Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / flashprint / default.nix
blob893ae8aed00552c20c899952ff1bdb969a13992f
1 { lib, stdenv, libGLU, qtbase, fetchurl, dpkg, autoPatchelfHook, wrapQtAppsHook }:
3 stdenv.mkDerivation (finalAttrs: {
4   pname = "flashprint";
5   version = "5.8.1";
7   src = fetchurl {
8     url = "http://www.ishare3d.com/3dapp/public/FlashPrint-5/FlashPrint/flashprint5_${finalAttrs.version}_amd64.deb";
9     hash = "sha256-X5CsJmJa3qGQxdZ1xg3xoVnIaChzxZ/GaLZFqBE2dIk=";
10   };
12   nativeBuildInputs = [ dpkg autoPatchelfHook wrapQtAppsHook ];
14   buildInputs = [ qtbase libGLU ];
16   qtWrapperArgs = [ "--prefix QT_QPA_PLATFORM : xcb" ];
18   installPhase = ''
19     runHook preInstall
21     mkdir -p $out/bin
22     mv etc usr/* $out
23     ln -s $out/share/FlashPrint5/FlashPrint $out/bin/flashprint
24     sed -i "/^Exec=/ c Exec=$out/bin/flashprint" $out/share/applications/FlashPrint5.desktop
26     runHook postInstall
27   '';
29   meta = with lib; {
30     description = "Slicer for the FlashForge 3D printers";
31     homepage = "https://www.flashforge.com/";
32     license = licenses.unfree;
33     mainProgram = "flashprint";
34     maintainers = [ maintainers.ianliu ];
35     platforms = [ "x86_64-linux" ];
36     sourceProvenance = [ sourceTypes.binaryNativeCode ];
37   };