nixpkgs/pkgs/tools/cd-dvd/cdrdao/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

37 lines
1.1 KiB
Nix

{lib, stdenv, fetchurl, libvorbis, libmad, pkgconfig, libao}:
stdenv.mkDerivation {
name = "cdrdao-1.2.3";
src = fetchurl {
url = "mirror://sourceforge/cdrdao/cdrdao-1.2.3.tar.bz2";
sha256 = "0pmpgx91j984snrsxbq1dgf3ximks2dfh1sqqmic72lrls7wp4w1";
};
makeFlags = [ "RM=rm" "LN=ln" "MV=mv" ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libvorbis libmad libao ];
hardeningDisable = [ "format" ];
# Adjust some headers to match glibc 2.12 ... patch is a diff between
# the cdrdao CVS head and the 1.2.3 release.
patches = [ ./adjust-includes-for-glibc-212.patch ];
# we have glibc/include/linux as a symlink to the kernel headers,
# and the magic '..' points to kernelheaders, and not back to the glibc/include
postPatch = ''
sed -i 's,linux/../,,g' dao/sg_err.h
'';
# Needed on gcc >= 6.
NIX_CFLAGS_COMPILE = "-Wno-narrowing";
meta = with lib; {
description = "A tool for recording audio or data CD-Rs in disk-at-once (DAO) mode";
homepage = "http://cdrdao.sourceforge.net/";
platforms = platforms.linux;
license = licenses.gpl2;
};
}