-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #128: Add content hashes for pinned channels
46edb39 Add content hashes for pinned channels (Erik Arvstedt) 961e821 Rename contrib/ to helper/ (Erik Arvstedt) Pull request description: Unhashed external content is bad for security and performance (due to re-fetches when the cache times out). Use this simple fix until #78 is fleshed out. For testing, run this in the repo root dir: ```bash nix eval '(import ./pkgs/nixpkgs-pinned.nix)' ``` ACKs for top commit: jonasnick: ACK 46edb39 Tree-SHA512: cb098a4714aecf00e8d0f9fe6d388b6322416c1d2f8d55b54dc16328145331a87a71fbf68e2faa85105727cbd6370542799f1c2d84ac2bee90a6710b96eba9bd
- Loading branch information
Showing
4 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
rev=$1 | ||
sha256=$(nix-prefetch-url --unpack https://github.com/nixos/nixpkgs-channels/archive/$rev.tar.gz) | ||
echo "rev = \"$rev\";" | ||
echo "sha256 = \"$sha256\";" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
let | ||
fetch = rev: builtins.fetchTarball "https://github.com/nixos/nixpkgs-channels/archive/${rev}.tar.gz"; | ||
fetch = { rev, sha256 }: | ||
builtins.fetchTarball { | ||
url = "https://github.com/nixos/nixpkgs-channels/archive/${rev}.tar.gz"; | ||
inherit sha256; | ||
}; | ||
in | ||
{ | ||
nixpkgs = fetch "27a5ddcf747fb2bb81ea9c63f63f2eb3eec7a2ec"; | ||
nixpkgs-unstable = fetch "4cd2cb43fb3a87f48c1e10bb65aee99d8f24cb9d"; | ||
# To update, run ../helper/fetch-channel REV | ||
nixpkgs = fetch { | ||
rev = "27a5ddcf747fb2bb81ea9c63f63f2eb3eec7a2ec"; | ||
sha256 = "1bp11q2marsqj3g2prdrghkhmv483ab5pi078d83xkhkk2jh3h81"; | ||
}; | ||
nixpkgs-unstable = fetch { | ||
rev = "4cd2cb43fb3a87f48c1e10bb65aee99d8f24cb9d"; | ||
sha256 = "1d6rmq67kdg5gmk94wx2774qw89nvbhy6g1f2lms3c9ph37hways"; | ||
}; | ||
} |