about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorkoral <koral@mailoo.org>2015-01-26 01:08:05 +0100
committerkoral <koral@mailoo.org>2015-01-28 17:35:12 +0100
commit3ed8c422a591109e1f15e16f2fe9d13aadeca29f (patch)
tree3964e3ad6605240071764245c803dda4e12cb5e8 /pkgs
parent5e7501cd41ebe17f32c8867f01d1b77f349d17eb (diff)
downloadnixlib-3ed8c422a591109e1f15e16f2fe9d13aadeca29f.tar
nixlib-3ed8c422a591109e1f15e16f2fe9d13aadeca29f.tar.gz
nixlib-3ed8c422a591109e1f15e16f2fe9d13aadeca29f.tar.bz2
nixlib-3ed8c422a591109e1f15e16f2fe9d13aadeca29f.tar.lz
nixlib-3ed8c422a591109e1f15e16f2fe9d13aadeca29f.tar.xz
nixlib-3ed8c422a591109e1f15e16f2fe9d13aadeca29f.tar.zst
nixlib-3ed8c422a591109e1f15e16f2fe9d13aadeca29f.zip
rmlint: 1.0.8 -> 2.0.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/rmlint/default.nix33
-rw-r--r--pkgs/tools/misc/rmlint/fix-scons.patch22
-rw-r--r--pkgs/top-level/all-packages.nix4
3 files changed, 45 insertions, 14 deletions
diff --git a/pkgs/tools/misc/rmlint/default.nix b/pkgs/tools/misc/rmlint/default.nix
index 805bcf6b01cb..21643a9d11aa 100644
--- a/pkgs/tools/misc/rmlint/default.nix
+++ b/pkgs/tools/misc/rmlint/default.nix
@@ -1,24 +1,31 @@
-{ fetchurl, stdenv }:
+{ stdenv, fetchurl
+, gettext, glib, json_glib, libelf, pkgconfig, scons, sphinx, utillinux }:
 
+with stdenv.lib;
 stdenv.mkDerivation rec {
-  name = "rmlint-1.0.8";
+  name = "rmlint-${version}";
+  version = "2.0.0";
 
   src = fetchurl {
-    url = "https://github.com/downloads/sahib/rmlint/rmlint_1.0.8.tar.gz";
-    sha256 = "bea39a5872b39d3596e756f242967bc5bde6febeb996fdcd63fbcf5bfdc75f01";
+    url = "https://github.com/sahib/rmlint/archive/v${version}.tar.gz";
+    sha256 = "14jiswagipsmzxclcskn672ws4126p65l6hlzkkvanyv8gmpv90f";
   };
 
-  preConfigure = ''
-    substituteInPlace Makefile.in \
-      --replace "/usr/" "/"
-  '';
+  patches = [ ./fix-scons.patch ];
 
-  makeFlags="DESTDIR=$(out)";
+  configurePhase = "scons config";
+
+  buildInputs = [ gettext glib json_glib libelf pkgconfig scons sphinx utillinux ];
+
+  buildPhase = "scons";
+
+  installPhase = "scons --prefix=$out install";
 
   meta = {
-    description = "A tool to remove duplicates and other lint";
-    homepage = "https://github.com/sahib/rmlint";
-    platforms = stdenv.lib.platforms.linux;
-    license = stdenv.lib.licenses.gpl3;
+    description = "Extremely fast tool to remove duplicates and other lint from your filesystem.";
+    homepage = http://rmlint.readthedocs.org;
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.koral ];
   };
 }
diff --git a/pkgs/tools/misc/rmlint/fix-scons.patch b/pkgs/tools/misc/rmlint/fix-scons.patch
new file mode 100644
index 000000000000..4d7d832f13d7
--- /dev/null
+++ b/pkgs/tools/misc/rmlint/fix-scons.patch
@@ -0,0 +1,22 @@
+diff --git b/SConstruct a/SConstruct
+old mode 100644
+new mode 100755
+index a7fca2e..561007e
+--- b/SConstruct
++++ a/SConstruct
+@@ -404,11 +404,10 @@ options = dict(
+     SHLINKCOMSTR=link_shared_library_message,
+     LINKCOMSTR=link_program_message,
+     PREFIX=GetOption('prefix'),
+-    ENV={
+-        'PATH': os.environ['PATH'],
+-        'TERM': os.environ['TERM'],
+-        'HOME': os.environ['HOME']
+-    }
++    ENV = dict([ (key, os.environ[key])
++                 for key in os.environ
++                 if key in ['PATH', 'TERM', 'HOME', 'PKG_CONFIG_PATH']
++              ])
+ )
+ 
+ if ARGUMENTS.get('VERBOSE') == "1":
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6cb0a4596bc5..353fc6883a31 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2352,7 +2352,9 @@ let
 
   rkflashtool = callPackage ../tools/misc/rkflashtool { };
 
-  rmlint = callPackage ../tools/misc/rmlint {};
+  rmlint = callPackage ../tools/misc/rmlint {
+    inherit (pythonPackages) sphinx;
+  };
 
   rng_tools = callPackage ../tools/security/rng-tools { };