From 53657d7d25e46174aed04af96b112e8f0f71b861 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sat, 24 Apr 2021 16:06:30 +0200 Subject: [PATCH] curaPlugins.rawmouse: 1.0.13 -> 1.1.0 --- pkgs/applications/misc/cura/plugins.nix | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/cura/plugins.nix b/pkgs/applications/misc/cura/plugins.nix index 4bf7ba8d852a..76a5808963f9 100644 --- a/pkgs/applications/misc/cura/plugins.nix +++ b/pkgs/applications/misc/cura/plugins.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, python3Packages, libspnav }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, python3Packages, libspnav, jq }: let @@ -34,18 +34,28 @@ let rawmouse = stdenv.mkDerivation rec { pname = "RawMouse"; - version = "1.0.13"; + version = "1.1.0"; src = fetchFromGitHub { owner = "smartavionics"; repo = pname; rev = version; - sha256 = "1cj40pgsfcwliz47mkiqjbslkwcm34qb1pajc2mcljgflcnickly"; + sha256 = "0hvi7qwd4xfnqnhbj9dgfjmvv9df7s42asf3fdfxv43n6nx74scw"; }; + nativeBuildInputs = [ jq ]; + + propagatedBuildInputs = with python3Packages; [ + hidapi + ]; + buildPhase = '' - substituteInPlace RawMouse/config.json --replace \ - /usr/local/lib/libspnav.so ${libspnav}/lib/libspnav.so + jq 'del(.devices) | .libspnav="${libspnav}/lib/libspnav.so"' \ + RawMouse/config.json.new + mv RawMouse/config.json.new RawMouse/config.json + + # remove prebuilt binaries + rm -r RawMouse/hidapi ''; installPhase = ''