mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(bbuddy): evdev barcode scanner client
This commit is contained in:
parent
c3cd9b0564
commit
90901a302c
24 changed files with 847 additions and 253 deletions
47
packages/barcodebuddy/scanner-python.nix
Normal file
47
packages/barcodebuddy/scanner-python.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
stdenvNoCC,
|
||||
makeWrapper,
|
||||
barcodebuddy,
|
||||
barcodebuddy-scanner,
|
||||
screen,
|
||||
lib,
|
||||
enableRequests ? true,
|
||||
enablePhp ? false,
|
||||
php,
|
||||
python3,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.lists) optional optionals;
|
||||
inherit (lib.strings) makeBinPath;
|
||||
python = python3.withPackages (
|
||||
p:
|
||||
[p.evdev]
|
||||
++ optional enableRequests p.requests
|
||||
);
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "barcodebuddy-scanner.py";
|
||||
inherit (barcodebuddy) version src;
|
||||
inherit (barcodebuddy-scanner) patches meta;
|
||||
|
||||
skipConfigure = true;
|
||||
skipBuild = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [python];
|
||||
|
||||
scannerPath = makeBinPath (
|
||||
optionals enablePhp [screen php]
|
||||
);
|
||||
${
|
||||
if enablePhp
|
||||
then "barcodebuddyScript"
|
||||
else null
|
||||
} = "${barcodebuddy}/index.php";
|
||||
|
||||
scannerSource = "example/grabInput.py";
|
||||
inherit (barcodebuddy-scanner) installPhase postInstall;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue