99, qtsvg
1010, qttools
1111, qtserialport
12+ , qtwayland
13+ , qt5compat
1214, boost
1315, libngspice
1416, libgit2
1820let
1921 # SHA256 of the fritzing-parts HEAD on the master branch,
2022 # which contains the latest stable parts definitions
21- partsSha = "4713511c894cb2894eae505b9307c6555afcc32c " ;
23+ partsSha = "015626e6cafb1fc7831c2e536d97ca2275a83d32 " ;
2224
2325 parts = fetchFromGitHub {
2426 owner = "fritzing" ;
2527 repo = "fritzing-parts" ;
2628 rev = partsSha ;
27- sha256 = "sha256-QiOGWc+99MJhOVrXyNOinR8rTVvW/E+wPfoB6QvbhY0=" ;
29+ hash = "sha256-5jw56cqxpT/8bf1q551WG53J6Lw5pH0HEtRUoNNMc+A=" ;
30+ } ;
31+
32+ # Header-only library
33+ svgpp = fetchFromGitHub {
34+ owner = "svgpp" ;
35+ repo = "svgpp" ;
36+ rev = "v1.3.0" ;
37+ hash = "sha256-kJEVnMYnDF7bThDB60bGXalYgpn9c5/JCZkRSK5GoE4=" ;
2838 } ;
2939in
3040
3141stdenv . mkDerivation rec {
3242 pname = "fritzing" ;
33- version = "unstable-2022-07-01 " ;
43+ version = "1.0.1 " ;
3444
3545 src = fetchFromGitHub {
3646 owner = pname ;
3747 repo = "fritzing-app" ;
38- rev = "40d23c29b0463d5c968c3c4b34ed5ffc05c5a258 " ;
39- sha256 = "sha256-smvfuxQWF/LMFFXHOKb3zUZsEet/XoiaxXOR5QMaYzw =" ;
48+ rev = "8f5f1373835050ce014299c78d91c24beea9b633 " ;
49+ hash = "sha256-jLVNzSh2KwXpi3begtp/53sdBmQQbCnKMCm2p770etg =" ;
4050 } ;
4151
42- buildInputs = [ qtbase qtsvg qtserialport boost libgit2 quazip libngspice ] ;
43- nativeBuildInputs = [ qmake pkg-config qttools wrapQtAppsHook ] ;
44-
4552 patches = [
53+ # Fix error caused by implicit call
4654 ( fetchpatch {
47- url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-Quick-Dirty-patch-to-allow-finding-quazip-qt5-on-Arc .patch?h=fritzing&id=1ae0dc88464f375a54b156e6761315bcb04bcc1f " ;
48- sha256 = "sha256-iS18EWw920gyeXDoHBRGwXvwMJurJS21H77Erl+fqog =" ;
55+ url = "https://aur.archlinux.org/cgit/aur.git/plain/0003-ParseResult-operator-bool-in-explicit .patch?h=fritzing&id=b2c79b55f0a2811e80bb1136b1e021fbc56937c9 " ;
56+ hash = "sha256-9HdcNqLHEB0HQbF7AaTdUIJUbafwsRKPA+wfF4g8veU =" ;
4957 } )
5058 ] ;
5159
60+ nativeBuildInputs = [ qmake pkg-config qttools wrapQtAppsHook ] ;
61+ buildInputs = [
62+ qtbase
63+ qtsvg
64+ qtserialport
65+ qtwayland
66+ qt5compat
67+ boost
68+ libgit2
69+ quazip
70+ libngspice
71+ ] ;
72+
5273 postPatch = ''
74+ # Use packaged quazip, libgit and ngspice
75+ sed -i "/pri\/quazipdetect.pri/d" phoenix.pro
76+ sed -i "/pri\/spicedetect.pri/d" phoenix.pro
5377 substituteInPlace phoenix.pro \
5478 --replace 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false'
5579
@@ -61,7 +85,11 @@ stdenv.mkDerivation rec {
6185 cp -a ${ parts } /* parts/
6286 '' ;
6387
64- env . NIX_CFLAGS_COMPILE = "-I${ lib . getDev quazip } /include/QuaZip-Qt${ lib . versions . major qtbase . version } -${ quazip . version } /quazip" ;
88+ env . NIX_CFLAGS_COMPILE = lib . concatStringsSep " " [
89+ "-I${ lib . getDev quazip } /include/QuaZip-Qt${ lib . versions . major qtbase . version } -${ quazip . version } /quazip"
90+ "-I${ svgpp } /include"
91+ ] ;
92+ env . NIX_LDFLAGS = "-lquazip1-qt${ lib . versions . major qtbase . version } " ;
6593
6694 qmakeFlags = [
6795 "phoenix.pro"
0 commit comments