2021-12-15 17:31:47 +01:00
|
|
|
# magrathea helps you build planets
|
|
|
|
#
|
|
|
|
# it is a tool for working with monorepos in the style of tvl's depot
|
|
|
|
{ pkgs, ... }:
|
|
|
|
|
2023-11-01 12:58:06 +01:00
|
|
|
let
|
|
|
|
inherit (pkgs)
|
|
|
|
stdenv
|
|
|
|
chicken
|
|
|
|
chickenPackages
|
|
|
|
makeWrapper
|
|
|
|
git
|
|
|
|
nix
|
|
|
|
lib
|
|
|
|
;
|
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2021-12-15 17:31:47 +01:00
|
|
|
name = "magrathea";
|
|
|
|
src = ./.;
|
|
|
|
dontInstall = true;
|
|
|
|
|
2023-11-01 12:58:06 +01:00
|
|
|
nativeBuildInputs = [ chicken makeWrapper ];
|
|
|
|
buildInputs = with chickenPackages.chickenEggs; [
|
2021-12-15 17:31:47 +01:00
|
|
|
matchable
|
|
|
|
srfi-13
|
|
|
|
];
|
|
|
|
|
2023-11-01 12:58:06 +01:00
|
|
|
propagatedBuildInputs = [ git ];
|
2021-12-15 17:31:47 +01:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2023-08-03 23:25:34 +02:00
|
|
|
csc -o $out/bin/mg -host -static ${./mg.scm}
|
2021-12-15 17:31:47 +01:00
|
|
|
'';
|
2023-11-01 12:58:06 +01:00
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
wrapProgram $out/bin/mg --prefix PATH ${lib.makeBinPath [ nix ]}
|
|
|
|
'';
|
2021-12-15 17:31:47 +01:00
|
|
|
}
|