mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-01 10:34:16 +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" ```
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{ config
|
|
, lib
|
|
, stdenv
|
|
, fetchurl
|
|
, pkg-config
|
|
, gettext
|
|
, glib
|
|
, alsaSupport ? stdenv.hostPlatform.isLinux
|
|
, alsa-lib
|
|
, udev
|
|
, pulseaudioSupport ? config.pulseaudio or true
|
|
, libpulseaudio
|
|
, ossSupport ? false
|
|
, mateUpdateScript
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libmatemixer";
|
|
version = "1.28.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://pub.mate-desktop.org/releases/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
sha256 = "XXO5Ijl/YGiOPJUw61MrzkbDDiYtsbU1L6MsQNhwoMc=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
gettext
|
|
];
|
|
|
|
buildInputs = [
|
|
glib
|
|
] ++ lib.optionals alsaSupport [
|
|
alsa-lib
|
|
udev
|
|
] ++ lib.optionals pulseaudioSupport [
|
|
libpulseaudio
|
|
];
|
|
|
|
configureFlags = lib.optional ossSupport "--enable-oss";
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
passthru.updateScript = mateUpdateScript { inherit pname; };
|
|
|
|
meta = with lib; {
|
|
description = "Mixer library for MATE";
|
|
homepage = "https://github.com/mate-desktop/libmatemixer";
|
|
license = licenses.lgpl2Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = teams.mate.members;
|
|
};
|
|
}
|