depot/third_party/nixpkgs/pkgs/development/python-modules/pydub/default.nix
Default email 9405df4a82 Project import generated by Copybara.
GitOrigin-RevId: 8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17
2021-04-26 15:14:03 -04:00

33 lines
918 B
Nix

{ lib, stdenv, buildPythonPackage, fetchFromGitHub, scipy, ffmpeg-full }:
buildPythonPackage rec {
pname = "pydub";
version = "0.25.1";
# pypi version doesn't include required data files for tests
src = fetchFromGitHub {
owner = "jiaaro";
repo = pname;
rev = "v${version}";
sha256 = "0xskllq66wqndjfmvp58k26cv3w480sqsil6ifwp4gghir7hqc8m";
};
# disable a test that fails on aarch64 due to rounding errors
postPatch = lib.optionalString stdenv.isAarch64 ''
substituteInPlace test/test.py \
--replace "test_overlay_with_gain_change" "notest_overlay_with_gain_change"
'';
checkInputs = [ scipy ffmpeg-full ];
checkPhase = ''
python test/test.py
'';
meta = with lib; {
description = "Manipulate audio with a simple and easy high level interface.";
homepage = "http://pydub.com/";
license = licenses.mit;
platforms = platforms.all;
};
}