fritzing: 0.9.6 -> unstable-2021-09-22 (#136142)

authored by Mustafa Çalışkan and committed by GitHub 66ea992d 02330920

+31 -22
+31 -22
pkgs/applications/science/electronics/fritzing/default.nix
··· 1 1 { mkDerivation 2 2 , lib 3 3 , fetchFromGitHub 4 + , fetchpatch 4 5 , qmake 5 6 , pkg-config 6 7 , qtbase ··· 9 10 , qtserialport 10 11 , boost 11 12 , libgit2 13 + , quazip 12 14 }: 13 15 14 16 let 15 - # build number corresponding to a release, has no further relation 16 - # see https://github.com/fritzing/fritzing-app/releases/tag/CD-498 17 - # fritzingBuild = "498"; 18 - # version 0.9.6 is properly tagged, hope it continues 19 - 20 17 # SHA256 of the fritzing-parts HEAD on the master branch, 21 18 # which contains the latest stable parts definitions 22 - partsSha = "6f04697be286768bc9e4d64f8707e8e40cbcafcb"; 19 + partsSha = "640fa25650211afccd369f960375ade8ec3e8653"; 20 + 21 + parts = fetchFromGitHub { 22 + owner = "fritzing"; 23 + repo = "fritzing-parts"; 24 + rev = partsSha; 25 + sha256 = "sha256-4S65eX4LCnXCFQAOxmdvr8d0nAgTWcJooE2SpLYpcXI="; 26 + }; 23 27 in 24 28 25 29 mkDerivation rec { 26 30 pname = "fritzing"; 27 - version = "0.9.6"; 31 + version = "unstable-2021-09-22"; 28 32 29 33 src = fetchFromGitHub { 30 34 owner = pname; 31 35 repo = "fritzing-app"; 32 - rev = version; 33 - sha256 = "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"; 36 + rev = "f0af53a9077f7cdecef31d231b85d8307de415d4"; 37 + sha256 = "sha256-fF38DrBoeZ0aKwVMNyYMPWa5rFPbIVXRARZT+eRat5Q="; 34 38 }; 35 39 36 - parts = fetchFromGitHub { 37 - owner = pname; 38 - repo = "fritzing-parts"; 39 - name = "fritzing-parts"; 40 - rev = partsSha; 41 - sha256 = "1f4w0hz44n4iw1rc5vhcgzvlji54rf4yr8bvzkqv99hn2xf5pjgs"; 42 - }; 40 + buildInputs = [ qtbase qtsvg qtserialport boost libgit2 quazip ]; 41 + nativeBuildInputs = [ qmake pkg-config qttools ]; 43 42 44 - buildInputs = [ qtbase qtsvg qtserialport boost libgit2 ]; 45 - nativeBuildInputs = [ qmake pkg-config qttools ]; 43 + patches = [ 44 + # Add support for QuaZip 1.x 45 + (fetchpatch { 46 + url = "https://github.com/fritzing/fritzing-app/commit/ef83ebd9113266bb31b3604e3e9d0332bb48c999.patch"; 47 + sha256 = "sha256-J43E6iBRIVbsuuo82gPk3Q7tyLhNkuuyYwtH8hUfcPU="; 48 + }) 49 + ]; 46 50 47 51 postPatch = '' 48 52 substituteInPlace phoenix.pro \ 49 53 --replace 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false' 50 54 55 + #TODO: Do not hardcode SHA. 51 56 substituteInPlace src/fapplication.cpp \ 52 57 --replace 'PartsChecker::getSha(dir.absolutePath());' '"${partsSha}";' 53 58 54 59 mkdir parts 55 60 cp -a ${parts}/* parts/ 56 61 ''; 62 + 63 + qmakeFlags = [ 64 + "phoenix.pro" 65 + "DEFINES=QUAZIP_INSTALLED" 66 + "DEFINES+=QUAZIP_1X" 67 + ]; 57 68 58 69 postFixup = '' 59 70 # generate the parts.db file 60 71 QT_QPA_PLATFORM=offscreen "$out/bin/Fritzing" \ 61 72 -db "$out/share/fritzing/parts/parts.db" \ 62 - -pp "$out/fritzing/parts" \ 73 + -pp "$out/share/fritzing/parts" \ 63 74 -folder "$out/share/fritzing" 64 75 ''; 65 76 66 - qmakeFlags = [ "phoenix.pro" ]; 67 - 68 77 meta = with lib; { 69 78 description = "An open source prototyping tool for Arduino-based projects"; 70 79 homepage = "https://fritzing.org/"; 71 80 license = with licenses; [ gpl3 cc-by-sa-30 ]; 72 - maintainers = with maintainers; [ robberer ]; 81 + maintainers = with maintainers; [ robberer musfay ]; 73 82 platforms = platforms.linux; 74 83 }; 75 84 }