nix-bitcoin/pkgs/nixpkgs-pinned.nix
Erik Arvstedt f7c2133250
add flake support
This change is fully backwards compatible.

We continue to use the standard non-flake evaluation mode in our
examples and internal tooling until the flakes design has stabilized.

'clightning-plugins = pkgs.recurseIntoAttrs' in pkgs/default.nix is
needed by flake-utils.lib.flattenTree in flake.nix.
It transforms the packages in `clightning-plugins` to top-level packages
named like `clightning-plugins/summary`. (The flake attr `packages`
must be a non-nested attrset of derivations.)
2021-08-26 12:45:10 +02:00

21 lines
478 B
Nix

let
fetchNixpkgs = { rev, sha256 }:
builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz";
inherit sha256;
};
fetch = input: let
inherit (input) locked;
in fetchNixpkgs {
inherit (locked) rev;
sha256 = locked.narHash;
};
lockedInputs = (builtins.fromJSON (builtins.readFile ../flake.lock)).nodes;
in
{
nixpkgs = fetch lockedInputs.nixpkgs;
nixpkgs-unstable = fetch lockedInputs.nixpkgsUnstable;
}