Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

77 lines
1.4 KiB
Nix

{
lib,
buildGoModule,
fetchFromSourcehut,
makeWrapper,
scdoc,
installShellFiles,
xclip,
wl-clipboard,
xdotool,
wtype,
}:
buildGoModule rec {
pname = "snippetexpanderd";
version = "1.0.3";
src = fetchFromSourcehut {
owner = "~ianmjones";
repo = "snippetexpander";
rev = "v${version}";
hash = "sha256-NIMuACrq8RodtjeBbBY42VJ8xqj7fZvdQ2w/5QsjjJI=";
};
vendorHash = "sha256-2nLO/b6XQC88VXE+SewhgKpkRtIHsva+fDudgKpvZiY=";
proxyVendor = true;
modRoot = "cmd/snippetexpanderd";
nativeBuildInputs = [
makeWrapper
scdoc
installShellFiles
];
buildInputs = [
xclip
wl-clipboard
xdotool
wtype
];
ldflags = [
"-s"
"-w"
"-X 'main.version=${src.rev}'"
];
postInstall = ''
make man
installManPage snippetexpanderd.1 snippetexpander-placeholders.5
'';
postFixup = ''
# Ensure xclip/wcopy and xdotool/wtype are available for copy and paste duties.
wrapProgram $out/bin/snippetexpanderd \
--prefix PATH : ${
lib.makeBinPath [
xclip
wl-clipboard
xdotool
wtype
]
}
'';
meta = {
description = "Your little expandable text snippet helper daemon";
homepage = "https://snippetexpander.org";
license = lib.licenses.gpl2Plus;
maintainers = [ ];
platforms = lib.platforms.linux;
mainProgram = "snippetexpanderd";
};
}