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