about summary refs log tree commit diff
path: root/tools/magrathea/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-15T16·31+0300
committertazjin <mail@tazj.in>2021-12-17T20·48+0000
commit564ad52b306bc1a3abe2afa9380bb0552144b23e (patch)
tree6f80c1c32a58b6240cc86bd89f0c9fcc879f3cbe /tools/magrathea/default.nix
parent887ac4d3d479b2c5c991ed718792bba7a38b4948 (diff)
feat(tools/magrathea): bootstrap a tool for working with depot r/3286
this is going to be a serious version of //tools/depot-build.

right now it doesn't support parsing any target specs yet, so only
shells and builds for the physical project of the current folder work.

Change-Id: I4308e29da940571622ff9e539fbb8ededd27aca7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4335
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tools/magrathea/default.nix')
-rw-r--r--tools/magrathea/default.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/magrathea/default.nix b/tools/magrathea/default.nix
new file mode 100644
index 000000000000..fa0a5d89a172
--- /dev/null
+++ b/tools/magrathea/default.nix
@@ -0,0 +1,23 @@
+# magrathea helps you build planets
+#
+# it is a tool for working with monorepos in the style of tvl's depot
+{ pkgs, ... }:
+
+pkgs.stdenv.mkDerivation {
+  name = "magrathea";
+  src = ./.;
+  dontInstall = true;
+
+  nativeBuildInputs = [ pkgs.chicken ];
+  buildInputs = with pkgs.chickenPackages.chickenEggs; [
+    matchable
+    srfi-13
+  ];
+
+  propagatedBuildInputs = [ pkgs.git ];
+
+  buildPhase = ''
+    mkdir -p $out/bin
+    csc -o $out/bin/mg -static ${./mg.scm}
+  '';
+}