1{
2 stdenv,
3 lib,
4 fetchurl,
5 pkg-config,
6 gtk3,
7 itstool,
8 gst_all_1,
9 libxml2,
10 libnotify,
11 libcanberra-gtk3,
12 intltool,
13 dvdauthor,
14 libburn,
15 libisofs,
16 vcdimager,
17 wrapGAppsHook3,
18 hicolor-icon-theme,
19}:
20
21let
22 major = "3.12";
23 minor = "3";
24 binpath = lib.makeBinPath [
25 dvdauthor
26 vcdimager
27 ];
28
29in
30stdenv.mkDerivation rec {
31 version = "${major}.${minor}";
32 pname = "brasero";
33
34 src = fetchurl {
35 url = "mirror://gnome/sources/brasero/${major}/${pname}-${version}.tar.xz";
36 hash = "sha256-h3SerjOhQSB9GwC+IzttgEWYLtMkntS5ja4fOpdf6hU=";
37 };
38
39 nativeBuildInputs = [
40 pkg-config
41 itstool
42 intltool
43 wrapGAppsHook3
44 ];
45
46 buildInputs = [
47 gtk3
48 libxml2
49 libnotify
50 libcanberra-gtk3
51 libburn
52 libisofs
53 hicolor-icon-theme
54 gst_all_1.gstreamer
55 gst_all_1.gst-plugins-base
56 gst_all_1.gst-plugins-good
57 gst_all_1.gst-plugins-bad
58 gst_all_1.gst-plugins-ugly
59 gst_all_1.gst-libav
60 ];
61
62 # brasero checks that the applications it uses aren't symlinks, but this
63 # will obviously not work on nix
64 patches = [ ./remove-symlink-check.patch ];
65
66 enableParallelBuilding = true;
67
68 configureFlags = [
69 "--with-girdir=$out/share/gir-1.0"
70 "--with-typelibdir=$out/lib/girepository-1.0"
71 ];
72
73 preFixup = ''
74 gappsWrapperArgs+=(--prefix PATH : "${binpath}")
75 '';
76
77 env = lib.optionalAttrs stdenv.cc.isGNU {
78 NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
79 };
80
81 meta = with lib; {
82 description = "Gnome CD/DVD Burner";
83 homepage = "https://gitlab.gnome.org/GNOME/brasero";
84 maintainers = [ maintainers.bdimcheff ];
85 license = licenses.gpl2Plus;
86 platforms = platforms.linux;
87 mainProgram = "brasero";
88 };
89}