nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 # Plumbing tools:
3 closureInfo,
4 runCommand,
5 buildEnv,
6 # Actual dependencies to propagate:
7 bash,
8 coreutils,
9}:
10let
11 tools = buildEnv {
12 name = "lorri-runtime-tools";
13 paths = [
14 coreutils
15 bash
16 ];
17 };
18
19 runtimeClosureInfo = closureInfo {
20 rootPaths = [ tools ];
21 };
22
23 closureToNix = runCommand "closure.nix" { } ''
24 (
25 echo '{ dep, ... }: ['
26 sed -E 's/^(.*)$/ (dep \1)/' ${runtimeClosureInfo}/store-paths
27 echo ']'
28 ) > $out
29 '';
30
31 runtimeClosureInfoAsNix =
32 runCommand "runtime-closure.nix"
33 {
34 runtime_closure_list = closureToNix;
35 tools_build_host = tools;
36 }
37 ''
38 substituteAll ${./runtime-closure.nix.template} $out
39 '';
40in
41runtimeClosureInfoAsNix