nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
947 B
Nix
Raw Normal View History

2021-04-01 21:25:04 +00:00
{ lib
, stdenv
, fetchFromSourcehut
, writeText
, libinput
, libX11
2021-09-18 23:25:25 +00:00
, wayland
2021-04-01 21:25:04 +00:00
, conf ? null
, patches ? [ ]
}:
stdenv.mkDerivation rec {
pname = "lisgd";
version = "0.4.0";
2021-04-01 21:25:04 +00:00
src = fetchFromSourcehut {
owner = "~mil";
repo = "lisgd";
rev = version;
hash = "sha256-ljRZpBo4lW2cYZYxKKMrXanE0YaHSFwcdyECK0czdWY=";
2021-04-01 21:25:04 +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-09-18 23:25:25 +00:00
wayland
2021-04-01 21:25:04 +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 ];
};
}