Merge pull request #124759 from dotlambda/whipper-fix
[21.05] whipper: fix
This commit is contained in:
commit
c258bb29a3
@ -1,7 +1,17 @@
|
|||||||
{ lib, fetchFromGitHub, python3, cdparanoia, cdrdao, flac
|
{ lib
|
||||||
, sox, accuraterip-checksum, libsndfile, util-linux, substituteAll }:
|
, python3
|
||||||
|
, fetchFromGitHub
|
||||||
|
, libcdio-paranoia
|
||||||
|
, cdrdao
|
||||||
|
, libsndfile
|
||||||
|
, flac
|
||||||
|
, sox
|
||||||
|
, util-linux
|
||||||
|
}:
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
let
|
||||||
|
bins = [ libcdio-paranoia cdrdao flac sox util-linux ];
|
||||||
|
in python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "whipper";
|
pname = "whipper";
|
||||||
version = "0.10.0";
|
version = "0.10.0";
|
||||||
|
|
||||||
@ -12,44 +22,43 @@ python3.pkgs.buildPythonApplication rec {
|
|||||||
sha256 = "00cq03cy5dyghmibsdsq5sdqv3bzkzhshsng74bpnb5lasxp3ia5";
|
sha256 = "00cq03cy5dyghmibsdsq5sdqv3bzkzhshsng74bpnb5lasxp3ia5";
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonPath = with python3.pkgs; [
|
nativeBuildInputs = with python3.pkgs; [
|
||||||
|
setuptools_scm
|
||||||
|
docutils
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
musicbrainzngs
|
musicbrainzngs
|
||||||
mutagen
|
mutagen
|
||||||
pycdio
|
pycdio
|
||||||
pygobject3
|
pygobject3
|
||||||
requests
|
|
||||||
ruamel_yaml
|
ruamel_yaml
|
||||||
setuptools
|
discid
|
||||||
setuptools_scm
|
pillow
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ libsndfile ];
|
buildInputs = [ libsndfile ];
|
||||||
|
|
||||||
checkInputs = with python3.pkgs; [
|
checkInputs = with python3.pkgs; [
|
||||||
twisted
|
twisted
|
||||||
];
|
] ++ bins;
|
||||||
|
|
||||||
patches = [
|
|
||||||
(substituteAll {
|
|
||||||
src = ./paths.patch;
|
|
||||||
inherit cdparanoia;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
"--prefix" "PATH" ":" (lib.makeBinPath [ accuraterip-checksum cdrdao util-linux flac sox ])
|
"--prefix" "PATH" ":" (lib.makeBinPath bins)
|
||||||
];
|
];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# some tests require internet access
|
checkPhase = ''
|
||||||
# https://github.com/JoeLametta/whipper/issues/291
|
runHook preCheck
|
||||||
doCheck = false;
|
# disable tests that require internet access
|
||||||
|
# https://github.com/JoeLametta/whipper/issues/291
|
||||||
preCheck = ''
|
substituteInPlace whipper/test/test_common_accurip.py \
|
||||||
HOME=$TMPDIR
|
--replace "test_AccurateRipResponse" "dont_test_AccurateRipResponse"
|
||||||
|
HOME=$TMPDIR ${python3.interpreter} -m unittest discover
|
||||||
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
--- a/whipper/program/cdparanoia.py
|
|
||||||
+++ b/whipper/program/cdparanoia.py
|
|
||||||
@@ -280,10 +280,10 @@
|
|
||||||
|
|
||||||
bufsize = 1024
|
|
||||||
if self._overread:
|
|
||||||
- argv = ["cd-paranoia", "--stderr-progress",
|
|
||||||
+ argv = ["@cdparanoia@/bin/cdparanoia", "--stderr-progress",
|
|
||||||
"--sample-offset=%d" % self._offset, "--force-overread", ]
|
|
||||||
else:
|
|
||||||
- argv = ["cd-paranoia", "--stderr-progress",
|
|
||||||
+ argv = ["@cdparanoia@/bin/cdparanoia", "--stderr-progress",
|
|
||||||
"--sample-offset=%d" % self._offset, ]
|
|
||||||
if self._device:
|
|
||||||
argv.extend(["--force-cdrom-device", self._device, ])
|
|
||||||
@@ -560,7 +560,7 @@
|
|
||||||
|
|
||||||
def getCdParanoiaVersion():
|
|
||||||
getter = common.VersionGetter('cd-paranoia',
|
|
||||||
- ["cd-paranoia", "-V"],
|
|
||||||
+ ["@cdparanoia@/bin/cdparanoia", "-V"],
|
|
||||||
_VERSION_RE,
|
|
||||||
"%(version)s %(release)s")
|
|
||||||
|
|
||||||
@@ -585,7 +585,7 @@
|
|
||||||
def __init__(self, device=None):
|
|
||||||
# cdparanoia -A *always* writes cdparanoia.log
|
|
||||||
self.cwd = tempfile.mkdtemp(suffix='.whipper.cache')
|
|
||||||
- self.command = ['cd-paranoia', '-A']
|
|
||||||
+ self.command = ['@cdparanoia@/bin/cdparanoia', '-A']
|
|
||||||
if device:
|
|
||||||
self.command += ['-d', device]
|
|
Loading…
x
Reference in New Issue
Block a user