xwax: init at version 1.9 (#377421)

This commit is contained in:
Arne Keller
2025-02-01 18:32:32 +01:00
committed by GitHub
2 changed files with 83 additions and 0 deletions
+6
View File
@@ -17056,6 +17056,12 @@
github = "obsidian-systems-maintenance";
githubId = 80847921;
};
obsoleszenz = {
name = "obsoleszenz";
email = "obsoleszenz@riseup.net";
github = "obsoleszenz";
githubId = 94946669;
};
ocfox = {
email = "i@ocfox.me";
github = "ocfox";
+77
View File
@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchurl,
SDL,
SDL_ttf,
jack2,
libmpg123,
ffmpeg,
cdparanoia,
dejavu_fonts,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xwax";
version = "1.9";
src = fetchurl {
url = "https://xwax.org/releases/xwax-${finalAttrs.version}.tar.gz";
hash = "sha256-m+2PoUMYKBhlA2H0kld1W/iR8UMWEGaqp7yoxszp9jI=";
};
postPatch = ''
# When cross-compiling sdl-config will not be available in $PATH,
# so we must provide the full path.
substituteInPlace Makefile \
--replace-fail sdl-config "${lib.getExe' (lib.getDev SDL) "sdl-config"}"
# font loading in xwax is relying on a hardcoded list of paths,
# therefore we patch interface.c to also look up in the dejavu_fonts nix store path
substituteInPlace interface.c \
--replace-fail "/usr/X11R6/lib/X11/fonts/TTF" "${dejavu_fonts.outPath}/share/fonts/truetype/"
'';
buildInputs = [
# sdl
SDL
SDL_ttf
# audio server
jack2
# audio decoder
libmpg123
ffmpeg
cdparanoia
# fonts
dejavu_fonts
];
configureFlags = [
"--enable-alsa"
"--enable-jack"
];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "-h";
doInstallCheck = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp xwax $out/bin/xwax
runHook postInstall
'';
meta = {
homepage = "https://xwax.org";
description = "Digital vinyl on Linux";
mainProgram = "xwax";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ obsoleszenz ];
platforms = lib.platforms.linux;
};
})