chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / po / portfolio / package.nix
blob468d56e8d418e9acd4bf3901716b0fd1bc0fbd09
2   autoPatchelfHook,
3   fetchurl,
4   glib,
5   glib-networking,
6   gtk3,
7   lib,
8   libsecret,
9   makeDesktopItem,
10   openjdk17,
11   stdenvNoCC,
12   swt,
13   webkitgtk,
14   wrapGAppsHook3,
15   gitUpdater,
17 let
18   desktopItem = makeDesktopItem {
19     name = "Portfolio";
20     exec = "portfolio";
21     icon = "portfolio";
22     comment = "Calculate Investment Portfolio Performance";
23     desktopName = "Portfolio Performance";
24     categories = [ "Office" ];
25   };
27   runtimeLibs = lib.makeLibraryPath [
28     glib
29     glib-networking
30     gtk3
31     libsecret
32     swt
33     webkitgtk
34   ];
36 stdenvNoCC.mkDerivation (finalAttrs: {
37   pname = "PortfolioPerformance";
38   version = "0.71.2";
40   src = fetchurl {
41     url = "https://github.com/buchen/portfolio/releases/download/${finalAttrs.version}/PortfolioPerformance-${finalAttrs.version}-linux.gtk.x86_64.tar.gz";
42     hash = "sha256-TVrxYz6hFWn2C0CrBnNCPxkfQkTjCXkNSeQp6eC/fjc=";
43   };
45   nativeBuildInputs = [
46     autoPatchelfHook
47     wrapGAppsHook3
48   ];
50   dontConfigure = true;
51   dontBuild = true;
53   installPhase = ''
54     mkdir -p $out/portfolio
55     cp -av ./* $out/portfolio
57     makeWrapper $out/portfolio/PortfolioPerformance $out/bin/portfolio \
58       --prefix LD_LIBRARY_PATH : "${runtimeLibs}" \
59       --prefix CLASSPATH : "${swt}/jars/swt.jar" \
60       --prefix PATH : ${openjdk17}/bin
62     # Create desktop item
63     mkdir -p $out/share/applications
64     cp ${desktopItem}/share/applications/* $out/share/applications
65     mkdir -p $out/share/pixmaps
66     ln -s $out/portfolio/icon.xpm $out/share/pixmaps/portfolio.xpm
67   '';
69   passthru.updateScript = gitUpdater { url = "https://github.com/buchen/portfolio.git"; };
71   meta = {
72     description = "Simple tool to calculate the overall performance of an investment portfolio";
73     homepage = "https://www.portfolio-performance.info/";
74     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
75     license = lib.licenses.epl10;
76     maintainers = with lib.maintainers; [
77       kilianar
78       oyren
79       shawn8901
80     ];
81     mainProgram = "portfolio";
82     platforms = [ "x86_64-linux" ];
83   };