depot/third_party/nixpkgs/pkgs/by-name/xd/xdg-terminal-exec/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

39 lines
1,008 B
Nix

{
lib,
stdenvNoCC,
fetchFromGitHub,
dash,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "xdg-terminal-exec";
version = "0.10.0";
src = fetchFromGitHub {
owner = "Vladimir-csp";
repo = "xdg-terminal-exec";
rev = "v${finalAttrs.version}";
hash = "sha256-u/BYhae6xf5rVhYi8uPxZeQTN7skjLbmOC8xoDcUDQk=";
};
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm555 xdg-terminal-exec -t $out/bin
runHook postInstall
'';
dontPatchShebangs = true;
postFixup = ''
substituteInPlace $out/bin/xdg-terminal-exec \
--replace-fail '#!/bin/sh' '#!${lib.getExe dash}'
'';
meta = {
description = "Reference implementation of the proposed XDG Default Terminal Execution Specification";
homepage = "https://github.com/Vladimir-csp/xdg-terminal-exec";
license = lib.licenses.gpl3Plus;
mainProgram = "xdg-terminal-exec";
maintainers = with lib.maintainers; [ quantenzitrone ];
platforms = lib.platforms.unix;
};
})