lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

Actually build (a newer version of) unifdef from source, so we can use it on non-linux platforms

+14 -11
+14 -11
pkgs/development/tools/misc/unifdef/default.nix
··· 1 1 { fetchurl, stdenv }: 2 2 3 - stdenv.mkDerivation { 4 - name = "unifdef-1.0"; 3 + stdenv.mkDerivation rec { 4 + name = "unifdef-2.6"; 5 5 6 6 src = fetchurl { 7 - url = http://www.cs.cmu.edu/~ajw/public/dist/unifdef-1.0.tar.gz; 8 - sha256 = "1bcxq7qgf6r98m6l277fx6s0gn9sr4vn7f3s0r5mwx79waqk0k6i"; 7 + url = "https://github.com/fanf2/unifdef/archive/${name}.tar.gz"; 8 + sha256 = "1p5wr5ms9w8kijy9h7qs1mz36dlavdj6ngz2bks588w7a20kcqxj"; 9 9 }; 10 10 11 - buildPhase = '' 12 - make unifdef 11 + postUnpack = '' 12 + substituteInPlace $sourceRoot/unifdef.c \ 13 + --replace '#include "version.h"' "" 14 + 15 + substituteInPlace $sourceRoot/Makefile \ 16 + --replace "unifdef.c: version.h" "unifdef.c:" 13 17 ''; 14 18 15 - installPhase = '' 16 - mkdir -p $out/bin 17 - cp unifdef $out/bin 19 + preBuild = '' 20 + unset HOME 21 + export DESTDIR=$out 18 22 ''; 19 23 20 24 meta = { 21 - description = "useful for removing #ifdef'ed lines from a file while otherwise leaving the file alone"; 22 - 25 + description = "Selectively remove C preprocessor conditionals"; 23 26 }; 24 27 }