Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 51 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 gitUpdater, 6 pkg-config, 7 glib, 8 mpv-unwrapped, 9 ffmpeg, 10}: 11 12stdenv.mkDerivation rec { 13 pname = "mpv-mpris"; 14 version = "1.1"; 15 16 src = fetchFromGitHub { 17 owner = "hoyon"; 18 repo = "mpv-mpris"; 19 rev = version; 20 hash = "sha256-vZIO6ILatIWa9nJYOp4AMKwvaZLahqYWRLMDOizyBI0="; 21 }; 22 passthru.updateScript = gitUpdater { }; 23 24 nativeBuildInputs = [ pkg-config ]; 25 26 buildInputs = [ 27 glib 28 mpv-unwrapped 29 ffmpeg 30 ]; 31 32 postPatch = '' 33 substituteInPlace Makefile --replace-fail 'PKG_CONFIG =' 'PKG_CONFIG ?=' 34 ''; 35 36 installFlags = [ "SCRIPTS_DIR=${placeholder "out"}/share/mpv/scripts" ]; 37 38 # Otherwise, the shared object isn't `strip`ped. See: 39 # https://discourse.nixos.org/t/debug-why-a-derivation-has-a-reference-to-gcc/7009 40 stripDebugList = [ "share/mpv/scripts" ]; 41 passthru.scriptName = "mpris.so"; 42 43 meta = { 44 description = "MPRIS plugin for mpv"; 45 homepage = "https://github.com/hoyon/mpv-mpris"; 46 license = lib.licenses.mit; 47 platforms = lib.platforms.linux; 48 maintainers = with lib.maintainers; [ ajs124 ]; 49 changelog = "https://github.com/hoyon/mpv-mpris/releases/tag/${version}"; 50 }; 51}