diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/unifdef/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/misc/unifdef/default.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/unifdef/default.nix b/nixpkgs/pkgs/development/tools/misc/unifdef/default.nix new file mode 100644 index 000000000000..8fc268423505 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/unifdef/default.nix @@ -0,0 +1,31 @@ +{ fetchurl, stdenv }: + +stdenv.mkDerivation rec { + name = "unifdef-2.6"; + + src = fetchurl { + url = "https://github.com/fanf2/unifdef/archive/${name}.tar.gz"; + sha256 = "1p5wr5ms9w8kijy9h7qs1mz36dlavdj6ngz2bks588w7a20kcqxj"; + }; + + postUnpack = '' + substituteInPlace $sourceRoot/unifdef.c \ + --replace '#include "version.h"' "" + + substituteInPlace $sourceRoot/Makefile \ + --replace "unifdef.c: version.h" "unifdef.c:" + ''; + + preBuild = '' + unset HOME + export DESTDIR=$out + ''; + + meta = with stdenv.lib; { + homepage = http://dotat.at/prog/unifdef/; + description = "Selectively remove C preprocessor conditionals"; + license = licenses.bsd2; + platforms = platforms.unix; + maintainers = [ maintainers.vrthra ]; + }; +} |