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 {
name = "unifdef-2.6";
pname = "unifdef";
version = "2.12";
src = fetchurl {
url = "https://github.com/fanf2/unifdef/archive/${name}.tar.gz";
sha256 = "1p5wr5ms9w8kijy9h7qs1mz36dlavdj6ngz2bks588w7a20kcqxj";
url = "https://dotat.at/prog/unifdef/unifdef-${version}.tar.xz";
sha256 = "00647bp3m9n01ck6ilw6r24fk4mivmimamvm4hxp5p6wxh10zkj3";
};
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
'';
makeFlags = [
"prefix=$(out)"
"DESTDIR="
];
meta = with lib; {
homepage = "http://dotat.at/prog/unifdef/";
homepage = "https://dotat.at/prog/unifdef/";
description = "Selectively remove C preprocessor conditionals";
license = licenses.bsd2;
platforms = platforms.unix;
maintainers = [ maintainers.vrthra ];
maintainers = with maintainers; [ orivej vrthra ];
};
}