Loading pkgs/by-name/mi/microhs/package.nix 0 → 100644 +43 −0 Original line number Diff line number Diff line { callPackage, stdenv, fetchFromGitHub, lib, writableTmpDirAsHomeHook, writeTextDir, }: stdenv.mkDerivation (finalAttrs: { pname = "microhs"; version = "0.14.21.0"; src = fetchFromGitHub { owner = "augustss"; repo = "MicroHs"; tag = "v${finalAttrs.version}"; hash = "sha256-Tq8fjI3LCP4NWrmbMP0xyhY2fjRmsMCEvgfDQ/SB5Bo="; }; # mcabal doesn't seem to respect the make flag and fails with /homeless-shelter # This works around the issue nativeBuildInputs = [ writableTmpDirAsHomeHook ]; makeFlags = [ "MCABAL=$(out)" ]; buildFlags = [ "bootstrap" ]; # MicroCabal is a separate repository, which should be packaged separately # The MicroCabal that is installed by `make install` is pregenerated, does not respect MCABAL above, and so is not useable postInstall = "rm $out/bin/mcabal"; passthru.tests = { hello-world = callPackage ./test-hello-world.nix { microhs = finalAttrs.finalPackage; }; }; meta = { description = "Haskell implemented with combinators"; homepage = "https://github.com/augustss/MicroHs"; license = lib.licenses.asl20; maintainers = [ lib.maintainers.steeleduncan ]; platforms = lib.platforms.all; }; }) pkgs/by-name/mi/microhs/test-hello-world.nix 0 → 100644 +34 −0 Original line number Diff line number Diff line { 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 ''; } Loading
pkgs/by-name/mi/microhs/package.nix 0 → 100644 +43 −0 Original line number Diff line number Diff line { callPackage, stdenv, fetchFromGitHub, lib, writableTmpDirAsHomeHook, writeTextDir, }: stdenv.mkDerivation (finalAttrs: { pname = "microhs"; version = "0.14.21.0"; src = fetchFromGitHub { owner = "augustss"; repo = "MicroHs"; tag = "v${finalAttrs.version}"; hash = "sha256-Tq8fjI3LCP4NWrmbMP0xyhY2fjRmsMCEvgfDQ/SB5Bo="; }; # mcabal doesn't seem to respect the make flag and fails with /homeless-shelter # This works around the issue nativeBuildInputs = [ writableTmpDirAsHomeHook ]; makeFlags = [ "MCABAL=$(out)" ]; buildFlags = [ "bootstrap" ]; # MicroCabal is a separate repository, which should be packaged separately # The MicroCabal that is installed by `make install` is pregenerated, does not respect MCABAL above, and so is not useable postInstall = "rm $out/bin/mcabal"; passthru.tests = { hello-world = callPackage ./test-hello-world.nix { microhs = finalAttrs.finalPackage; }; }; meta = { description = "Haskell implemented with combinators"; homepage = "https://github.com/augustss/MicroHs"; license = lib.licenses.asl20; maintainers = [ lib.maintainers.steeleduncan ]; platforms = lib.platforms.all; }; })
pkgs/by-name/mi/microhs/test-hello-world.nix 0 → 100644 +34 −0 Original line number Diff line number Diff line { 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 ''; }