You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to run builtins.compareVersions from the command line with argument strings. However, I can't figure out how to actually do that.
I've tried nix eval --raw --argstr a 1.23 --argstr b 1.24 --expr '{a, b}: builtins.compareVersions a b', which returns this:
nix eval --raw --argstr a 1.23 --argstr b 1.24 --expr '{a, b}: builtins.compareVersions a b'
error: cannot coerce a function to a string
--apply seems promising but it maps over the installable paths, which is not really what I want. I just want to call a nix function with arguments from the shell. It's unclear to me what --argstr actually does given this.
Problem
I want to run
builtins.compareVersions
from the command line with argument strings. However, I can't figure out how to actually do that.I've tried
nix eval --raw --argstr a 1.23 --argstr b 1.24 --expr '{a, b}: builtins.compareVersions a b'
, which returns this:--apply
seems promising but it maps over the installable paths, which is not really what I want. I just want to call a nix function with arguments from the shell. It's unclear to me what--argstr
actually does given this.Checklist
Proposal
Figure out and clarify what
--argstr
actually does withnix eval
.The text was updated successfully, but these errors were encountered: