summary refs log tree commit diff
path: root/pkgs/development/python-modules/pysoundfile
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-10-29 13:23:55 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2017-10-29 13:42:11 +0100
commit16d0a334c86cb580afcca2b13c0c7714c5158bbd (patch)
tree839d9c56a88b661bec1c732c301ed803360cb47f /pkgs/development/python-modules/pysoundfile
parentd4bf9684b78141f7310e22dafabbfdbb6fae4f81 (diff)
downloadnixlib-16d0a334c86cb580afcca2b13c0c7714c5158bbd.tar
nixlib-16d0a334c86cb580afcca2b13c0c7714c5158bbd.tar.gz
nixlib-16d0a334c86cb580afcca2b13c0c7714c5158bbd.tar.bz2
nixlib-16d0a334c86cb580afcca2b13c0c7714c5158bbd.tar.lz
nixlib-16d0a334c86cb580afcca2b13c0c7714c5158bbd.tar.xz
nixlib-16d0a334c86cb580afcca2b13c0c7714c5158bbd.tar.zst
nixlib-16d0a334c86cb580afcca2b13c0c7714c5158bbd.zip
python.pkgs.pysoundfile: move expression
Diffstat (limited to 'pkgs/development/python-modules/pysoundfile')
-rw-r--r--pkgs/development/python-modules/pysoundfile/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pysoundfile/default.nix b/pkgs/development/python-modules/pysoundfile/default.nix
new file mode 100644
index 000000000000..fe24f0203f0d
--- /dev/null
+++ b/pkgs/development/python-modules/pysoundfile/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytest
+, numpy
+, libsndfile
+, cffi
+, isPyPy
+, stdenv
+}:
+
+buildPythonPackage rec {
+  pname = "PySoundFile";
+  name = "PySoundFile-${version}";
+  version = "0.8.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "72c3e23b7c9998460ec78176084ea101e3439596ab29df476bc8508708df84df";
+  };
+
+    checkInputs = [ pytest ];
+    propagatedBuildInputs = [ numpy libsndfile cffi ];
+
+    meta = {
+      description = "An audio library based on libsndfile, CFFI and NumPy";
+      license = lib.licenses.bsd3;
+      homepage = https://github.com/bastibe/PySoundFile;
+      maintainers = with lib.maintainers; [ fridh ];
+    };
+
+    prePatch = ''
+      substituteInPlace soundfile.py --replace "'sndfile'" "'${libsndfile.out}/lib/libsndfile.so'"
+    '';
+
+    # https://github.com/bastibe/PySoundFile/issues/157
+    disabled = isPyPy ||  stdenv.isi686;
+}
\ No newline at end of file