chore: add nix

This commit is contained in:
r0chd 2026-09-09 01:51:29 +02:00
parent 0a16d339a4
commit 499f13a634
No known key found for this signature in database
7 changed files with 334 additions and 0 deletions

12
nix/flake-parse.nix Normal file
View 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