From b1d1eaa36a054b85cb6fb41da724c338f21e85fc Mon Sep 17 00:00:00 2001 From: Quantenzitrone Date: Tue, 19 Mar 2024 21:11:49 +0100 Subject: [PATCH] xdg-terminal-exec: unstable-2023-12-08 -> 0.9.0 - also use dash as sh implementation instead of bash, because the xdg-terminal-exec repo README recommends to use 'a slick sh implementation like dash' for faster execution --- pkgs/by-name/xd/xdg-terminal-exec/package.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/xd/xdg-terminal-exec/package.nix b/pkgs/by-name/xd/xdg-terminal-exec/package.nix index 1dd07bd22396..461b7f58ee33 100644 --- a/pkgs/by-name/xd/xdg-terminal-exec/package.nix +++ b/pkgs/by-name/xd/xdg-terminal-exec/package.nix @@ -2,16 +2,17 @@ lib, stdenvNoCC, fetchFromGitHub, + dash, }: -stdenvNoCC.mkDerivation { +stdenvNoCC.mkDerivation (finalAttrs: { pname = "xdg-terminal-exec"; - version = "unstable-2023-12-08"; + version = "0.9.0"; src = fetchFromGitHub { owner = "Vladimir-csp"; repo = "xdg-terminal-exec"; - rev = "04f37d4337b6ce157d4a7338dd600a32deb43a28"; - hash = "sha256-QIPdF+/dMUEVcz5j9o+wQ4dnw2yWwz7slnLdMNETkGs="; + rev = "v${finalAttrs.version}"; + hash = "sha256-uLUHvSjxIjmy0ejqLfliB6gHFRwyTWNH1RL5kTXebUM="; }; dontBuild = true; @@ -21,6 +22,12 @@ stdenvNoCC.mkDerivation { runHook postInstall ''; + dontPatchShebangs = true; + postFixup = '' + substituteInPlace $out/bin/xdg-terminal-exec \ + --replace-fail '#!/bin/sh' '#!${lib.getExe dash}' + ''; + meta = { description = "Proposal for XDG terminal execution utility"; homepage = "https://github.com/Vladimir-csp/xdg-terminal-exec"; @@ -29,4 +36,4 @@ stdenvNoCC.mkDerivation { maintainers = with lib.maintainers; [quantenzitrone]; platforms = lib.platforms.unix; }; -} +})