soundux package

This commit is contained in:
Daniel Olsen 2021-07-08 02:17:15 +02:00
parent 51f3211e61
commit b992454f76
2 changed files with 62 additions and 16 deletions

View File

@ -36,22 +36,6 @@ rec {
rust-synapse-compress-state = pkgs.callPackage ./pkgs/rust-synapse-compress-state { };
matrix-corporal = pkgs.callPackage ./pkgs/matrix-corporal { };
matrix-synapse = pkgs.matrix-synapse.overrideAttrs (oldAttrs: rec {
propagatedBuildInputs = oldAttrs.propagatedBuildInputs
++ [ ( pkgs.python3.pkgs.buildPythonPackage {
pname = "txredisapi";
version = "1.4.7";
src = pkgs.python3.pkgs.fetchPypi {
pname = "txredisapi";
version = "1.4.7";
sha256 = "1fqjr2z3wqgapa2fbxkr4vcf33ql1v9cgy58vjmhimim3vsl7k76";
};
propagatedBuildInputs = [ pkgs.python3.pkgs.twisted ];
})
pkgs.python3.pkgs.hiredis ];
});
rank_photos = pkgs.callPackage ./pkgs/rank_photos { };
# grav1 = pkgs.callPackage ./pkgs/grav1/server.nix { wsgiserver = wsgiserver; setuptools = pkgs.python3Packages.setuptools; };
@ -78,6 +62,8 @@ rec {
# this is just for language of the program
#libreoffice = pkgs.libreoffice.override { libreoffice = pkgs.libreoffice.libreoffice.override { langs = [ "nb" "nn" "en-GB" "en-US" ]; }; };
soundux = pkgs.callPackage ./pkgs/soundux { };
mesloNFp10k = pkgs.callPackage ./pkgs/fonts/MesloNFp10k.nix { };
wallpapers = pkgs.callPackage ./pkgs/wallpapers/monogatari { };
}

60
pkgs/soundux/default.nix Normal file
View File

@ -0,0 +1,60 @@
{
lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config, makeWrapper, wrapGAppsHook,
libappindicator-gtk3, openssl, pipewire, pulseaudio, webkitgtk, xorg,
libpulseaudio, libwnck3,
downloaderSupport ? true, ffmpeg, youtube-dl
}:
let
downloaderPath = lib.makeBinPath [ffmpeg youtube-dl ];
in
stdenv.mkDerivation rec {
pname = "soundux";
version = "0.2.7";
src = fetchFromGitHub {
owner = "Soundux";
repo = "Soundux";
rev = "0.2.7";
fetchSubmodules = true;
sha256 = "15kd9vl7inn8zm5cqzjkb6zb9xk2xxwpkm7fx1za3dy9m61sq839";
};
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
dontWrapGApps = true;
installPhase = ''
mkdir -p $out/opt $out/bin
cp -r dist soundux-${version} $out/opt
'';
# Soundux loads pipewire, pulse and libwnck optionally during runtime
postFixup = ''
makeWrapper $out/opt/soundux-${version} $out/bin/soundux \
--prefix LD_LIBRARY_PATH ":" ${lib.makeLibraryPath [libpulseaudio pipewire libwnck3 ]} \
"''${gappsWrapperArgs[@]}" \
${lib.optionalString downloaderSupport "--prefix PATH \":\" " + downloaderPath}
'';
nativeBuildInputs = [ cmake ninja pkg-config makeWrapper wrapGAppsHook ];
buildInputs = [
libappindicator-gtk3
openssl
pipewire
pulseaudio
webkitgtk
xorg.libX11
xorg.libXtst
];
meta = with lib; {
homepage = "https://soundux.rocks/";
description = "cross-platform soundboard";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ dandellion ];
};
}