7e47f3658e
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
37 lines
732 B
Nix
37 lines
732 B
Nix
{
|
|
# Plumbing tools:
|
|
closureInfo
|
|
, runCommand
|
|
, buildEnv
|
|
, # Actual dependencies to propagate:
|
|
bash
|
|
, coreutils
|
|
}:
|
|
let
|
|
tools = buildEnv {
|
|
name = "lorri-runtime-tools";
|
|
paths = [ coreutils bash ];
|
|
};
|
|
|
|
runtimeClosureInfo = closureInfo {
|
|
rootPaths = [ tools ];
|
|
};
|
|
|
|
closureToNix = runCommand "closure.nix" {}
|
|
''
|
|
(
|
|
echo '{ dep, ... }: ['
|
|
sed -E 's/^(.*)$/ (dep \1)/' ${runtimeClosureInfo}/store-paths
|
|
echo ']'
|
|
) > $out
|
|
'';
|
|
|
|
runtimeClosureInfoAsNix = runCommand "runtime-closure.nix" {
|
|
runtime_closure_list = closureToNix;
|
|
tools_build_host = tools;
|
|
}
|
|
''
|
|
substituteAll ${./runtime-closure.nix.template} $out
|
|
'';
|
|
in
|
|
runtimeClosureInfoAsNix
|