mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 02:33:25 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
64 lines
1.3 KiB
Nix
64 lines
1.3 KiB
Nix
{ lib, stdenv, fetchFromGitLab, fetchpatch }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "aacgain-1.9.0";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "mulx";
|
|
repo = "aacgain";
|
|
rev = "7c29dccd878ade1301710959aeebe87a8f0828f5";
|
|
sha256 = "07hl432vsscqg01b6wr99qmsj4gbx0i02x4k565432y6zpfmaxm0";
|
|
};
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
postPatch = ''
|
|
(
|
|
cd mp4v2
|
|
patch -p0 < ${fetchpatch {
|
|
name = "fix_missing_ptr_deref.patch";
|
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/fix_missing_ptr_deref.patch?h=aacgain-cvs&id=e1a19c920f57063e64bab75cb0d8624731f6e3d7";
|
|
sha256 = "1cq7r005nvmwdjb25z80grcam7jv6k57jnl2bh349mg3ajmslbq9";
|
|
}}
|
|
)
|
|
'';
|
|
|
|
configurePhase = ''
|
|
runHook preConfigure
|
|
cd mp4v2
|
|
./configure
|
|
|
|
cd ../faad2
|
|
./configure
|
|
|
|
cd ..
|
|
./configure
|
|
runHook postConfigure
|
|
'';
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
cd mp4v2
|
|
make libmp4v2.la
|
|
|
|
cd ../faad2
|
|
make LDFLAGS=-static
|
|
|
|
cd ..
|
|
make
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -D aacgain/aacgain "$out/bin/aacgain"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "ReplayGain for AAC files";
|
|
homepage = "https://aacgain.altosdesign.com";
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.robbinch ];
|
|
};
|
|
}
|