3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/valentina/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.5 KiB
Nix
Raw Normal View History

2022-08-29 20:40:13 +01:00
{ lib, stdenv, fetchFromGitLab, substituteAll, installShellFiles
2018-02-21 09:24:53 +00:00
, qmake, qttools
2022-08-29 20:40:13 +01:00
, qtsvg, qttranslations, qtxmlpatterns
, wrapQtAppsHook
2018-02-21 09:24:53 +00:00
}:
2022-08-29 20:40:13 +01:00
stdenv.mkDerivation rec {
pname = "valentina";
2022-08-29 20:40:13 +01:00
version = "0.7.51";
2018-02-21 09:24:53 +00:00
2022-08-29 20:40:13 +01:00
src = fetchFromGitLab {
owner = "smart-pattern";
repo = "valentina";
2018-11-15 17:12:55 +00:00
rev = "v${version}";
2022-08-29 20:40:13 +01:00
hash = "sha256-N9fC2tCP4TVNncatHaz5W5Mp3jOmAcEWYCl30+0myaE=";
2018-02-21 09:24:53 +00:00
};
2022-08-29 20:40:13 +01:00
patches = (substituteAll {
# See https://github.com/NixOS/nixpkgs/issues/86054
src = ./fix-qttranslations-path.patch;
inherit qttranslations;
});
2018-02-21 09:24:53 +00:00
postPatch = ''
substituteInPlace src/app/translations.pri \
2022-08-29 20:40:13 +01:00
--replace '$$[QT_INSTALL_BINS]/$$LRELEASE' '${lib.getDev qttools}/bin/lrelease'
2018-02-21 09:24:53 +00:00
'';
2022-08-29 20:40:13 +01:00
nativeBuildInputs = [ qmake qttools wrapQtAppsHook installShellFiles ];
2018-02-21 09:24:53 +00:00
2022-08-29 20:40:13 +01:00
buildInputs = [ qtsvg qtxmlpatterns ];
2018-02-21 09:24:53 +00:00
2022-08-29 20:40:13 +01:00
qmakeFlags = [
"-r"
"PREFIX=${placeholder "out"}"
"CONFIG+=noTests"
"CONFIG+=noRunPath"
"CONFIG+=no_ccache"
"CONFIG+=noDebugSymbols"
];
2018-02-21 09:24:53 +00:00
postInstall = ''
2022-08-29 20:40:13 +01:00
installManPage dist/debian/*.1
install -Dm644 dist/debian/valentina.sharedmimeinfo $out/share/mime/packages/valentina.xml
2018-02-21 09:24:53 +00:00
'';
2022-08-29 20:40:13 +01:00
meta = with lib; {
2018-02-21 09:24:53 +00:00
description = "An open source sewing pattern drafting software";
2022-08-29 20:40:13 +01:00
homepage = "https://smart-pattern.com.ua/";
changelog = "https://gitlab.com/smart-pattern/valentina/-/blob/v${version}/ChangeLog.txt";
license = licenses.gpl3Plus;
2018-02-21 09:24:53 +00:00
platforms = platforms.linux;
maintainers = with maintainers; [ jfrankenau ];
};
}