1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-13 16:15:30 +00:00
nixpkgs/pkgs/applications/audio/whipper/default.nix

82 lines
1.9 KiB
Nix
Raw Normal View History

2021-05-28 12:39:19 +01:00
{ lib
, python3
, fetchFromGitHub
, fetchpatch
2021-05-28 12:39:19 +01:00
, libcdio-paranoia
, cdrdao
, libsndfile
, flac
, sox
, util-linux
}:
2021-05-28 12:39:19 +01:00
let
bins = [ libcdio-paranoia cdrdao flac sox util-linux ];
in python3.pkgs.buildPythonApplication rec {
2019-12-14 03:21:44 +00:00
pname = "whipper";
2021-05-17 18:13:13 +01:00
version = "0.10.0";
src = fetchFromGitHub {
2018-10-21 22:40:33 +01:00
owner = "whipper-team";
repo = "whipper";
2021-05-17 18:13:13 +01:00
rev = "v${version}";
sha256 = "00cq03cy5dyghmibsdsq5sdqv3bzkzhshsng74bpnb5lasxp3ia5";
};
patches = [
(fetchpatch {
# Use custom YAML subclass to be compatible with ruamel_yaml>=0.17
# https://github.com/whipper-team/whipper/pull/543
url = "https://github.com/whipper-team/whipper/commit/3ce5964dfe8be1e625c3e3b091360dd0bc34a384.patch";
sha256 = "0n9dmib884y8syvypsg88j0h71iy42n1qsrh0am8pwna63sl15ah";
})
];
2021-05-28 12:39:19 +01:00
nativeBuildInputs = with python3.pkgs; [
setuptools-scm
2021-05-28 12:39:19 +01:00
docutils
];
propagatedBuildInputs = with python3.pkgs; [
2019-12-16 15:45:55 +00:00
musicbrainzngs
mutagen
pycdio
pygobject3
ruamel-yaml
2021-05-28 12:39:19 +01:00
discid
pillow
];
2019-12-14 03:21:44 +00:00
buildInputs = [ libsndfile ];
checkInputs = with python3.pkgs; [
twisted
2021-05-28 12:39:19 +01:00
] ++ bins;
2018-12-01 00:35:25 +00:00
makeWrapperArgs = [
2021-05-28 12:39:19 +01:00
"--prefix" "PATH" ":" (lib.makeBinPath bins)
2018-12-01 00:35:25 +00:00
];
2019-12-14 03:21:44 +00:00
preBuild = ''
2019-12-16 15:45:55 +00:00
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
2019-12-14 03:21:44 +00:00
'';
2021-05-28 12:39:19 +01:00
checkPhase = ''
runHook preCheck
# disable tests that require internet access
# https://github.com/JoeLametta/whipper/issues/291
substituteInPlace whipper/test/test_common_accurip.py \
--replace "test_AccurateRipResponse" "dont_test_AccurateRipResponse"
HOME=$TMPDIR ${python3.interpreter} -m unittest discover
runHook postCheck
'';
meta = with lib; {
homepage = "https://github.com/whipper-team/whipper";
description = "A CD ripper aiming for accuracy over speed";
2021-04-18 08:00:18 +01:00
maintainers = with maintainers; [ emily ];
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
}