summary refs log tree commit diff
path: root/pkgs/applications/audio/sublime-music/default.nix
diff options
context:
space:
mode:
authorSumner Evans <me@sumnerevans.com>2021-04-19 02:24:57 -0600
committerGitHub <noreply@github.com>2021-04-19 10:24:57 +0200
commit80b600af2998bab1b89f1673002c94da29952bfb (patch)
treeeebacc85af5af55649e37e0e4b42fb00976ec697 /pkgs/applications/audio/sublime-music/default.nix
parent8dbf8818eb1616472c030782ebc3e863e41012a7 (diff)
downloadnixpkgs-80b600af2998bab1b89f1673002c94da29952bfb.tar
nixpkgs-80b600af2998bab1b89f1673002c94da29952bfb.tar.gz
nixpkgs-80b600af2998bab1b89f1673002c94da29952bfb.tar.bz2
nixpkgs-80b600af2998bab1b89f1673002c94da29952bfb.tar.lz
nixpkgs-80b600af2998bab1b89f1673002c94da29952bfb.tar.xz
nixpkgs-80b600af2998bab1b89f1673002c94da29952bfb.tar.zst
nixpkgs-80b600af2998bab1b89f1673002c94da29952bfb.zip
sublime-music: 0.11.10 -> 0.11.11 (#119204)
Diffstat (limited to 'pkgs/applications/audio/sublime-music/default.nix')
-rw-r--r--pkgs/applications/audio/sublime-music/default.nix37
1 files changed, 31 insertions, 6 deletions
diff --git a/pkgs/applications/audio/sublime-music/default.nix b/pkgs/applications/audio/sublime-music/default.nix
index f584b13a292..15963faf06b 100644
--- a/pkgs/applications/audio/sublime-music/default.nix
+++ b/pkgs/applications/audio/sublime-music/default.nix
@@ -1,4 +1,12 @@
-{ fetchFromGitLab, lib, python3Packages, gobject-introspection, gtk3, pango, wrapGAppsHook
+{ fetchFromGitLab
+, fetchpatch
+, lib
+, python3Packages
+, gobject-introspection
+, gtk3
+, pango
+, wrapGAppsHook
+, xvfb_run
 , chromecastSupport ? false
 , serverSupport ? false
 , keyringSupport ? true
@@ -8,18 +16,29 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "sublime-music";
-  version = "0.11.10";
+  version = "0.11.11";
+  format = "pyproject";
 
   src = fetchFromGitLab {
     owner = "sublime-music";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1g78gmiywg07kaywfc9q0yab2bzxs936vb3157ni1z0flbmcwrry";
+    sha256 = "sha256-r4Tn/7CGDny8Aa4kF4PM5ZKMYthMJ7801X3zPdvXh4Q=";
   };
 
+  patches = [
+    # Switch to poetry-core:
+    # https://gitlab.com/sublime-music/sublime-music/-/merge_requests/60
+    (fetchpatch {
+      name = "use-poetry-core.patch";
+      url = "https://gitlab.com/sublime-music/sublime-music/-/commit/9b0af19dbdfdcc5a0fa23e73bb34c7135a8c2855.patch";
+      sha256 = "sha256-cXG0RvrnBpme6yKWM0nfqMqoK0qPT6spflJ9AaaslVg=";
+    })
+  ];
+
   nativeBuildInputs = [
     gobject-introspection
-    python3Packages.setuptools
+    python3Packages.poetry-core
     wrapGAppsHook
   ];
 
@@ -53,8 +72,14 @@ python3Packages.buildPythonApplication rec {
   # https://github.com/NixOS/nixpkgs/issues/56943
   strictDeps = false;
 
-  # no tests
-  doCheck = false;
+  # Use the test suite provided by the upstream project.
+  checkInputs = with python3Packages; [
+    pytest
+    pytest-cov
+  ];
+  checkPhase = "${xvfb_run}/bin/xvfb-run pytest";
+
+  # Also run the python import check for sanity
   pythonImportsCheck = [ "sublime_music" ];
 
   postInstall = ''