Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefloweringash/1511527c46d22730480c2f2e745ae7ad to your computer and use it in GitHub Desktop.
Save thefloweringash/1511527c46d22730480c2f2e745ae7ad to your computer and use it in GitHub Desktop.
What is `nix run`? How is it meant to work?
$ nix run nixpkgs.rubocop
error: attribute 'nixpkgs' in selection path 'nixpkgs.rubocop' not found
$ nix run -f '<nixpkgs>' rubocop
tourou:~ lorne$ which rubocop
/run/current-system/sw/bin/rubocop
tourou:~ lorne$ exit
$ nix run -f '<nixpkgs>' rubocop -c which rubocop
/nix/store/j7my41m8s9irhyczlscy6yd5lcgsclck-rubocop-0.59.1/bin/rubocop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment