2022-07-31 11:03:59 +02:00
|
|
|
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
2022-03-12 23:05:37 +01:00
|
|
|
{
|
2022-07-31 11:03:59 +02:00
|
|
|
name = "hidapitester";
|
|
|
|
overlay = {hidapitester}: final: prev: {
|
2022-03-12 23:05:37 +01:00
|
|
|
hidapitester = prev.stdenv.mkDerivation {
|
|
|
|
pname = "hidapitester";
|
|
|
|
version = "0.2";
|
|
|
|
|
2022-07-31 11:03:59 +02:00
|
|
|
buildInputs = with prev; [
|
|
|
|
udev
|
|
|
|
];
|
2022-03-12 23:05:37 +01:00
|
|
|
|
2022-07-31 11:03:59 +02:00
|
|
|
nativeBuildInputs = with prev; [
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-03-12 23:05:37 +01:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
runHook preUnpack
|
|
|
|
|
|
|
|
install -d /build/source/hidapi
|
|
|
|
install -d /build/source/hidapitester
|
|
|
|
|
|
|
|
cp -r ${prev.hidapi.src}/. /build/source/hidapi
|
|
|
|
cp -r ${hidapitester}/. /build/source/hidapitester
|
|
|
|
|
|
|
|
chmod -R 755 /build/source
|
|
|
|
|
|
|
|
runHook postUnpack
|
|
|
|
'';
|
|
|
|
|
|
|
|
HIDAPI_DIR = "/build/source/hidapi";
|
|
|
|
sourceRoot = "/build/source/hidapitester";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -d $out/bin
|
|
|
|
install hidapitester $out/bin
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|