nixpkgs/pkgs/by-name/wa/wavegain/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

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";
};
}