ks: add completions for bash and zsh (#364049)
[NixPkgs.git] / pkgs / applications / office / mytetra / default.nix
blob53e3fcad15c8c3d1f1c7514c6ec44ad7074d671d
2   lib,
3   mkDerivation,
4   fetchFromGitHub,
5   qmake,
6   qtsvg,
7   makeWrapper,
8   xdg-utils,
9 }:
11 mkDerivation rec {
12   pname = "mytetra";
13   version = "1.44.55";
15   src = fetchFromGitHub {
16     owner = "xintrea";
17     repo = "mytetra_dev";
18     rev = "v.${version}";
19     sha256 = "sha256-jQXnDoLkqbDZxfsYKPDsTOE7p/BFeA8wEznpbkRVGdw=";
20   };
22   nativeBuildInputs = [
23     qmake
24     makeWrapper
25   ];
26   buildInputs = [ qtsvg ];
28   hardeningDisable = [ "format" ];
30   preBuild = ''
31     substituteInPlace app/app.pro \
32       --replace /usr/local/bin $out/bin \
33       --replace /usr/share $out/share
35     substituteInPlace app/src/views/mainWindow/MainWindow.cpp \
36       --replace ":/resource/pic/logo.svg" "$out/share/icons/hicolor/48x48/apps/mytetra.png"
38     # https://github.com/xintrea/mytetra_dev/issues/164
39     substituteInPlace thirdParty/mimetex/mimetex.c \
40       --replace "const char *strcasestr" "char *strcasestr"
41   '';
43   postFixup = ''
44     # make xdg-open overrideable at runtime
45     wrapProgram $out/bin/mytetra \
46       --suffix PATH : ${xdg-utils}/bin
47   '';
49   meta = with lib; {
50     description = "Smart manager for information collecting";
51     mainProgram = "mytetra";
52     homepage = "https://webhamster.ru/site/page/index/articles/projectcode/138";
53     license = licenses.gpl3;
54     maintainers = [ ];
55     platforms = platforms.linux;
56   };