From 2b71a243fd8da5d2a77120f408ee5676de392123 Mon Sep 17 00:00:00 2001 From: aleksana Date: Sat, 17 May 2025 16:27:35 +0800 Subject: [PATCH 1/2] try: remove executable dependencies checking --- pkgs/by-name/tr/try/package.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/tr/try/package.nix b/pkgs/by-name/tr/try/package.nix index 6194046ad4f5..87db8e54a1ac 100644 --- a/pkgs/by-name/tr/try/package.nix +++ b/pkgs/by-name/tr/try/package.nix @@ -8,34 +8,33 @@ attr, makeWrapper, pandoc, - kmod, + coreutils, installShellFiles, versionCheckHook, }: stdenv.mkDerivation { pname = "try"; version = "0.2.0-unstable-2025-02-25"; + src = fetchFromGitHub { owner = "binpash"; repo = "try"; rev = "67052d8f20725f3cdc22ffaec33f7b7c14f1eb6b"; hash = "sha256-8mfCmqN50pRAeNTJUlRVrRQulWon4b2OL4Ug/ygBhB0="; }; + + # skip TRY_REQUIRE_PROG as it detects executable dependencies by running it + postPatch = '' + sed -i '/^AC_DEFUN(\[TRY_REQUIRE_PROG\]/,/^])$/c\AC_DEFUN([TRY_REQUIRE_PROG], [])' configure.ac + ''; + nativeBuildInputs = [ makeWrapper autoreconfHook pandoc - attr - util-linux - kmod installShellFiles ]; - # Trigger a overlay run to load the overlayfs module, required by ./configure - preConfigure = '' - mkdir lower upper work merged - unshare -r --mount mount -t overlay overlay -o lowerdir=lower,upperdir=upper,workdir=work merged - rm -rf lower upper work merged - ''; + installPhase = '' runHook preInstall install -Dt $out/bin try @@ -43,6 +42,7 @@ stdenv.mkDerivation { install -Dt $out/bin utils/try-summary wrapProgram $out/bin/try --prefix PATH : ${ lib.makeBinPath [ + coreutils util-linux mergerfs attr @@ -52,6 +52,7 @@ stdenv.mkDerivation { installShellCompletion --bash --name try.bash completions/try.bash runHook postInstall ''; + doInstallCheck = true; nativeInstallCheckInputs = [ versionCheckHook @@ -60,6 +61,7 @@ stdenv.mkDerivation { export version=0.2.0 ''; versionCheckProgramArg = "-v"; + meta = with lib; { homepage = "https://github.com/binpash/try"; description = "Lets you run a command and inspect its effects before changing your live system"; From ab68927b3e00dd874f905b1b8e9faa4b0ae990dc Mon Sep 17 00:00:00 2001 From: aleksana Date: Sat, 17 May 2025 16:28:43 +0800 Subject: [PATCH 2/2] try: remove `with lib` --- pkgs/by-name/tr/try/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/tr/try/package.nix b/pkgs/by-name/tr/try/package.nix index 87db8e54a1ac..fa6451dad9a2 100644 --- a/pkgs/by-name/tr/try/package.nix +++ b/pkgs/by-name/tr/try/package.nix @@ -62,15 +62,15 @@ stdenv.mkDerivation { ''; versionCheckProgramArg = "-v"; - meta = with lib; { + meta = { homepage = "https://github.com/binpash/try"; description = "Lets you run a command and inspect its effects before changing your live system"; mainProgram = "try"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ pasqui23 ezrizhu ]; - license = with licenses; [ mit ]; - platforms = platforms.linux; + license = with lib.licenses; [ mit ]; + platforms = lib.platforms.linux; }; }