summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPeter Hoeg <peter@speartail.com>2017-01-01 22:04:45 +0800
committerPeter Hoeg <peter@speartail.com>2017-01-02 22:50:53 +0800
commitb11264a282657ec42b77b95f7339aa5dcc6c46fd (patch)
tree31f192cf1f73bc069fe77c418fa23eed4211e8d2 /pkgs
parent59dbcefaa74b940f9b7490c034dc4ff885fa2627 (diff)
downloadnixlib-b11264a282657ec42b77b95f7339aa5dcc6c46fd.tar
nixlib-b11264a282657ec42b77b95f7339aa5dcc6c46fd.tar.gz
nixlib-b11264a282657ec42b77b95f7339aa5dcc6c46fd.tar.bz2
nixlib-b11264a282657ec42b77b95f7339aa5dcc6c46fd.tar.lz
nixlib-b11264a282657ec42b77b95f7339aa5dcc6c46fd.tar.xz
nixlib-b11264a282657ec42b77b95f7339aa5dcc6c46fd.tar.zst
nixlib-b11264a282657ec42b77b95f7339aa5dcc6c46fd.zip
rubber: 1.3 -> 1.4
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/typesetting/rubber/default.nix35
1 files changed, 21 insertions, 14 deletions
diff --git a/pkgs/tools/typesetting/rubber/default.nix b/pkgs/tools/typesetting/rubber/default.nix
index a9403020e41b..bbcda05dc801 100644
--- a/pkgs/tools/typesetting/rubber/default.nix
+++ b/pkgs/tools/typesetting/rubber/default.nix
@@ -1,23 +1,30 @@
 { fetchurl, stdenv, python2Packages, texinfo }:
 
-stdenv.mkDerivation rec {
-  name = "rubber-1.3";
+python2Packages.buildPythonApplication rec {
+  name = "rubber-${version}";
+  version = "1.4";
 
   src = fetchurl {
-    url = "https://launchpad.net/rubber/trunk/1.3/+download/rubber-1.3.tar.gz";
-    sha256 = "09715apfd6a0haz1mqsxgm8sj4rwzi38gcz2kz020zxk5rh0dksh";
+    url = "https://launchpad.net/rubber/trunk/${version}/+download/${name}.tar.gz";
+    sha256 = "1d7hq19vpb3l31grldbxg8lx1qdd18f5f3gqw96q0lhf58agcjl2";
   };
 
-  buildInputs = [ python2Packages.python texinfo ];
-  nativeBuildInputs = [ python2Packages.wrapPython ];
+  propagatedBuildInputs = [ texinfo ];
 
-  patchPhase = ''
-    substituteInPlace configure --replace which "type -P"
+  # I couldn't figure out how to pass the proper parameter to disable pdf generation, so we
+  # use sed to change the default
+  preBuild = ''
+    sed -i -r 's/pdf\s+= True/pdf = False/g' setup.py
   '';
 
-  postInstall = "wrapPythonPrograms";
+  # the check scripts forces python2. If we need to use python3 at some point, we should use
+  # the correct python
+  checkPhase = ''
+    sed -i 's|python=python2|python=${python2Packages.python.interpreter}|' tests/run.sh
+    cd tests && ${stdenv.shell} run.sh
+  '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Wrapper for LaTeX and friends";
     longDescription = ''
       Rubber is a program whose purpose is to handle all tasks related
@@ -28,9 +35,9 @@ stdenv.mkDerivation rec {
       produce PostScript documents is also included, as well as usage
       of pdfLaTeX to produce PDF documents.
     '';
-    license = stdenv.lib.licenses.gpl2Plus;
-    homepage = http://www.pps.jussieu.fr/~beffara/soft/rubber/;
-    maintainers = [ stdenv.lib.maintainers.ttuegel ];
-    platforms = stdenv.lib.platforms.unix;
+    license = licenses.gpl2Plus;
+    homepage = https://launchpad.net/rubber;
+    maintainers = with maintainers; [ ttuegel peterhoeg ];
+    platforms = platforms.unix;
   };
 }