ci: pin nixpkgs to locked version instead of <nixpkgs>
This commit is contained in:
parent
b21cbda697
commit
f20db9aa1b
2
ci.nix
2
ci.nix
@ -9,7 +9,7 @@
|
||||
# then your CI will be able to build and cache only those packages for
|
||||
# which this is possible.
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
{ pkgs ? import ./flake-compat.nix { src = ./.; } }:
|
||||
|
||||
with builtins;
|
||||
|
||||
|
12
flake-compat.nix
Normal file
12
flake-compat.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ src, system ? builtins.currentSystem or "unknown-system" }:
|
||||
|
||||
let
|
||||
lockFilePath = "${src}/flake.lock";
|
||||
lockFile = builtins.fromJSON (builtins.readFile lockFilePath);
|
||||
nixpkgs = lockFile.nodes.nixpkgs.locked;
|
||||
tarball = fetchTarball {
|
||||
url = "https://github.com/${nixpkgs.owner}/${nixpkgs.repo}/archive/${nixpkgs.rev}.zip";
|
||||
sha256 = nixpkgs.narHash;
|
||||
};
|
||||
in
|
||||
import tarball { inherit system; }
|
Loading…
Reference in New Issue
Block a user