2008-08-29 13:53:28 +00:00
|
|
|
{ fetchurl, stdenv }:
|
|
|
|
|
2015-02-08 06:32:32 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "unifdef-2.6";
|
2008-08-29 13:53:28 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-02-08 06:32:32 +00:00
|
|
|
url = "https://github.com/fanf2/unifdef/archive/${name}.tar.gz";
|
|
|
|
sha256 = "1p5wr5ms9w8kijy9h7qs1mz36dlavdj6ngz2bks588w7a20kcqxj";
|
2008-08-29 13:53:28 +00:00
|
|
|
};
|
|
|
|
|
2015-02-08 06:32:32 +00:00
|
|
|
postUnpack = ''
|
|
|
|
substituteInPlace $sourceRoot/unifdef.c \
|
|
|
|
--replace '#include "version.h"' ""
|
|
|
|
|
|
|
|
substituteInPlace $sourceRoot/Makefile \
|
|
|
|
--replace "unifdef.c: version.h" "unifdef.c:"
|
2008-08-29 13:53:28 +00:00
|
|
|
'';
|
|
|
|
|
2015-02-08 06:32:32 +00:00
|
|
|
preBuild = ''
|
|
|
|
unset HOME
|
|
|
|
export DESTDIR=$out
|
2008-08-29 13:53:28 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2015-02-08 06:32:32 +00:00
|
|
|
description = "Selectively remove C preprocessor conditionals";
|
2008-08-29 13:53:28 +00:00
|
|
|
};
|
|
|
|
}
|