nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 90 lines 1.7 kB view raw
1{ 2 mkDerivation, 3 cmake, 4 fetchFromGitLab, 5 nix-update-script, 6 gst_all_1, 7 lib, 8 libpulseaudio, 9 ninja, 10 pcre, 11 pkg-config, 12 qtbase, 13 qttools, 14 taglib, 15 zlib, 16 python3, 17}: 18 19let 20 py = python3.withPackages ( 21 ps: with ps; [ 22 pydbus 23 ] 24 ); 25in 26mkDerivation rec { 27 pname = "sayonara"; 28 version = "1.10.0-stable1"; 29 30 src = fetchFromGitLab { 31 owner = "luciocarreras"; 32 repo = "sayonara-player"; 33 rev = version; 34 hash = "sha256-ZcuWe1dsLJS4/nLXSSKB7wzPU9COFyE4vPSwZIo0bgI="; 35 }; 36 37 # error: no matching function for call to 'max' 38 postPatch = '' 39 substituteInPlace src/Components/Playlist/PlaylistModifiers.cpp \ 40 --replace-fail "std::max" "std::max<MilliSeconds>" 41 ''; 42 43 nativeBuildInputs = [ 44 cmake 45 ninja 46 pkg-config 47 qttools 48 ]; 49 50 buildInputs = [ 51 libpulseaudio 52 pcre 53 qtbase 54 taglib 55 zlib 56 py 57 ] 58 ++ (with gst_all_1; [ 59 gstreamer 60 gst-plugins-base 61 gst-plugins-good 62 gst-plugins-bad 63 gst-plugins-ugly 64 ]); 65 66 # we carry the patched taglib 1.11.1 that doesn't break ogg but sayonara just 67 # checks for the version 68 cmakeFlags = [ 69 "-DWITH_SYSTEM_TAGLIB=ON" 70 ]; 71 72 # gstreamer cannot otherwise be found 73 env.NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"; 74 75 postInstall = '' 76 qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0") 77 ''; 78 79 passthru = { 80 updateScript = nix-update-script { }; 81 }; 82 83 meta = with lib; { 84 description = "Sayonara music player"; 85 homepage = "https://sayonara-player.com/"; 86 license = licenses.gpl3; 87 maintainers = with maintainers; [ deepfire ]; 88 platforms = platforms.unix; 89 }; 90}