about summary refs log tree commit diff
path: root/pkgs/applications/audio/cozy
diff options
context:
space:
mode:
authoraleksana <me@aleksana.moe>2024-04-06 01:53:16 +0800
committeraleksana <me@aleksana.moe>2024-04-06 21:39:41 +0800
commitcc1ef6b3cb54702c92bf35fe7beeccbd43cf2905 (patch)
treefa9165b8420cc5fedd6979eb3dc461ed67412802 /pkgs/applications/audio/cozy
parent67e2bc037137e4fdcf6b3132a4f54c165726500b (diff)
cozy: clean up and misc fixes
Diffstat (limited to 'pkgs/applications/audio/cozy')
-rw-r--r--pkgs/applications/audio/cozy/default.nix55
1 files changed, 21 insertions, 34 deletions
diff --git a/pkgs/applications/audio/cozy/default.nix b/pkgs/applications/audio/cozy/default.nix
index e07217567d340..36bd542eee751 100644
--- a/pkgs/applications/audio/cozy/default.nix
+++ b/pkgs/applications/audio/cozy/default.nix
@@ -1,52 +1,41 @@
-{ lib, fetchFromGitHub
-, ninja
+{ lib
+, python3Packages
+, fetchFromGitHub
 , meson
+, ninja
 , pkg-config
-, wrapGAppsHook
+, wrapGAppsHook4
 , appstream-glib
 , desktop-file-utils
-, gtk3
-, gst_all_1
 , gobject-introspection
 , libadwaita
-, libdazzle
-, python3Packages
-, cairo
-, gettext
-, gnome
-, pantheon
+, gst_all_1
 }:
 
 python3Packages.buildPythonApplication rec {
-
-  format = "other"; # no setup.py
-
   pname = "cozy";
   version = "1.3.0";
+  pyproject = false; # built with meson
 
   src = fetchFromGitHub {
     owner = "geigi";
-    repo = pname;
+    repo = "cozy";
     rev = version;
     hash = "sha256-oMgdz2dny0u1XV13aHu5s8/pcAz8z/SAOf4hbCDsdjw";
   };
 
   nativeBuildInputs = [
-    meson ninja pkg-config
-    wrapGAppsHook
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook4
     appstream-glib
     desktop-file-utils
     gobject-introspection
   ];
 
   buildInputs = [
-    gtk3
-    cairo
-    gettext
-    gnome.adwaita-icon-theme
     libadwaita
-    libdazzle
-    pantheon.granite
   ] ++ (with gst_all_1; [
     gstreamer
     gst-plugins-good
@@ -56,32 +45,30 @@ python3Packages.buildPythonApplication rec {
   ]);
 
   propagatedBuildInputs = with python3Packages; [
-    apsw
-    cairo
-    dbus-python
     distro
-    gst-python
-    magic
     mutagen
-    packaging
     peewee
     pygobject3
     pytz
     requests
   ];
 
-  postPatch = ''
-    patchShebangs meson/*.py
+  dontWrapGApps = true;
+
+  preFixup = ''
+    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
   '';
 
-  postInstall = ''
+  postFixup = ''
     ln -s $out/bin/com.github.geigi.cozy $out/bin/cozy
   '';
 
   meta = with lib; {
-    description = "A modern audio book player for Linux using GTK 3";
+    description = "A modern audio book player for Linux";
     homepage = "https://cozy.geigi.de/";
     maintainers = [ maintainers.makefu ];
-    license = licenses.gpl3;
+    license = licenses.gpl3Plus;
+    mainProgram = "com.github.geigi.cozy";
+    platforms = platforms.linux;
   };
 }