diff options
author | Enno Lohmeier <enno@nerdworks.de> | 2020-01-10 14:36:46 +0100 |
---|---|---|
committer | Enno Lohmeier <enno@nerdworks.de> | 2020-05-16 19:45:04 +0200 |
commit | beaed5b544e8709dbc41dc64dd1bc2b66c029b18 (patch) | |
tree | 353e7091a429556487d751f883e38f3f3a677285 /pkgs/applications/office | |
parent | 347882f36ae2ba0c1da747e530deeab21c9799ed (diff) |
portfolio: init at 0.46.3
Diffstat (limited to 'pkgs/applications/office')
-rw-r--r-- | pkgs/applications/office/portfolio/default.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/applications/office/portfolio/default.nix b/pkgs/applications/office/portfolio/default.nix new file mode 100644 index 0000000000000..53f3b8a3150a0 --- /dev/null +++ b/pkgs/applications/office/portfolio/default.nix @@ -0,0 +1,67 @@ +{ stdenv +, autoPatchelfHook +, fetchurl +, glibc +, gcc-unwrapped +, gtk3 +, jre +, libsecret +, makeDesktopItem +, webkitgtk +, wrapGAppsHook +}: +let + desktopItem = makeDesktopItem { + name = "Portfolio"; + exec = "portfolio"; + icon = "portfolio"; + comment = "Calculate Investment Portfolio Performance"; + desktopName = "Portfolio Performance"; + categories = "Office;"; + }; + + runtimeLibs = stdenv.lib.makeLibraryPath [ gtk3 webkitgtk ]; +in +stdenv.mkDerivation rec { + pname = "PortfolioPerformance"; + version = "0.46.3"; + + src = fetchurl { + url = "https://github.com/buchen/portfolio/releases/download/${version}/PortfolioPerformance-${version}-linux.gtk.x86_64.tar.gz"; + sha256 = "0263v0ymqmf7kcwys4smwx1p1gh8d20dh10canjfqgl4c5lfx966"; + }; + + nativeBuildInputs = [ + autoPatchelfHook + wrapGAppsHook + ]; + + buildInputs = [ + glibc + gcc-unwrapped + libsecret + ]; + + installPhase = '' + mkdir -p $out/portfolio + cp -av ./* $out/portfolio + + makeWrapper $out/portfolio/PortfolioPerformance $out/bin/portfolio \ + --prefix LD_LIBRARY_PATH : "${runtimeLibs}" \ + --prefix PATH : ${jre}/bin + + # Create desktop item + mkdir -p $out/share/applications + cp ${desktopItem}/share/applications/* $out/share/applications + mkdir -p $out/share/pixmaps + ln -s $out/portfolio/icon.xpm $out/share/pixmaps/portfolio.xpm + ''; + + meta = with stdenv.lib; { + description = "A simple tool to calculate the overall performance of an investment portfolio."; + homepage = "https://www.portfolio-performance.info/"; + license = licenses.epl10; + maintainers = with maintainers; [ elohmeier ]; + platforms = [ "x86_64-linux" ]; + }; +} |