sewing/pkgs/seamly2d-2022-06-13.nix

98 lines
2.4 KiB
Nix

{ mkDerivation
, lib
, fetchFromGitHub
, pkg-config
, libGL
, qmake
, qttools
, qtbase
, qtsvg
, qtxmlpatterns
, qt3d
, poppler_utils
, wrapQtAppsHook
}:
with lib;
mkDerivation rec {
pname = "seamly2d";
version = "2022-06-13.0319";
src = fetchFromGitHub {
owner = "FashionFreedom";
repo = "Seamly2D";
rev = "v${version}";
sha256 = "sha256-qm8Hlt3z0jABV71Pxa6ZbNmf/ixwp74zh2HZnnMVQSY=";
};
#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/translations.pri \
# --replace '$$[QT_INSTALL_BINS]/$$LRELEASE' '${getDev qttools}/bin/lrelease'
# substituteInPlace src/app/seamly2d/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 = [
pkg-config
qmake
qttools
wrapQtAppsHook
];
buildInputs = [
poppler_utils
libGL
qtbase
qtsvg
qtxmlpatterns
qt3d
];
#configurePhase = ''
# qmake PREFIX=/ Seamly2D.pro -r "CONFIG += noTests noRunPath no_ccache noDebugSymbols"
#'';
qmakeFlags = [
"PREFIX=/"
"Seamly2D.pro"
"CONFIG+=noDebugSymbols"
"CONFIG+=no_ccache"
"CONFIG+=noTests"
"CONFIG+=noRunPath"
];
installFlags = [ "INSTALL_ROOT=$(out)" ];
#postInstall = ''
# mv $out/usr/share $out/
# rmdir $out/usr
#
# 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 = {
description = "An open source sewing pattern drafting software";
homepage = "https://valentinaproject.bitbucket.io/";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ jfrankenau ];
};
}