From 4dd250dc04e8c44fa91627fb051a9670b7b01e63 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 31 Oct 2022 11:29:11 -0700 Subject: feat(tools/gha-billing): a CLI to report minutes left/used on GHA --- tools/gha-billing/default.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tools/gha-billing/default.nix (limited to 'tools/gha-billing/default.nix') diff --git a/tools/gha-billing/default.nix b/tools/gha-billing/default.nix new file mode 100644 index 0000000..51f69f8 --- /dev/null +++ b/tools/gha-billing/default.nix @@ -0,0 +1,35 @@ +{ self, lib, stdenvNoCC, pkgs }: + +stdenvNoCC.mkDerivation rec { + pname = "gha-billing"; + src = ./gha-billing.py; + version = "0.1.0"; + + buildInputs = [ + (pkgs.python310.withPackages (ps: with ps; [ + requests + ])) + ]; + + propagatedBuildInputs = [ + (pkgs.python310.withPackages (ps: with ps; [ + requests + ])) + ]; + + dontUnpack = true; + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/${pname} + ''; + + + meta = with pkgs.lib; { + description = "CLI to get billing information for GHA."; + license = licenses.mit; + platforms = platforms.unix; + maintainers = [ ]; + }; +} -- cgit v1.2.3