2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-01-10 13:36:46 +00:00
|
|
|
, 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;";
|
|
|
|
};
|
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
runtimeLibs = lib.makeLibraryPath [ gtk3 webkitgtk ];
|
2020-01-10 13:36:46 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "PortfolioPerformance";
|
2021-07-26 19:38:46 +01:00
|
|
|
version = "0.54.1";
|
2020-01-10 13:36:46 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/buchen/portfolio/releases/download/${version}/PortfolioPerformance-${version}-linux.gtk.x86_64.tar.gz";
|
2021-07-26 19:38:46 +01:00
|
|
|
sha256 = "16sv938sdbs01byqwngrfqmzb81zfhvk72ar53l68cg8qjvzs5ml";
|
2020-01-10 13:36:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "A simple tool to calculate the overall performance of an investment portfolio";
|
2020-01-10 13:36:46 +00:00
|
|
|
homepage = "https://www.portfolio-performance.info/";
|
|
|
|
license = licenses.epl10;
|
2020-07-03 13:47:50 +01:00
|
|
|
maintainers = with maintainers; [ elohmeier oyren ];
|
2020-01-10 13:36:46 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|