-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Nix derivation for the lucky few.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ pkgs ? import <nixpkgs> {}, | ||
}: | ||
|
||
pkgs.stdenv.mkDerivation rec { | ||
name = "smlpkg"; | ||
|
||
src = ./.; | ||
|
||
nativeBuildInputs = [ pkgs.mlton ]; | ||
|
||
checkInputs = [ pkgs.unzip ]; | ||
|
||
enableParallelBuilding = true; | ||
|
||
doCheck = true; | ||
|
||
# Set as an environment variable in all the phase scripts. | ||
MLCOMP = "mlton"; | ||
|
||
buildPhase = '' | ||
make all | ||
''; | ||
|
||
installPhase = '' | ||
make install prefix=$out | ||
''; | ||
|
||
# We cannot run the pkgtests, as Nix does not allow network | ||
# connections. | ||
checkPhase = '' | ||
make -C src test | ||
''; | ||
|
||
} |