]> git.scottworley.com Git - pinch/blame_incremental - README
Links & feature comparison with require.nix, niv, flakes
[pinch] / README
... / ...
CommitLineData
1# Pinch
2
3PIN CHannels - a simple drop-in replacement for `nix-channel --update`.
4
5Example usage, being invoked on the example "channels" file included here:
6
7 $ python3 pinch.py pin channels
8 $ python3 pinch.py update channels
9
10
11The first "pin" command will add these fields to the file:
12
13 [nixos]
14 channel_url = https://channels.nixos.org/nixos-20.03
15 git_repo = https://github.com/NixOS/nixpkgs.git
16 git_ref = nixos-20.03
17 +release_name = nixos-20.03beta1155.29eddfc36d7
18 +tarball_url = https://releases.nixos.org/nixos/20.03/nixos-20.03beta1155.29eddfc36d7/nixexprs.tar.xz
19 +tarball_sha256 = 9c1d182af2af64e5e8799e256a4a6dc1fed324ba06cb5f76c938dc63b64f0959
20 +git_revision = 29eddfc36d720dcc4822581175217543b387b1e8
21
22 [nixos-hardware]
23 git_repo = https://github.com/NixOS/nixos-hardware.git
24 git_ref = master
25 +release_name = nixos-hardware.git-1585241157-edb7199b5c4
26 +git_revision = edb7199b5c4f1db34a7253d4cabf6cf690521a92
27
28The second "update" command applies these changes to your nix channels, like `nix-channel --update` does.
29
30### Feature comparison
31
32| Feature | nix-channel | [require.nix][] | [niv][] | [flakes][] | pinch |
33| ---------------------------- | :---------: | :-------------: | :-----: | :--------: | :---: |
34| Same version across machines | - | yes | yes | yes | yes |
35| Verifies hashes | - | ? | yes | yes | yes |
36| Fetch from git | - | ? | yes | yes | yes |
37| Fetch from git with ssh key | - | ? | yes | yes? | yes |
38| command_not_found_handle | yes | ? | - | yes | yes |
39| Verifies tarball == git repo | - | - | - | - | yes |
40| Rejects force pushes | - | - | - | - | yes |
41| Ready to use today | yes | - | yes | - | yes |
42
43[require.nix]: https://www.youtube.com/watch?v=DHOLjsyXPtM
44[niv]: https://github.com/nmattia/niv
45[flakes]: https://github.com/nixos/rfcs/pull/49