nixpkgs/pkgs/by-name/xd/xdg-terminal-exec/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.2 KiB
Nix
Raw Normal View History

{
lib,
stdenvNoCC,
fetchFromGitHub,
dash,
2024-07-24 23:54:00 +02:00
scdoc,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "xdg-terminal-exec";
2024-07-24 23:54:00 +02:00
version = "0.10.1";
src = fetchFromGitHub {
owner = "Vladimir-csp";
repo = "xdg-terminal-exec";
rev = "v${finalAttrs.version}";
2024-07-24 23:54:00 +02:00
hash = "sha256-bZsyHv4qbL3pdx5gW1sPG/vn6luKG1mvgR4ZmzYDDwE=";
};
2024-07-24 23:54:00 +02:00
nativeBuildInputs = [ scdoc ];
buildPhase = ''
runHook preBuild
scdoc < xdg-terminal-exec.1.scd > xdg-terminal-exec.1
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm555 xdg-terminal-exec -t $out/bin
2024-07-24 23:54:00 +02:00
install -Dm444 xdg-terminal-exec.1 -t $out/share/man/man1
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;
};
})