about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/package-management/smlpkg/default.nix
blob: f3f7750f1bddd1d2888ce4cdab7b98c2388781ab (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
41
42
{ lib, stdenv, fetchFromGitHub, mlton, unzip }:

stdenv.mkDerivation rec {
  pname = "smlpkg";
  version = "0.1.5";

  src = fetchFromGitHub {
    owner = "diku-dk";
    repo = "smlpkg";
    rev = "v${version}";
    sha256 = "1xmbdnfc34ia0a78dhkfv5jyadxndinhw8c47l1mjd4l7n8vqnph";
  };

  enableParallelBuilding = true;

  nativeBuildInputs = [ mlton ];

  # Set as an environment variable in all the phase scripts.
  MLCOMP = "mlton";

  buildFlags = ["all"];
  installFlags = ["prefix=$(out)"];

  doCheck = true;

  checkInputs = [ unzip ];

  # We cannot run the pkgtests, as Nix does not allow network
  # connections.
  checkPhase = ''
    runHook preCheck
    make -C src test
    runHook postCheck
  '';

  meta = with lib; {
    description = "Generic package manager for Standard ML libraries and programs";
    homepage = "https://github.com/diku-dk/smlpkg";
    license = licenses.mit;
    maintainers = with maintainers; [ athas ];
  };
}