mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
nix-on-droid: remove fallback for default nix < 2.4
Nixpkgs 22.11 has the default nix package with version 2.11.0.
This commit is contained in:
parent
588ab89b1d
commit
355aa408c2
2 changed files with 4 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE.
|
# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||||
|
|
||||||
{ bash, coreutils, lib, nix, nix_2_4, runCommand }:
|
{ bash, coreutils, lib, nix, runCommand }:
|
||||||
|
|
||||||
runCommand
|
runCommand
|
||||||
"nix-on-droid"
|
"nix-on-droid"
|
||||||
|
|
@ -14,6 +14,5 @@ runCommand
|
||||||
substituteInPlace $out/bin/nix-on-droid \
|
substituteInPlace $out/bin/nix-on-droid \
|
||||||
--subst-var-by bash "${bash}" \
|
--subst-var-by bash "${bash}" \
|
||||||
--subst-var-by coreutils "${coreutils}" \
|
--subst-var-by coreutils "${coreutils}" \
|
||||||
--subst-var-by nix "${nix}" \
|
--subst-var-by nix "${nix}"
|
||||||
--subst-var-by nixge24 "${if lib.versionAtLeast nix.version "2.4pre" then nix else nix_2_4}"
|
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -28,15 +28,13 @@ function nixActivationPackage() {
|
||||||
local extraArgs=("${@:2}"
|
local extraArgs=("${@:2}"
|
||||||
--extra-experimental-features nix-command
|
--extra-experimental-features nix-command
|
||||||
"${PASSTHROUGH_OPTS[@]}")
|
"${PASSTHROUGH_OPTS[@]}")
|
||||||
local nix=nix
|
|
||||||
if [[ -n "${FLAKE_CONFIG_URI}" ]]; then
|
if [[ -n "${FLAKE_CONFIG_URI}" ]]; then
|
||||||
nix=@nixge24@/bin/nix
|
|
||||||
extraArgs+=(--impure "${FLAKE_CONFIG_URI}.activationPackage")
|
extraArgs+=(--impure "${FLAKE_CONFIG_URI}.activationPackage")
|
||||||
else
|
else
|
||||||
extraArgs+=(--file "<nix-on-droid/modules>" activationPackage)
|
extraArgs+=(--file "<nix-on-droid/modules>" activationPackage)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$nix "${command}" "${extraArgs[@]}"
|
nix "${command}" "${extraArgs[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue