fritzing: support darwin

+14 -6
+14 -6
pkgs/applications/science/electronics/fritzing/default.nix
··· 54 qtbase 55 qtsvg 56 qtserialport 57 - qtwayland 58 qt5compat 59 boost 60 libgit2 61 quazip 62 libngspice 63 clipper 64 ]; 65 66 postPatch = '' 67 # Use packaged quazip, libgit and ngspice 68 sed -i "/pri\/quazipdetect.pri/d" phoenix.pro 69 sed -i "/pri\/spicedetect.pri/d" phoenix.pro 70 - substituteInPlace phoenix.pro \ 71 - --replace 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false' 72 73 #TODO: Do not hardcode SHA. 74 substituteInPlace src/fapplication.cpp \ 75 - --replace 'PartsChecker::getSha(dir.absolutePath());' '"${partsSha}";' 76 77 substituteInPlace phoenix.pro \ 78 - --replace "6.5.10" "${qtbase.version}" 79 80 mkdir parts 81 cp -a ${parts}/* parts/ ··· 92 "phoenix.pro" 93 ]; 94 95 postFixup = '' 96 # generate the parts.db file 97 QT_QPA_PLATFORM=offscreen "$out/bin/Fritzing" \ ··· 105 homepage = "https://fritzing.org/"; 106 license = with licenses; [ gpl3 cc-by-sa-30 ]; 107 maintainers = with maintainers; [ robberer muscaln ]; 108 - platforms = platforms.linux; 109 mainProgram = "Fritzing"; 110 }; 111 }
··· 54 qtbase 55 qtsvg 56 qtserialport 57 qt5compat 58 boost 59 libgit2 60 quazip 61 libngspice 62 clipper 63 + ] ++ lib.optionals stdenv.isLinux [ 64 + qtwayland 65 ]; 66 67 postPatch = '' 68 # Use packaged quazip, libgit and ngspice 69 sed -i "/pri\/quazipdetect.pri/d" phoenix.pro 70 sed -i "/pri\/spicedetect.pri/d" phoenix.pro 71 + substituteInPlace pri/libgit2detect.pri \ 72 + --replace-fail 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false' 73 74 #TODO: Do not hardcode SHA. 75 substituteInPlace src/fapplication.cpp \ 76 + --replace-fail 'PartsChecker::getSha(dir.absolutePath());' '"${partsSha}";' 77 78 substituteInPlace phoenix.pro \ 79 + --replace-fail "6.5.10" "${qtbase.version}" 80 81 mkdir parts 82 cp -a ${parts}/* parts/ ··· 93 "phoenix.pro" 94 ]; 95 96 + postInstall = lib.optionalString stdenv.isDarwin '' 97 + mkdir $out/Applications 98 + mv $out/bin/Fritzing.app $out/Applications/Fritzing.app 99 + cp FritzingInfo.plist $out/Applications/Fritzing.app/Contents/Info.plist 100 + makeWrapper $out/Applications/Fritzing.app/Contents/MacOS/Fritzing $out/bin/Fritzing 101 + ''; 102 + 103 postFixup = '' 104 # generate the parts.db file 105 QT_QPA_PLATFORM=offscreen "$out/bin/Fritzing" \ ··· 113 homepage = "https://fritzing.org/"; 114 license = with licenses; [ gpl3 cc-by-sa-30 ]; 115 maintainers = with maintainers; [ robberer muscaln ]; 116 + platforms = platforms.unix; 117 mainProgram = "Fritzing"; 118 }; 119 }