nixpkgs/pkgs/applications/audio/cdparanoia/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

44 lines
1.5 KiB
Nix

{ lib, stdenv, fetchurl, autoreconfHook, gnu-config, IOKit, Carbon }:
stdenv.mkDerivation rec {
name = "cdparanoia-III-10.2";
src = fetchurl {
url = "http://downloads.xiph.org/releases/cdparanoia/${name}.src.tgz";
sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80";
};
patches = stdenv.lib.optionals stdenv.isDarwin [
(fetchurl {
url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch";
sha256 = "1n86kzm2ssl8fdf5wlhp6ncb2bf6b9xlb5vg0mhc85r69prqzjiy";
})
(fetchurl {
url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff";
sha256 = "17l2qhn8sh4jy6ryy5si6ll6dndcm0r537rlmk4a6a8vkn852vad";
})
] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./utils.patch
++ [./fix_private_keyword.patch];
nativeBuildInputs = stdenv.lib.optional stdenv.isAarch64 autoreconfHook;
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [
Carbon
IOKit
];
hardeningDisable = [ "format" ];
preConfigure = "unset CC" + stdenv.lib.optionalString stdenv.isAarch64 '';
cp ${gnu-config}/config.sub configure.sub
cp ${gnu-config}/config.guess configure.guess
'';
meta = with lib; {
homepage = "https://xiph.org/paranoia";
description = "A tool and library for reading digital audio from CDs";
license = with licenses; [ gpl2Plus lgpl21Plus ];
platforms = platforms.unix;
};
}