2022-04-17 22:36:31 +03:00
|
|
|
# comma
|
2020-04-29 01:05:04 +03:00
|
|
|
|
|
|
|
Comma runs software without installing it.
|
|
|
|
|
2022-04-17 22:36:31 +03:00
|
|
|
Basically it just wraps together `nix shell -c` and `nix-index`. You stick a `,` in front of a command to
|
2020-04-29 01:05:04 +03:00
|
|
|
run it from whatever location it happens to occupy in `nixpkgs` without really thinking about it.
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2022-04-17 22:36:31 +03:00
|
|
|
- Nix with [Flakes](https://nixos.wiki/wiki/Flakes):
|
2020-04-29 01:05:04 +03:00
|
|
|
|
2022-04-17 22:36:31 +03:00
|
|
|
```bash
|
|
|
|
$ nix profile install github:nix-community/comma
|
|
|
|
```
|
|
|
|
|
|
|
|
- No flakes:
|
2020-04-29 01:05:04 +03:00
|
|
|
|
2022-04-17 22:36:31 +03:00
|
|
|
```bash
|
|
|
|
$ nix-env -i -f "https://github.com/nix-community/comma/archive/master.tar.gz"
|
|
|
|
```
|
|
|
|
|
2022-04-19 02:11:48 +03:00
|
|
|
## NixOS installation
|
|
|
|
|
|
|
|
- No flakes:
|
|
|
|
|
|
|
|
replace "v1.2.0" with the latest version
|
|
|
|
|
|
|
|
```nix
|
|
|
|
environment.systemPackages =
|
|
|
|
let
|
|
|
|
comma = (import (pkgs.fetchFromGitHub {
|
|
|
|
owner = "nix-community";
|
|
|
|
repo = "comma";
|
|
|
|
rev = "v1.2.0";
|
|
|
|
sha256 = "0000000000000000000000000000000000000000000000000000";
|
|
|
|
})).default;
|
|
|
|
in [ comma ];
|
|
|
|
```
|
|
|
|
|
2023-06-06 21:57:39 +03:00
|
|
|
|
|
|
|
- Flakes
|
|
|
|
|
|
|
|
Add
|
|
|
|
|
|
|
|
```nix
|
|
|
|
inputs.comma = {
|
|
|
|
url = "github:nix-community/comma";
|
|
|
|
};
|
|
|
|
```
|
|
|
|
|
|
|
|
to inputs
|
|
|
|
|
|
|
|
and
|
|
|
|
|
|
|
|
`inputs.comma.overlays.default` (or comma without `inputs.` if you use explicit input arguments)
|
|
|
|
|
|
|
|
to nixpkgs.overlays
|
|
|
|
|
|
|
|
|
2022-04-17 22:36:31 +03:00
|
|
|
## Usage
|
2020-04-29 17:28:09 +03:00
|
|
|
|
2020-04-29 01:05:04 +03:00
|
|
|
```bash
|
|
|
|
, cowsay neato
|
|
|
|
```
|
2022-04-15 15:02:05 +03:00
|
|
|
|
|
|
|
## Prebuilt index
|
|
|
|
|
|
|
|
https://github.com/Mic92/nix-index-database
|