aboutsummaryrefslogtreecommitdiff
path: root/nix/common.nix
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-04-25 14:56:49 +0000
committerAlex <alex@adnab.me>2023-04-25 14:56:49 +0000
commit1ecd88c01f0857139921214a264128e5639e31db (patch)
treeeeca4d33aabec4150296f6c475224a8510563204 /nix/common.nix
parenta16eb7e4b8344d2f58c09a249b7b1bd17d339a35 (diff)
parent5efcdc0de3121da18e7531a9f8196ef38cecd93c (diff)
downloadgarage-1ecd88c01f0857139921214a264128e5639e31db.tar.gz
garage-1ecd88c01f0857139921214a264128e5639e31db.zip
Merge pull request 'Update rust toolchain to 1.68 and simplify Nix stuff' (#554) from nix-update-simplify into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/554
Diffstat (limited to 'nix/common.nix')
-rw-r--r--nix/common.nix25
1 files changed, 10 insertions, 15 deletions
diff --git a/nix/common.nix b/nix/common.nix
index 57f354dd..acc5ce7e 100644
--- a/nix/common.nix
+++ b/nix/common.nix
@@ -1,19 +1,14 @@
-rec {
- # * Fixed dependencies
- pkgsSrc = fetchTarball {
- # As of 2022-10-13
+let
+ lock = builtins.fromJSON (builtins.readFile ../flake.lock);
+ flakeCompatRev = lock.nodes.flake-compat.locked.rev;
+ flakeCompat = fetchTarball {
url =
- "https://github.com/NixOS/nixpkgs/archive/a3073c49bc0163fea6a121c276f526837672b555.zip";
- sha256 = "1bz632psfbpmicyzjb8b4265y50shylccvfm6ry6mgnv5hvz324s";
+ "https://github.com/edolstra/flake-compat/archive/${flakeCompatRev}.tar.gz";
+ sha256 = lock.nodes.flake-compat.locked.narHash;
};
- cargo2nixSrc = fetchGit {
- # As of 2022-10-18: two small patches over unstable branch, one for clippy and one to fix feature detection
- url = "https://github.com/Alexis211/cargo2nix";
- ref = "custom_unstable";
- rev = "a7a61179b66054904ef6a195d8da736eaaa06c36";
- };
-
- # * Shared objects
- cargo2nix = import cargo2nixSrc;
+ flake = ((import flakeCompat) { src = ../.; }).defaultNix;
+in rec {
+ pkgsSrc = flake.inputs.nixpkgs;
+ cargo2nix = flake.inputs.cargo2nix;
cargo2nixOverlay = cargo2nix.overlays.default;
}