depot/third_party/nixpkgs/pkgs/tools/inputmethods/footswitch/default.nix
Default email b6f2ab0a42 Project import generated by Copybara.
GitOrigin-RevId: 253aecf69ed7595aaefabde779aa6449195bebb7
2021-08-18 15:19:15 +02:00

35 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 ];
};
}