sayonara: 1.1.1 -> 1.5.1

This commit is contained in:
Peter Hoeg 2019-08-27 19:07:41 +08:00
parent 65000c0ff8
commit aba7db77e9
2 changed files with 72 additions and 36 deletions

View File

@ -1,46 +1,82 @@
{ stdenv, fetchurl, cmake, qt5, zlib, taglib, pkgconfig, pcre, gst_all_1 }:
{ mkDerivation
, cmake
, fetchgit
, gst_all_1
, lib
, libpulseaudio
, ninja
, pcre
, pkgconfig
, qtbase
, qttools
, taglib
, zlib
}:
let
version = "1.1.1-git1-20180828";
in
stdenv.mkDerivation {
mkDerivation rec {
pname = "sayonara-player";
inherit version;
version = "1.5.1-stable5";
src = fetchurl {
url = "https://sayonara-player.com/sw/sayonara-player-${version}.tar.gz";
sha256 = "0rvy47qvavrp03zjdrw025dmq9fq5aaii3q1qq8b94byarl0c5kn";
src = fetchgit {
url = "https://git.sayonara-player.com/sayonara.git";
rev = version;
sha256 = "13l7r3gaszrkyf4z8rdijfzxvcnilax4ki2mcm30wqk8d4g4qdzj";
};
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = with qt5; with gst_all_1;
[ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly
pcre qtbase qttools taglib zlib
];
# CMake Error at src/GUI/Resources/Icons/cmake_install.cmake:49 (file):
# file cannot create directory: /usr/share/icons. Maybe need administrative
# privileges.
# Call Stack (most recent call first):
# src/GUI/Resources/cmake_install.cmake:50 (include)
# src/GUI/cmake_install.cmake:50 (include)
# src/cmake_install.cmake:59 (include)
# cmake_install.cmake:42 (include)
# all this can go with version 1.5.2
postPatch = ''
substituteInPlace src/GUI/Resources/Icons/CMakeLists.txt \
--replace "/usr/share" "$out/share"
# if we don't delete this, sayonara will look here instead of the provided taglib
rm -r src/3rdParty/taglib
for f in \
src/DBus/DBusNotifications.cpp \
src/Gui/Resources/Icons/CMakeLists.txt \
src/Utils/Utils.cpp \
test/Util/FileHelperTest.cpp \
; do
substituteInPlace $f --replace /usr $out
done
substituteInPlace src/Components/Shutdown/Shutdown.cpp \
--replace /usr/bin/systemctl systemctl
'';
# [ 65%] Building CXX object src/Components/Engine/CMakeFiles/say_comp_engine.dir/AbstractPipeline.cpp.o
# /tmp/nix-build-sayonara-player-1.0.0-git5-20180115.drv-0/sayonara-player/src/Components/Engine/AbstractPipeline.cpp:28:32: fatal error: gst/app/gstappsink.h: No such file or directory
# #include <gst/app/gstappsink.h>
nativeBuildInputs = [ cmake ninja pkgconfig qttools ];
buildInputs = [
libpulseaudio
pcre
qtbase
taglib
zlib
]
++ (with gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
]);
# we carry the patched taglib 1.11.1 that doesn't break ogg but sayonara just
# checks for the version
cmakeFlags = [
"-DWITH_SYSTEM_TAGLIB=ON"
];
# gstreamer cannot otherwise be found
NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0";
meta = with stdenv.lib;
{ description = "Sayonara music player";
homepage = https://sayonara-player.com/;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ maintainers.deepfire ];
};
postInstall = ''
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
'';
meta = with lib; {
description = "Sayonara music player";
homepage = "https://sayonara-player.com/";
license = licenses.gpl3;
maintainers = with maintainers; [ deepfire ];
platforms = platforms.unix;
};
}

View File

@ -20384,7 +20384,7 @@ in
sakura = callPackage ../applications/misc/sakura { };
sayonara = callPackage ../applications/audio/sayonara { };
sayonara = libsForQt5.callPackage ../applications/audio/sayonara { };
sbagen = callPackage ../applications/misc/sbagen { };