diff options
Diffstat (limited to 'pkgs/by-name/di/dim/package.nix')
-rw-r--r-- | pkgs/by-name/di/dim/package.nix | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/pkgs/by-name/di/dim/package.nix b/pkgs/by-name/di/dim/package.nix index 9b59329e766ac..fba2c5e11f0c6 100644 --- a/pkgs/by-name/di/dim/package.nix +++ b/pkgs/by-name/di/dim/package.nix @@ -4,6 +4,7 @@ rustPlatform, fetchFromGitHub, buildNpmPackage, + darwin, makeWrapper, ffmpeg_5, git, @@ -11,6 +12,7 @@ sqlite, libvaSupport ? stdenv.hostPlatform.isLinux, libva, + fetchpatch, }: rustPlatform.buildRustPackage rec { pname = "dim"; @@ -45,6 +47,14 @@ rustPlatform.buildRustPackage rec { # (ffmpeg) binaries in the same directory as the binary. Patch it to use # the working dir and PATH instead. ./relative-paths.diff + + # Upstream has some unused imports that prevent things from compiling... + # Remove for next release. + (fetchpatch { + name = "remove-unused-imports.patch"; + url = "https://github.com/Dusk-Labs/dim/commit/f62de1d38e6e52f27b1176f0dabbbc51622274cb.patch"; + hash = "sha256-Gk+RHWtCKN7McfFB3siIOOhwi3+k17MCQr4Ya4RCKjc="; + }) ]; postConfigure = '' @@ -57,9 +67,14 @@ rustPlatform.buildRustPackage rec { git ]; - buildInputs = [ - sqlite - ] ++ lib.optional libvaSupport libva; + buildInputs = + [ sqlite ] + ++ lib.optional stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.CoreServices + darwin.apple_sdk.frameworks.SystemConfiguration + ] + ++ lib.optional libvaSupport libva; buildFeatures = lib.optional libvaSupport "vaapi"; @@ -86,7 +101,7 @@ rustPlatform.buildRustPackage rec { postInstall = '' wrapProgram $out/bin/dim \ - --prefix PATH : ${lib.makeBinPath [ffmpeg_5]} + --prefix PATH : ${lib.makeBinPath [ ffmpeg_5 ]} ''; meta = { |