2023-12-10 18:03:18 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenvNoCC,
|
|
|
|
fetchFromGitHub,
|
2024-03-19 21:11:49 +01:00
|
|
|
dash,
|
2024-07-24 23:54:00 +02:00
|
|
|
scdoc,
|
2023-12-10 18:03:18 +01:00
|
|
|
}:
|
2024-03-19 21:11:49 +01:00
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
2023-12-10 18:03:18 +01:00
|
|
|
pname = "xdg-terminal-exec";
|
2024-07-24 23:54:00 +02:00
|
|
|
version = "0.10.1";
|
2023-12-10 18:03:18 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Vladimir-csp";
|
|
|
|
repo = "xdg-terminal-exec";
|
2024-03-19 21:11:49 +01:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-07-24 23:54:00 +02:00
|
|
|
hash = "sha256-bZsyHv4qbL3pdx5gW1sPG/vn6luKG1mvgR4ZmzYDDwE=";
|
2023-12-10 18:03:18 +01:00
|
|
|
};
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2023-12-10 18:03:18 +01:00
|
|
|
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
|
2023-12-10 18:03:18 +01:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2024-03-19 21:11:49 +01:00
|
|
|
dontPatchShebangs = true;
|
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/bin/xdg-terminal-exec \
|
|
|
|
--replace-fail '#!/bin/sh' '#!${lib.getExe dash}'
|
|
|
|
'';
|
|
|
|
|
2023-12-10 18:03:18 +01:00
|
|
|
meta = {
|
2024-04-13 16:00:28 +02:00
|
|
|
description = "Reference implementation of the proposed XDG Default Terminal Execution Specification";
|
2023-12-10 18:03:18 +01:00
|
|
|
homepage = "https://github.com/Vladimir-csp/xdg-terminal-exec";
|
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
mainProgram = "xdg-terminal-exec";
|
2024-04-13 16:00:28 +02:00
|
|
|
maintainers = with lib.maintainers; [ quantenzitrone ];
|
2023-12-10 18:03:18 +01:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
2024-03-19 21:11:49 +01:00
|
|
|
})
|