unifdef: 2.6 -> 2.12

This commit is contained in:
Orivej Desh 2021-01-30 06:56:41 +00:00
parent ac98f9973f
commit a2b25fed55

View File

@ -1,31 +1,24 @@
{ fetchurl, lib, stdenv }: { lib, stdenv, fetchurl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "unifdef-2.6"; pname = "unifdef";
version = "2.12";
src = fetchurl { src = fetchurl {
url = "https://github.com/fanf2/unifdef/archive/${name}.tar.gz"; url = "https://dotat.at/prog/unifdef/unifdef-${version}.tar.xz";
sha256 = "1p5wr5ms9w8kijy9h7qs1mz36dlavdj6ngz2bks588w7a20kcqxj"; sha256 = "00647bp3m9n01ck6ilw6r24fk4mivmimamvm4hxp5p6wxh10zkj3";
}; };
postUnpack = '' makeFlags = [
substituteInPlace $sourceRoot/unifdef.c \ "prefix=$(out)"
--replace '#include "version.h"' "" "DESTDIR="
];
substituteInPlace $sourceRoot/Makefile \
--replace "unifdef.c: version.h" "unifdef.c:"
'';
preBuild = ''
unset HOME
export DESTDIR=$out
'';
meta = with lib; { meta = with lib; {
homepage = "http://dotat.at/prog/unifdef/"; homepage = "https://dotat.at/prog/unifdef/";
description = "Selectively remove C preprocessor conditionals"; description = "Selectively remove C preprocessor conditionals";
license = licenses.bsd2; license = licenses.bsd2;
platforms = platforms.unix; platforms = platforms.unix;
maintainers = [ maintainers.vrthra ]; maintainers = with maintainers; [ orivej vrthra ];
}; };
} }