2021-08-13 17:43:35 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, hidapi }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "footswitch";
|
2022-05-28 03:45:42 +02:00
|
|
|
version = "unstable-2022-04-12";
|
2021-08-13 17:43:35 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rgerganov";
|
|
|
|
repo = "footswitch";
|
2022-05-28 03:45:42 +02:00
|
|
|
rev = "1cf63643e18e688e4ebe96451db24edf52338cc0";
|
|
|
|
sha256 = "0gfvi2wgrljndyz889cjjh2q13994fnaf11n7hpdd82c4wgg06kj";
|
2021-08-13 17:43:35 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ hidapi ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace /usr/local $out \
|
|
|
|
--replace /usr/bin/install install \
|
2022-05-28 03:45:42 +02:00
|
|
|
--replace /etc/udev $out/lib/udev
|
2021-08-13 17:43:35 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|