nixpkgs/pkgs/development/python-modules/wavefile/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

59 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pyaudio,
numpy,
libsndfile,
replaceVars,
}:
buildPythonPackage rec {
pname = "wavefile";
version = "1.6.2";
pyproject = true;
src = fetchFromGitHub {
owner = "vokimon";
repo = "python-wavefile";
tag = "python-wavefile-${version}";
hash = "sha256-TLSWhLARY+3sHkl2p3d3LDGzLu6DggjTJWFpyrwRXSI=";
};
nativeBuildInputs = [ setuptools ];
buildInputs = [
pyaudio
libsndfile
];
propagatedBuildInputs = [ numpy ];
nativeCheckInputs = [
pyaudio
numpy
libsndfile
];
patches = [
# Fix check error
# OSError: libsndfile.so.1: cannot open shared object file: No such file or directory
(replaceVars ./libsndfile.py.patch {
libsndfile = "${lib.getLib libsndfile}/lib/libsndfile${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];
doCheck = false; # all test files (test/wavefileTest.py) are failing
pythonImportsCheck = [ "wavefile" ];
meta = {
description = "Pythonic libsndfile wrapper to read and write audio files";
homepage = "https://github.com/vokimon/python-wavefile";
changelog = "https://github.com/vokimon/python-wavefile#version-history";
maintainers = [ ];
license = lib.licenses.gpl3Plus;
};
}