Comma runs software without installing it. [maintainers=@Artturin,@burke,@DavHau]
Go to file
Burke Libbey 8a0b3041e0 .
2020-05-02 21:32:07 -04:00
, . 2020-05-02 21:32:07 -04:00
default.nix ,q 2020-05-02 14:17:19 -04:00
install-symlinks ,q 2020-05-02 14:17:19 -04:00
LICENSE MIT 2020-04-29 10:23:34 -04:00
README.md ,q 2020-05-02 14:17:19 -04:00

Comma: the laconic Nix toolkit

, runs software without installing it.

,i installs that software to your nix-env profile.

,q has a suite of subcommands for interacting with the Nix Store:

,ql  <regex>       : (list nix-store entries matching regex)
,qs  <store-path*> : nix show-derivation

,qo  <store-path*> : nix-store --query --outputs
,qd  <store-path*> : nix-store --query --deriver

,q-  <store-path*> : nix-store --query --references
,q-- <store-path*> : nix-store --query --requisites
,q+  <store-path*> : nix-store --query --referers
,q++ <store-path*> : nix-store --query --referers-closure

,qx  <store-path*> : nix-store --realise

Anything taking <store-path*> can also be called like:
  echo <store-path*> | ,q-

Basically it just wraps together nix run and nix-index. You stick a , in front of a command to run it from whatever location it happens to occupy in nixpkgs without really thinking about it.

Installation

nix-env -i -f .

, Usage

See a quick demo of , on YouTube

, cowsay neato
,i ripgrep

,q Usage

,q-- ~/.nix-profile | grep ruby | ,qd | ,qo | grep devdoc | ,qx

This is equivalent to something like:

rubies=$(nix-store -qR ~/.nix-profile | grep ruby)
docs=$(nix-store -q --outputs $(nix-store -qd $rubies) | grep devdoc)
nix-store --realise $docs