nixpkgs/pkgs/by-name/mp/mp3blaster/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

43 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, libvorbis, SDL }:
stdenv.mkDerivation rec {
pname = "mp3blaster";
version = "3.2.6";
src = fetchFromGitHub {
owner = "stragulus";
repo = pname;
rev = "v${version}";
sha256 = "0pzwml3yhysn8vyffw9q9p9rs8gixqkmg4n715vm23ib6wxbliqs";
};
patches = [
# Fix pending upstream inclusion for ncurses-6.3 support:
# https://github.com/stragulus/mp3blaster/pull/8
(fetchpatch {
name = "ncurses-6.3.patch";
url = "https://github.com/stragulus/mp3blaster/commit/62168cba5eaba6ffe56943552837cf033cfa96ed.patch";
sha256 = "088l27kl1l58lwxfnw5x2n64sdjy925ycphni3icwag7zvpj0xz1";
})
];
buildInputs = [
ncurses
libvorbis
] ++ lib.optional stdenv.hostPlatform.isDarwin SDL;
env.NIX_CFLAGS_COMPILE = toString ([
"-Wno-narrowing"
] ++ lib.optionals stdenv.cc.isClang [
"-Wno-reserved-user-defined-literal"
]);
meta = with lib; {
description = "Audio player for the text console";
homepage = "http://www.mp3blaster.org/";
license = licenses.gpl2;
maintainers = with maintainers; [ earldouglas ];
platforms = with platforms; linux ++ darwin;
};
}