2021-04-22 02:08:21 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, boost, libevdevplus, libuinputplus, iodash, cxxopts}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ydotool";
|
2021-04-22 02:08:21 +00:00
|
|
|
version = "unstable-2021-01-20";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ReimuNotMoe";
|
|
|
|
repo = "ydotool";
|
2021-04-22 02:08:21 +00:00
|
|
|
rev = "b1d041f52f7bac364d6539b1251d29c3b77c0f37";
|
|
|
|
sha256 = "1gzdbx6fv0dbcyia3yyzhv93az2gf90aszb9kcj5cnxywfpv9w9g";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-22 02:08:21 +00:00
|
|
|
# upstream decided to use a cpp package manager called cpm.
|
|
|
|
# we need to disable that because it wants networking, furthermore,
|
|
|
|
# it does some system folder creating which also needs to be disabled.
|
|
|
|
# Both changes are to respect the sandbox.
|
|
|
|
patches = [ ./fixup-cmakelists.patch ];
|
|
|
|
|
|
|
|
|
|
|
|
# cxxopts is a header only library.
|
|
|
|
# See pull request: https://github.com/ReimuNotMoe/ydotool/pull/105
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt --replace \
|
2021-04-22 02:08:21 +00:00
|
|
|
"PUBLIC cxxopts" \
|
|
|
|
"PUBLIC"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-04-22 02:08:21 +00:00
|
|
|
boost libevdevplus libuinputplus iodash cxxopts
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "Generic Linux command-line automation tool";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ willibutz ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|