Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

portfolio: init at 0.46.3 #77438

Merged
merged 1 commit into from May 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
67 changes: 67 additions & 0 deletions 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" ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -20975,6 +20975,10 @@ in

polyphone = libsForQt5.callPackage ../applications/audio/polyphone { };

portfolio = callPackage ../applications/office/portfolio {
jre = openjdk11;
};

ptex = callPackage ../development/libraries/ptex {};

qbec = callPackage ../applications/networking/cluster/qbec { };
Expand Down