···162 isolinuxCfg = concatStringsSep "\n"
163 ([ baseIsolinuxCfg ] ++ optional config.boot.loader.grub.memtest86.enable isolinuxMemtest86Entry);
16400165 # Setup instructions for rEFInd.
166 refind =
167- if targetArch == "x64" then
168 ''
169 # Adds rEFInd to the ISO.
170- cp -v ${pkgs.refind}/share/refind/refind_x64.efi $out/EFI/boot/
171 ''
172 else
173 "# No refind for ${targetArch}"
···186187 # Fonts can be loaded?
188 # (This font is assumed to always be provided as a fallback by NixOS)
189- if loadfont (hd0)/EFI/boot/unicode.pf2; then
000190 # Use graphical term, it can be either with background image or a theme.
191 # input is "console", while output is "gfxterm".
192 # This enables "serial" input and output only when possible.
···207 ${ # When there is a theme configured, use it, otherwise use the background image.
208 if config.isoImage.grubTheme != null then ''
209 # Sets theme.
210- set theme=(hd0)/EFI/boot/grub-theme/theme.txt
211 # Load theme fonts
212- $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (hd0)/EFI/boot/grub-theme/%P\n")
213 '' else ''
214- if background_image (hd0)/EFI/boot/efi-background.png; then
215 # Black background means transparent background when there
216 # is a background image set... This seems undocumented :(
217 set color_normal=black/black
···264265 cat <<EOF > $out/EFI/boot/grub.cfg
26600267 # If you want to use serial for "terminal_*" commands, you need to set one up:
268 # Example manual configuration:
269 # → serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
···273 export with_serial
274 clear
275 set timeout=10
00000000276 ${grubMenuCfg}
277000000000000278 # If the parameter iso_path is set, append the findiso parameter to the kernel
279 # line. We need this to allow the nixos iso to be booted from grub directly.
280 if [ \''${iso_path} ] ; then
···337 }
338 }
339340- menuentry 'rEFInd' --class refind {
341- # UUID is hard-coded in the derivation.
342- search --set=root --no-floppy --fs-uuid 1234-5678
343- chainloader (\$root)/EFI/boot/refind_x64.efi
344- }
0000345 menuentry 'Firmware Setup' --class settings {
346 fwsetup
347 clear
···162 isolinuxCfg = concatStringsSep "\n"
163 ([ baseIsolinuxCfg ] ++ optional config.boot.loader.grub.memtest86.enable isolinuxMemtest86Entry);
164165+ refindBinary = if targetArch == "x64" || targetArch == "aa64" then "refind_${targetArch}.efi" else null;
166+167 # Setup instructions for rEFInd.
168 refind =
169+ if refindBinary != null then
170 ''
171 # Adds rEFInd to the ISO.
172+ cp -v ${pkgs.refind}/share/refind/${refindBinary} $out/EFI/boot/
173 ''
174 else
175 "# No refind for ${targetArch}"
···188189 # Fonts can be loaded?
190 # (This font is assumed to always be provided as a fallback by NixOS)
191+ if loadfont /EFI/boot/unicode.pf2; then
192+ set with_fonts=true
193+ fi
194+ if [ "\$textmode" != "true" -a "\$with_fonts" == "true" ]; then
195 # Use graphical term, it can be either with background image or a theme.
196 # input is "console", while output is "gfxterm".
197 # This enables "serial" input and output only when possible.
···212 ${ # When there is a theme configured, use it, otherwise use the background image.
213 if config.isoImage.grubTheme != null then ''
214 # Sets theme.
215+ set theme=/EFI/boot/grub-theme/theme.txt
216 # Load theme fonts
217+ $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont /EFI/boot/grub-theme/%P\n")
218 '' else ''
219+ if background_image /EFI/boot/efi-background.png; then
220 # Black background means transparent background when there
221 # is a background image set... This seems undocumented :(
222 set color_normal=black/black
···269270 cat <<EOF > $out/EFI/boot/grub.cfg
271272+ set with_fonts=false
273+ set textmode=false
274 # If you want to use serial for "terminal_*" commands, you need to set one up:
275 # Example manual configuration:
276 # → serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
···280 export with_serial
281 clear
282 set timeout=10
283+284+ # This message will only be viewable when "gfxterm" is not used.
285+ echo ""
286+ echo "Loading graphical boot menu..."
287+ echo ""
288+ echo "Press 't' to use the text boot menu on this console..."
289+ echo ""
290+291 ${grubMenuCfg}
292293+ hiddenentry 'Text mode' --hotkey 't' {
294+ loadfont /EFI/boot/unicode.pf2
295+ set textmode=true
296+ terminal_output gfxterm console
297+ }
298+ hiddenentry 'GUI mode' --hotkey 'g' {
299+ $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont /EFI/boot/grub-theme/%P\n")
300+ set textmode=false
301+ terminal_output gfxterm
302+ }
303+304+305 # If the parameter iso_path is set, append the findiso parameter to the kernel
306 # line. We need this to allow the nixos iso to be booted from grub directly.
307 if [ \''${iso_path} ] ; then
···364 }
365 }
366367+ ${lib.optionalString (refindBinary != null) ''
368+ # GRUB apparently cannot do "chainloader" operations on "CD".
369+ if [ "\$root" != "cd0" ]; then
370+ menuentry 'rEFInd' --class refind {
371+ # \$root defaults to the drive the EFI is found on.
372+ chainloader (\$root)/EFI/boot/${refindBinary}
373+ }
374+ fi
375+ ''}
376 menuentry 'Firmware Setup' --class settings {
377 fwsetup
378 clear
+31-8
pkgs/applications/audio/audacity/default.nix
···28, ffmpeg
29, soundtouch
30, pcre /*, portaudio - given up fighting their portaudio.patch */
031, at-spi2-core ? null
32, dbus ? null
33, epoxy ? null
···41}:
4243# TODO
44-# - as of 2.4.2, GTK2 is still the recommended version ref https://www.audacityteam.org/download/source/ check if that changes in future versions
45# - detach sbsms
460000000000047stdenv.mkDerivation rec {
48 pname = "audacity";
49- version = "2.4.2";
5051 src = fetchFromGitHub {
52 owner = "audacity";
53 repo = "audacity";
54 rev = "Audacity-${version}";
55- sha256 = "sha256-hpRTo5B0EMyzORopsNPOgv6mohBkwJfWfCLnPvFmdFI=";
56 };
5758 patches = [
59 (fetchpatch {
60- url = "https://github.com/audacity/audacity/commit/a070b5d8a8ba10fb86edba6aeb8fdab0f66ba408.patch";
61- sha256 = "sha256-8UZupGcN+/tytAhyy5T1P0nufvsQPeyLgOUMGt7l8Oc=";
62 name = "audacity_xdg_paths.patch";
63 })
64 ];
···66 # this file *should* be generated by cmake but as of 2.4.2 isn't yet
67 postPatch = ''
68 touch src/RevisionIdent.h
000069 '';
7071 # workaround for a broken cmake. Drop it with a later version to see if it works.
···86 "-lswscale"
87 ];
8889- nativeBuildInputs = [ cmake gettext pkg-config python3 ];
00000009091 buildInputs = [
92 alsaLib
···110 sratom
111 suil
112 twolame
113- wxGTK
114- wxGTK.gtk
115 ] ++ lib.optionals stdenv.isLinux [
116 at-spi2-core
117 dbus
···28, ffmpeg
29, soundtouch
30, pcre /*, portaudio - given up fighting their portaudio.patch */
31+, linuxHeaders
32, at-spi2-core ? null
33, dbus ? null
34, epoxy ? null
···42}:
4344# TODO
45+# - as of 3.0.2, GTK2 is still the recommended version ref https://www.audacityteam.org/download/source/ check if that changes in future versions
46# - detach sbsms
4748+let
49+ wxGTK-audacity = wxGTK.overrideAttrs (oldAttrs: rec {
50+ src = fetchFromGitHub {
51+ owner = "audacity";
52+ repo = "wxWidgets";
53+ rev = "07e7d832c7a337aedba3537b90b2c98c4d8e2985";
54+ sha256 = "1mawnkcrmqj98jp0jxlnh9xkc950ca033ccb51c7035pzmi9if9a";
55+ fetchSubmodules = true;
56+ };
57+ });
58+in
59stdenv.mkDerivation rec {
60 pname = "audacity";
61+ version = "3.0.2";
6263 src = fetchFromGitHub {
64 owner = "audacity";
65 repo = "audacity";
66 rev = "Audacity-${version}";
67+ sha256 = "035qq2ff16cdl2cb9iply2bfjmhfl1dpscg79x6c9l0i9m8k41zj";
68 };
6970 patches = [
71 (fetchpatch {
72+ url = "https://github.com/audacity/audacity/commit/007852e51fcbb5f1f359d112f28b8984a604dac6.patch";
73+ sha256 = "0zp2iydd46analda9cfnbmzdkjphz5m7dynrdj5qdnmq6j3px9fw";
74 name = "audacity_xdg_paths.patch";
75 })
76 ];
···78 # this file *should* be generated by cmake but as of 2.4.2 isn't yet
79 postPatch = ''
80 touch src/RevisionIdent.h
81+ '';
82+83+ preConfigure = ''
84+ substituteInPlace src/FileNames.cpp --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
85 '';
8687 # workaround for a broken cmake. Drop it with a later version to see if it works.
···102 "-lswscale"
103 ];
104105+ nativeBuildInputs = [
106+ cmake
107+ gettext
108+ pkg-config
109+ python3
110+ ] ++ lib.optionals stdenv.isLinux [
111+ linuxHeaders
112+ ];
113114 buildInputs = [
115 alsaLib
···133 sratom
134 suil
135 twolame
136+ wxGTK-audacity
137+ wxGTK-audacity.gtk
138 ] ++ lib.optionals stdenv.isLinux [
139 at-spi2-core
140 dbus