about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/sm/smlfut/package.nix
blob: b3d60ce133d1f991a673f9805fedd1750bf7c077 (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
{ lib, stdenv, fetchFromGitHub, mlton, futhark }:

stdenv.mkDerivation rec {
  pname = "smlfut";
  version = "1.2.0";

  src = fetchFromGitHub {
    owner = "diku-dk";
    repo = "smlfut";
    rev = "v${version}";
    hash = "sha256-bPqvHExAoOCd6Z2/rfKd6kHeYxu/jNDz5qTklqJtlzI=";
  };

  enableParallelBuilding = true;

  nativeBuildInputs = [ mlton ];

  env.MLCOMP = "mlton";

  installFlags = ["PREFIX=$(out)"];

  doCheck = true;

  nativeCheckInputs = [ futhark ];

  checkTarget = "run_test";

  meta = with lib; {
    description = "Allow SML programs to call Futhark programs";
    homepage = "https://github.com/diku-dk/smlfut";
    license = licenses.gpl3Plus;
    platforms = mlton.meta.platforms;
    maintainers = with maintainers; [ athas ];
    mainProgram = "smlfut";
  };
}