Is your feature request related to a problem? Please describe.
I am contributing on an OPAM-based OCaml project with both Nix and non-Nix people. I setup opam-nix for my convenience, but not everyone goes through it to work on the project in question. Now, for non-Nix OPAM-based scripts, it is common to prefix commands by opam exec -- to make sure that they are run in the correct environment. Because the fake opam command does not support exec, though, those scripts do not work for me. Depending on the version of opam-nix, I get either:
I would like for the fake opam command to recognize the exec subcommand. Considering that the fake opam only exists when in a Nix context, then opam exec should basically be a no-op running the given command (eg. opam exec - echo foo just runs echo foo).
Describe alternatives you've considered
For now, I am just stripping all uses of opam exec from scripts before running anything. This is doable and not very difficult. Alternatively, I could provide yet another fake opam in my Nix flake, taking precedence over opam-nix's, and recognizing exec. I feel the best would still be for it to be supported in opam-nix.
Is your feature request related to a problem? Please describe.
I am contributing on an OPAM-based OCaml project with both Nix and non-Nix people. I setup opam-nix for my convenience, but not everyone goes through it to work on the project in question. Now, for non-Nix OPAM-based scripts, it is common to prefix commands by
opam exec --
to make sure that they are run in the correct environment. Because the fakeopam
command does not supportexec
, though, those scripts do not work for me. Depending on the version of opam-nix, I get either:or
Describe the solution you'd like
I would like for the fake
opam
command to recognize theexec
subcommand. Considering that the fakeopam
only exists when in a Nix context, thenopam exec
should basically be a no-op running the given command (eg.opam exec - echo foo
just runsecho foo
).Describe alternatives you've considered
For now, I am just stripping all uses of
opam exec
from scripts before running anything. This is doable and not very difficult. Alternatively, I could provide yet another fakeopam
in my Nix flake, taking precedence over opam-nix's, and recognizingexec
. I feel the best would still be for it to be supported in opam-nix.