about summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/gnustep/make/default.nix
blob: 67fe60f2c0eb69375a5c07ae6c5c27b9da229315 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "gnustep-make-${version}";
  version = "1.0";

  src = fetchurl {
    url = "http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-make-2.6.6.tar.gz";
    sha256 = "07cqr8x17bia9w6clbmiv7ay6r9nplrjz2cyzinv4w7zfpc19vxw";
  };

  patchPhase = ''
    substituteInPlace GNUmakefile.in \
      --replace which type \
      --replace 'tooldir = $(DESTDIR)' 'tooldir = ' \
      --replace 'makedir = $(DESTDIR)' 'makedir = ' \
      --replace 'mandir  = $(DESTDIR)' 'mandir  = '

    substituteInPlace FilesystemLayouts/apple \
      --replace /usr/local ""
  '';

  installFlags = "DESTDIR=$(out)";

  postInstall = ''
    mkdir -p $out/nix-support
    cat >$out/nix-support/setup-hook <<EOF
      . $out/Library/GNUstep/Makefiles/GNUstep.sh
    EOF
  '';
}