nix: support legacy nix using 'flake-compat'

This commit is contained in:
Bruno BELANYI 2021-03-29 18:04:56 +00:00
parent 2954981e0f
commit a961db0433
4 changed files with 47 additions and 0 deletions

13
shell.nix Normal file
View file

@ -0,0 +1,13 @@
(import
(
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
in
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 = ./.;
}).shellNix