2021-05-29 03:34:57 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libcdio-paranoia
|
|
|
|
, cdrdao
|
|
|
|
, libsndfile
|
|
|
|
, flac
|
|
|
|
, sox
|
|
|
|
, util-linux
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
let
|
|
|
|
bins = [ libcdio-paranoia cdrdao flac sox util-linux ];
|
|
|
|
in python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "whipper";
|
2021-05-28 09:39:13 +00:00
|
|
|
version = "0.10.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "whipper-team";
|
|
|
|
repo = "whipper";
|
2021-05-28 09:39:13 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "00cq03cy5dyghmibsdsq5sdqv3bzkzhshsng74bpnb5lasxp3ia5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
2021-06-04 09:07:49 +00:00
|
|
|
setuptools-scm
|
2021-05-29 03:34:57 +00:00
|
|
|
docutils
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2020-04-24 23:36:52 +00:00
|
|
|
musicbrainzngs
|
|
|
|
mutagen
|
|
|
|
pycdio
|
|
|
|
pygobject3
|
|
|
|
ruamel_yaml
|
2021-05-29 03:34:57 +00:00
|
|
|
discid
|
|
|
|
pillow
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ libsndfile ];
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
twisted
|
2021-05-29 03:34:57 +00:00
|
|
|
] ++ bins;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
makeWrapperArgs = [
|
2021-05-29 03:34:57 +00:00
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath bins)
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
|
|
|
'';
|
|
|
|
|
2021-05-29 03:34:57 +00: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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/whipper-team/whipper";
|
|
|
|
description = "A CD ripper aiming for accuracy over speed";
|
2021-04-19 03:05:28 +00:00
|
|
|
maintainers = with maintainers; [ emily ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|