aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorEdwin Mackenzie-Owen <edwin.mowen@gmail.com>2023-03-06 20:51:58 +0100
committerEdwin Mackenzie-Owen <edwin.mowen@gmail.com>2023-03-06 21:11:24 +0100
commit934431d06ca4e3daea07b7fb4fb2789bd9b053b3 (patch)
treeb00f16a33278e56b9a017e9657460a24f2fe8a33 /default.nix
parent02bf5219685fcbd762188fa39946495293e6ce5f (diff)
add flake-compat to flake.nix and use sha256 in default.nix
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/default.nix b/default.nix
index 00ec5b617..2cccff28d 100644
--- a/default.nix
+++ b/default.nix
@@ -1,3 +1,10 @@
-(import (fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz") {
- src = ./.;
-}).defaultNix
+(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 = ./.; }
+).defaultNix