mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
fix: don't force the use of nix_2_4 for flakes when nix is new enough
This commit is contained in:
parent
e7e7d1347f
commit
949f20f8ba
2 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE.
|
# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||||
|
|
||||||
{ bash, coreutils, nix, nix_2_4, runCommand }:
|
{ bash, coreutils, lib, nix, nix_2_4, runCommand }:
|
||||||
|
|
||||||
runCommand
|
runCommand
|
||||||
"nix-on-droid"
|
"nix-on-droid"
|
||||||
|
|
@ -15,5 +15,5 @@ runCommand
|
||||||
--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 nix24 "${nix_2_4}"
|
--subst-var-by nixge24 "${if lib.versionAtLeast nix.version "2.4pre" then nix else nix_2_4}"
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ function nixActivationPackage() {
|
||||||
local extraArgs=("${@:2}" "${PASSTHROUGH_OPTS[@]}")
|
local extraArgs=("${@:2}" "${PASSTHROUGH_OPTS[@]}")
|
||||||
local nix=nix
|
local nix=nix
|
||||||
if [[ -n "${FLAKE_CONFIG_URI}" ]]; then
|
if [[ -n "${FLAKE_CONFIG_URI}" ]]; then
|
||||||
nix=@nix24@/bin/nix
|
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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue