From 3b2506b04857a5bfc825a46f5ee15d0132056e65 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Sun, 23 Dec 2018 21:43:28 +0100 Subject: [PATCH 1/2] rmlint: 2.6.1 -> 2.8.0 The recipe now uses the default scons build phases. --- pkgs/tools/misc/rmlint/blkid-hack.patch | 18 ++++++++++++++++++ pkgs/tools/misc/rmlint/default.nix | 15 ++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 pkgs/tools/misc/rmlint/blkid-hack.patch diff --git a/pkgs/tools/misc/rmlint/blkid-hack.patch b/pkgs/tools/misc/rmlint/blkid-hack.patch new file mode 100644 index 00000000000..d712f7daa27 --- /dev/null +++ b/pkgs/tools/misc/rmlint/blkid-hack.patch @@ -0,0 +1,18 @@ +# HACK: For some reason the file blkid/blkid.h is not found during build. +# I assueme it is due to the fact that -I [...]util-linux-2.33-dev/include/blkid +# is added during the build and not just -I [...]util-linux-2.33-dev/include +# For the time being this patch is the only way I could find to fix the build. + +diff --git a/lib/utilities.c b/lib/utilities.c +index e768fa41..1f96fd68 100644 +--- a/lib/utilities.c ++++ b/lib/utilities.c +@@ -76,7 +76,7 @@ + #endif + + #if HAVE_BLKID +-#include ++#include + #endif + + #if HAVE_JSON_GLIB diff --git a/pkgs/tools/misc/rmlint/default.nix b/pkgs/tools/misc/rmlint/default.nix index 640e641dd47..b97c4ac13f7 100644 --- a/pkgs/tools/misc/rmlint/default.nix +++ b/pkgs/tools/misc/rmlint/default.nix @@ -4,23 +4,24 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "rmlint-${version}"; - version = "2.6.1"; + version = "2.8.0"; src = fetchFromGitHub { owner = "sahib"; repo = "rmlint"; rev = "v${version}"; - sha256 = "1j09qk3zypw4my713q9g36kq37ggqd5v9vrs3h821p6p3qmmkdn8"; + sha256 = "1gc7gbnh0qg1kl151cv1ld87vhpm1v3pnkn7prhscdcc21jrg8nz"; }; - configurePhase = "scons config"; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ gettext glib json-glib libelf scons sphinx utillinux ]; + patches = [ + ./blkid-hack.patch + ]; - buildPhase = "scons"; + nativeBuildInputs = [ pkgconfig sphinx ]; + buildInputs = [ gettext glib json-glib libelf scons utillinux ]; - installPhase = "scons --prefix=$out install"; + prefixKey = "--prefix="; meta = { description = "Extremely fast tool to remove duplicates and other lint from your filesystem"; From e7ad1fb97770cee7189e86e3e40ae39afbac162a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 23 Dec 2018 22:41:09 +0100 Subject: [PATCH 2/2] rmlint: fix build without patch --- pkgs/tools/misc/rmlint/blkid-hack.patch | 18 ------------------ pkgs/tools/misc/rmlint/default.nix | 15 +++++++++------ 2 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 pkgs/tools/misc/rmlint/blkid-hack.patch diff --git a/pkgs/tools/misc/rmlint/blkid-hack.patch b/pkgs/tools/misc/rmlint/blkid-hack.patch deleted file mode 100644 index d712f7daa27..00000000000 --- a/pkgs/tools/misc/rmlint/blkid-hack.patch +++ /dev/null @@ -1,18 +0,0 @@ -# HACK: For some reason the file blkid/blkid.h is not found during build. -# I assueme it is due to the fact that -I [...]util-linux-2.33-dev/include/blkid -# is added during the build and not just -I [...]util-linux-2.33-dev/include -# For the time being this patch is the only way I could find to fix the build. - -diff --git a/lib/utilities.c b/lib/utilities.c -index e768fa41..1f96fd68 100644 ---- a/lib/utilities.c -+++ b/lib/utilities.c -@@ -76,7 +76,7 @@ - #endif - - #if HAVE_BLKID --#include -+#include - #endif - - #if HAVE_JSON_GLIB diff --git a/pkgs/tools/misc/rmlint/default.nix b/pkgs/tools/misc/rmlint/default.nix index b97c4ac13f7..320edd83021 100644 --- a/pkgs/tools/misc/rmlint/default.nix +++ b/pkgs/tools/misc/rmlint/default.nix @@ -1,5 +1,6 @@ -{ stdenv, fetchFromGitHub, - gettext, glib, json-glib, libelf, pkgconfig, scons, sphinx, utillinux }: +{ stdenv, fetchFromGitHub +, gettext, pkgconfig, scons +, glib, json-glib, libelf, sphinx, utillinux }: with stdenv.lib; stdenv.mkDerivation rec { @@ -13,13 +14,15 @@ stdenv.mkDerivation rec { sha256 = "1gc7gbnh0qg1kl151cv1ld87vhpm1v3pnkn7prhscdcc21jrg8nz"; }; + CFLAGS="-I${stdenv.lib.getDev utillinux}/include"; - patches = [ - ./blkid-hack.patch + nativeBuildInputs = [ + pkgconfig sphinx gettext scons ]; - nativeBuildInputs = [ pkgconfig sphinx ]; - buildInputs = [ gettext glib json-glib libelf scons utillinux ]; + buildInputs = [ + glib json-glib libelf utillinux + ]; prefixKey = "--prefix=";