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/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/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 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"; + }; }