nixpkgs/pkgs/applications/audio/cozy-audiobooks/default.nix

83 lines
1.6 KiB
Nix
Raw Normal View History

2018-10-02 00:17:42 +02:00
{ stdenv, fetchFromGitHub
, ninja
, meson
, pkgconfig
, wrapGAppsHook
, appstream-glib
, desktop-file-utils
, gtk3
, gst_all_1
, gobject-introspection
2018-10-02 00:17:42 +02:00
, python3Packages
, file
, cairo
, gettext
, gnome3
}:
python3Packages.buildPythonApplication rec {
format = "other"; # no setup.py
2019-01-13 08:46:10 +01:00
pname = "cozy";
version = "0.6.7";
2018-10-02 00:17:42 +02:00
# Temporary fix
# See https://github.com/NixOS/nixpkgs/issues/57029
# and https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;
2018-10-02 00:17:42 +02:00
src = fetchFromGitHub {
owner = "geigi";
2019-01-13 08:46:10 +01:00
repo = pname;
2018-10-02 00:17:42 +02:00
rev = version;
2019-01-13 08:46:10 +01:00
sha256 = "0f8dyqj6111czn8spgsnic1fqs3kimjwl1b19mw55fa924b9bhsa";
2018-10-02 00:17:42 +02:00
};
nativeBuildInputs = [
meson ninja pkgconfig
wrapGAppsHook
appstream-glib
desktop-file-utils
gobject-introspection
2018-10-02 00:17:42 +02:00
];
buildInputs = [
gtk3
cairo
gettext
2019-02-13 22:47:50 +01:00
gnome3.adwaita-icon-theme
2018-10-02 00:17:42 +02:00
] ++ (with gst_all_1; [
gstreamer
gst-plugins-good
gst-plugins-ugly
gst-plugins-base
]);
propagatedBuildInputs = with python3Packages; [
gst-python
pygobject3
dbus-python
mutagen
peewee
magic
];
postPatch = ''
chmod +x data/meson_post_install.py
patchShebangs data/meson_post_install.py
substituteInPlace cozy/magic/magic.py --replace "ctypes.util.find_library('magic')" "'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
'';
postInstall = ''
ln -s $out/bin/com.github.geigi.cozy $out/bin/cozy
'';
meta = with stdenv.lib; {
description = "A modern audio book player for Linux using GTK 3";
homepage = "https://cozy.geigi.de/";
2018-10-02 00:17:42 +02:00
maintainers = [ maintainers.makefu ];
license = licenses.gpl3;
};
}