depot/pkgs/development/libraries/libmikmod/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

42 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, texinfo, alsa-lib, libpulseaudio, CoreAudio }:
let
inherit (lib) optional optionalString;
in stdenv.mkDerivation rec {
pname = "libmikmod";
version = "3.3.11.1";
src = fetchurl {
url = "mirror://sourceforge/mikmod/libmikmod-${version}.tar.gz";
sha256 = "06bdnhb0l81srdzg6gn2v2ydhhaazza7rshrcj3q8dpqr3gn97dd";
};
buildInputs = [ texinfo ]
++ optional stdenv.hostPlatform.isLinux alsa-lib
++ optional stdenv.hostPlatform.isDarwin CoreAudio;
propagatedBuildInputs =
optional stdenv.hostPlatform.isLinux libpulseaudio;
outputs = [ "out" "dev" "man" ];
NIX_LDFLAGS = optionalString stdenv.hostPlatform.isLinux "-lasound";
postInstall = ''
moveToOutput bin/libmikmod-config "$dev"
'';
meta = with lib; {
description = "Library for playing tracker music module files";
mainProgram = "libmikmod-config";
homepage = "https://mikmod.shlomifish.org/";
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ astsmtl lovek323 ];
platforms = platforms.unix;
longDescription = ''
A library for playing tracker music module files supporting many formats,
including MOD, S3M, IT and XM.
'';
};
}