mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-12 07:54:50 +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" ```
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch }:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "wavegain";
|
|
version = "1.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "MestreLion";
|
|
repo = "wavegain";
|
|
rev = "c928eaf97aeec5732625491b64c882e08e314fee";
|
|
sha256 = "0wghqnsbypmr4xcrhb568bfjdnxzzp8qgnws3jslzmzf34dpk5ls";
|
|
};
|
|
|
|
patches = [
|
|
# Upstream fix for -fno-common toolchains.
|
|
(fetchpatch {
|
|
name = "fno-common.patch";
|
|
url = "https://github.com/MestreLion/wavegain/commit/ee5e0f9a0ce34c0cf2769ea6566685a54b938304.patch";
|
|
sha256 = "11yi0czdn5h5bsqp23cww6yn9lm60cij8i1pzfwcfhgyf6f8ym1n";
|
|
})
|
|
];
|
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
|
|
|
installPhase = ''
|
|
strip -s wavegain
|
|
install -vD wavegain "$out/bin/wavegain"
|
|
'';
|
|
|
|
meta = {
|
|
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
|
|
description = "ReplayGain for wave files";
|
|
homepage = "https://github.com/MestreLion/wavegain";
|
|
license = lib.licenses.lgpl21;
|
|
platforms = lib.platforms.linux;
|
|
maintainers = [ lib.maintainers.robbinch ];
|
|
mainProgram = "wavegain";
|
|
};
|
|
}
|