Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix run: An expression which is a function should be passed the result of evaluating -f #2645

Open
mpickering opened this issue Jan 22, 2019 · 2 comments
Labels

Comments

@mpickering
Copy link

It is a major annoyance that -f does not interact well with the expression evaluation mode in nix run.

My proposed API is that the expression passed to nix run should be a function which is then passed the result of evaluating the argument to -f.

Previously:

nix run "(import <nixpkgs> {}).haskellPackages.ghcWithPackages (p: [ p.lens ])"

With my proposed change:

nix run "pkgs: pkgs.haskellPackages.ghcWithPackages (p: [ p.lens ]"
nix run -f my-nixpkgs.nix "pkgs: pkgs.haskellPackages.ghcWithPackages (p: [ p.lens ]"

This adds flexibility as now -f can be added to replace the default and the resulting expression can remain unchanged.

@stale
Copy link

stale bot commented Feb 21, 2021

I marked this as stale due to inactivity. → More info

@stale
Copy link

stale bot commented Apr 28, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this as completed Apr 28, 2022
@thufschmitt thufschmitt reopened this Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants