2021-05-28 13:39:19 +02:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libcdio-paranoia
|
|
|
|
, cdrdao
|
|
|
|
, libsndfile
|
|
|
|
, flac
|
|
|
|
, sox
|
|
|
|
, util-linux
|
|
|
|
}:
|
2018-09-13 16:42:28 +02:00
|
|
|
|
2021-05-28 13:39:19 +02:00
|
|
|
let
|
|
|
|
bins = [ libcdio-paranoia cdrdao flac sox util-linux ];
|
|
|
|
in python3.pkgs.buildPythonApplication rec {
|
2019-12-14 04:21:44 +01:00
|
|
|
pname = "whipper";
|
2021-05-17 19:13:13 +02:00
|
|
|
version = "0.10.0";
|
2018-09-13 16:42:28 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-10-21 23:40:33 +02:00
|
|
|
owner = "whipper-team";
|
2018-09-13 16:42:28 +02:00
|
|
|
repo = "whipper";
|
2021-05-17 19:13:13 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "00cq03cy5dyghmibsdsq5sdqv3bzkzhshsng74bpnb5lasxp3ia5";
|
2018-09-13 16:42:28 +02:00
|
|
|
};
|
|
|
|
|
2021-05-28 13:39:19 +02:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
2021-06-03 12:09:11 +02:00
|
|
|
setuptools-scm
|
2021-05-28 13:39:19 +02:00
|
|
|
docutils
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2019-12-16 16:45:55 +01:00
|
|
|
musicbrainzngs
|
|
|
|
mutagen
|
|
|
|
pycdio
|
|
|
|
pygobject3
|
|
|
|
ruamel_yaml
|
2021-05-28 13:39:19 +02:00
|
|
|
discid
|
|
|
|
pillow
|
2018-09-13 16:42:28 +02:00
|
|
|
];
|
|
|
|
|
2019-12-14 04:21:44 +01:00
|
|
|
buildInputs = [ libsndfile ];
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
2018-09-13 16:42:28 +02:00
|
|
|
twisted
|
2021-05-28 13:39:19 +02:00
|
|
|
] ++ bins;
|
2018-09-13 16:42:28 +02:00
|
|
|
|
2018-12-01 01:35:25 +01:00
|
|
|
makeWrapperArgs = [
|
2021-05-28 13:39:19 +02:00
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath bins)
|
2018-12-01 01:35:25 +01:00
|
|
|
];
|
|
|
|
|
2019-12-14 04:21:44 +01:00
|
|
|
preBuild = ''
|
2019-12-16 16:45:55 +01:00
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
2019-12-14 04:21:44 +01:00
|
|
|
'';
|
|
|
|
|
2021-05-28 13:39:19 +02: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
|
2018-09-13 16:42:28 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/whipper-team/whipper";
|
2018-09-13 16:42:28 +02:00
|
|
|
description = "A CD ripper aiming for accuracy over speed";
|
2021-04-18 09:00:18 +02:00
|
|
|
maintainers = with maintainers; [ emily ];
|
2018-09-13 16:42:28 +02:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|