2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, writeText
|
|
|
|
, libinput
|
|
|
|
, libX11
|
2021-10-01 09:20:50 +00:00
|
|
|
, wayland
|
2021-04-05 15:23:46 +00:00
|
|
|
, conf ? null
|
|
|
|
, patches ? [ ]
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lisgd";
|
2021-10-01 09:20:50 +00:00
|
|
|
version = "0.3.2";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~mil";
|
|
|
|
repo = "lisgd";
|
|
|
|
rev = version;
|
2021-10-01 09:20:50 +00:00
|
|
|
sha256 = "sha256-yE2CUv1XDvo8fW0bLS1O2oxgDUu4drCO3jFpxPgAYKU=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit patches;
|
|
|
|
|
|
|
|
postPatch = let
|
|
|
|
configFile = if lib.isDerivation conf || lib.isPath conf then
|
|
|
|
conf
|
|
|
|
else
|
|
|
|
writeText "config.def.h" conf;
|
|
|
|
in lib.optionalString (conf != null) ''
|
|
|
|
cp ${configFile} config.def.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libinput
|
|
|
|
libX11
|
2021-10-01 09:20:50 +00:00
|
|
|
wayland
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Bind gestures via libinput touch events";
|
|
|
|
homepage = "https://git.sr.ht/~mil/lisgd";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|