feat: pkgs.niimprint

This commit is contained in:
arcnmx 2024-08-31 16:40:37 -07:00
parent 5975a2b7a8
commit 80937d6496
4 changed files with 48 additions and 1 deletions

43
packages/niimprint.nix Normal file
View file

@ -0,0 +1,43 @@
{
buildPythonApplication
, fetchFromGitHub
, poetry-core
, pyserial
, pillow
, click
}: let
mainProgram = "niimprint";
in buildPythonApplication {
pname = "niimprint";
version = "2024_04_05";
src = fetchFromGitHub {
owner = "AndBondStyle";
repo = "niimprint";
rev = "be39f68c16a5a7dc1b09bb173700d0ee1ec9cb66";
sha256 = "sha256-+YISYchdqeVKrQ0h2cj5Jy2ezMjnQcWCCYm5f95H9dI=";
};
pyproject = true;
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
pyserial
pillow
click
];
postInstall = ''
install -d $out/bin
echo '#!/usr/bin/env python' > $out/bin/${mainProgram}
cat niimprint/__main__.py >> $out/bin/${mainProgram}
chmod +x $out/bin/${mainProgram}
'';
meta = {
inherit mainProgram;
};
}