mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-26 23:03:41 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
43 lines
1.2 KiB
Nix
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;
|
|
};
|
|
}
|