{inputs, lock}: change lock format and provide hash

This commit is contained in:
Wroclaw 2024-06-18 07:44:54 +02:00
parent ba94153c3b
commit 672807280e
3 changed files with 11 additions and 4 deletions

View file

@ -5,6 +5,10 @@ let self = {
{
inherit lock;
nixpkgs = builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/${lock.nixpkgs}.tar.gz";
nixpkgs = builtins.fetchTarball {
name = "nixpkgs";
url = "https://github.com/NixOS/nixpkgs/archive/${lock.nixpkgs.revision}.tar.gz";
sha256 = "${lock.nixpkgs.sha256}";
};
};
in self

View file

@ -2,7 +2,7 @@
selfLib: superLib: {
trivial = superLib.trivial // {
versionSuffix = ".git.${builtins.substring 0 12 inputs.lock.nixpkgs}";
revisionWithDefault = default: inputs.lock.nixpkgs or default;
versionSuffix = ".git.${builtins.substring 0 12 inputs.lock.nixpkgs.revision}";
revisionWithDefault = default: inputs.lock.nixpkgs.revision or default;
};
}

View file

@ -1,3 +1,6 @@
{
nixpkgs = "2975732531b5fa6e728f837c6f090335cbef5285" /*git revision*/;
nixpkgs = {
revision = "2975732531b5fa6e728f837c6f090335cbef5285";
sha256 = "0hwawvw8kf70f87ygv9pjndwwiddigh5vv1w5jdbp3dxv9slsx2v";
};
}