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

50 lines
1.5 KiB
Nix

{ stdenv, lib, fetchurl, pkgconfig, gtk3, itstool, gst_all_1, libxml2, libnotify
, libcanberra-gtk3, intltool, dvdauthor, libburn, libisofs
, vcdimager, wrapGAppsHook, hicolor-icon-theme }:
let
major = "3.12";
minor = "2";
binpath = lib.makeBinPath [ dvdauthor vcdimager ];
in stdenv.mkDerivation rec {
version = "${major}.${minor}";
pname = "brasero";
src = fetchurl {
url = "http://download.gnome.org/sources/brasero/${major}/${pname}-${version}.tar.xz";
sha256 = "0h90y674j26rvjahb8cc0w79zx477rb6zaqcj26wzvq8kmpic8k8";
};
nativeBuildInputs = [ pkgconfig itstool intltool wrapGAppsHook ];
buildInputs = [ gtk3 libxml2 libnotify libcanberra-gtk3 libburn libisofs
hicolor-icon-theme
gst_all_1.gstreamer gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly gst_all_1.gst-libav ];
# brasero checks that the applications it uses aren't symlinks, but this
# will obviously not work on nix
patches = [ ./remove-symlink-check.patch ];
enableParallelBuilding = true;
configureFlags = [
"--with-girdir=$out/share/gir-1.0"
"--with-typelibdir=$out/lib/girepository-1.0"
];
preFixup = ''
gappsWrapperArgs+=(--prefix PATH : "${binpath}")
'';
meta = with lib; {
description = "A Gnome CD/DVD Burner";
homepage = "https://wiki.gnome.org/Apps/Brasero";
maintainers = [ maintainers.bdimcheff ];
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}