forked from pub-solar/os
teutat3s
7655260456
Improved flake-compat Get the rev from the flake.lock file. Shouldn't be an issue for first time users as the guide instructs users to generate a lock file. `builtins.file` was used in accordance with nix.dev reccommendations. https://nix.dev/anti-patterns/language#reproducibility-referencing-top-level-directory-with Rm tempfix
15 lines
433 B
Nix
15 lines
433 B
Nix
let
|
|
lock = builtins.fromJSON (builtins.readFile builtins.path { path = ../../flake.lock; name = "lockPath"; });
|
|
flake = (import
|
|
(
|
|
fetchTarball {
|
|
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
|
sha256 = lock.nodes.flake-compat.locked.narHash;
|
|
}
|
|
)
|
|
{
|
|
src = builtins.path { path = ../../.; name = "projectRoot"; };
|
|
});
|
|
in
|
|
flake
|