From 949f20f8ba900a02dfceb5c61ccef927ce704d87 Mon Sep 17 00:00:00 2001 From: Matthew Toohey Date: Sun, 5 Jun 2022 17:03:18 -0400 Subject: [PATCH] fix: don't force the use of nix_2_4 for flakes when nix is new enough --- nix-on-droid/default.nix | 4 ++-- nix-on-droid/nix-on-droid.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nix-on-droid/default.nix b/nix-on-droid/default.nix index 36457b8..df13430 100644 --- a/nix-on-droid/default.nix +++ b/nix-on-droid/default.nix @@ -1,6 +1,6 @@ # 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 "nix-on-droid" @@ -15,5 +15,5 @@ runCommand --subst-var-by bash "${bash}" \ --subst-var-by coreutils "${coreutils}" \ --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}" '' diff --git a/nix-on-droid/nix-on-droid.sh b/nix-on-droid/nix-on-droid.sh index d1969e9..72e7d0a 100644 --- a/nix-on-droid/nix-on-droid.sh +++ b/nix-on-droid/nix-on-droid.sh @@ -28,7 +28,7 @@ function nixActivationPackage() { local extraArgs=("${@:2}" "${PASSTHROUGH_OPTS[@]}") local nix=nix if [[ -n "${FLAKE_CONFIG_URI}" ]]; then - nix=@nix24@/bin/nix + nix=@nixge24@/bin/nix extraArgs+=(--impure "${FLAKE_CONFIG_URI}.activationPackage") else extraArgs+=(--file "" activationPackage)