aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-08-29 11:32:42 +0200
committerAlex Auvolat <alex@adnab.me>2023-08-29 11:32:42 +0200
commit2e90e1c124ea298de5e613de5a672f7c90ab6704 (patch)
tree76d1b50c353048d36e01ffcc8dda2223c0c4545d /nix
parent8ef42c9609bcefc642cc9739acb921dffba49b89 (diff)
parent32e5686ad8354a2b2b37807ba6d7add73a6d23ee (diff)
downloadgarage-2e90e1c124ea298de5e613de5a672f7c90ab6704.tar.gz
garage-2e90e1c124ea298de5e613de5a672f7c90ab6704.zip
Merge branch 'main' into nextv0.9.0-beta1
Diffstat (limited to 'nix')
-rw-r--r--nix/common.nix21
1 files changed, 12 insertions, 9 deletions
diff --git a/nix/common.nix b/nix/common.nix
index acc5ce7e..323c3882 100644
--- a/nix/common.nix
+++ b/nix/common.nix
@@ -1,14 +1,17 @@
let
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
- flakeCompatRev = lock.nodes.flake-compat.locked.rev;
- flakeCompat = fetchTarball {
- url =
- "https://github.com/edolstra/flake-compat/archive/${flakeCompatRev}.tar.gz";
- sha256 = lock.nodes.flake-compat.locked.narHash;
+
+ inherit (lock.nodes.flake-compat.locked) owner repo rev narHash;
+
+ flake-compat = fetchTarball {
+ url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
+ sha256 = narHash;
};
- flake = ((import flakeCompat) { src = ../.; }).defaultNix;
-in rec {
- pkgsSrc = flake.inputs.nixpkgs;
- cargo2nix = flake.inputs.cargo2nix;
+
+ flake = (import flake-compat { system = builtins.currentSystem; src = ../.; });
+in
+rec {
+ pkgsSrc = flake.defaultNix.inputs.nixpkgs;
+ cargo2nix = flake.defaultNix.inputs.cargo2nix;
cargo2nixOverlay = cargo2nix.overlays.default;
}