nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 54 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 libGLU, 5 qtbase, 6 fetchurl, 7 dpkg, 8 autoPatchelfHook, 9 wrapQtAppsHook, 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "flashprint"; 14 version = "5.8.7"; 15 16 src = fetchurl { 17 url = "http://www.ishare3d.com/3dapp/public/FlashPrint-5/FlashPrint/flashprint5_${finalAttrs.version}_amd64.deb"; 18 hash = "sha256-DVY5XxAz3HPAWMNaGauUop7OWHeFuuRHuVllyJvHqFk="; 19 }; 20 21 nativeBuildInputs = [ 22 dpkg 23 autoPatchelfHook 24 wrapQtAppsHook 25 ]; 26 27 buildInputs = [ 28 qtbase 29 libGLU 30 ]; 31 32 qtWrapperArgs = [ "--prefix QT_QPA_PLATFORM : xcb" ]; 33 34 installPhase = '' 35 runHook preInstall 36 37 mkdir -p $out/bin 38 mv etc usr/* $out 39 ln -s $out/share/FlashPrint5/FlashPrint $out/bin/flashprint 40 sed -i "/^Exec=/ c Exec=$out/bin/flashprint" $out/share/applications/FlashPrint5.desktop 41 42 runHook postInstall 43 ''; 44 45 meta = with lib; { 46 description = "Slicer for the FlashForge 3D printers"; 47 homepage = "https://www.flashforge.com/"; 48 license = licenses.unfree; 49 mainProgram = "flashprint"; 50 maintainers = [ maintainers.ianliu ]; 51 platforms = [ "x86_64-linux" ]; 52 sourceProvenance = [ sourceTypes.binaryNativeCode ]; 53 }; 54})