33 lines
1.6 KiB
Nix
33 lines
1.6 KiB
Nix
# Audiphi 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, yt-dlp, ffmpeg }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "audiphi";
|
|
version = "0.2.1";
|
|
src = fetchurl {
|
|
url = "https://astar76.com/git/astar76/Audiphi/releases/download/v${version}/Audiphi-${version}-Linux-x86_64.tar.gz";
|
|
hash = "sha256-Rwkhc/cC6VD/bDCYkR96kxtqNy/gWw8dl4XBKWtE6BU=";
|
|
};
|
|
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/audiphi/README.md
|
|
runHook postInstall
|
|
'';
|
|
postFixup = "wrapProgram $out/bin/audiphi --prefix PATH : ${lib.makeBinPath [ yt-dlp ffmpeg ]}";
|
|
meta = {
|
|
description = "Material 3 music downloader and quick player for any music service";
|
|
homepage = "https://astar76.com/git/astar76/Audiphi";
|
|
license = lib.licenses.mit;
|
|
platforms = [ "x86_64-linux" ];
|
|
mainProgram = "audiphi";
|
|
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
|
};
|
|
}
|