nixpkgs/pkgs/tools/inputmethods/footswitch/default.nix
Arthur Gautier d527a12d1e
footswitch: init at unstable-2021-03-17 (#133691)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-08-13 17:43:35 +02:00

36 lines
965 B
Nix

{ lib, stdenv, fetchFromGitHub, pkg-config, hidapi }:
stdenv.mkDerivation {
pname = "footswitch";
version = "unstable-20201-03-17";
src = fetchFromGitHub {
owner = "rgerganov";
repo = "footswitch";
rev = "aa0b10f00d3e76dac27b55b88c8d44c0c406f7f0";
sha256 = "sha256-SikYiBN7jbH5I1x5wPCF+buwFp1dt35cVxAN6lWkTN0=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ hidapi ];
postPatch = ''
substituteInPlace Makefile \
--replace /usr/local $out \
--replace /usr/bin/install install \
--replace /etc/udev/rules.d $out/lib/udev/rules.d
'';
preInstall = ''
mkdir -p $out/bin $out/lib/udev/rules.d
'';
meta = with lib; {
description = "Command line utlities for programming PCsensor and Scythe foot switches.";
homepage = "https://github.com/rgerganov/footswitch";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ baloo ];
};
}