summary refs log tree commit diff
path: root/pkgs/tools/system/plan9port/default.nix
blob: ca248da56cf1b243787e6e47af83878acb9c84aa (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
32
33
34
35
36
37
38
39
40
{stdenv, fetchurl, which, libX11, libXt, fontconfig
, xproto ? null
, xextproto ? null
, libXext ? null }:

stdenv.mkDerivation rec {
  name = "plan9port-20140306";

  patches = [ ./fontsrv.patch ];
  postPatch =
    ''
      substituteInPlace src/cmd/acme/acme.c \
          --replace /lib/font/bit $out/plan9/font
    '';

  builder = ./builder.sh;

  src = fetchurl {
    url = "https://plan9port.googlecode.com/files/${name}.tgz";
    # Google code is much faster than swtch
    # url = "http://swtch.com/plan9port/${name}.tgz";
    sha256 = "1sza12j3db7i54r3pzli8wmby6aiyzmyfj8w0nidmawkwv6jdf6b";
  };

  NIX_LDFLAGS="-lgcc_s";
  buildInputs = stdenv.lib.optionals (!stdenv.isDarwin) [ which libX11 fontconfig xproto libXt xextproto libXext ];

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    homepage = "http://swtch.com/plan9port/";
    description = "Plan 9 from User Space";
    license = licenses.lpl-102;
    maintainers = [ stdenv.lib.maintainers.ftrvxmtrx ];
    platforms = platforms.unix;
  };

  inherit libXt;
  inherit fontconfig;
}