mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
feat: pkgs.niimprint
This commit is contained in:
parent
5975a2b7a8
commit
80937d6496
4 changed files with 48 additions and 1 deletions
43
packages/niimprint.nix
Normal file
43
packages/niimprint.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue