diff options
author | Quantenzitrone <nix@dev.quantenzitrone.eu> | 2024-05-08 20:22:34 +0200 |
---|---|---|
committer | Quantenzitrone <nix@dev.quantenzitrone.eu> | 2024-05-13 12:20:53 +0200 |
commit | 6722b4ade920b46ff51144e06bffc92f7b8bb1f4 (patch) | |
tree | 59579db8a8e4b96851af0dccdbc272b0af2415b2 /pkgs/by-name | |
parent | aac3aeaf2ff230af121534e26262feb6428214ff (diff) |
ydotool: move to pkgs/by-name, add meta.mainProgram, refactor
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/yd/ydotool/package.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/by-name/yd/ydotool/package.nix b/pkgs/by-name/yd/ydotool/package.nix new file mode 100644 index 0000000000000..70c75165af458 --- /dev/null +++ b/pkgs/by-name/yd/ydotool/package.nix @@ -0,0 +1,46 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + scdoc, + util-linux, + xorg, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "ydotool"; + version = "1.0.4"; + + src = fetchFromGitHub { + owner = "ReimuNotMoe"; + repo = "ydotool"; + rev = "v${finalAttrs.version}"; + hash = "sha256-MtanR+cxz6FsbNBngqLE+ITKPZFHmWGsD1mBDk0OVng="; + }; + + 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 + ]; + + meta = { + description = "Generic Linux command-line automation tool"; + homepage = "https://github.com/ReimuNotMoe/ydotool"; + license = lib.licenses.agpl3Plus; + mainProgram = "ydotool"; + maintainers = with lib.maintainers; [ + willibutz + kraem + ]; + platforms = lib.platforms.linux; + }; +}) |