diff options
author | Profpatsch <mail@profpatsch.de> | 2022-01-09T11·30+0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2022-01-09T12·52+0000 |
commit | 71fe30a87c2dd2c7f93fd34f3abd596755f0d016 (patch) | |
tree | f20ae2dce439274c1715d1e5861aa8a55e40a080 /users/Profpatsch/ytextr/create-symlink-farm.nix | |
parent | ebd5c3ad15a693c3437bdc083c0532b1959ee75a (diff) |
feat(users/Profpatsch): add ytextr, a sandboxed yt-dlp wrapper r/3580
Change-Id: Id0992e5c1f52ac2c95444721c7565a66ef484e2b Reviewed-on: https://cl.tvl.fyi/c/depot/+/4836 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
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; + } |