From 44655761c5e524814be760e19b6f024d379445b9 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 8 Jan 2022 08:53:26 +1300 Subject: [PATCH] Use locked nixpkgs version for nix-shell --- shell.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index 7b97e75..1def6db 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,15 @@ -{ pkgs ? import { } +{ pkgs ? ( + let + inherit (builtins) fromJSON readFile; + flakeLock = fromJSON (readFile ./flake.lock); + locked = flakeLock.nodes.nixpkgs.locked; + nixpkgs = assert locked.type == "github"; builtins.fetchTarball { + url = "https://github.com/${locked.owner}/${locked.repo}/archive/${locked.rev}.tar.gz"; + sha256 = locked.narHash; + }; + in + import nixpkgs { } + ) , srcDir ? null }: