Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / valentina / default.nix
blobe0ca06af8aa3e259ee0d9a8fe31705584e58bfe9
1 { lib, stdenv, fetchFromGitLab, installShellFiles
2 , qmake, qttools
3 , qtsvg, qtxmlpatterns
4 , wrapQtAppsHook
5 , autoPatchelfHook
6 }:
8 stdenv.mkDerivation rec {
9   pname = "valentina";
10   version = "0.7.52";
12   src = fetchFromGitLab {
13     owner = "smart-pattern";
14     repo = "valentina";
15     rev = "v${version}";
16     hash = "sha256-DmNRBxqyBvDTdA7Sz9X04Dhejtxx7tOVpST+SkUNguM=";
17   };
19   postPatch = ''
20     substituteInPlace src/app/translations.pri \
21       --replace '$$[QT_INSTALL_BINS]/$$LRELEASE' '${lib.getDev qttools}/bin/lrelease'
22   '';
24   nativeBuildInputs = [ qmake qttools wrapQtAppsHook installShellFiles autoPatchelfHook ];
26   buildInputs = [ qtsvg qtxmlpatterns ];
28   qmakeFlags = [
29     "-r"
30     "PREFIX=${placeholder "out"}"
31     "CONFIG+=noTests"
32     "CONFIG+=noRunPath"
33     "CONFIG+=no_ccache"
34     "CONFIG+=noDebugSymbols"
35   ];
37   postInstall = ''
38     installManPage dist/debian/*.1
39     install -Dm644 dist/debian/valentina.sharedmimeinfo $out/share/mime/packages/valentina.xml
40   '';
42   meta = with lib; {
43     description = "An open source sewing pattern drafting software";
44     homepage = "https://smart-pattern.com.ua/";
45     changelog = "https://gitlab.com/smart-pattern/valentina/-/blob/v${version}/ChangeLog.txt";
46     license = licenses.gpl3Plus;
47     platforms = platforms.linux;
48     maintainers = with maintainers; [ ];
49   };