lol

treewide: add version tests (#255781)

authored by

Austin Horstman and committed by
GitHub
ad07cd4f ba267807

+54 -5
+5 -1
pkgs/applications/file-managers/ranger/default.nix
··· 1 - { lib, fetchFromGitHub, python3Packages, file, less, highlight, w3m 1 + { lib, fetchFromGitHub, python3Packages, file, less, highlight, w3m, ranger, testers 2 2 , imagePreviewSupport ? true 3 3 , neoVimSupport ? true 4 4 , improvedEncodingDetection ? true ··· 48 48 substituteInPlace ranger/config/rc.conf \ 49 49 --replace "set preview_images false" "set preview_images true" 50 50 ''; 51 + 52 + passthru.tests.version = testers.testVersion { 53 + package = ranger; 54 + }; 51 55 52 56 meta = with lib; { 53 57 description = "File manager with minimalistic curses interface";
+5 -1
pkgs/applications/misc/1password/default.nix
··· 1 - { lib, stdenv, fetchurl, fetchzip, autoPatchelfHook, installShellFiles, cpio, xar }: 1 + { lib, stdenv, fetchurl, fetchzip, autoPatchelfHook, installShellFiles, cpio, xar, _1password, testers }: 2 2 3 3 let 4 4 inherit (stdenv.hostPlatform) system; ··· 62 62 installCheckPhase = '' 63 63 $out/bin/${mainProgram} --version 64 64 ''; 65 + 66 + passthru.tests.version = testers.testVersion { 67 + package = _1password; 68 + }; 65 69 66 70 meta = with lib; { 67 71 description = "1Password command-line tool";
+5 -1
pkgs/development/tools/lazygit/default.nix
··· 1 - { lib, buildGoModule, fetchFromGitHub }: 1 + { lib, buildGoModule, fetchFromGitHub, lazygit, testers }: 2 2 3 3 buildGoModule rec { 4 4 pname = "lazygit"; ··· 15 15 subPackages = [ "." ]; 16 16 17 17 ldflags = [ "-X main.version=${version}" "-X main.buildSource=nix" ]; 18 + 19 + passthru.tests.version = testers.testVersion { 20 + package = lazygit; 21 + }; 18 22 19 23 meta = with lib; { 20 24 description = "Simple terminal UI for git commands";
+6
pkgs/os-specific/darwin/sketchybar/default.nix
··· 9 9 , IOKit 10 10 , MediaRemote 11 11 , SkyLight 12 + , testers 12 13 }: 13 14 14 15 let ··· 52 53 53 54 runHook postInstall 54 55 ''; 56 + 57 + passthru.tests.version = testers.testVersion { 58 + package = finalAttrs.finalPackage; 59 + version = "sketchybar-v${finalAttrs.version}"; 60 + }; 55 61 56 62 meta = { 57 63 description = "A highly customizable macOS status bar replacement";
+6
pkgs/os-specific/darwin/skhd/default.nix
··· 3 3 , fetchFromGitHub 4 4 , Carbon 5 5 , Cocoa 6 + , testers 6 7 }: 7 8 8 9 stdenv.mkDerivation (finalAttrs: { ··· 30 31 cp ${./org.nixos.skhd.plist} $out/Library/LaunchDaemons/org.nixos.skhd.plist 31 32 substituteInPlace $out/Library/LaunchDaemons/org.nixos.skhd.plist --subst-var out 32 33 ''; 34 + 35 + passthru.tests.version = testers.testVersion { 36 + package = finalAttrs.finalPackage; 37 + version = "skhd-v${finalAttrs.version}"; 38 + }; 33 39 34 40 meta = { 35 41 description = "Simple hotkey daemon for macOS";
+5 -1
pkgs/tools/misc/lazydocker/default.nix
··· 1 - { lib, buildGoModule, fetchFromGitHub }: 1 + { lib, buildGoModule, fetchFromGitHub, lazydocker, testers }: 2 2 3 3 buildGoModule rec { 4 4 pname = "lazydocker"; ··· 20 20 excludedPackages = [ "scripts" "test/printrandom" ]; 21 21 22 22 ldflags = [ "-s" "-w" "-X main.version=${version}" ]; 23 + 24 + passthru.tests.version = testers.testVersion { 25 + package = lazydocker; 26 + }; 23 27 24 28 meta = with lib; { 25 29 description = "A simple terminal UI for both docker and docker-compose";
+5
pkgs/tools/misc/ncdu/default.nix
··· 4 4 , ncurses 5 5 , zig_0_11 6 6 , installShellFiles 7 + , testers 7 8 , pie ? stdenv.isDarwin 8 9 }: 9 10 ··· 30 31 postInstall = '' 31 32 installManPage ncdu.1 32 33 ''; 34 + 35 + passthru.tests.version = testers.testVersion { 36 + package = finalAttrs.finalPackage; 37 + }; 33 38 34 39 meta = { 35 40 homepage = "https://dev.yorhel.nl/ncdu";
+5 -1
pkgs/tools/misc/toilet/default.nix
··· 1 - { lib, stdenv, fetchurl, pkg-config, libcaca }: 1 + { lib, stdenv, fetchurl, pkg-config, libcaca, toilet, testers }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "toilet"; ··· 11 11 12 12 nativeBuildInputs = [ pkg-config ]; 13 13 buildInputs = [ libcaca ]; 14 + 15 + passthru.tests.version = testers.testVersion { 16 + package = toilet; 17 + }; 14 18 15 19 meta = with lib; { 16 20 description = "Display large colourful characters in text mode";
+6
pkgs/tools/system/bottom/default.nix
··· 4 4 , installShellFiles 5 5 , stdenv 6 6 , darwin 7 + , bottom 8 + , testers 7 9 }: 8 10 9 11 rustPlatform.buildRustPackage rec { ··· 35 37 ''; 36 38 37 39 BTM_GENERATE = true; 40 + 41 + passthru.tests.version = testers.testVersion { 42 + package = bottom; 43 + }; 38 44 39 45 meta = with lib; { 40 46 description = "A cross-platform graphical process/system monitor with a customizable interface";
+6
pkgs/tools/system/btop/default.nix
··· 3 3 , fetchFromGitHub 4 4 , darwin 5 5 , removeReferencesTo 6 + , btop 7 + , testers 6 8 }: 7 9 8 10 stdenv.mkDerivation rec { ··· 29 31 postInstall = '' 30 32 ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/bin/btop) 31 33 ''; 34 + 35 + passthru.tests.version = testers.testVersion { 36 + package = btop; 37 + }; 32 38 33 39 meta = with lib; { 34 40 description = "A monitor of resources";