-
-
Notifications
You must be signed in to change notification settings - Fork 20k
microhs: init at 0.14.21.0 #458599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+77
−0
Merged
microhs: init at 0.14.21.0 #458599
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,43 @@ | ||
| { | ||
| 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; | ||
| }; | ||
| }) | ||
This file contains hidden or 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 @@ | ||
| { | ||
| 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 | ||
| ''; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this is "built" from generated code that has equivalent properties to bytecode, could you set the appropriate
sourceProvenance?It'd also be great if the description mentioned the purpose/difference of this package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formula has been superseded now in #460845 which bootstraps without the generated blob using hugs (recently fixed in nixpkgs)
Once that is merged this will be deleted, so I wasn't planning on making any changes to this formula
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer this to be done regardless as it's not certain when/if that PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no reason it shouldn't be merged, and that PR is a superior approach to this one, so I'd rather contribute to it to help get it over the line!