nixpkgs/pkgs/development/tools/misc/unifdef/default.nix

32 lines
765 B
Nix
Raw Normal View History

{ 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
'';
2016-06-26 01:34:57 +00:00
meta = with stdenv.lib; {
homepage = http://dotat.at/prog/unifdef/;
description = "Selectively remove C preprocessor conditionals";
2016-06-26 01:34:57 +00:00
license = licenses.bsd2;
platforms = platforms.unix;
2016-06-26 01:34:57 +00:00
maintainers = [ maintainers.vrthra ];
};
}