valentina: 0.6.1 → 0.7.51
This commit is contained in:
parent
25f7edccc7
commit
96e9801607
|
@ -1,65 +1,54 @@
|
||||||
{ mkDerivation, lib, fetchhg
|
{ lib, stdenv, fetchFromGitLab, substituteAll, installShellFiles
|
||||||
, qmake, qttools
|
, qmake, qttools
|
||||||
, qtbase, qtsvg, qtxmlpatterns
|
, qtsvg, qttranslations, qtxmlpatterns
|
||||||
, poppler_utils
|
, wrapQtAppsHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
mkDerivation rec {
|
|
||||||
pname = "valentina";
|
pname = "valentina";
|
||||||
version = "0.6.1";
|
version = "0.7.51";
|
||||||
|
|
||||||
src = fetchhg {
|
src = fetchFromGitLab {
|
||||||
url = "https://bitbucket.org/dismine/valentina";
|
owner = "smart-pattern";
|
||||||
|
repo = "valentina";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0dxk2av7xbsd233sr9wa1hamzb7pp8yx6p5b43rsnvnzchkqf423";
|
hash = "sha256-N9fC2tCP4TVNncatHaz5W5Mp3jOmAcEWYCl30+0myaE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = (substituteAll {
|
||||||
|
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||||
|
src = ./fix-qttranslations-path.patch;
|
||||||
|
inherit qttranslations;
|
||||||
|
});
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace common.pri \
|
|
||||||
--replace '$$[QT_INSTALL_HEADERS]/QtXmlPatterns' '${getDev qtxmlpatterns}/include/QtXmlPatterns' \
|
|
||||||
--replace '$$[QT_INSTALL_HEADERS]/QtSvg' '${getDev qtsvg}/include/QtSvg' \
|
|
||||||
--replace '$$[QT_INSTALL_HEADERS]/' '${getDev qtbase}/include/' \
|
|
||||||
--replace '$$[QT_INSTALL_HEADERS]' '${getDev qtbase}'
|
|
||||||
substituteInPlace src/app/tape/tape.pro \
|
|
||||||
--replace '$$[QT_INSTALL_BINS]/rcc' '${getDev qtbase}/bin/rcc'
|
|
||||||
substituteInPlace src/app/translations.pri \
|
substituteInPlace src/app/translations.pri \
|
||||||
--replace '$$[QT_INSTALL_BINS]/$$LRELEASE' '${getDev qttools}/bin/lrelease'
|
--replace '$$[QT_INSTALL_BINS]/$$LRELEASE' '${lib.getDev qttools}/bin/lrelease'
|
||||||
substituteInPlace src/app/valentina/mainwindowsnogui.cpp \
|
|
||||||
--replace 'define PDFTOPS "pdftops"' 'define PDFTOPS "${getBin poppler_utils}/bin/pdftops"'
|
|
||||||
substituteInPlace src/app/valentina/dialogs/dialogsavelayout.h \
|
|
||||||
--replace 'define PDFTOPS "pdftops"' 'define PDFTOPS "${getBin poppler_utils}/bin/pdftops"'
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ qmake qttools ];
|
nativeBuildInputs = [ qmake qttools wrapQtAppsHook installShellFiles ];
|
||||||
|
|
||||||
buildInputs = [ qtbase qtsvg qtxmlpatterns poppler_utils ];
|
buildInputs = [ qtsvg qtxmlpatterns ];
|
||||||
|
|
||||||
configurePhase = ''
|
qmakeFlags = [
|
||||||
qmake PREFIX=/ Valentina.pro -r "CONFIG += noTests noRunPath no_ccache noDebugSymbols"
|
"-r"
|
||||||
'';
|
"PREFIX=${placeholder "out"}"
|
||||||
|
"CONFIG+=noTests"
|
||||||
installFlags = [ "INSTALL_ROOT=$(out)" ];
|
"CONFIG+=noRunPath"
|
||||||
|
"CONFIG+=no_ccache"
|
||||||
|
"CONFIG+=noDebugSymbols"
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv $out/usr/share $out/
|
installManPage dist/debian/*.1
|
||||||
rmdir $out/usr
|
install -Dm644 dist/debian/valentina.sharedmimeinfo $out/share/mime/packages/valentina.xml
|
||||||
|
|
||||||
mkdir -p $out/share/man/man1
|
|
||||||
gzip -9c dist/debian/valentina.1 > $out/share/man/man1/valentina.1.gz
|
|
||||||
gzip -9c dist/debian/tape.1 > $out/share/man/man1/tape.1.gz
|
|
||||||
|
|
||||||
mkdir -p $out/share/mime/packages
|
|
||||||
cp dist/debian/valentina.sharedmimeinfo $out/share/mime/packages/valentina.xml
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
meta = with lib; {
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "An open source sewing pattern drafting software";
|
description = "An open source sewing pattern drafting software";
|
||||||
homepage = "https://valentinaproject.bitbucket.io/";
|
homepage = "https://smart-pattern.com.ua/";
|
||||||
license = licenses.gpl3;
|
changelog = "https://gitlab.com/smart-pattern/valentina/-/blob/v${version}/ChangeLog.txt";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ jfrankenau ];
|
maintainers = with maintainers; [ jfrankenau ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
diff --git i/src/libs/vmisc/vabstractapplication.cpp w/src/libs/vmisc/vabstractapplication.cpp
|
||||||
|
index b64817bab..5f9aa3518 100644
|
||||||
|
--- i/src/libs/vmisc/vabstractapplication.cpp
|
||||||
|
+++ w/src/libs/vmisc/vabstractapplication.cpp
|
||||||
|
@@ -221,26 +221,26 @@ void VAbstractApplication::LoadTranslation(const QString &locale)
|
||||||
|
ClearTranslation();
|
||||||
|
|
||||||
|
qtTranslator = new QTranslator(this);
|
||||||
|
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
|
+#if defined(Q_OS_WIN)
|
||||||
|
qtTranslator->load("qt_" + locale, translationsPath(locale));
|
||||||
|
#else
|
||||||
|
- qtTranslator->load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||||
|
+ qtTranslator->load("qt_" + locale, QLatin1String("@qttranslations@/translations"));
|
||||||
|
#endif
|
||||||
|
installTranslator(qtTranslator);
|
||||||
|
|
||||||
|
qtxmlTranslator = new QTranslator(this);
|
||||||
|
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
|
+#if defined(Q_OS_WIN)
|
||||||
|
qtxmlTranslator->load("qtxmlpatterns_" + locale, translationsPath(locale));
|
||||||
|
#else
|
||||||
|
- qtxmlTranslator->load("qtxmlpatterns_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||||
|
+ qtxmlTranslator->load("qtxmlpatterns_" + locale, QLatin1String("@qttranslations@/translations"));
|
||||||
|
#endif
|
||||||
|
installTranslator(qtxmlTranslator);
|
||||||
|
|
||||||
|
qtBaseTranslator = new QTranslator(this);
|
||||||
|
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
|
+#if defined(Q_OS_WIN)
|
||||||
|
qtBaseTranslator->load("qtbase_" + locale, translationsPath(locale));
|
||||||
|
#else
|
||||||
|
- qtBaseTranslator->load("qtbase_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||||
|
+ qtBaseTranslator->load("qtbase_" + locale, QLatin1String("@qttranslations@/translations"));
|
||||||
|
#endif
|
||||||
|
installTranslator(qtBaseTranslator);
|
||||||
|
|
|
@ -31375,7 +31375,7 @@ with pkgs;
|
||||||
|
|
||||||
utox = callPackage ../applications/networking/instant-messengers/utox { };
|
utox = callPackage ../applications/networking/instant-messengers/utox { };
|
||||||
|
|
||||||
valentina = libsForQt512.callPackage ../applications/misc/valentina { };
|
valentina = libsForQt5.callPackage ../applications/misc/valentina { };
|
||||||
|
|
||||||
vbindiff = callPackage ../applications/editors/vbindiff { };
|
vbindiff = callPackage ../applications/editors/vbindiff { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue