diff options
-rw-r--r-- | pkgs/by-name/yt/yt/package.nix | 23 |
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 ''; } |