devenv: add version test

This commit is contained in:
Ivan Mincik 2024-03-25 21:24:12 +01:00
parent eb1beb497b
commit c40032835e
1 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,7 @@
, fetchFromGitHub
, makeWrapper
, rustPlatform
, testers
, cachix
, darwin
@ -10,6 +11,8 @@
, nix
, openssl
, pkg-config
, devenv # required to run version test
}:
let
@ -50,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";