Skip to content

Commit

Permalink
portfolio: add update script and make it nix-run-able (NixOS#199904)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn8901 authored Nov 28, 2022
1 parent 1849d01 commit 1befba0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkgs/applications/office/portfolio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, makeDesktopItem
, webkitgtk
, wrapGAppsHook
, writeScript
}:
let
desktopItem = makeDesktopItem {
Expand Down Expand Up @@ -60,12 +61,20 @@ stdenv.mkDerivation rec {
ln -s $out/portfolio/icon.xpm $out/share/pixmaps/portfolio.xpm
'';

passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
version="$(curl -sL "https://api.github.com/repos/buchen/portfolio/tags" | jq '.[0].name' --raw-output)"
update-source-version portfolio "$version"
'';

meta = with lib; {
description = "A simple tool to calculate the overall performance of an investment portfolio";
homepage = "https://www.portfolio-performance.info/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.epl10;
maintainers = with maintainers; [ elohmeier oyren shawn8901 ];
mainProgram = "portfolio";
platforms = [ "x86_64-linux" ];
};
}

0 comments on commit 1befba0

Please sign in to comment.