about summary refs log tree commit diff
path: root/pkgs/by-name/de/devenv/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/de/devenv/package.nix')
-rw-r--r--pkgs/by-name/de/devenv/package.nix27
1 files changed, 18 insertions, 9 deletions
diff --git a/pkgs/by-name/de/devenv/package.nix b/pkgs/by-name/de/devenv/package.nix
index 29c8333e4117..5e1ab56f7026 100644
--- a/pkgs/by-name/de/devenv/package.nix
+++ b/pkgs/by-name/de/devenv/package.nix
@@ -6,7 +6,7 @@
 , testers
 , cachix
 , darwin
-, libgit2
+, sqlx-cli
 , nixVersions
 , openssl
 , pkg-config
@@ -19,15 +19,14 @@ let
     src = fetchFromGitHub {
       owner = "domenkozar";
       repo = "nix";
-      rev = "1e61e9f40673f84c3b02573145492d8af581bec5";
-      hash = "sha256-uDwWyizzlQ0HFzrhP6rVp2+2NNA+/TM5zT32dR8GUlg=";
+      rev = "f6c5ae4c1b2e411e6b1e6a8181cc84363d6a7546";
+      hash = "sha256-X8ES7I1cfNhR9oKp06F6ir4Np70WGZU5sfCOuNBEwMg=";
     };
-    buildInputs = old.buildInputs ++ [ libgit2 ];
     doCheck = false;
     doInstallCheck = false;
   });
 
-  version = "1.1";
+  version = "1.3.1";
 in rustPlatform.buildRustPackage {
   pname = "devenv";
   inherit version;
@@ -36,16 +35,26 @@ in rustPlatform.buildRustPackage {
     owner = "cachix";
     repo = "devenv";
     rev = "v${version}";
-    hash = "sha256-7o2OBUwE51ZNMCBB4rg5LARc8S6C9vuzRXnqk3d/lN4=";
+    hash = "sha256-FhlknassIb3rKEucqnfFAzgny1ANmenJcTyRaXYwbA0=";
   };
 
-  cargoHash = "sha256-Yos8iOWfRJcOqbanskUg75cX05dvxWnq42NhmQt/jf4=";
+  cargoHash = "sha256-dJ8A2kVXkpJcRvMLE/IawFUZNJqok/IRixTRGtLsE3w=";
 
   buildAndTestSubdir = "devenv";
 
-  nativeBuildInputs = [ makeWrapper pkg-config ];
+  # Force sqlx to use the prepared queries
+  SQLX_OFFLINE = true;
+  # A local database to use for preparing queries
+  DATABASE_URL = "sqlite:nix-eval-cache.db";
 
-  buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
+  preBuild = ''
+    cargo sqlx database setup --source devenv-eval-cache/migrations
+    cargo sqlx prepare --workspace
+  '';
+
+  nativeBuildInputs = [ makeWrapper pkg-config sqlx-cli ];
+
+  buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
     darwin.apple_sdk.frameworks.SystemConfiguration
   ];