push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,143 @@
{
stdenv,
lib,
fetchFromGitHub,
wrapQtAppsHook,
qmake,
pkg-config,
qtbase,
qtsvg,
qttools,
qtserialport,
qtwayland,
qt5compat,
boost,
libngspice,
libgit2,
quazip,
clipper,
}:
let
# SHA256 of the fritzing-parts HEAD on the master branch,
# which contains the latest stable parts definitions
partsSha = "76235099ed556e52003de63522fdd74e61d53a36";
parts = fetchFromGitHub {
owner = "fritzing";
repo = "fritzing-parts";
rev = partsSha;
hash = "sha256-1QVcPbRBOSYnNFsp7B2OyPXYuPaINRv9yEqGZFd662Y=";
};
# Header-only library
svgpp = fetchFromGitHub {
owner = "svgpp";
repo = "svgpp";
tag = "v1.3.1";
hash = "sha256-nW0ns06XWfUi22nOKZzFKgAOHVIlQqChW8HxUDOFMh4=";
};
in
stdenv.mkDerivation {
pname = "fritzing";
version = "1.0.4";
src = fetchFromGitHub {
owner = "fritzing";
repo = "fritzing-app";
rev = "a8c6ef7cf66f7a42b9b233d6137f1b70a9573a25";
hash = "sha256-a/bWAUeDPj3g8BECOlXuqyCi4JgGLLs1605m380Drt0=";
};
patches = [
# Fix build with Qt >= 6.9
./fix-stricter-types.patch
];
nativeBuildInputs = [
qmake
pkg-config
qttools
wrapQtAppsHook
];
buildInputs = [
qtbase
qtsvg
qtserialport
qt5compat
boost
libgit2
quazip
libngspice
clipper
]
++ lib.optionals stdenv.hostPlatform.isLinux [
qtwayland
];
postPatch = ''
# Use packaged quazip, libgit and ngspice
sed -i "/pri\/quazipdetect.pri/d" phoenix.pro
sed -i "/pri\/spicedetect.pri/d" phoenix.pro
substituteInPlace pri/libgit2detect.pri \
--replace-fail 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false'
#TODO: Do not hardcode SHA.
substituteInPlace src/fapplication.cpp \
--replace-fail 'PartsChecker::getSha(dir.absolutePath());' '"${partsSha}";'
substituteInPlace phoenix.pro \
--replace-fail "6.5.10" "${qtbase.version}"
substituteInPlace src/simulation/ngspice_simulator.cpp \
--replace-fail 'path + "/" + libName' '"${libngspice}/lib/libngspice.so"'
mkdir parts
cp -a ${parts}/* parts/
'';
env = {
NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [
"-I${lib.getDev quazip}/include/QuaZip-Qt${lib.versions.major qtbase.version}-${quazip.version}"
"-I${svgpp}/include"
"-I${clipper}/include/polyclipping"
];
NIX_LDFLAGS = "-lquazip1-qt${lib.versions.major qtbase.version}";
};
qmakeFlags = [
"phoenix.pro"
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
mv $out/bin/Fritzing.app $out/Applications/Fritzing.app
cp FritzingInfo.plist $out/Applications/Fritzing.app/Contents/Info.plist
makeWrapper $out/Applications/Fritzing.app/Contents/MacOS/Fritzing $out/bin/Fritzing
'';
postFixup = ''
# generate the parts.db file
QT_QPA_PLATFORM=offscreen "$out/bin/Fritzing" \
-db "$out/share/fritzing/parts/parts.db" \
-pp "$out/share/fritzing/parts" \
-folder "$out/share/fritzing"
'';
meta = {
description = "Open source prototyping tool for Arduino-based projects";
homepage = "https://fritzing.org";
license = with lib.licenses; [
gpl3
cc-by-sa-30
];
maintainers = with lib.maintainers; [
robberer
muscaln
];
platforms = lib.platforms.unix;
mainProgram = "Fritzing";
};
}

View File

@@ -0,0 +1,57 @@
diff --git a/src/items/paletteitembase.cpp b/src/items/paletteitembase.cpp
index 49db343e..8760ba55 100644
--- a/src/items/paletteitembase.cpp
+++ b/src/items/paletteitembase.cpp
@@ -626,7 +626,7 @@ QString PaletteItemBase::retrieveSvg(ViewLayer::ViewLayerID viewLayerID, QHash<Q
//DebugDialog::debug(QString("path: %1").arg(path));
- QString svg = svgHash.value(path + xmlName + QString(QChar(m_viewLayerPlacement)), "");
+ QString svg = svgHash.value(path + xmlName + QString(QChar(static_cast<ushort>(m_viewLayerPlacement))), "");
if (!svg.isEmpty()) return svg;
SvgFileSplitter splitter;
@@ -657,7 +657,7 @@ QString PaletteItemBase::retrieveSvg(ViewLayer::ViewLayerID viewLayerID, QHash<Q
return "";
}
svg = splitter.elementString(xmlName);
- svgHash.insert(path + xmlName + QString(QChar(m_viewLayerPlacement)), svg);
+ svgHash.insert(path + xmlName + QString(QChar(static_cast<ushort>(m_viewLayerPlacement))), svg);
return svg;
}
diff --git a/src/items/resistor.cpp b/src/items/resistor.cpp
index e2a23fd8..3fb4c669 100644
--- a/src/items/resistor.cpp
+++ b/src/items/resistor.cpp
@@ -260,7 +260,7 @@ bool Resistor::collectExtraInfo(QWidget * parent, const QString & family, const
validator->setSymbol(OhmSymbol);
validator->setConverter(TextUtils::convertFromPowerPrefix);
validator->setBounds(MIN_RESISTANCE, MAX_RESISTANCE);
- validator->setRegularExpression(QRegularExpression(QString("((\\d{1,10})|(\\d{1,10}\\.)|(\\d{1,10}\\.\\d{1,5}))[\\x%1umkMG]{0,1}[\\x03A9]{0,1}").arg(TextUtils::MicroSymbolCode, 4, 16, QChar('0'))));
+ validator->setRegularExpression(QRegularExpression(QString("((\\d{1,10})|(\\d{1,10}\\.)|(\\d{1,10}\\.\\d{1,5}))[\\x%1umkMG]{0,1}[\\x03A9]{0,1}").arg(static_cast<int>(TextUtils::MicroSymbolCode), 4, 16, QChar('0'))));
focusOutComboBox->setValidator(validator);
connect(focusOutComboBox->validator(), SIGNAL(sendState(QValidator::State)), this, SLOT(textModified(QValidator::State)));
connect(focusOutComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(resistanceEntry(int)));
diff --git a/src/utils/textutils.cpp b/src/utils/textutils.cpp
index a1a28d51..3d3aa8e0 100644
--- a/src/utils/textutils.cpp
+++ b/src/utils/textutils.cpp
@@ -79,7 +79,7 @@ const QString TextUtils::AdobeIllustratorIdentifier = "Generator: Adobe Illustra
QList<QString> PowerPrefixes;
QList<double> PowerPrefixValues;
-const QString TextUtils::PowerPrefixesString = QString("pnmkMGTu\\x%1").arg(MicroSymbolCode, 4, 16, QChar('0'));
+const QString TextUtils::PowerPrefixesString = QString("pnmkMGTu\\x%1").arg(static_cast<int>(MicroSymbolCode), 4, 16, QChar('0'));
typedef QHash<QString /*brokenFont*/, QString /*replacementFont*/> FixedFontsHash;
@@ -763,7 +763,7 @@ QString TextUtils::convertExtendedChars(const QString & str)
result.append(c);
}
else {
- result.append(QString("&#x%1;").arg(c.unicode(), 0, 16));
+ result.append("&#x" + QString::number(c.unicode(), 16) + ";");
}
}