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
With the legacy CLI, running nix-build '<nixpkgs>' -A feh would build and print feh's default output.
With the new CLI (starting from 1ddabe1), nix build nixpkgs#feh --print-out-paths prints feh.man, then feh.out, so if you only want the default output you have to specify it explicitly: nixpkgs#feh^out. This is not ideal as you need to know the name of the default output.
My ideas for solving this, in decreasing order of preference:
only build the default output by default instead of outputsToInstall (i.e. revert 1ddabe1), at least for nix build
extend the ^ syntax to be able to specify only the default output (ideas: feh^, feh^default, feh^0)
make sure the outputs are kept in their original order so that you can just take the first line (and maybe use nlohmann::ordered_json when printing JSON)
With the legacy CLI, running
nix-build '<nixpkgs>' -A fehwould build and printfeh's default output.With the new CLI (starting from 1ddabe1),
nix build nixpkgs#feh --print-out-pathsprintsfeh.man, thenfeh.out, so if you only want the default output you have to specify it explicitly:nixpkgs#feh^out. This is not ideal as you need to know the name of the default output.My ideas for solving this, in decreasing order of preference:
outputsToInstall(i.e. revert 1ddabe1), at least fornix build^syntax to be able to specify only the default output (ideas:feh^,feh^default,feh^0)nlohmann::ordered_jsonwhen printing JSON)outputNamefield to the output ofnix build --jsoncontaining the default outputCrazier ideas that would require big changes to the ecosystem:
outfeh^out,man, mergeoutandmaninto a single output path