nixpkgs/pkgs/development/tools/build-managers/gnustep/make/default.nix

35 lines
879 B
Nix
Raw Normal View History

2015-06-21 20:29:33 -07:00
{ stdenv, fetchurl }:
2016-01-02 12:32:47 -08:00
let version = "2.6.7"; in
2015-06-21 20:29:33 -07:00
stdenv.mkDerivation rec {
name = "gnustep-make-${version}";
2015-06-21 20:29:33 -07:00
src = fetchurl {
2016-01-02 12:32:47 -08:00
url = "http://ftpmain.gnustep.org/pub/gnustep/core/${name}.tar.gz";
sha256 = "1r2is23xdg4qirckb6bd4lynfwnnw5d9522wib3ndk1xgirmfaqi";
2015-06-21 20:29:33 -07:00
};
patchPhase = ''
substituteInPlace GNUmakefile.in \
--replace which type \
--replace 'tooldir = $(DESTDIR)' 'tooldir = ' \
--replace 'makedir = $(DESTDIR)' 'makedir = ' \
--replace 'mandir = $(DESTDIR)' 'mandir = '
2015-06-21 20:29:33 -07:00
substituteInPlace FilesystemLayouts/apple \
--replace /usr/local ""
substituteInPlace configure \
--replace /Library/GNUstep "$out"
2015-06-21 20:29:33 -07:00
'';
installFlags = "DESTDIR=$(out)";
2015-06-21 20:29:33 -07:00
postInstall = ''
mkdir -p $out/nix-support
cat >$out/nix-support/setup-hook <<EOF
. $out/Library/GNUstep/Makefiles/GNUstep.sh
EOF
'';
}