fritzing: 0.9.6 -> unstable-2021-09-22 (#136142)
This commit is contained in:
parent
02330920cf
commit
66ea992d48
|
@ -1,6 +1,7 @@
|
|||
{ mkDerivation
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, qmake
|
||||
, pkg-config
|
||||
, qtbase
|
||||
|
@ -9,45 +10,49 @@
|
|||
, qtserialport
|
||||
, boost
|
||||
, libgit2
|
||||
, quazip
|
||||
}:
|
||||
|
||||
let
|
||||
# build number corresponding to a release, has no further relation
|
||||
# see https://github.com/fritzing/fritzing-app/releases/tag/CD-498
|
||||
# fritzingBuild = "498";
|
||||
# version 0.9.6 is properly tagged, hope it continues
|
||||
|
||||
# SHA256 of the fritzing-parts HEAD on the master branch,
|
||||
# which contains the latest stable parts definitions
|
||||
partsSha = "6f04697be286768bc9e4d64f8707e8e40cbcafcb";
|
||||
partsSha = "640fa25650211afccd369f960375ade8ec3e8653";
|
||||
|
||||
parts = fetchFromGitHub {
|
||||
owner = "fritzing";
|
||||
repo = "fritzing-parts";
|
||||
rev = partsSha;
|
||||
sha256 = "sha256-4S65eX4LCnXCFQAOxmdvr8d0nAgTWcJooE2SpLYpcXI=";
|
||||
};
|
||||
in
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "fritzing";
|
||||
version = "0.9.6";
|
||||
version = "unstable-2021-09-22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = "fritzing-app";
|
||||
rev = version;
|
||||
sha256 = "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs";
|
||||
rev = "f0af53a9077f7cdecef31d231b85d8307de415d4";
|
||||
sha256 = "sha256-fF38DrBoeZ0aKwVMNyYMPWa5rFPbIVXRARZT+eRat5Q=";
|
||||
};
|
||||
|
||||
parts = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = "fritzing-parts";
|
||||
name = "fritzing-parts";
|
||||
rev = partsSha;
|
||||
sha256 = "1f4w0hz44n4iw1rc5vhcgzvlji54rf4yr8bvzkqv99hn2xf5pjgs";
|
||||
};
|
||||
|
||||
buildInputs = [ qtbase qtsvg qtserialport boost libgit2 ];
|
||||
buildInputs = [ qtbase qtsvg qtserialport boost libgit2 quazip ];
|
||||
nativeBuildInputs = [ qmake pkg-config qttools ];
|
||||
|
||||
patches = [
|
||||
# Add support for QuaZip 1.x
|
||||
(fetchpatch {
|
||||
url = "https://github.com/fritzing/fritzing-app/commit/ef83ebd9113266bb31b3604e3e9d0332bb48c999.patch";
|
||||
sha256 = "sha256-J43E6iBRIVbsuuo82gPk3Q7tyLhNkuuyYwtH8hUfcPU=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace phoenix.pro \
|
||||
--replace 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false'
|
||||
|
||||
#TODO: Do not hardcode SHA.
|
||||
substituteInPlace src/fapplication.cpp \
|
||||
--replace 'PartsChecker::getSha(dir.absolutePath());' '"${partsSha}";'
|
||||
|
||||
|
@ -55,21 +60,25 @@ mkDerivation rec {
|
|||
cp -a ${parts}/* parts/
|
||||
'';
|
||||
|
||||
qmakeFlags = [
|
||||
"phoenix.pro"
|
||||
"DEFINES=QUAZIP_INSTALLED"
|
||||
"DEFINES+=QUAZIP_1X"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
# generate the parts.db file
|
||||
QT_QPA_PLATFORM=offscreen "$out/bin/Fritzing" \
|
||||
-db "$out/share/fritzing/parts/parts.db" \
|
||||
-pp "$out/fritzing/parts" \
|
||||
-pp "$out/share/fritzing/parts" \
|
||||
-folder "$out/share/fritzing"
|
||||
'';
|
||||
|
||||
qmakeFlags = [ "phoenix.pro" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source prototyping tool for Arduino-based projects";
|
||||
homepage = "https://fritzing.org/";
|
||||
license = with licenses; [ gpl3 cc-by-sa-30 ];
|
||||
maintainers = with maintainers; [ robberer ];
|
||||
maintainers = with maintainers; [ robberer musfay ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue