README: fix node name look-up

This commit is contained in:
Gerg-L 2023-10-23 20:54:55 -04:00
parent 0f9255e01c
commit b7cd594063
No known key found for this signature in database

View file

@ -13,10 +13,13 @@ Afterwards, create a `default.nix` file containing the following:
```nix
(import
(
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
nodeName = lock.nodes.root.inputs.flake-compat;
in
fetchTarball {
url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
url = lock.nodes.${nodeName}.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
sha256 = lock.nodes.${nodeName}.locked.narHash;
}
)
{ src = ./.; }