-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
nix-bundle.sh: Modernize CLI #48
nix-bundle.sh: Modernize CLI #48
Conversation
TODOs: * [ ] Update `README.md` * [ ] What about `nix2appimage.sh`?
809f99d
to
14157e0
Compare
Can somebody please explain to me what |
The idea is you can put multiple paths into a tarball. For instance you might want to add |
nix-bundle.sh
Outdated
nix build "${build_flags[@]}" "$target" || exit $? | ||
if [ -z "$target_path" ] | ||
then | ||
target_path="$(readlink "$linkdir/result")" |
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.
How does this handle multiple targets?
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.
extra_target_paths contains the store paths (separated by whitespace) to the extra targets.
|
||
expr="(with import $nix_file {}; $bootstrap { target = $target_path; extraTargets = [$extra_target_paths ]; run = \"$bin\"; })" | ||
|
||
echo $expr | ||
|
||
out=$(nix-store --no-gc-warning -r $(nix-instantiate --no-gc-warning -E "$expr")) |
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 should normally do the actual build, The hope is that it avoids creating /result
dirs in the user's directory.
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.
Although it's not clear how to handle some of the new flags like -f
, etc. nix-instantiate
does allow --arg
and --argstr
however.
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.
nix build
has nicer output and it allows to use the modern nix cli. The result
link is created in a temporary directory.
@edolstra added some handling for "app"s which have a "program" attr. NixOS/nix#2909. I am not sure if we can use that effectively here, since it is still unreleased. |
…LE or default Previously, they were just taken from the `import <nixpkgs> {}` inside `./default.nix`.
Possible solution to #47.
TODOs:
README.md
nix2appimage.sh
?