libxmp: modernize; adopt (#402124)

authored by Ben Siraphob and committed by GitHub 4e397bdc 834ff42f

+46 -11
+46 -11
pkgs/by-name/li/libxmp/package.nix
··· 1 { 2 lib, 3 stdenv, 4 - fetchurl, 5 }: 6 7 - stdenv.mkDerivation rec { 8 pname = "libxmp"; 9 version = "4.6.2"; 10 11 - meta = with lib; { 12 description = "Extended module player library"; 13 homepage = "https://xmp.sourceforge.net/"; 14 longDescription = '' 15 Libxmp is a library that renders module files to PCM data. It supports 16 over 90 mainstream and obscure module formats including Protracker (MOD), 17 Scream Tracker 3 (S3M), Fast Tracker II (XM), and Impulse Tracker (IT). 18 ''; 19 - license = licenses.lgpl21Plus; 20 - platforms = platforms.all; 21 - }; 22 - 23 - src = fetchurl { 24 - url = "mirror://sourceforge/xmp/libxmp/${pname}-${version}.tar.gz"; 25 - sha256 = "sha256-rKwXBb4sT7TS1w3AV1mFO6aqt0eoPeV2sIJ4TUb1pLk="; 26 }; 27 - }
··· 1 { 2 lib, 3 stdenv, 4 + docutils, 5 + fetchFromGitHub, 6 + cmake, 7 + ninja, 8 + nix-update-script, 9 }: 10 11 + stdenv.mkDerivation (finalAttrs: { 12 pname = "libxmp"; 13 version = "4.6.2"; 14 15 + src = fetchFromGitHub { 16 + owner = "libxmp"; 17 + repo = "libxmp"; 18 + tag = "libxmp-${finalAttrs.version}"; 19 + hash = "sha256-AfHathuBmF9OhtTyt8WabZKzFtnAkX1YeiYFF079z80="; 20 + }; 21 + 22 + outputs = [ 23 + "out" 24 + "dev" 25 + "man" 26 + ]; 27 + 28 + nativeBuildInputs = [ 29 + cmake 30 + ninja 31 + docutils 32 + ]; 33 + 34 + cmakeFlags = [ 35 + (lib.cmakeBool "BUILD_SHARED" (!stdenv.hostPlatform.isStatic)) 36 + (lib.cmakeBool "BUILD_STATIC" stdenv.hostPlatform.isStatic) 37 + (lib.cmakeBool "WITH_UNIT_TESTS" finalAttrs.doCheck) 38 + ]; 39 + 40 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 41 + 42 + passthru.updateScript = nix-update-script { 43 + extraArgs = [ 44 + "--version-regex" 45 + "libxmp-(.*)" 46 + ]; 47 + }; 48 + 49 + meta = { 50 description = "Extended module player library"; 51 homepage = "https://xmp.sourceforge.net/"; 52 + changelog = "https://github.com/libxmp/libxmp/releases/tag/${finalAttrs.src.tag}"; 53 longDescription = '' 54 Libxmp is a library that renders module files to PCM data. It supports 55 over 90 mainstream and obscure module formats including Protracker (MOD), 56 Scream Tracker 3 (S3M), Fast Tracker II (XM), and Impulse Tracker (IT). 57 ''; 58 + maintainers = with lib.maintainers; [ marcin-serwin ]; 59 + license = lib.licenses.mit; 60 + platforms = lib.platforms.all; 61 }; 62 + })