mirror of
https://github.com/ilyakooo0/nix-bundle.git
synced 2024-09-11 06:55:53 +03:00
nix-bundle.sh: Also take app-specific extra targets from the given FILE or default
Previously, they were just taken from the `import <nixpkgs> {}` inside `./default.nix`.
This commit is contained in:
parent
3e54397176
commit
bb26366fea
@ -101,6 +101,18 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
# Add application-specific extra targets
|
||||
|
||||
if [ "${targets[0]}" = "nix-bundle" ] || [ "${targets[0]}" = "nixStable" ] || [ "${targets[0]}" = "nixUnstable" ] || [ "${targets[0]}" = "nix" ]
|
||||
then
|
||||
targets+=("bash")
|
||||
targets+=("bzip2")
|
||||
targets+=("coreutils")
|
||||
targets+=("gnutar")
|
||||
targets+=("gzip")
|
||||
targets+=("xz")
|
||||
fi
|
||||
|
||||
# Create tmp directory for the links produced by `nix build`
|
||||
|
||||
linkdir=$(mktemp -d)
|
||||
@ -142,9 +154,7 @@ fi
|
||||
# Determine bootstrap function -- This seems like a total hack!
|
||||
|
||||
bootstrap=nix-bootstrap
|
||||
if [ "${targets[0]}" = "nix-bundle" ] || [ "${targets[0]}" = "nixStable" ] || [ "${targets[0]}" = "nixUnstable" ] || [ "${targets[0]}" = "nix" ]; then
|
||||
bootstrap=nix-bootstrap-nix
|
||||
elif ! [ -z "$extra_target_paths" ]; then
|
||||
if ! [ -z "$extra_target_paths" ]; then
|
||||
bootstrap=nix-bootstrap-path
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user