about summary refs log tree commit diff stats
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-21 17:53:57 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-21 17:53:57 +0200
commit822429e268eee7f573b82516df3b5834b5b6552d (patch)
tree74c2a7b59a9cf760521f9ffeba339b9c152b2340 /pkgs/by-name
parentfix(pkgs/ll): Ensure that the last_directory save dir exists (diff)
downloadnixos-config-822429e268eee7f573b82516df3b5834b5b6552d.tar.gz
nixos-config-822429e268eee7f573b82516df3b5834b5b6552d.zip
fix(pkgs/yt): Wrap with the needed dependencies
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/yt/yt/package.nix23
1 files changed, 12 insertions, 11 deletions
diff --git a/pkgs/by-name/yt/yt/package.nix b/pkgs/by-name/yt/yt/package.nix
index 35b5e2ea..c85a6c83 100644
--- a/pkgs/by-name/yt/yt/package.nix
+++ b/pkgs/by-name/yt/yt/package.nix
@@ -17,9 +17,15 @@
     rev = "v${version}";
     hash = "sha256-glaGJ9E4myuSL1Q01Ll6YFfuWgzJwz+xavmmk6PKp80=";
   };
+
+  buildInputs = [
+    (python3.withPackages (ps: [ps.yt-dlp]))
+    mpv-unwrapped.dev
+    ffmpeg
+  ];
 in
   rustPlatform.buildRustPackage {
-    inherit version src;
+    inherit version src buildInputs;
     pname = "yt";
 
     nativeBuildInputs = [
@@ -27,23 +33,18 @@ in
       sqlite
     ];
 
-    buildInputs = [
-      (python3.withPackages (ps: [ps.yt-dlp]))
-      mpv-unwrapped.dev
-    ];
-
     env = let
       clang_version =
         lib.versions.major
         llvmPackages_latest.clang-unwrapped.version;
     in {
       FFMPEG_LOCATION = "${lib.getExe ffmpeg}";
-      LIBCLANG_PATH = "${llvmPackages_latest.clang-unwrapped.lib}/lib/libclang.so";
-      LIBCLANG_INCLUDE_PATH = "${llvmPackages_latest.clang-unwrapped.lib}/lib/clang/${clang_version}/include";
-      C_INCLUDE_PATH = "${glibc.dev}/include";
-
       PYO3_PYTHON = lib.getExe (python3.withPackages (ps: [ps.yt-dlp]));
+
+      C_INCLUDE_PATH = "${glibc.dev}/include";
       DATABASE_URL = "sqlite://target/database.sqlite";
+      LIBCLANG_INCLUDE_PATH = "${llvmPackages_latest.clang-unwrapped.lib}/lib/clang/${clang_version}/include";
+      LIBCLANG_PATH = "${llvmPackages_latest.clang-unwrapped.lib}/lib/libclang.so";
     };
 
     prePatch = ''
@@ -60,6 +61,6 @@ in
 
     postInstall = ''
       wrapProgram $out/bin/yt \
-        --prefix PATH : $out/bin/
+        --prefix PATH : ${lib.makeBinPath buildInputs}:$out/bin
     '';
   }