mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat: pkgs.niimprint
This commit is contained in:
parent
5975a2b7a8
commit
80937d6496
4 changed files with 48 additions and 1 deletions
|
|
@ -39,6 +39,7 @@ in {
|
|||
];
|
||||
print.inputs = [
|
||||
#legacyPackages.x86_64-linux.pkgs.cura-octoprint
|
||||
legacyPackages.x86_64-linux.pkgs.niimprint
|
||||
];
|
||||
systemd2mqtt.inputs = [
|
||||
packages.x86_64-linux.systemd2mqtt
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ in {
|
|||
plugins = [final.curaPlugins.octoprint];
|
||||
};
|
||||
|
||||
klipper = prev.callPackage ../packages/klipper.nix {};
|
||||
klipper = final.callPackage ../packages/klipper.nix {};
|
||||
|
||||
octoprint = let
|
||||
mapPlugin = python3Packages: _: plugin:
|
||||
|
|
@ -73,4 +73,6 @@ in {
|
|||
in
|
||||
callPackage octoklipper {};
|
||||
};
|
||||
|
||||
niimprint = final.python3Packages.callPackage ../packages/niimprint.nix {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
barcodebuddy
|
||||
barcodebuddy-scanner
|
||||
barcodebuddy-scanner-python
|
||||
niimprint
|
||||
openwebrxplus
|
||||
systemd2mqtt
|
||||
;
|
||||
|
|
|
|||
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