Files
nixpkgs/pkgs/by-name/fl/flashprint/package.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

54 lines
1.2 KiB
Nix

{
lib,
stdenv,
libGLU,
fetchurl,
dpkg,
autoPatchelfHook,
libsForQt5,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "flashprint";
version = "5.8.7";
src = fetchurl {
url = "http://www.ishare3d.com/3dapp/public/FlashPrint-5/FlashPrint/flashprint5_${finalAttrs.version}_amd64.deb";
hash = "sha256-DVY5XxAz3HPAWMNaGauUop7OWHeFuuRHuVllyJvHqFk=";
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
libsForQt5.wrapQtAppsHook
];
buildInputs = [
libsForQt5.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 = {
description = "Slicer for the FlashForge 3D printers";
homepage = "https://www.flashforge.com/";
license = lib.licenses.unfree;
mainProgram = "flashprint";
maintainers = [ lib.maintainers.ianliu ];
platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
})