2023-05-06 19:37:09 +05:30
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromSourcehut,
|
|
|
|
libxkbcommon,
|
|
|
|
pkg-config,
|
2024-07-11 19:22:17 +05:30
|
|
|
installShellFiles,
|
|
|
|
scdoc,
|
2023-05-06 19:37:09 +05:30
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "dotool";
|
2024-07-11 19:22:17 +05:30
|
|
|
version = "1.5";
|
2023-05-06 19:37:09 +05:30
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~geb";
|
|
|
|
repo = "dotool";
|
|
|
|
rev = version;
|
2024-07-11 19:22:17 +05:30
|
|
|
hash = "sha256-4QmTHeU3TnpRATKIvilkIA3i2hDjM5zQwSvmRvoWuNE=";
|
2023-05-06 19:37:09 +05:30
|
|
|
};
|
|
|
|
|
2024-07-11 19:22:17 +05:30
|
|
|
vendorHash = "sha256-IQ847LHDYJPboWL/6lQNJ4vPPD/+xkrGI2LSZ7kBnp4=";
|
2023-05-06 19:37:09 +05:30
|
|
|
|
|
|
|
# uses nix store path for the dotool binary
|
|
|
|
# also replaces /bin/echo with echo
|
|
|
|
patches = [ ./fix-paths.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ./dotoold --replace "@dotool@" "$out/bin/dotool"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ libxkbcommon ];
|
2024-07-11 19:22:17 +05:30
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
pkg-config
|
|
|
|
scdoc
|
|
|
|
];
|
2024-12-10 20:26:33 +01:00
|
|
|
|
2023-05-06 19:37:09 +05:30
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ./dotoold ./dotoolc $out/bin
|
2024-07-11 19:22:17 +05:30
|
|
|
scdoc < doc/dotool.1.scd > doc/dotool.1
|
|
|
|
installManPage doc/dotool.1
|
2023-05-06 19:37:09 +05:30
|
|
|
'';
|
|
|
|
|
2025-06-02 08:42:56 +02:00
|
|
|
meta = {
|
2023-05-06 19:37:09 +05:30
|
|
|
description = "Command to simulate input anywhere";
|
|
|
|
homepage = "https://git.sr.ht/~geb/dotool";
|
|
|
|
changelog = "https://git.sr.ht/~geb/dotool/tree/${version}/item/CHANGELOG.md";
|
2025-06-02 08:42:56 +02:00
|
|
|
license = lib.licenses.gpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [ dit7ya ];
|
2023-05-06 19:37:09 +05:30
|
|
|
};
|
|
|
|
}
|