unifdef: 2.6 -> 2.11

This commit is contained in:
Rahul Gopinath 2016-06-25 18:34:57 -07:00
parent 9ef6dceca9
commit c6980b20e4

View File

@ -1,27 +1,30 @@
{ fetchurl, stdenv }: { stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "unifdef-2.6"; name = "unifdef-${version}";
version = "2.11";
src = fetchurl { src = fetchFromGitHub {
url = "https://github.com/fanf2/unifdef/archive/${name}.tar.gz"; owner = "fanf2";
sha256 = "1p5wr5ms9w8kijy9h7qs1mz36dlavdj6ngz2bks588w7a20kcqxj"; repo = "unifdef";
rev = "8697cc11a1bb67c1153ecc556b880d1fdc4b4e00";
sha256 = "0d842m4zqbl5h8qiga1bp3vdirs01wd878rz0dkf32illkimmg0y";
}; };
postUnpack = '' makeFlags = [
substituteInPlace $sourceRoot/unifdef.c \ "prefix=$(out)"
--replace '#include "version.h"' "" "DESTDIR="
];
substituteInPlace $sourceRoot/Makefile \
--replace "unifdef.c: version.h" "unifdef.c:"
'';
preBuild = '' preBuild = ''
unset HOME echo 'V="${name}"' > version.sh
export DESTDIR=$out
''; '';
meta = { meta = with stdenv.lib; {
homepage = "http://dotat.at/prog/unifdef/";
description = "Selectively remove C preprocessor conditionals"; description = "Selectively remove C preprocessor conditionals";
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = [ maintainers.vrthra ];
}; };
} }