libxmp: modernize; adopt (#402124)

This commit is contained in:
Ben Siraphob
2025-04-27 02:24:09 -04:00
committed by GitHub
+46 -11
View File
@@ -1,27 +1,62 @@
{
lib,
stdenv,
fetchurl,
docutils,
fetchFromGitHub,
cmake,
ninja,
nix-update-script,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libxmp";
version = "4.6.2";
meta = with lib; {
src = fetchFromGitHub {
owner = "libxmp";
repo = "libxmp";
tag = "libxmp-${finalAttrs.version}";
hash = "sha256-AfHathuBmF9OhtTyt8WabZKzFtnAkX1YeiYFF079z80=";
};
outputs = [
"out"
"dev"
"man"
];
nativeBuildInputs = [
cmake
ninja
docutils
];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED" (!stdenv.hostPlatform.isStatic))
(lib.cmakeBool "BUILD_STATIC" stdenv.hostPlatform.isStatic)
(lib.cmakeBool "WITH_UNIT_TESTS" finalAttrs.doCheck)
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"libxmp-(.*)"
];
};
meta = {
description = "Extended module player library";
homepage = "https://xmp.sourceforge.net/";
changelog = "https://github.com/libxmp/libxmp/releases/tag/${finalAttrs.src.tag}";
longDescription = ''
Libxmp is a library that renders module files to PCM data. It supports
over 90 mainstream and obscure module formats including Protracker (MOD),
Scream Tracker 3 (S3M), Fast Tracker II (XM), and Impulse Tracker (IT).
'';
license = licenses.lgpl21Plus;
platforms = platforms.all;
maintainers = with lib.maintainers; [ marcin-serwin ];
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
src = fetchurl {
url = "mirror://sourceforge/xmp/libxmp/${pname}-${version}.tar.gz";
sha256 = "sha256-rKwXBb4sT7TS1w3AV1mFO6aqt0eoPeV2sIJ4TUb1pLk=";
};
}
})