2016-06-28 17:48:25 +01:00
|
|
|
{ fetchurl, stdenv }:
|
2008-08-29 14:53:28 +01:00
|
|
|
|
2015-02-08 06:32:32 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-06-28 17:48:25 +01:00
|
|
|
name = "unifdef-2.6";
|
2008-08-29 14:53:28 +01:00
|
|
|
|
2016-06-28 17:48:25 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/fanf2/unifdef/archive/${name}.tar.gz";
|
|
|
|
sha256 = "1p5wr5ms9w8kijy9h7qs1mz36dlavdj6ngz2bks588w7a20kcqxj";
|
2008-08-29 14:53:28 +01:00
|
|
|
};
|
|
|
|
|
2016-06-28 17:48:25 +01:00
|
|
|
postUnpack = ''
|
|
|
|
substituteInPlace $sourceRoot/unifdef.c \
|
|
|
|
--replace '#include "version.h"' ""
|
|
|
|
|
|
|
|
substituteInPlace $sourceRoot/Makefile \
|
|
|
|
--replace "unifdef.c: version.h" "unifdef.c:"
|
|
|
|
'';
|
2008-08-29 14:53:28 +01:00
|
|
|
|
2015-02-08 06:32:32 +00:00
|
|
|
preBuild = ''
|
2016-06-28 17:48:25 +01:00
|
|
|
unset HOME
|
|
|
|
export DESTDIR=$out
|
2008-08-29 14:53:28 +01:00
|
|
|
'';
|
|
|
|
|
2016-06-26 02:34:57 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://dotat.at/prog/unifdef/;
|
2015-02-08 06:32:32 +00:00
|
|
|
description = "Selectively remove C preprocessor conditionals";
|
2016-06-26 02:34:57 +01:00
|
|
|
license = licenses.bsd2;
|
2016-06-28 05:38:25 +01:00
|
|
|
platforms = platforms.unix;
|
2016-06-26 02:34:57 +01:00
|
|
|
maintainers = [ maintainers.vrthra ];
|
2008-08-29 14:53:28 +01:00
|
|
|
};
|
|
|
|
}
|