nixpkgs/pkgs/applications/audio/vorbis-tools/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

38 lines
1.1 KiB
Nix

{ lib, stdenv, fetchurl, fetchzip, libogg, libvorbis, libao, pkgconfig, curl
, speex, flac }:
let
debPatch = fetchzip {
url = "mirror://debian/pool/main/v/vorbis-tools/vorbis-tools_1.4.0-11.debian.tar.xz";
sha256 = "0kvmd5nslyqplkdb7pnmqj47ir3y5lmaxd12wmrnqh679a8jhcyi";
};
in
stdenv.mkDerivation {
name = "vorbis-tools-1.4.0";
src = fetchurl {
url = "http://downloads.xiph.org/releases/vorbis/vorbis-tools-1.4.0.tar.gz";
sha256 = "1g12bnh5ah08v529y72kfdz5lhvy75iaz7f9jskyby23m9dkk2d3";
};
postPatch = ''
for patch in $(ls "${debPatch}"/patches/*.{diff,patch} | grep -v debian_subdir)
do patch -p1 < "$patch"
done
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libogg libvorbis libao curl speex flac ];
meta = with lib; {
description = "Extra tools for Ogg-Vorbis audio codec";
longDescription = ''
A set of command-line tools to manipulate Ogg Vorbis audio
files, notably the `ogg123' player and the `oggenc' encoder.
'';
homepage = "https://xiph.org/vorbis/";
license = licenses.gpl2;
platforms = platforms.all;
};
}