about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/friture
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-10-19 14:40:23 +0000
committerAlyssa Ross <hi@alyssa.is>2022-01-07 10:22:32 +0000
commitcc62bcb55359ba8c5e0fe3a48e778444c89060d8 (patch)
treeca0e21d44eaf8837b687395e614445f7761d7bbd /nixpkgs/pkgs/applications/audio/friture
parentd6625e8d25efd829c3cfa227d025ca4e606ae4b7 (diff)
parenta323570a264da96a0b0bcc1c9aa017794acdc752 (diff)
downloadnixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.gz
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.bz2
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.lz
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.xz
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.zst
nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.zip
Merge commit 'a323570a264da96a0b0bcc1c9aa017794acdc752'
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/friture')
-rw-r--r--nixpkgs/pkgs/applications/audio/friture/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/friture/unlock_constraints.patch34
2 files changed, 27 insertions, 39 deletions
diff --git a/nixpkgs/pkgs/applications/audio/friture/default.nix b/nixpkgs/pkgs/applications/audio/friture/default.nix
index 8383bdbebc67..7918ea178917 100644
--- a/nixpkgs/pkgs/applications/audio/friture/default.nix
+++ b/nixpkgs/pkgs/applications/audio/friture/default.nix
@@ -1,16 +1,16 @@
-{ lib, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
+{ lib, fetchFromGitHub, fetchpatch, python3Packages, wrapQtAppsHook }:
 
 let
   py = python3Packages;
 in py.buildPythonApplication rec {
   pname = "friture";
-  version = "0.47";
+  version = "0.48";
 
   src = fetchFromGitHub {
     owner = "tlecomte";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1qcsvmgdz9hhv5gaa918147wvng6manc4iq8ci6yr761ljqrgwjx";
+    sha256 = "sha256-oOH58jD49xAeSuP+l6tYUpwkYsnfeSGTt8x4DFzTY6g=";
   };
 
   nativeBuildInputs = (with py; [ numpy cython scipy ]) ++
@@ -29,18 +29,40 @@ in py.buildPythonApplication rec {
   ];
 
   patches = [
-    ./unlock_constraints.patch
+    # Backported fix that resolves an issue with setuptools packaging
+    (fetchpatch {
+      name = "fix-setuptools-packaging.patch";
+      url = "https://github.com/tlecomte/friture/commit/ea7210dae883edf17de8fec82f9428b18ee138b6.diff";
+      sha256 = "sha256-Kv/vmC8kcqfOgfIPQyZN46sbV6bezhq6pyj8bvke6s8=";
+    })
   ];
 
+  postPatch = ''
+    # Remove version constraints from Python dependencies in setup.py
+    sed -i -E "s/\"([A-Za-z0-9]+)(=|>|<)=[0-9\.]+\"/\"\1\"/g" setup.py
+  '';
+
   preFixup = ''
     makeWrapperArgs+=("''${qtWrapperArgs[@]}")
   '';
 
+  postInstall = ''
+    substituteInPlace $out/share/applications/friture.desktop --replace usr/bin/friture friture
+
+    for size in 16 32 128 256 512
+    do
+      mkdir -p $out/share/icons/hicolor/$size\x$size
+      cp $src/resources/images/friture.iconset/icon_$size\x$size.png $out/share/icons/hicolor/$size\x$size/friture.png
+    done
+    mkdir -p $out/share/icons/hicolor/scalable/apps/
+    cp $src/resources/images-src/window-icon.svg $out/share/icons/hicolor/scalable/apps/friture.svg
+  '';
+
   meta = with lib; {
     description = "A real-time audio analyzer";
     homepage = "https://friture.org/";
     license = licenses.gpl3;
     platforms = platforms.linux; # fails on Darwin
-    maintainers = [ maintainers.laikq ];
+    maintainers = with maintainers; [ laikq alyaeanyx ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/audio/friture/unlock_constraints.patch b/nixpkgs/pkgs/applications/audio/friture/unlock_constraints.patch
deleted file mode 100644
index 6ee474794b2b..000000000000
--- a/nixpkgs/pkgs/applications/audio/friture/unlock_constraints.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 4092388..6cb7dac 100644
---- a/setup.py
-+++ b/setup.py
-@@ -50,19 +50,19 @@ ext_modules = [LateIncludeExtension("friture_extensions.exp_smoothing_conv",
- # these will be installed when calling 'pip install friture'
- # they are also retrieved by 'requirements.txt'
- install_requires = [
--    "sounddevice==0.4.2",
--    "rtmixer==0.1.3",
--    "PyOpenGL==3.1.5",
--    "PyOpenGL-accelerate==3.1.5",
--    "docutils==0.17.1",
--    "numpy==1.21.1",
--    "PyQt5==5.15.4",
--    "appdirs==1.4.4",
--    "pyrr==0.10.3",
-+    "sounddevice>=0.4.1",
-+    "rtmixer>=0.1.1",
-+    "PyOpenGL>=3.1.4",
-+    "PyOpenGL-accelerate>=3.1.5",
-+    "docutils>=0.17.1",
-+    "numpy>=1.20.3",
-+    "PyQt5>=5.15.4",
-+    "appdirs>=1.4.4",
-+    "pyrr>=0.10.3",
- ]
- 
- # Cython and numpy are needed when running setup.py, to build extensions
--setup_requires=["numpy==1.21.1", "Cython==0.29.24"]
-+setup_requires=["numpy>=1.20.3", "Cython>=0.29.22"]
- 
- with open(join(dirname(__file__), 'README.rst')) as f:
-     long_description = f.read()