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 22:25:04 +01:00
{ lib
, stdenv
, fetchFromSourcehut
, writeText
, libinput
, libX11
2021-09-19 00:25:25 +01:00
, wayland
2021-04-01 22:25:04 +01:00
, conf ? null
, patches ? [ ]
}:
stdenv.mkDerivation rec {
pname = "lisgd";
2022-05-01 05:35:44 +01:00
version = "0.3.4";
2021-04-01 22:25:04 +01:00
src = fetchFromSourcehut {
owner = "~mil";
repo = "lisgd";
rev = version;
2022-05-01 05:35:44 +01:00
hash = "sha256-ZzPdIwN4/G5Te51gJpbNcHVkG4Rplcaa8yHDJr58oyk=";
2021-04-01 22:25:04 +01: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-19 00:25:25 +01:00
wayland
2021-04-01 22:25:04 +01: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 ];
};
}