chore: fmt, feat(syncthing): allow on tailscale

This commit is contained in:
Kat Inskip 2024-09-02 23:17:24 -07:00
parent b7f5cd0562
commit b556db56cc
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
7 changed files with 89 additions and 65 deletions

View file

@ -1,11 +1,11 @@
{ stdenv
, lib
, fetchFromGitHub
, python3
, unstableGitUpdater
, makeWrapper
{
stdenv,
lib,
fetchFromGitHub,
python3,
unstableGitUpdater,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "klipper";
version = "0.12.0-unstable-2024-07-05";
@ -21,11 +21,11 @@ stdenv.mkDerivation rec {
# NB: This is needed for the postBuild step
nativeBuildInputs = [
(python3.withPackages ( p: with p; [ cffi ] ))
(python3.withPackages (p: with p; [cffi]))
makeWrapper
];
buildInputs = [ (python3.withPackages (p: with p; [ can cffi pyserial greenlet jinja2 markupsafe numpy ])) ];
buildInputs = [(python3.withPackages (p: with p; [can cffi pyserial greenlet jinja2 markupsafe numpy]))];
# we need to run this to prebuild the chelper.
postBuild = ''
@ -76,9 +76,8 @@ stdenv.mkDerivation rec {
description = "Klipper 3D printer firmware";
mainProgram = "klippy";
homepage = "https://github.com/KevinOConnor/klipper";
maintainers = with maintainers; [ lovesegfault zhaofengli cab404 ];
maintainers = with maintainers; [lovesegfault zhaofengli cab404];
platforms = platforms.linux;
license = licenses.gpl3Only;
};
}

View file

@ -1,43 +1,44 @@
{
buildPythonApplication
, fetchFromGitHub
, poetry-core
, pyserial
, pillow
, click
buildPythonApplication,
fetchFromGitHub,
poetry-core,
pyserial,
pillow,
click,
}: let
mainProgram = "niimprint";
in buildPythonApplication {
pname = "niimprint";
version = "2024_04_05";
in
buildPythonApplication {
pname = "niimprint";
version = "2024_04_05";
src = fetchFromGitHub {
owner = "AndBondStyle";
repo = "niimprint";
rev = "be39f68c16a5a7dc1b09bb173700d0ee1ec9cb66";
sha256 = "sha256-+YISYchdqeVKrQ0h2cj5Jy2ezMjnQcWCCYm5f95H9dI=";
};
src = fetchFromGitHub {
owner = "AndBondStyle";
repo = "niimprint";
rev = "be39f68c16a5a7dc1b09bb173700d0ee1ec9cb66";
sha256 = "sha256-+YISYchdqeVKrQ0h2cj5Jy2ezMjnQcWCCYm5f95H9dI=";
};
pyproject = true;
pyproject = true;
nativeBuildInputs = [
poetry-core
];
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
pyserial
pillow
click
];
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}
'';
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;
};
}
meta = {
inherit mainProgram;
};
}