mirror of
https://github.com/NotAShelf/nyxexprs.git
synced 2025-10-01 22:43:39 +00:00
nix: simplify flake-compat exp
This commit is contained in:
parent
3d0975e08c
commit
309c11400b
1 changed files with 10 additions and 20 deletions
30
default.nix
30
default.nix
|
@ -1,21 +1,11 @@
|
||||||
(
|
(import (
|
||||||
import
|
let
|
||||||
(
|
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
|
||||||
let
|
flakeCompatNode = lock.nodes.${lock.nodes.root.inputs.flake-compat}.locked;
|
||||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
in
|
||||||
nodeName = lock.nodes.root.inputs.flake-compat;
|
fetchTarball {
|
||||||
in
|
url = "https://github.com/${flakeCompatNode.owner}/${flakeCompatNode.repo}/archive/${flakeCompatNode.rev}.tar.gz";
|
||||||
fetchTarball {
|
sha256 = flakeCompatNode.narHash;
|
||||||
url =
|
}
|
||||||
lock.nodes.${
|
) {src = ./.;})
|
||||||
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 = ./.;}
|
|
||||||
)
|
|
||||||
.defaultNix
|
.defaultNix
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue