biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / office / mytetra / default.nix
blob8195a73bb2075b4c84f5d0184ccf25a1532dae37
1 { lib, mkDerivation, fetchFromGitHub, qmake, qtsvg, makeWrapper, xdg-utils }:
3 mkDerivation rec {
4   pname = "mytetra";
5   version = "1.44.55";
7   src = fetchFromGitHub {
8     owner = "xintrea";
9     repo = "mytetra_dev";
10     rev = "v.${version}";
11     sha256 = "sha256-jQXnDoLkqbDZxfsYKPDsTOE7p/BFeA8wEznpbkRVGdw=";
12   };
14   nativeBuildInputs = [ qmake makeWrapper ];
15   buildInputs = [ qtsvg ];
17   hardeningDisable = [ "format" ];
19   preBuild = ''
20     substituteInPlace app/app.pro \
21       --replace /usr/local/bin $out/bin \
22       --replace /usr/share $out/share
24     substituteInPlace app/src/views/mainWindow/MainWindow.cpp \
25       --replace ":/resource/pic/logo.svg" "$out/share/icons/hicolor/48x48/apps/mytetra.png"
27     # https://github.com/xintrea/mytetra_dev/issues/164
28     substituteInPlace thirdParty/mimetex/mimetex.c \
29       --replace "const char *strcasestr" "char *strcasestr"
30   '';
32   postFixup = ''
33     # make xdg-open overrideable at runtime
34     wrapProgram $out/bin/mytetra \
35       --suffix PATH : ${xdg-utils}/bin
36   '';
38   meta = with lib; {
39     description = "Smart manager for information collecting";
40     mainProgram = "mytetra";
41     homepage = "https://webhamster.ru/site/page/index/articles/projectcode/138";
42     license = licenses.gpl3;
43     maintainers = [ ];
44     platforms = platforms.linux;
45   };