forked from mirrors/nixpkgs
portfolio: add update script and make it nix-run-able (#199904)
This commit is contained in:
parent
1849d01c1a
commit
1befba0d66
|
@ -11,6 +11,7 @@
|
||||||
, makeDesktopItem
|
, makeDesktopItem
|
||||||
, webkitgtk
|
, webkitgtk
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
|
, writeScript
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
|
@ -60,12 +61,20 @@ stdenv.mkDerivation rec {
|
||||||
ln -s $out/portfolio/icon.xpm $out/share/pixmaps/portfolio.xpm
|
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; {
|
meta = with lib; {
|
||||||
description = "A simple tool to calculate the overall performance of an investment portfolio";
|
description = "A simple tool to calculate the overall performance of an investment portfolio";
|
||||||
homepage = "https://www.portfolio-performance.info/";
|
homepage = "https://www.portfolio-performance.info/";
|
||||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||||
license = licenses.epl10;
|
license = licenses.epl10;
|
||||||
maintainers = with maintainers; [ elohmeier oyren shawn8901 ];
|
maintainers = with maintainers; [ elohmeier oyren shawn8901 ];
|
||||||
|
mainProgram = "portfolio";
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue