Files
nixpkgs/pkgs/development/compilers/microhs/test-hello-world.nix
Alex Tunstall e805baacb7 haskell.{compiler,packages}.microhs: init
The package set is built entirely from source using the stdenv and Hugs.

This also replaces the recently added microhs package, which was built
from pre-generated compiler output.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2026-04-09 22:33:33 +01:00

35 lines
529 B
Nix

{
stdenv,
microhs,
writeTextDir,
}:
stdenv.mkDerivation {
name = "microhs-hello-world";
buildInputs = [ microhs ];
src = writeTextDir "helloworld.hs" ''
main :: IO ()
main = putStrLn "Hello World"
'';
buildPhase = ''
runHook preBuild
mhs helloworld.hs -oExe
runHook postBuild
'';
checkPhase = ''
runHook preCheck
./Exe | grep "Hello World"
runHook postCheck
'';
doCheck = true;
installPhase = ''
runHook preInstall
touch $out
runHook postInstall
'';
}