ydotool: move to pkgs/by-name, add meta.mainProgram, refactor

Changed files
+46 -33
pkgs
by-name
yd
ydotool
tools
wayland
ydotool
top-level
+46
pkgs/by-name/yd/ydotool/package.nix
···
+
{
+
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;
+
};
+
})
-31
pkgs/tools/wayland/ydotool/default.nix
···
-
{ lib, stdenv, fetchFromGitHub, cmake, scdoc, util-linux, xorg }:
-
-
stdenv.mkDerivation rec {
-
pname = "ydotool";
-
version = "1.0.4";
-
-
src = fetchFromGitHub {
-
owner = "ReimuNotMoe";
-
repo = "ydotool";
-
rev = "v${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 = with lib; {
-
homepage = "https://github.com/ReimuNotMoe/ydotool";
-
description = "Generic Linux command-line automation tool";
-
license = licenses.agpl3Plus;
-
maintainers = with maintainers; [ willibutz kraem ];
-
platforms = with platforms; linux;
-
};
-
}
-2
pkgs/top-level/all-packages.nix
···
wtype = callPackage ../tools/wayland/wtype { };
-
ydotool = callPackage ../tools/wayland/ydotool { };
-
cambalache = callPackage ../development/tools/cambalache { };
cambrinary = python3Packages.callPackage ../applications/misc/cambrinary { };