13 libvaSupport ? stdenv.hostPlatform.isLinux,
17 rustPlatform.buildRustPackage rec {
19 version = "0-unstable-2023-12-29";
20 src = fetchFromGitHub {
23 rev = "3ccb4ab05fc1d7dbd4ebbba9ff2de0ecc9139b27";
24 hash = "sha256-1mgbrDnIkIdWy78uj4EjjgwBQxw/rIS1LCFNscXXPbk=";
27 frontend = buildNpmPackage {
33 ln -s ${./package-lock.json} package-lock.json
36 npmDepsHash = "sha256-6oSm3H6RItHOrBIvP6uvR7sBboBRWFuP3VwU38GMfgQ=";
46 # Upstream uses a 'ffpath' function to look for config directory and
47 # (ffmpeg) binaries in the same directory as the binary. Patch it to use
48 # the working dir and PATH instead.
51 # Bump the firstâparty nightfall dependency to the latest Git
52 # revision for FFmpeg >= 6 support.
53 ./bump-nightfall.patch
55 # Upstream has some unused imports that prevent things from compiling...
56 # Remove for next release.
58 name = "remove-unused-imports.patch";
59 url = "https://github.com/Dusk-Labs/dim/commit/f62de1d38e6e52f27b1176f0dabbbc51622274cb.patch";
60 hash = "sha256-Gk+RHWtCKN7McfFB3siIOOhwi3+k17MCQr4Ya4RCKjc=";
65 ln -sf ${./Cargo.lock} Cargo.lock
69 ln -ns $frontend ui/build
80 ++ lib.optional stdenv.hostPlatform.isDarwin [
81 darwin.apple_sdk.frameworks.Security
82 darwin.apple_sdk.frameworks.CoreServices
83 darwin.apple_sdk.frameworks.SystemConfiguration
85 ++ lib.optional libvaSupport libva;
87 buildFeatures = lib.optional libvaSupport "vaapi";
90 lockFile = ./Cargo.lock;
92 "mp4-0.8.2" = "sha256-OtVRtOTU/yoxxoRukpUghpfiEgkKoJZNflMQ3L26Cno=";
93 "nightfall-0.3.12-rc4" = "sha256-AbSuLe3ySOla3NB+mlfHRHqHuMqQbrThAaUZ747GErE=";
99 "--skip=tmdb::tests::johhny_test_seasons"
100 "--skip=tmdb::tests::once_upon_get_year"
101 "--skip=tmdb::tests::tmdb_get_cast"
102 "--skip=tmdb::tests::tmdb_get_details"
103 "--skip=tmdb::tests::tmdb_get_episodes"
104 "--skip=tmdb::tests::tmdb_get_seasons"
105 "--skip=tmdb::tests::tmdb_search"
107 "--skip=dim-utils/src/lib.rs"
111 wrapProgram $out/bin/dim \
112 --prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
116 homepage = "https://github.com/Dusk-Labs/dim";
117 description = "Self-hosted media manager";
118 license = lib.licenses.agpl3Only;
120 maintainers = [ lib.maintainers.misterio77 ];
121 platforms = lib.platforms.unix;