diff options
Diffstat (limited to 'users/Profpatsch/ytextr/create-symlink-farm.nix')
-rw-r--r-- | users/Profpatsch/ytextr/create-symlink-farm.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/users/Profpatsch/ytextr/create-symlink-farm.nix b/users/Profpatsch/ytextr/create-symlink-farm.nix new file mode 100644 index 000000000000..583a3a90f5c5 --- /dev/null +++ b/users/Profpatsch/ytextr/create-symlink-farm.nix @@ -0,0 +1,18 @@ +{ + # list of package attribute names to get at run time + packageNamesAtRuntimeJsonPath, +}: +let + pkgs = import <nixpkgs> {}; + + getPkg = pkgName: pkgs.${pkgName}; + + packageNamesAtRuntime = builtins.fromJSON (builtins.readFile packageNamesAtRuntimeJsonPath); + + runtime = map getPkg packageNamesAtRuntime; + +in + pkgs.symlinkJoin { + name = "symlink-farm"; + paths = runtime; + } |