diff options
author | xd1le <elisp.vim@gmail.com> | 2017-09-02 16:17:53 +1000 |
---|---|---|
committer | xd1le <elisp.vim@gmail.com> | 2017-09-02 16:17:53 +1000 |
commit | e0b44a09b84ed462b98b2c1fa841253be801ef8c (patch) | |
tree | 11a5c7ca0cfe3f3debb38242660753d28593c9bc /pkgs/tools/inputmethods/interception-tools/default.nix | |
parent | 96457d26dded05bcba8e9fbb9bf0255596654aab (diff) |
interception-tools: init at 0.1.1
The latest release of libyamlcpp in nixpkgs does not build because it uses an older version of boost than the one in nixpkgs and therefore expects a particular header file which does not exist in the latest boost anymore. For this reason, a later (git) version of libyamlcpp is used here (which actually doesn't even require boost). The substituteInPlace in the prePatch phase is needed because libevdev places its headers in non-standard places, meaning Nix cannot normally find them. The `cut` command removes the first two "-I" characters from the output of `pkg-config`. This needs to be in the prePatch phase because otherwise Nix will patch these lines to `/var/empty`, meaning you would have less specific replacement (in case other lines are also patched to `/var/empty`). I wrote the patch. (I believe it is NixOS specific.)
Diffstat (limited to 'pkgs/tools/inputmethods/interception-tools/default.nix')
-rw-r--r-- | pkgs/tools/inputmethods/interception-tools/default.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/tools/inputmethods/interception-tools/default.nix b/pkgs/tools/inputmethods/interception-tools/default.nix new file mode 100644 index 0000000000000..ba54d4954c584 --- /dev/null +++ b/pkgs/tools/inputmethods/interception-tools/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, cmake, libyamlcppWithoutBoost, + libevdev, libudev }: + +let + version = "0.1.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 = "14g4pphvylqdb922va322z1pbp12ap753hcf7zf9sii1ikvif83j"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ cmake libevdev libudev libyamlcppWithoutBoost ]; + + prePatch = '' + substituteInPlace CMakeLists.txt --replace \ + '"/usr/include/libevdev-1.0"' \ + "\"$(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 = stdenv.lib.licenses.gpl3; + maintainers = stdenv.lib.maintainers.vyp; + platforms = stdenv.lib.platforms.linux; + }; +} |