portfolio: add update script and make it nix-run-able (#199904)

authored by

Shawn8901 and committed by
GitHub
1befba0d 1849d01c

+9
+9
pkgs/applications/office/portfolio/default.nix
··· 11 11 , makeDesktopItem 12 12 , webkitgtk 13 13 , wrapGAppsHook 14 + , writeScript 14 15 }: 15 16 let 16 17 desktopItem = makeDesktopItem { ··· 60 61 ln -s $out/portfolio/icon.xpm $out/share/pixmaps/portfolio.xpm 61 62 ''; 62 63 64 + passthru.updateScript = writeScript "update.sh" '' 65 + #!/usr/bin/env nix-shell 66 + #!nix-shell -i bash -p curl jq common-updater-scripts 67 + version="$(curl -sL "https://api.github.com/repos/buchen/portfolio/tags" | jq '.[0].name' --raw-output)" 68 + update-source-version portfolio "$version" 69 + ''; 70 + 63 71 meta = with lib; { 64 72 description = "A simple tool to calculate the overall performance of an investment portfolio"; 65 73 homepage = "https://www.portfolio-performance.info/"; 66 74 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 67 75 license = licenses.epl10; 68 76 maintainers = with maintainers; [ elohmeier oyren shawn8901 ]; 77 + mainProgram = "portfolio"; 69 78 platforms = [ "x86_64-linux" ]; 70 79 }; 71 80 }