mirror of
https://github.com/tweag/gomod2nix.git
synced 2024-11-08 11:39:11 +00:00
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> {
|
||||
overlays = [
|
||||
(import ./overlay.nix)
|
||||
];
|
||||
}
|
||||
{ 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 {
|
||||
overlays = [
|
||||
(import ./overlay.nix)
|
||||
];
|
||||
}
|
||||
)
|
||||
}:
|
||||
|
||||
let
|
||||
pythonEnv = pkgs.python3.withPackages (_: [ ]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue