How I get option applied with exec?

What I’m trying to do is running

exec nix --extra-experimental-features "nix-command flakes" shell -f "$(dirname ${BASH_SOURCE[0]})" arion -c arion "$@"

instead of

exec nix run -f "$(dirname ${BASH_SOURCE[0]})" arion -c arion "$@"

in this file: arion/run-arion-via-nix at c2bdf8e0478a4bd3cf63f1baec1986a81861a761 · hercules-ci/arion · GitHub

But all I’m still getting is:

error: Cannot call ‘builtins.getFlake’ because experimental Nix feature ‘flakes’ is disabled. You can enable it via ‘–extra-experimental-features flakes’.

  at /home/573/arion/arion-compose.nix:1:2:

       1| (builtins.getFlake (toString ./.)).packages.x86_64-linux.arion-compose
        |  ^

Nevermind, seems to be more like arion command is not passed those flags correctly.

./execdebug 'nix' --extra-experimental-features "nix-command flakes" "shell" -f "$(dirname ${BASH_SOURCE[0]})" 'arion' '-c' 'arion' --nix-arg --option --nix-arg experimental-features --nix-arg "nix-command flakes" 'up' '-d'

with ./execdebug being

#! /bin/sh -
exec "$@"

Anyway that is a different topic, see here Add experimental flake example by roberth · Pull Request #114 · hercules-ci/arion · GitHub

1 Like