Merge pull request #111275 from orivej/unifdef

unifdef: 2.6 -> 2.12
This commit is contained in:
Sandro 2021-02-01 00:31:14 +01:00 committed by GitHub
commit 070605263b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 ];
}; };
} }