about summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2023-01-26 00:43:18 +0100
committerGitHub <noreply@github.com>2023-01-26 00:43:18 +0100
commit83c940e4399b3861e794806cd5c8721b06fcd5a8 (patch)
tree45599f24ae8e6e0614aebf3e126f4013dd090790 /pkgs/applications/audio
parenta9ee2b37506f9a52587ecf3df5fb9acb209ac476 (diff)
parent83f2d1f1e9349d58ee13de39ced75a8d3d4419d0 (diff)
Merge pull request #212425 from fabaff/sublime-music-fix
sublime-music: remove python-Levenshtein
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/sublime-music/default.nix39
1 files changed, 23 insertions, 16 deletions
diff --git a/pkgs/applications/audio/sublime-music/default.nix b/pkgs/applications/audio/sublime-music/default.nix
index cedad6ef17e77..d469c9689a5d8 100644
--- a/pkgs/applications/audio/sublime-music/default.nix
+++ b/pkgs/applications/audio/sublime-music/default.nix
@@ -1,5 +1,5 @@
-{ fetchFromGitLab
-, lib
+{ lib
+, fetchFromGitLab
 , python3Packages
 , gobject-introspection
 , gtk3
@@ -9,8 +9,10 @@
 , chromecastSupport ? false
 , serverSupport ? false
 , keyringSupport ? true
-, notifySupport ? true, libnotify
-, networkSupport ? true, networkmanager
+, notifySupport ? true
+, libnotify
+, networkSupport ? true
+, networkmanager
 }:
 
 python3Packages.buildPythonApplication rec {
@@ -21,8 +23,8 @@ python3Packages.buildPythonApplication rec {
   src = fetchFromGitLab {
     owner = "sublime-music";
     repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-n77mTgElwwFaX3WQL8tZzbkPwnsyQ08OW9imSOjpBlg=";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-n77mTgElwwFaX3WQL8tZzbkPwnsyQ08OW9imSOjpBlg=";
   };
 
   nativeBuildInputs = [
@@ -38,12 +40,21 @@ python3Packages.buildPythonApplication rec {
     "python-mpv"
   ];
 
+  postPatch = ''
+    sed -i "/--cov/d" setup.cfg
+    sed -i "/--no-cov-on-fail/d" setup.cfg
+    # https://github.com/sublime-music/sublime-music/pull/370
+    # Can be removed in later versions (probably > 0.11.16)
+    substituteInPlace pyproject.toml \
+      --replace 'python-Levenshtein = "^0.12.0"' 'Levenshtein = ">0.12.0"'
+  '';
+
   buildInputs = [
     gtk3
     pango
   ]
-   ++ lib.optional notifySupport libnotify
-   ++ lib.optional networkSupport networkmanager
+  ++ lib.optional notifySupport libnotify
+  ++ lib.optional networkSupport networkmanager
   ;
 
   propagatedBuildInputs = with python3Packages; [
@@ -59,16 +70,11 @@ python3Packages.buildPythonApplication rec {
     requests
     semver
   ]
-   ++ lib.optional chromecastSupport PyChromecast
-   ++ lib.optional keyringSupport keyring
-   ++ lib.optional serverSupport bottle
+  ++ lib.optional chromecastSupport PyChromecast
+  ++ lib.optional keyringSupport keyring
+  ++ lib.optional serverSupport bottle
   ;
 
-  postPatch = ''
-    sed -i "/--cov/d" setup.cfg
-    sed -i "/--no-cov-on-fail/d" setup.cfg
-  '';
-
   # hook for gobject-introspection doesn't like strictDeps
   # https://github.com/NixOS/nixpkgs/issues/56943
   strictDeps = false;
@@ -98,6 +104,7 @@ python3Packages.buildPythonApplication rec {
   meta = with lib; {
     description = "GTK3 Subsonic/Airsonic client";
     homepage = "https://sublimemusic.app/";
+    changelog = "https://github.com/sublime-music/sublime-music/blob/v${version}/CHANGELOG.rst";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ albakham sumnerevans ];
   };