From f35dd88c646059cff4979577232730622b742fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 1 Apr 2021 23:25:04 +0200 Subject: [PATCH] lisgd: init at 0.3.0 --- pkgs/tools/inputmethods/lisgd/default.nix | 49 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/tools/inputmethods/lisgd/default.nix diff --git a/pkgs/tools/inputmethods/lisgd/default.nix b/pkgs/tools/inputmethods/lisgd/default.nix new file mode 100644 index 000000000000..02344d153dbf --- /dev/null +++ b/pkgs/tools/inputmethods/lisgd/default.nix @@ -0,0 +1,49 @@ +{ lib +, stdenv +, fetchFromSourcehut +, writeText +, libinput +, libX11 +, conf ? null +, patches ? [ ] +}: + +stdenv.mkDerivation rec { + pname = "lisgd"; + version = "0.3.0"; + + src = fetchFromSourcehut { + owner = "~mil"; + repo = "lisgd"; + rev = version; + sha256 = "0g2pwff2c6ipxz83l26kx4rs3vah9qlm4h0n4x1k80mzqzf15hb6"; + }; + + 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 + ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 94b6a6444439..fef7f5b1d75f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2658,6 +2658,8 @@ in linuxptp = callPackage ../os-specific/linux/linuxptp { }; + lisgd = callPackage ../tools/inputmethods/lisgd { }; + lite = callPackage ../applications/editors/lite { }; loadwatch = callPackage ../tools/system/loadwatch { };