chore: add nix
This commit is contained in:
parent
0a16d339a4
commit
499f13a634
7 changed files with 334 additions and 0 deletions
12
nix/flake-parse.nix
Normal file
12
nix/flake-parse.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
inputName:
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
|
||||
namedNode = lock.nodes.${lock.nodes.root.inputs.${inputName}}.locked;
|
||||
githubTarball = fetchTarball {
|
||||
url =
|
||||
namedNode.url
|
||||
or "https://github.com/${namedNode.owner}/${namedNode.repo}/archive/${namedNode.rev}.tar.gz";
|
||||
sha256 = namedNode.narHash;
|
||||
};
|
||||
in
|
||||
githubTarball
|
||||
Loading…
Add table
Add a link
Reference in a new issue