about summary refs log tree commit diff
path: root/tools/gha-billing/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gha-billing/default.nix')
-rw-r--r--tools/gha-billing/default.nix35
1 files changed, 35 insertions, 0 deletions
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 = [ ];
+  };
+}