Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SL1ToPhoton: init at 0.1.3 #93792

Merged
merged 2 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions pkgs/applications/misc/sl1-to-photon/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ lib
, buildPythonApplication
, fetchFromGitHub
, pillow
, pyside2
, numpy
, pyphotonfile
, shiboken2
, which
}:
let
version = "0.1.3";
in
buildPythonApplication rec {
pname = "sl1-to-photon";
inherit version;

src = fetchFromGitHub {
owner = "fookatchu";
repo = "SL1toPhoton";
rev = "v${version}";
sha256 = "1hmb74rcky3nax4lxn7pw6lcd5a66fdbwrm11c84zb31xb51bakw";
};

propagatedBuildInputs = [ pyphotonfile pillow numpy pyside2 shiboken2 ];

format = "other";

installPhase = ''
install -D -m 0755 SL1_to_Photon.py $out/bin/${pname}
sed -i '1i#!/usr/bin/env python' $out/bin/${pname}
'';

meta = with lib; {
maintainers = [ maintainers.cab404 ];
license = licenses.gpl3Plus;
description = "Tool for converting Slic3r PE's SL1 files to Photon files for the Anycubic Photon 3D-Printer";
homepage = "https://github.com/fookatchu/SL1toPhoton";
};

}
29 changes: 29 additions & 0 deletions pkgs/development/python-modules/pyphotonfile/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pillow
, numpy
}:
let
version = "0.2.1";
in
buildPythonPackage {
pname = "pyphotonfile";
inherit version;
propagatedBuildInputs = [ pillow numpy ];

src = fetchFromGitHub {
owner = "fookatchu";
repo = "pyphotonfile";
rev = "v${version}";
sha256 = "1hh1fcn7q3kyk2413pjs18xnxvzrchrisbpj2cd59jrdp0qzgv2s";
};

meta = with lib; {
maintainers = [ maintainers.cab404 ];
license = licenses.gpl3Plus;
description = "Library for reading and writing files for the Anycubic Photon 3D-Printer";
homepage = "https://github.com/fookatchu/pyphotonfile";
};

}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3060,6 +3060,8 @@ in

doom-bcc = callPackage ../games/zdoom/bcc-git.nix { };

sl1-to-photon = python3Packages.callPackage ../applications/misc/sl1-to-photon { };

slade = callPackage ../applications/misc/slade {
wxGTK = wxGTK30;
};
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,8 @@ in {

pyperf = callPackage ../development/python-modules/pyperf { };

pyphotonfile = callPackage ../development/python-modules/pyphotonfile { };

pefile = callPackage ../development/python-modules/pefile { };

perfplot = callPackage ../development/python-modules/perfplot { };
Expand Down