base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12 (#356361)
[NixPkgs.git] / pkgs / tools / misc / lorri / runtime.nix
blob7e6883be0644d3370af3510a4897281fff483261
2   # Plumbing tools:
3   closureInfo
4 , runCommand
5 , buildEnv
6 , # Actual dependencies to propagate:
7   bash
8 , coreutils
9 }:
10 let
11   tools = buildEnv {
12     name = "lorri-runtime-tools";
13     paths = [ coreutils bash ];
14   };
16   runtimeClosureInfo = closureInfo {
17     rootPaths = [ tools ];
18   };
20   closureToNix = runCommand "closure.nix" {}
21     ''
22       (
23         echo '{ dep, ... }: ['
24         sed -E 's/^(.*)$/    (dep \1)/' ${runtimeClosureInfo}/store-paths
25         echo ']'
26       ) > $out
27     '';
29   runtimeClosureInfoAsNix = runCommand "runtime-closure.nix" {
30     runtime_closure_list = closureToNix;
31     tools_build_host = tools;
32   }
33     ''
34       substituteAll ${./runtime-closure.nix.template} $out
35     '';
37 runtimeClosureInfoAsNix