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