diff options
Diffstat (limited to '')
-rw-r--r-- | package.nix | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/package.nix b/package.nix index ef218a3..54ee6c1 100644 --- a/package.nix +++ b/package.nix @@ -21,9 +21,15 @@ version = "0.1.0"; src = ./.; + + buildInputs = [ + (python3.withPackages (ps: [ps.yt-dlp])) + mpv-unwrapped.dev + ffmpeg + ]; in rustPlatform.buildRustPackage { - inherit version src; + inherit version src buildInputs; pname = "yt"; nativeBuildInputs = [ @@ -31,23 +37,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 = '' @@ -66,6 +67,6 @@ in postInstall = '' wrapProgram $out/bin/yt \ - --prefix PATH : $out/bin/ + --prefix PATH : ${lib.makeBinPath buildInputs}:$out/bin ''; } |