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
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fetchpatch2,
|
|
cmake,
|
|
scdoc,
|
|
util-linux,
|
|
xorg,
|
|
nixosTests,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "ydotool";
|
|
version = "1.0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ReimuNotMoe";
|
|
repo = "ydotool";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-MtanR+cxz6FsbNBngqLE+ITKPZFHmWGsD1mBDk0OVng=";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch2 {
|
|
url = "https://github.com/ReimuNotMoe/ydotool/commit/58fde33d9a8b393fd59348f71e80c56177b62706.patch?full_index=1";
|
|
hash = "sha256-Ga9DPCzpJwtYVHWwKKl3kzn2BPEZBZ7uzbEY/eFXGs4=";
|
|
includes = [ "CMakeLists.txt" ];
|
|
})
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace Daemon/ydotoold.c \
|
|
--replace "/usr/bin/xinput" "${xorg.xinput}/bin/xinput"
|
|
substituteInPlace Daemon/ydotool.service.in \
|
|
--replace "/usr/bin/kill" "${util-linux}/bin/kill"
|
|
'';
|
|
|
|
strictDeps = true;
|
|
nativeBuildInputs = [
|
|
cmake
|
|
scdoc
|
|
];
|
|
|
|
passthru.tests.basic = nixosTests.ydotool;
|
|
|
|
meta = {
|
|
description = "Generic Linux command-line automation tool";
|
|
homepage = "https://github.com/ReimuNotMoe/ydotool";
|
|
license = lib.licenses.agpl3Plus;
|
|
mainProgram = "ydotool";
|
|
maintainers = with lib.maintainers; [
|
|
kraem
|
|
];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|