about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/de/devenv/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/de/devenv/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/de/devenv/package.nix33
1 files changed, 21 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/by-name/de/devenv/package.nix b/nixpkgs/pkgs/by-name/de/devenv/package.nix
index 17755df44b31..2d482956eed4 100644
--- a/nixpkgs/pkgs/by-name/de/devenv/package.nix
+++ b/nixpkgs/pkgs/by-name/de/devenv/package.nix
@@ -1,14 +1,18 @@
-{ stdenv
-, lib
-, openssl
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeWrapper
+, rustPlatform
+, testers
+
+, cachix
 , darwin
 , libgit2
-, makeWrapper
 , nix
+, openssl
 , pkg-config
-, rustPlatform
-, cachix
-, fetchFromGitHub
+
+, devenv  # required to run version test
 }:
 
 let
@@ -25,7 +29,7 @@ let
     doInstallCheck = false;
   });
 
-  version = "1.0.1";
+  version = "1.0.2";
 in rustPlatform.buildRustPackage {
   pname = "devenv";
   inherit version;
@@ -34,12 +38,10 @@ in rustPlatform.buildRustPackage {
     owner = "cachix";
     repo = "devenv";
     rev = "v${version}";
-    hash = "sha256-9LnGe0KWqXj18IV+A1panzXQuTamrH/QcasaqnuqiE0=";
+    hash = "sha256-JCxjmWr2+75KMPOoVybNZhy9zhhrg9BAKA8D+J6MNBc=";
   };
 
-  cargoLock = {
-    lockFile = ./Cargo.lock;
-  };
+  cargoHash = "sha256-FGB8p9ClGokYDrV0b47PnjeSlOv7p+IgThNajve3yms=";
 
   nativeBuildInputs = [ makeWrapper pkg-config ];
 
@@ -51,6 +53,13 @@ in rustPlatform.buildRustPackage {
     wrapProgram $out/bin/devenv --set DEVENV_NIX ${devenv_nix} --prefix PATH ":" "$out/bin:${cachix}/bin"
   '';
 
+  passthru.tests = {
+    version = testers.testVersion {
+      package = devenv;
+      command = "export XDG_DATA_HOME=$PWD; devenv version";
+    };
+  };
+
   meta = {
     changelog = "https://github.com/cachix/devenv/releases/tag/v${version}";
     description = "Fast, Declarative, Reproducible, and Composable Developer Environments";