From 961e8217a92efd9f92f01a56231dd63bbf947b8d Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 11 Nov 2019 18:43:10 +0100 Subject: [PATCH 1/2] Rename contrib/ to helper/ --- docs/install.md | 2 +- {contrib => helper}/vbox-resize-disk1.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {contrib => helper}/vbox-resize-disk1.sh (100%) diff --git a/docs/install.md b/docs/install.md index 903ac0f..1c74e34 100644 --- a/docs/install.md +++ b/docs/install.md @@ -128,7 +128,7 @@ See [usage.md](usage.md) for usage instructions, such as how to update. To resize the VM disk image, you can use this helper script from within nix-shell: ``` -./contrib/vbox-resize-disk1.sh --help +./helper/vbox-resize-disk1.sh --help ``` ---- diff --git a/contrib/vbox-resize-disk1.sh b/helper/vbox-resize-disk1.sh similarity index 100% rename from contrib/vbox-resize-disk1.sh rename to helper/vbox-resize-disk1.sh From 46edb39d2f33d0386b683f7a2112b5fe801e4cc7 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 7 Nov 2019 21:57:00 +0100 Subject: [PATCH 2/2] Add content hashes for pinned channels --- helper/fetch-channel | 6 ++++++ pkgs/nixpkgs-pinned.nix | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100755 helper/fetch-channel diff --git a/helper/fetch-channel b/helper/fetch-channel new file mode 100755 index 0000000..708e4ec --- /dev/null +++ b/helper/fetch-channel @@ -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\";" diff --git a/pkgs/nixpkgs-pinned.nix b/pkgs/nixpkgs-pinned.nix index b3ca47f..2b7a2c8 100644 --- a/pkgs/nixpkgs-pinned.nix +++ b/pkgs/nixpkgs-pinned.nix @@ -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"; + }; }