From cb452d02c2adf9067f5b98fe7dbe183dc1124c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Sat, 1 Dec 2018 01:35:25 +0100 Subject: [PATCH] whipper: 0.7.0 -> 0.7.2 --- pkgs/applications/audio/whipper/default.nix | 13 ++-- pkgs/applications/audio/whipper/paths.patch | 73 --------------------- 2 files changed, 8 insertions(+), 78 deletions(-) diff --git a/pkgs/applications/audio/whipper/default.nix b/pkgs/applications/audio/whipper/default.nix index fa5845c260be..8b93175ce359 100644 --- a/pkgs/applications/audio/whipper/default.nix +++ b/pkgs/applications/audio/whipper/default.nix @@ -3,17 +3,17 @@ python2.pkgs.buildPythonApplication rec { name = "whipper-${version}"; - version = "0.7.0"; + version = "0.7.2"; src = fetchFromGitHub { owner = "whipper-team"; repo = "whipper"; rev = "v${version}"; - sha256 = "04m8s0s9dcnly9l6id8vv99n9kbjrjid79bss52ay9yvwng0frmj"; + sha256 = "17cn11c6c62pfhhp6vcslxpanb0czh2xbxq1g6wd7bpmgw38yd8v"; }; pythonPath = with python2.pkgs; [ - pygobject2 musicbrainzngs urllib3 chardet + pygobject3 musicbrainzngs urllib3 chardet pycdio setuptools mutagen CDDB requests ]; @@ -25,11 +25,14 @@ python2.pkgs.buildPythonApplication rec { patches = [ (substituteAll { src = ./paths.patch; - inherit cdrdao cdparanoia utillinux flac sox; - accurateripChecksum = accuraterip-checksum; + inherit cdparanoia; }) ]; + makeWrapperArgs = [ + "--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ accuraterip-checksum cdrdao utillinux flac sox ]}" + ]; + # some tests require internet access # https://github.com/JoeLametta/whipper/issues/291 doCheck = false; diff --git a/pkgs/applications/audio/whipper/paths.patch b/pkgs/applications/audio/whipper/paths.patch index 9fe9f7a57c51..14b5384330da 100644 --- a/pkgs/applications/audio/whipper/paths.patch +++ b/pkgs/applications/audio/whipper/paths.patch @@ -1,16 +1,3 @@ ---- a/whipper/program/arc.py -+++ b/whipper/program/arc.py -@@ -3,8 +3,8 @@ - import logging - logger = logging.getLogger(__name__) - --ARB = 'accuraterip-checksum' --FLAC = 'flac' -+ARB = '@accurateripChecksum@/bin/accuraterip-checksum' -+FLAC = '@flac@/bin/flac' - - - def _execute(cmd, **redirects): --- a/whipper/program/cdparanoia.py +++ b/whipper/program/cdparanoia.py @@ -280,10 +280,10 @@ @@ -43,63 +30,3 @@ + self.command = ['@cdparanoia@/bin/cdparanoia', '-A'] if device: self.command += ['-d', device] - ---- a/whipper/program/cdrdao.py -+++ b/whipper/program/cdrdao.py -@@ -9,7 +9,7 @@ - import logging - logger = logging.getLogger(__name__) - --CDRDAO = 'cdrdao' -+CDRDAO = '@cdrdao@/bin/cdrdao' - - - def read_toc(device, fast_toc=False): ---- a/whipper/program/sox.py -+++ b/whipper/program/sox.py -@@ -4,7 +4,7 @@ - import logging - logger = logging.getLogger(__name__) - --SOX = 'sox' -+SOX = '@sox@/bin/sox' - - - def peak_level(track_path): ---- a/whipper/program/soxi.py -+++ b/whipper/program/soxi.py -@@ -6,7 +6,7 @@ - import logging - logger = logging.getLogger(__name__) - --SOXI = 'soxi' -+SOXI = '@sox@/bin/soxi' - - - class AudioLengthTask(ctask.PopenTask): ---- a/whipper/program/utils.py -+++ b/whipper/program/utils.py -@@ -9,7 +9,7 @@ - Eject the given device. - """ - logger.debug("ejecting device %s", device) -- os.system('eject %s' % device) -+ os.system('@utillinux@/bin/eject %s' % device) - - - def load_device(device): -@@ -17,7 +17,7 @@ - Load the given device. - """ - logger.debug("loading (eject -t) device %s", device) -- os.system('eject -t %s' % device) -+ os.system('@utillinux@/bin/eject -t %s' % device) - - - def unmount_device(device): -@@ -32,4 +32,4 @@ - proc = open('/proc/mounts').read() - if device in proc: - print 'Device %s is mounted, unmounting' % device -- os.system('umount %s' % device) -+ os.system('@utillinux@/bin/umount %s' % device)