git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #5443 from rycee/morituri-cleanup
415df72Domen Kožar
pkgs/applications/audio/morituri/default.nix+8−18
@@ -1,10 +1,11 @@
1{ stdenv, fetchurl, python, pythonPackages, cdparanoia, cdrdao
1{ stdenv, fetchurl, python, pythonPackages, cdparanoia, cdrdao
2, pygobject, gst_python, gst_plugins_base, gst_plugins_good
2, pygobject, gst_python, gst_plugins_base, gst_plugins_good
3−, setuptools, utillinux, makeWrapper }:
3+, setuptools, utillinux, makeWrapper, substituteAll }:
4
4
5stdenv.mkDerivation rec {
5stdenv.mkDerivation rec {
6 name = "morituri-${version}";
6 name = "morituri-${version}";
7 version = "0.2.3";
7 version = "0.2.3";
8+ namePrefix = "";
8
9
9 src = fetchurl {
10 src = fetchurl {
10 url = "http://thomas.apestaart.org/download/morituri/${name}.tar.bz2";
11 url = "http://thomas.apestaart.org/download/morituri/${name}.tar.bz2";
@@ -21,23 +22,12 @@ stdenv.mkDerivation rec {
21 gst_plugins_base gst_plugins_good
22 gst_plugins_base gst_plugins_good
22 ] ++ pythonPath;
23 ] ++ pythonPath;
23
24
25+ patches = [
26+ (substituteAll {
24− patches = [ ./paths.patch ];
27+ src = ./paths.patch;
25−
28+ inherit cdrdao cdparanoia python utillinux;
26− postPatch = ''
29+ })
27− substituteInPlace morituri/extern/python-command/scripts/help2man \
28− --replace /usr/bin/python ${python}/bin/python
29−
30− substituteInPlace morituri/common/program.py \
31− --replace umount ${utillinux}/bin/umount \
32− --replace \'eject \'${utillinux}/bin/eject
33−
34− substituteInPlace morituri/program/cdparanoia.py \
35− --replace '"cdparanoia"' '"${cdparanoia}/bin/cdparanoia"'
36−
37− substituteInPlace morituri/program/cdrdao.py \
38− --replace "['cdrdao', ]" "['${cdrdao}/bin/cdrdao', ]" \
39− --replace '"cdrdao"' '"${cdrdao}/bin/cdrdao"'
40− '';
30+ ];
41
31
42 # This package contains no binaries to patch or strip.
32 # This package contains no binaries to patch or strip.
43 dontPatchELF = true;
33 dontPatchELF = true;
pkgs/applications/audio/morituri/paths.patch+81−2
@@ -1,6 +1,6 @@
1diff -Nurp morituri-0.2.3-orig/doc/Makefile.in morituri-0.2.3/doc/Makefile.in
1diff -Nurp morituri-0.2.3-orig/doc/Makefile.in morituri-0.2.3/doc/Makefile.in
2−--- morituri-0.2.3-orig/doc/Makefile.in 2014-11-01 00:13:01.231364181 +0100
2+--- morituri-0.2.3-orig/doc/Makefile.in 2014-12-23 12:44:46.222410092 +0100
3−+++ morituri-0.2.3/doc/Makefile.in 2014-11-01 00:13:56.691812229 +0100
3++++ morituri-0.2.3/doc/Makefile.in 2014-12-23 12:46:49.619756940 +0100
4@@ -486,7 +486,7 @@ morituri.ics: $(top_srcdir)/morituri.doa
4@@ -486,7 +486,7 @@ morituri.ics: $(top_srcdir)/morituri.doa
5 -moap doap -f $(top_srcdir)/morituri.doap ical > morituri.ics
5 -moap doap -f $(top_srcdir)/morituri.doap ical > morituri.ics
6
6
@@ -10,3 +10,82 @@ diff -Nurp morituri-0.2.3-orig/doc/Makefile.in morituri-0.2.3/doc/Makefile.in
10
10
11 clean-local:
11 clean-local:
12 @rm -rf reference
12 @rm -rf reference
13+diff -Nurp morituri-0.2.3-orig/morituri/common/program.py morituri-0.2.3/morituri/common/program.py
14+--- morituri-0.2.3-orig/morituri/common/program.py 2014-12-23 12:44:46.218410048 +0100
15++++ morituri-0.2.3/morituri/common/program.py 2014-12-23 12:46:49.647757245 +0100
16+@@ -92,13 +92,13 @@ class Program(log.Loggable):
17+ """
18+ Load the given device.
19+ """
20+- os.system('eject -t %s' % device)
21++ os.system('@utillinux@/bin/eject -t %s' % device)
22+
23+ def ejectDevice(self, device):
24+ """
25+ Eject the given device.
26+ """
27+- os.system('eject %s' % device)
28++ os.system('@utillinux@/bin/eject %s' % device)
29+
30+ def unmountDevice(self, device):
31+ """
32+@@ -112,7 +112,7 @@ class Program(log.Loggable):
33+ proc = open('/proc/mounts').read()
34+ if device in proc:
35+ print 'Device %s is mounted, unmounting' % device
36+- os.system('umount %s' % device)
37++ os.system('@utillinux@/bin/umount %s' % device)
38+
39+ def getFastToc(self, runner, toc_pickle, device):
40+ """
41+diff -Nurp morituri-0.2.3-orig/morituri/extern/python-command/scripts/help2man morituri-0.2.3/morituri/extern/python-command/scripts/help2man
42+--- morituri-0.2.3-orig/morituri/extern/python-command/scripts/help2man 2014-12-23 12:44:46.206409916 +0100
43++++ morituri-0.2.3/morituri/extern/python-command/scripts/help2man 2014-12-23 12:46:49.631757074 +0100
44+@@ -1,4 +1,4 @@
45+-#!/usr/bin/python
46++#!@python@/bin/python
47+
48+ # -*- Mode: Python -*-
49+ # vi:si:et:sw=4:sts=4:ts=4
50+diff -Nurp morituri-0.2.3-orig/morituri/program/cdparanoia.py morituri-0.2.3/morituri/program/cdparanoia.py
51+--- morituri-0.2.3-orig/morituri/program/cdparanoia.py 2014-12-23 12:44:46.202409873 +0100
52++++ morituri-0.2.3/morituri/program/cdparanoia.py 2014-12-23 12:46:49.659757376 +0100
53+@@ -278,7 +278,7 @@ class ReadTrackTask(log.Loggable, task.T
54+ stopTrack, stopOffset)
55+
56+ bufsize = 1024
57+- argv = ["cdparanoia", "--stderr-progress",
58++ argv = ["@cdparanoia@/bin/cdparanoia", "--stderr-progress",
59+ "--sample-offset=%d" % self._offset, ]
60+ if self._device:
61+ argv.extend(["--force-cdrom-device", self._device, ])
62+@@ -551,7 +551,7 @@ _VERSION_RE = re.compile(
63+
64+ def getCdParanoiaVersion():
65+ getter = common.VersionGetter('cdparanoia',
66+- ["cdparanoia", "-V"],
67++ ["@cdparanoia@/bin/cdparanoia", "-V"],
68+ _VERSION_RE,
69+ "%(version)s %(release)s")
70+
71+diff -Nurp morituri-0.2.3-orig/morituri/program/cdrdao.py morituri-0.2.3/morituri/program/cdrdao.py
72+--- morituri-0.2.3-orig/morituri/program/cdrdao.py 2014-12-23 12:44:46.202409873 +0100
73++++ morituri-0.2.3/morituri/program/cdrdao.py 2014-12-23 12:46:49.667757463 +0100
74+@@ -257,7 +257,7 @@ class CDRDAOTask(ctask.PopenTask):
75+
76+ def start(self, runner):
77+ self.debug('Starting cdrdao with options %r', self.options)
78+- self.command = ['cdrdao', ] + self.options
79++ self.command = ['@cdrdao@/bin/cdrdao', ] + self.options
80+
81+ ctask.PopenTask.start(self, runner)
82+
83+@@ -515,7 +515,7 @@ _VERSION_RE = re.compile(
84+
85+ def getCDRDAOVersion():
86+ getter = common.VersionGetter('cdrdao',
87+- ["cdrdao"],
88++ ["@cdrdao@/bin/cdrdao"],
89+ _VERSION_RE,
90+ "%(version)s")
91+