From d453259932c00143395a767addc67bb53aebcb19 Mon Sep 17 00:00:00 2001 From: Ian Liu Rodrigues Date: Mon, 11 Sep 2023 08:31:44 -0300 Subject: [PATCH] flashprint: init at 5.7.1 --- pkgs/applications/misc/flashprint/default.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/misc/flashprint/default.nix diff --git a/pkgs/applications/misc/flashprint/default.nix b/pkgs/applications/misc/flashprint/default.nix new file mode 100644 index 000000000000..e698f4857b3b --- /dev/null +++ b/pkgs/applications/misc/flashprint/default.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, libGLU, qtbase, fetchurl, dpkg, autoPatchelfHook, wrapQtAppsHook }: + +stdenv.mkDerivation (finalAttrs: { + pname = "flashprint"; + version = "5.7.1"; + + src = fetchurl { + url = "http://www.ishare3d.com/3dapp/public/FlashPrint-5/FlashPrint/flashprint5_${finalAttrs.version}_amd64.deb"; + hash = "sha256-kxvqEgXlKQlfzlCqKb5o3hvop82vDsJmQDK9XOCq61g="; + }; + + nativeBuildInputs = [ dpkg autoPatchelfHook wrapQtAppsHook ]; + + buildInputs = [ qtbase libGLU ]; + + qtWrapperArgs = [ "--prefix QT_QPA_PLATFORM : xcb" ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + mv etc usr/* $out + ln -s $out/share/FlashPrint5/FlashPrint $out/bin/flashprint + sed -i "/^Exec=/ c Exec=$out/bin/flashprint" $out/share/applications/FlashPrint5.desktop + + runHook postInstall + ''; + + meta = with lib; { + description = "Slicer for the FlashForge 3D printers"; + homepage = "https://www.flashforge.com/"; + license = licenses.unfree; + mainProgram = "flashprint"; + maintainers = [ maintainers.ianliu ]; + platforms = [ "x86_64-linux" ]; + sourceProvenance = [ sourceTypes.binaryNativeCode ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dd8e187dba44..15510ad599b1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40482,6 +40482,8 @@ with pkgs; faustPhysicalModeling = callPackage ../applications/audio/faustPhysicalModeling { }; + flashprint = libsForQt5.callPackage ../applications/misc/flashprint { }; + flockit = callPackage ../tools/backup/flockit { }; fahclient = callPackage ../applications/science/misc/foldingathome/client.nix { };