Conversation
nzhang-zh
commented
Aug 1, 2020
| (lib | ||
| { libBuildInfo = libbi | ||
| { cppOptions = cppOptions libbi | ||
| ++ map fmtCppArg paths |
Contributor
Author
There was a problem hiding this comment.
Finds the path of external programs to bake into the binary and pass that in through cpp
nzhang-zh
commented
Aug 1, 2020
| where | ||
|
|
||
| hello :: FilePath | ||
| hello = PATH_TO_HELLO |
Contributor
Author
There was a problem hiding this comment.
Receives the external tool paths through cpp
Contributor
Author
|
The build output will have ~/m/Haskell-Demo ❯❯❯ nix-build release.nix -A application
...
~/m/Haskell-Demo ❯❯❯ nix-store -qR result
...
/nix/store/gql5x518q1xh1vd0ka6my5vg3j1xfqw1-hello-1.0.0.2
...
~/m/Haskell-Demo ❯❯❯ ./result/bin/haskell-demo-deps-exe
Hello, World! |
Merged
Contributor
Author
Member
|
This can no longer be merged. So the notes of how to do this should go into the issue. |
Closed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds an example to bake runtime dependency (e.g. shellout cli programs)
into the binary so that it becomes part of the closure of the build output.
Based on NixOS/cabal2nix#466
Tries to solve #7