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 , makeDesktopItem 12 , webkitgtk 13 , wrapGAppsHook 14 }: 15 let 16 desktopItem = makeDesktopItem { ··· 60 ln -s $out/portfolio/icon.xpm $out/share/pixmaps/portfolio.xpm 61 ''; 62 63 meta = with lib; { 64 description = "A simple tool to calculate the overall performance of an investment portfolio"; 65 homepage = "https://www.portfolio-performance.info/"; 66 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 67 license = licenses.epl10; 68 maintainers = with maintainers; [ elohmeier oyren shawn8901 ]; 69 platforms = [ "x86_64-linux" ]; 70 }; 71 }
··· 11 , makeDesktopItem 12 , webkitgtk 13 , wrapGAppsHook 14 + , writeScript 15 }: 16 let 17 desktopItem = makeDesktopItem { ··· 61 ln -s $out/portfolio/icon.xpm $out/share/pixmaps/portfolio.xpm 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 + 71 meta = with lib; { 72 description = "A simple tool to calculate the overall performance of an investment portfolio"; 73 homepage = "https://www.portfolio-performance.info/"; 74 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 75 license = licenses.epl10; 76 maintainers = with maintainers; [ elohmeier oyren shawn8901 ]; 77 + mainProgram = "portfolio"; 78 platforms = [ "x86_64-linux" ]; 79 }; 80 }