nixpkgs/pkgs/applications/office/mytetra/default.nix

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

47 lines
1.3 KiB
Nix
Raw Normal View History

2021-11-02 13:23:29 +00:00
{ lib, mkDerivation, fetchFromGitHub, qmake, qtsvg, makeWrapper, xdg-utils }:
2017-03-18 10:53:42 +00:00
2021-11-02 13:23:29 +00:00
mkDerivation rec {
2019-08-13 21:52:01 +00:00
pname = "mytetra";
2021-11-02 13:23:29 +00:00
version = "1.44.55";
src = fetchFromGitHub {
owner = "xintrea";
repo = "mytetra_dev";
rev = "v.${version}";
sha256 = "sha256-jQXnDoLkqbDZxfsYKPDsTOE7p/BFeA8wEznpbkRVGdw=";
2017-03-18 10:53:42 +00:00
};
nativeBuildInputs = [ qmake makeWrapper ];
2017-06-02 15:40:19 +00:00
buildInputs = [ qtsvg ];
2017-03-18 10:53:42 +00:00
hardeningDisable = [ "format" ];
preBuild = ''
2019-01-11 21:40:29 +00:00
substituteInPlace app/app.pro \
2017-03-18 10:53:42 +00:00
--replace /usr/local/bin $out/bin \
--replace /usr/share $out/share
2019-01-11 21:40:29 +00:00
substituteInPlace app/src/views/mainWindow/MainWindow.cpp \
2017-03-18 10:53:42 +00:00
--replace ":/resource/pic/logo.svg" "$out/share/icons/hicolor/48x48/apps/mytetra.png"
# https://github.com/xintrea/mytetra_dev/issues/164
substituteInPlace thirdParty/mimetex/mimetex.c \
--replace "const char *strcasestr" "char *strcasestr"
2017-03-18 10:53:42 +00:00
'';
postFixup = ''
# make xdg-open overrideable at runtime
wrapProgram $out/bin/mytetra \
--suffix PATH : ${xdg-utils}/bin
'';
meta = with lib; {
2017-03-18 10:53:42 +00:00
description = "Smart manager for information collecting";
mainProgram = "mytetra";
homepage = "https://webhamster.ru/site/page/index/articles/projectcode/138";
2017-03-18 10:53:42 +00:00
license = licenses.gpl3;
maintainers = [ ];
2017-03-18 10:53:42 +00:00
platforms = platforms.linux;
};
}