diff options
Diffstat (limited to 'tools/magrathea/default.nix')
-rw-r--r-- | tools/magrathea/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/magrathea/default.nix b/tools/magrathea/default.nix new file mode 100644 index 000000000000..5e8019852abd --- /dev/null +++ b/tools/magrathea/default.nix @@ -0,0 +1,39 @@ +# magrathea helps you build planets +# +# it is a tool for working with monorepos in the style of tvl's depot +{ pkgs, ... }: + +let + inherit (pkgs) + stdenv + chicken + chickenPackages + makeWrapper + git + nix + lib + ; + +in +stdenv.mkDerivation { + name = "magrathea"; + src = ./.; + dontInstall = true; + + nativeBuildInputs = [ chicken makeWrapper ]; + buildInputs = with chickenPackages.chickenEggs; [ + matchable + srfi-13 + ]; + + propagatedBuildInputs = [ git ]; + + buildPhase = '' + mkdir -p $out/bin + csc -o $out/bin/mg -host -static ${./mg.scm} + ''; + + fixupPhase = '' + wrapProgram $out/bin/mg --prefix PATH ${lib.makeBinPath [ nix ]} + ''; +} |