diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix b/nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix new file mode 100644 index 000000000000..dd57f61de9d6 --- /dev/null +++ b/nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix @@ -0,0 +1,51 @@ +{ lib +, stdenv +, fetchFromSourcehut +, writeText +, libinput +, libX11 +, wayland +, conf ? null +, patches ? [ ] +}: + +stdenv.mkDerivation rec { + pname = "lisgd"; + version = "0.4.0"; + + src = fetchFromSourcehut { + owner = "~mil"; + repo = "lisgd"; + rev = version; + hash = "sha256-ljRZpBo4lW2cYZYxKKMrXanE0YaHSFwcdyECK0czdWY="; + }; + + 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 + wayland + ]; + + 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 ]; + }; +} |