forked from mirrors/gomod2nix
shell.nix: Use pinned nixpkgs from flake.lock
This commit is contained in:
parent
c9d91f60a7
commit
d83a46b61f
1 changed files with 17 additions and 5 deletions
22
shell.nix
22
shell.nix
|
@ -1,9 +1,21 @@
|
||||||
{ pkgs ? import <nixpkgs> {
|
{ pkgs ? (
|
||||||
overlays = [
|
let
|
||||||
(import ./overlay.nix)
|
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 {
|
||||||
|
overlays = [
|
||||||
|
(import ./overlay.nix)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
)
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pythonEnv = pkgs.python3.withPackages (_: [ ]);
|
pythonEnv = pkgs.python3.withPackages (_: [ ]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue