tvl-depot/users/Profpatsch/ytextr/create-symlink-farm.nix
Profpatsch 71fe30a87c feat(users/Profpatsch): add ytextr, a sandboxed yt-dlp wrapper
Change-Id: Id0992e5c1f52ac2c95444721c7565a66ef484e2b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4836
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-01-09 12:52:09 +00:00

18 lines
385 B
Nix

{
# 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;
}