82 lines
1.5 KiB
Nix
82 lines
1.5 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'
|
|
|
|
substituteInPlace src/app/translations.pri \
|
|
--replace '$$[QT_INSTALL_BINS]/$$LRELEASE' '${getDev qttools}/bin/lrelease'
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
qmake
|
|
qttools
|
|
wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
poppler_utils
|
|
libGL
|
|
|
|
qtbase
|
|
qtsvg
|
|
qtxmlpatterns
|
|
qt3d
|
|
];
|
|
|
|
qmakeFlags = [
|
|
"-r"
|
|
"PREFIX=/"
|
|
"PREFIX_LIB=/usr/lib"
|
|
"Seamly2D.pro"
|
|
"CONFIG+=noDebugSymbols"
|
|
"CONFIG+=no_ccache"
|
|
"CONFIG+=noTests"
|
|
"CONFIG+=noRunPath"
|
|
];
|
|
|
|
installFlags = [ "INSTALL_ROOT=$(out)" ];
|
|
|
|
#postInstall = ''
|
|
# mv $out/lib/Seamly2D/* $out/lib/
|
|
# rmdir $out/lib/Seamly2D
|
|
#'';
|
|
|
|
meta = {
|
|
description = "An open source sewing pattern drafting software";
|
|
homepage = "https://valentinaproject.bitbucket.io/";
|
|
license = licenses.gpl3;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ jfrankenau ];
|
|
};
|
|
}
|