2021-02-13 14:23:35 +00:00
|
|
|
{ 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;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unzip ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
# 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;
|
2022-07-14 12:49:19 +00:00
|
|
|
platforms = mlton.meta.platforms;
|
2021-02-13 14:23:35 +00:00
|
|
|
maintainers = with maintainers; [ athas ];
|
|
|
|
};
|
|
|
|
}
|