Mulberry/packaging/nix/default.nix
2026-12-02 16:26:16 -06:00

33 lines
1.4 KiB
Nix

# Mulberry for Nix, from the release tar.gz. Written by tools/package.sh (version and hash); edit the header there.
# nix build .#default or nix profile install . (from the repo), or callPackage this file.
{ lib, stdenv, fetchurl, autoPatchelfHook, makeWrapper, libGL, wayland, libxkbcommon, xorg, fontconfig, dbus, mpv-unwrapped }:
stdenv.mkDerivation rec {
pname = "mulberry";
version = "2.0.4";
src = fetchurl {
url = "https://astar76.com/git/astar76/Mulberry/releases/download/v${version}/Mulberry-${version}-Linux-x86_64.tar.gz";
hash = "sha256-h9qyUeI1k0V60+OyuMp5A/ea84W4BdJ27CnnAXheXl8=";
};
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
buildInputs = [ mpv-unwrapped stdenv.cc.cc.lib ];
# Loaded with dlopen at run time, so autoPatchelf can't see them.
runtimeDependencies = [ libGL wayland libxkbcommon xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr fontconfig dbus ];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out
for d in bin lib share; do [ ! -d $d ] || cp -R $d $out/; done
install -Dm644 README.md $out/share/doc/mulberry/README.md
runHook postInstall
'';
meta = {
description = "Material You music player";
homepage = "https://astar76.com/git/astar76/Mulberry";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
mainProgram = "mulberry";
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
}