summary refs log tree commit diff
path: root/pkgs/tools/inputmethods
diff options
context:
space:
mode:
authorHoàng Minh Thắng <github@banphim.net>2021-06-06 13:26:02 +0700
committerHoàng Minh Thắng <p@banphim.net>2021-06-06 22:33:51 +0700
commitceab4362b2437a95dc5bc0c8bfe795a849034da9 (patch)
tree8db2467961a68f7c84ea9e998e44658a34eb4daf /pkgs/tools/inputmethods
parent4a34590eced7ec7aadf4a64105d7a88125919738 (diff)
downloadnixpkgs-ceab4362b2437a95dc5bc0c8bfe795a849034da9.tar
nixpkgs-ceab4362b2437a95dc5bc0c8bfe795a849034da9.tar.gz
nixpkgs-ceab4362b2437a95dc5bc0c8bfe795a849034da9.tar.bz2
nixpkgs-ceab4362b2437a95dc5bc0c8bfe795a849034da9.tar.lz
nixpkgs-ceab4362b2437a95dc5bc0c8bfe795a849034da9.tar.xz
nixpkgs-ceab4362b2437a95dc5bc0c8bfe795a849034da9.tar.zst
nixpkgs-ceab4362b2437a95dc5bc0c8bfe795a849034da9.zip
interception-tools: 0.2.1 -> 0.6.6
- use fetchFromGitLab
- add boost to build inputs
- remove outdated patches
Diffstat (limited to 'pkgs/tools/inputmethods')
-rw-r--r--pkgs/tools/inputmethods/interception-tools/default.nix27
-rw-r--r--pkgs/tools/inputmethods/interception-tools/fix-udevmon-configuration-job-path.patch32
2 files changed, 12 insertions, 47 deletions
diff --git a/pkgs/tools/inputmethods/interception-tools/default.nix b/pkgs/tools/inputmethods/interception-tools/default.nix
index 21636ea8d8e..35b3b1e336d 100644
--- a/pkgs/tools/inputmethods/interception-tools/default.nix
+++ b/pkgs/tools/inputmethods/interception-tools/default.nix
@@ -1,19 +1,18 @@
-{ lib, stdenv, fetchurl, pkg-config, cmake, libyamlcpp,
-  libevdev, udev }:
+{ lib, stdenv, fetchFromGitLab, pkg-config, cmake, libyamlcpp,
+  libevdev, udev, boost }:
 
-let
-  version = "0.2.1";
-  baseName = "interception-tools";
-in stdenv.mkDerivation {
-  name = "${baseName}-${version}";
-
-  src = fetchurl {
-    url = "https://gitlab.com/interception/linux/tools/repository/v${version}/archive.tar.gz";
-    sha256 = "0lqz89wsf9r5xdgflincysxg4l8fpgg5z8zczhhrg9s5787srfzi";
+stdenv.mkDerivation rec {
+  pname = "interception-tools";
+  version = "0.6.6";
+  src = fetchFromGitLab {
+    owner = "interception/linux";
+    repo = "tools";
+    rev = "v${version}";
+    sha256 = "0k9h14a9d65nwvv7pj0kigjgzfv453mm3r4svnxfg1h5lccmy8jj";
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
-  buildInputs = [ libevdev udev libyamlcpp ];
+  buildInputs = [ libevdev udev libyamlcpp boost ];
 
   prePatch = ''
     substituteInPlace CMakeLists.txt --replace \
@@ -21,12 +20,10 @@ in stdenv.mkDerivation {
       "\"$(pkg-config --cflags libevdev | cut -c 3-)\""
   '';
 
-  patches = [ ./fix-udevmon-configuration-job-path.patch ];
-
   meta = {
     description = "A minimal composable infrastructure on top of libudev and libevdev";
     homepage = "https://gitlab.com/interception/linux/tools";
-    license = lib.licenses.gpl3;
+    license = lib.licenses.gpl3Only;
     maintainers = [ lib.maintainers.vyp ];
     platforms = lib.platforms.linux;
   };
diff --git a/pkgs/tools/inputmethods/interception-tools/fix-udevmon-configuration-job-path.patch b/pkgs/tools/inputmethods/interception-tools/fix-udevmon-configuration-job-path.patch
deleted file mode 100644
index 469c96647d6..00000000000
--- a/pkgs/tools/inputmethods/interception-tools/fix-udevmon-configuration-job-path.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From d3a5d661b80f3597368f517ebaeddfdfaafc1bf2 Mon Sep 17 00:00:00 2001
-From: xd1le <elisp.vim@gmail.com>
-Date: Mon, 28 Aug 2017 00:19:09 +1000
-Subject: [PATCH] fix udevmon configuration job path
-
-For some reason, the udevmon job $PATH seems to be empty (or otherwise
-seems to point to `/no-such-path`). This commit fixes that by setting
-its $PATH to the same $PATH that the parent udevmon process has.
----
- udevmon.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/udevmon.cpp b/udevmon.cpp
-index ebdd909..b523efd 100644
---- a/udevmon.cpp
-+++ b/udevmon.cpp
-@@ -237,8 +237,11 @@ private:
-             case 0: {
-                 char *command[] = {(char *)"sh", (char *)"-c",
-                                    (char *)job.c_str(), nullptr};
-+                std::string path = getenv("PATH");
-                 std::string variables = "DEVNODE=" + devnode;
--                char *environment[]   = {(char *)variables.c_str(), nullptr};
-+                std::string pathenv = "PATH=" + path;
-+                char *environment[] = {(char *)variables.c_str(),
-+                                       (char *)pathenv.c_str(), nullptr};
-                 execvpe(command[0], command, environment);
-                 std::fprintf(stderr,
-                              R"(exec failed for devnode %s, job "%s" )"
--- 
-2.14.1
-