Add compat files for non flakes users
This commit is contained in:
parent
b89090f3ce
commit
7bc43946a9
25
default.nix
Normal file
25
default.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
system ? builtins.currentSystem,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||||
|
|
||||||
|
root = lock.nodes.${lock.root};
|
||||||
|
inherit (lock.nodes.${root.inputs.flake-compat}.locked)
|
||||||
|
owner
|
||||||
|
repo
|
||||||
|
rev
|
||||||
|
narHash
|
||||||
|
;
|
||||||
|
|
||||||
|
flake-compat = fetchTarball {
|
||||||
|
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
||||||
|
sha256 = narHash;
|
||||||
|
};
|
||||||
|
|
||||||
|
flake = import flake-compat {
|
||||||
|
inherit system;
|
||||||
|
src = ./.;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
flake.defaultNix
|
25
shell.nix
Normal file
25
shell.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
system ? builtins.currentSystem,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||||
|
|
||||||
|
root = lock.nodes.${lock.root};
|
||||||
|
inherit (lock.nodes.${root.inputs.flake-compat}.locked)
|
||||||
|
owner
|
||||||
|
repo
|
||||||
|
rev
|
||||||
|
narHash
|
||||||
|
;
|
||||||
|
|
||||||
|
flake-compat = fetchTarball {
|
||||||
|
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
||||||
|
sha256 = narHash;
|
||||||
|
};
|
||||||
|
|
||||||
|
flake = import flake-compat {
|
||||||
|
inherit system;
|
||||||
|
src = ./.;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
flake.shellNix
|
Loading…
Reference in a new issue