depot/third_party/nixpkgs/pkgs/applications/misc/flashprint/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

38 lines
1.1 KiB
Nix

{ lib, stdenv, libGLU, qtbase, fetchurl, dpkg, autoPatchelfHook, wrapQtAppsHook }:
stdenv.mkDerivation (finalAttrs: {
pname = "flashprint";
version = "5.8.3";
src = fetchurl {
url = "http://www.ishare3d.com/3dapp/public/FlashPrint-5/FlashPrint/flashprint5_${finalAttrs.version}_amd64.deb";
hash = "sha256-6vBEthQD0HM2D+l+2dwWmdU+XPJpcvZQM+2GMuaf5Pw=";
};
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 ];
};
})