···6677 <para>
88 Sometimes one wants to override parts of <literal>nixpkgs</literal>, e.g.
99- derivation attributes, the results of derivations or even the whole package
1010- set.
99+ derivation attributes, the results of derivations.
1010+ </para>
1111+1212+ <para>
1313+ These functions are used to make changes to packages, returning only single
1414+ packages. <link xlink:href="#chap-overlays">Overlays</link>, on the other
1515+ hand, can be used to combine the overridden packages across the entire
1616+ package set of Nixpkgs.
1117 </para>
12181319 <section xml:id="sec-pkg-override">
···2531 <para>
2632 Example usages:
2733<programlisting>pkgs.foo.override { arg1 = val1; arg2 = val2; ... }</programlisting>
3434+<!-- TODO: move below programlisting to a new section about extending and overlays
3535+ and reference it
3636+ -->
2837<programlisting>
2938import pkgs.path { overlays = [ (self: super: {
3039 foo = super.foo.override { barSupport = true ; };
···8695 in this case, as it overrides only the attributes of the final derivation.
8796 It is for this reason that <varname>overrideAttrs</varname> should be
8897 preferred in (almost) all cases to <varname>overrideDerivation</varname>,
8989- i.e. to allow using <varname>sdenv.mkDerivation</varname> to process input
9898+ i.e. to allow using <varname>stdenv.mkDerivation</varname> to process input
9099 arguments, as well as the fact that it is easier to use (you can use the
91100 same attribute names you see in your Nix code, instead of the ones
92101 generated (e.g. <varname>buildInputs</varname> vs
9393- <varname>nativeBuildInputs</varname>, and involves less typing.
102102+ <varname>nativeBuildInputs</varname>), and it involves less typing).
94103 </para>
95104 </note>
96105 </section>
+111-80
doc/overlays.xml
···1717 <title>Installing overlays</title>
18181919 <para>
2020- The list of overlays is determined as follows.
2020+ The list of overlays can be set either explicitly in a Nix expression, or
2121+ through <literal><nixpkgs-overlays></literal> or user configuration
2222+ files.
2123 </para>
22242323- <para>
2424- If the <varname>overlays</varname> argument is not provided explicitly, we
2525- look for overlays in a path. The path is determined as follows:
2626- <orderedlist>
2727- <listitem>
2828- <para>
2929- First, if an <varname>overlays</varname> argument to the nixpkgs function
3030- itself is given, then that is used.
3131- </para>
3232- <para>
3333- This can be passed explicitly when importing nipxkgs, for example
3434- <literal>import <nixpkgs> { overlays = [ overlay1 overlay2 ];
3535- }</literal>.
3636- </para>
3737- </listitem>
3838- <listitem>
3939- <para>
4040- Otherwise, if the Nix path entry <literal><nixpkgs-overlays></literal>
4141- exists, we look for overlays at that path, as described below.
4242- </para>
4343- <para>
4444- See the section on <literal>NIX_PATH</literal> in the Nix manual for more
4545- details on how to set a value for
4646- <literal><nixpkgs-overlays>.</literal>
4747- </para>
4848- </listitem>
4949- <listitem>
5050- <para>
5151- If one of <filename>~/.config/nixpkgs/overlays.nix</filename> and
5252- <filename>~/.config/nixpkgs/overlays/</filename> exists, then we look for
5353- overlays at that path, as described below. It is an error if both exist.
5454- </para>
5555- </listitem>
5656- </orderedlist>
5757- </para>
2525+ <section xml:id="sec-overlays-argument">
2626+ <title>Set overlays in NixOS or Nix expressions</title>
2727+2828+ <para>
2929+ On a NixOS system the value of the <literal>nixpkgs.overlays</literal>
3030+ option, if present, is passed to the system Nixpkgs directly as an
3131+ argument. Note that this does not affect the overlays for non-NixOS
3232+ operations (e.g. <literal>nix-env</literal>), which are
3333+ <link xlink:href="#sec-overlays-lookup">looked</link> up independently.
3434+ </para>
3535+3636+ <para>
3737+ The list of overlays can be passed explicitly when importing nixpkgs, for
3838+ example <literal>import <nixpkgs> { overlays = [ overlay1 overlay2 ];
3939+ }</literal>.
4040+ </para>
4141+4242+ <para>
4343+ Further overlays can be added by calling the <literal>pkgs.extend</literal>
4444+ or <literal>pkgs.appendOverlays</literal>, although it is often preferable
4545+ to avoid these functions, because they recompute the Nixpkgs fixpoint,
4646+ which is somewhat expensive to do.
4747+ </para>
4848+ </section>
4949+5050+ <section xml:id="sec-overlays-lookup">
5151+ <title>Install overlays via configuration lookup</title>
5252+5353+ <para>
5454+ The list of overlays is determined as follows.
5555+ </para>
5656+5757+ <para>
5858+ <orderedlist>
5959+ <listitem>
6060+ <para>
6161+ First, if an
6262+ <link xlink:href="#sec-overlays-argument"><varname>overlays</varname>
6363+ argument</link> to the nixpkgs function itself is given, then that is
6464+ used and no path lookup will be performed.
6565+ </para>
6666+ </listitem>
6767+ <listitem>
6868+ <para>
6969+ Otherwise, if the Nix path entry
7070+ <literal><nixpkgs-overlays></literal> exists, we look for overlays at
7171+ that path, as described below.
7272+ </para>
7373+ <para>
7474+ See the section on <literal>NIX_PATH</literal> in the Nix manual for
7575+ more details on how to set a value for
7676+ <literal><nixpkgs-overlays>.</literal>
7777+ </para>
7878+ </listitem>
7979+ <listitem>
8080+ <para>
8181+ If one of <filename>~/.config/nixpkgs/overlays.nix</filename> and
8282+ <filename>~/.config/nixpkgs/overlays/</filename> exists, then we look
8383+ for overlays at that path, as described below. It is an error if both
8484+ exist.
8585+ </para>
8686+ </listitem>
8787+ </orderedlist>
8888+ </para>
58895959- <para>
6060- If we are looking for overlays at a path, then there are two cases:
6161- <itemizedlist>
6262- <listitem>
6363- <para>
6464- If the path is a file, then the file is imported as a Nix expression and
6565- used as the list of overlays.
6666- </para>
6767- </listitem>
6868- <listitem>
6969- <para>
7070- If the path is a directory, then we take the content of the directory,
7171- order it lexicographically, and attempt to interpret each as an overlay
7272- by:
7373- <itemizedlist>
7474- <listitem>
7575- <para>
7676- Importing the file, if it is a <literal>.nix</literal> file.
7777- </para>
7878- </listitem>
7979- <listitem>
8080- <para>
8181- Importing a top-level <filename>default.nix</filename> file, if it is
8282- a directory.
8383- </para>
8484- </listitem>
8585- </itemizedlist>
8686- </para>
8787- </listitem>
8888- </itemizedlist>
8989- </para>
9090+ <para>
9191+ If we are looking for overlays at a path, then there are two cases:
9292+ <itemizedlist>
9393+ <listitem>
9494+ <para>
9595+ If the path is a file, then the file is imported as a Nix expression and
9696+ used as the list of overlays.
9797+ </para>
9898+ </listitem>
9999+ <listitem>
100100+ <para>
101101+ If the path is a directory, then we take the content of the directory,
102102+ order it lexicographically, and attempt to interpret each as an overlay
103103+ by:
104104+ <itemizedlist>
105105+ <listitem>
106106+ <para>
107107+ Importing the file, if it is a <literal>.nix</literal> file.
108108+ </para>
109109+ </listitem>
110110+ <listitem>
111111+ <para>
112112+ Importing a top-level <filename>default.nix</filename> file, if it is
113113+ a directory.
114114+ </para>
115115+ </listitem>
116116+ </itemizedlist>
117117+ </para>
118118+ </listitem>
119119+ </itemizedlist>
120120+ </para>
901219191- <para>
9292- On a NixOS system the value of the <literal>nixpkgs.overlays</literal>
9393- option, if present, is passed to the system Nixpkgs directly as an argument.
9494- Note that this does not affect the overlays for non-NixOS operations (e.g.
9595- <literal>nix-env</literal>), which are looked up independently.
9696- </para>
122122+ <para>
123123+ Because overlays that are set in NixOS configuration do not affect
124124+ non-NixOS operations such as <literal>nix-env</literal>, the
125125+ <filename>overlays.nix</filename> option provides a convenient way to use
126126+ the same overlays for a NixOS system configuration and user configuration:
127127+ the same file can be used as <filename>overlays.nix</filename> and imported
128128+ as the value of <literal>nixpkgs.overlays</literal>.
129129+ </para>
971309898- <para>
9999- The <filename>overlays.nix</filename> option therefore provides a convenient
100100- way to use the same overlays for a NixOS system configuration and user
101101- configuration: the same file can be used as
102102- <filename>overlays.nix</filename> and imported as the value of
103103- <literal>nixpkgs.overlays</literal>.
104104- </para>
131131+<!-- TODO: Example of sharing overlays between NixOS configuration
132132+ and configuration lookup. Also reference the example
133133+ from the sec-overlays-argument paragraph about NixOS.
134134+ -->
135135+ </section>
105136 </section>
106137<!--============================================================-->
107138 <section xml:id="sec-overlays-definition">
+4-4
doc/package-notes.xml
···681681 </para>
682682683683 <para>
684684- The python plugin allows the addition of extra libraries. For instance, the
685685- <literal>inotify.py</literal> script in weechat-scripts requires D-Bus or
686686- libnotify, and the <literal>fish.py</literal> script requires pycrypto. To
687687- use these scripts, use the <literal>python</literal> plugin's
684684+ The python and perl plugins allows the addition of extra libraries. For
685685+ instance, the <literal>inotify.py</literal> script in weechat-scripts
686686+ requires D-Bus or libnotify, and the <literal>fish.py</literal> script
687687+ requires pycrypto. To use these scripts, use the plugin's
688688 <literal>withPackages</literal> attribute:
689689<programlisting>weechat.override { configure = {availablePlugins, ...}: {
690690 plugins = with availablePlugins; [
···130130 were removed. They were never used for anything and can therefore safely be removed.
131131 </para>
132132 </listitem>
133133+ <listitem>
134134+ <para>
135135+ Package <literal>wasm</literal> has been renamed <literal>proglodyte-wasm</literal>. The package
136136+ <literal>wasm</literal> will be pointed to <literal>ocamlPackages.wasm</literal> in 19.09, so
137137+ make sure to update your configuration if you want to keep <literal>proglodyte-wasm</literal>
138138+ </para>
139139+ </listitem>
133140 </itemizedlist>
134141 </section>
135142
···11-{ config, pkgs, lib, ... }:
22-33-with lib;
44-55-let
66- cfg = config.programs.rootston;
77-88- rootstonWrapped = pkgs.writeScriptBin "rootston" ''
99- #! ${pkgs.runtimeShell}
1010- if [[ "$#" -ge 1 ]]; then
1111- exec ${pkgs.rootston}/bin/rootston "$@"
1212- else
1313- ${cfg.extraSessionCommands}
1414- exec ${pkgs.rootston}/bin/rootston -C ${cfg.configFile}
1515- fi
1616- '';
1717-in {
1818- options.programs.rootston = {
1919- enable = mkEnableOption ''
2020- rootston, the reference compositor for wlroots. The purpose of rootston
2121- is to test and demonstrate the features of wlroots (if you want a real
2222- Wayland compositor you should e.g. use Sway instead). You can manually
2323- start the compositor by running "rootston" from a terminal'';
2424-2525- extraSessionCommands = mkOption {
2626- type = types.lines;
2727- default = "";
2828- example = ''
2929- # Define a keymap (US QWERTY is the default)
3030- export XKB_DEFAULT_LAYOUT=de,us
3131- export XKB_DEFAULT_VARIANT=nodeadkeys
3232- export XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle,caps:escape
3333- '';
3434- description = ''
3535- Shell commands executed just before rootston is started.
3636- '';
3737- };
3838-3939- extraPackages = mkOption {
4040- type = with types; listOf package;
4141- default = with pkgs; [
4242- westonLite xwayland rofi
4343- ];
4444- defaultText = literalExample ''
4545- with pkgs; [
4646- westonLite xwayland rofi
4747- ]
4848- '';
4949- example = literalExample "[ ]";
5050- description = ''
5151- Extra packages to be installed system wide.
5252- '';
5353- };
5454-5555- config = mkOption {
5656- type = types.str;
5757- default = ''
5858- [keyboard]
5959- meta-key = Logo
6060-6161- # Sway/i3 like Keybindings
6262- # Maps key combinations with commands to execute
6363- # Commands include:
6464- # - "exit" to stop the compositor
6565- # - "exec" to execute a shell command
6666- # - "close" to close the current view
6767- # - "next_window" to cycle through windows
6868- [bindings]
6969- Logo+Shift+e = exit
7070- Logo+q = close
7171- Logo+m = maximize
7272- Alt+Tab = next_window
7373- Logo+Return = exec weston-terminal
7474- Logo+d = exec rofi -show run
7575- '';
7676- description = ''
7777- Default configuration for rootston (used when called without any
7878- parameters).
7979- '';
8080- };
8181-8282- configFile = mkOption {
8383- type = types.path;
8484- default = "/etc/rootston.ini";
8585- example = literalExample "${pkgs.rootston}/etc/rootston.ini";
8686- description = ''
8787- Path to the default rootston configuration file (the "config" option
8888- will have no effect if you change the path).
8989- '';
9090- };
9191- };
9292-9393- config = mkIf cfg.enable {
9494- environment.etc."rootston.ini".text = cfg.config;
9595- environment.systemPackages = [ rootstonWrapped ] ++ cfg.extraPackages;
9696-9797- hardware.opengl.enable = mkDefault true;
9898- fonts.enableDefaultFonts = mkDefault true;
9999- programs.dconf.enable = mkDefault true;
100100- };
101101-102102- meta.maintainers = with lib.maintainers; [ primeos gnidorah ];
103103-}
-29
nixos/modules/security/wrappers/default.nix
···180180 # programs to be wrapped.
181181 WRAPPER_PATH=${config.system.path}/bin:${config.system.path}/sbin
182182183183- # Remove the old /var/setuid-wrappers path from the system...
184184- #
185185- # TODO: this is only necessary for upgrades 16.09 => 17.x;
186186- # this conditional removal block needs to be removed after
187187- # the release.
188188- if [ -d /var/setuid-wrappers ]; then
189189- rm -rf /var/setuid-wrappers
190190- ln -s /run/wrappers/bin /var/setuid-wrappers
191191- fi
192192-193193- # Remove the old /run/setuid-wrappers-dir path from the
194194- # system as well...
195195- #
196196- # TODO: this is only necessary for upgrades 16.09 => 17.x;
197197- # this conditional removal block needs to be removed after
198198- # the release.
199199- if [ -d /run/setuid-wrapper-dirs ]; then
200200- rm -rf /run/setuid-wrapper-dirs
201201- ln -s /run/wrappers/bin /run/setuid-wrapper-dirs
202202- fi
203203-204204- # TODO: this is only necessary for upgrades 16.09 => 17.x;
205205- # this conditional removal block needs to be removed after
206206- # the release.
207207- if readlink -f /run/booted-system | grep nixos-17 > /dev/null; then
208208- rm -rf /run/setuid-wrapper-dirs
209209- rm -rf /var/setuid-wrappers
210210- fi
211211-212183 # We want to place the tmpdirs for the wrappers to the parent dir.
213184 wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX)
214185 chmod a+rx $wrapperDir
+5-1
nixos/modules/services/mail/dovecot.nix
···311311 { name = "dovenull";
312312 uid = config.ids.uids.dovenull2;
313313 description = "Dovecot user for untrusted logins";
314314- group = cfg.group;
314314+ group = "dovenull";
315315 }
316316 ] ++ optional (cfg.user == "dovecot2")
317317 { name = "dovecot2";
···332332 }
333333 ++ optional (cfg.createMailUser && cfg.mailGroup != null)
334334 { name = cfg.mailGroup;
335335+ }
336336+ ++ singleton
337337+ { name = "dovenull";
338338+ gid = config.ids.gids.dovenull2;
335339 };
336340337341 environment.etc."dovecot/modules".source = modulesDir;
···11-#! @bash@/bin/sh -e
22-33-shopt -s nullglob
44-55-export PATH=/empty
66-for i in @path@; do PATH=$PATH:$i/bin; done
77-88-default=$1
99-if test -z "$1"; then
1010- echo "Syntax: builder.sh <DEFAULT-CONFIG>"
1111- exit 1
1212-fi
1313-1414-echo "updating the boot generations directory..."
1515-1616-mkdir -p /boot/old
1717-1818-# Convert a path to a file in the Nix store such as
1919-# /nix/store/<hash>-<name>/file to <hash>-<name>-<file>.
2020-cleanName() {
2121- local path="$1"
2222- echo "$path" | sed 's|^/nix/store/||' | sed 's|/|-|g'
2323-}
2424-2525-# Copy a file from the Nix store to /boot/kernels.
2626-declare -A filesCopied
2727-2828-copyToKernelsDir() {
2929- local src="$1"
3030- local dst="/boot/old/$(cleanName $src)"
3131- # Don't copy the file if $dst already exists. This means that we
3232- # have to create $dst atomically to prevent partially copied
3333- # kernels or initrd if this script is ever interrupted.
3434- if ! test -e $dst; then
3535- local dstTmp=$dst.tmp.$$
3636- cp $src $dstTmp
3737- mv $dstTmp $dst
3838- fi
3939- filesCopied[$dst]=1
4040- result=$dst
4141-}
4242-4343-copyForced() {
4444- local src="$1"
4545- local dst="$2"
4646- cp $src $dst.tmp
4747- mv $dst.tmp $dst
4848-}
4949-5050-outdir=/boot/old
5151-mkdir -p $outdir || true
5252-5353-# Copy its kernel and initrd to /boot/kernels.
5454-addEntry() {
5555- local path="$1"
5656- local generation="$2"
5757-5858- if ! test -e $path/kernel -a -e $path/initrd; then
5959- return
6060- fi
6161-6262- local kernel=$(readlink -f $path/kernel)
6363- local initrd=$(readlink -f $path/initrd)
6464- local dtb_path=$(readlink -f $path/kernel-modules/dtbs)
6565-6666- if test -n "@copyKernels@"; then
6767- copyToKernelsDir $kernel; kernel=$result
6868- copyToKernelsDir $initrd; initrd=$result
6969- fi
7070-7171- echo $(readlink -f $path) > $outdir/$generation-system
7272- echo $(readlink -f $path/init) > $outdir/$generation-init
7373- cp $path/kernel-params $outdir/$generation-cmdline.txt
7474- echo $initrd > $outdir/$generation-initrd
7575- echo $kernel > $outdir/$generation-kernel
7676-7777- if test $(readlink -f "$path") = "$default"; then
7878- if [ @version@ -eq 1 ]; then
7979- copyForced $kernel /boot/kernel.img
8080- else
8181- copyForced $kernel /boot/kernel7.img
8282- fi
8383- copyForced $initrd /boot/initrd
8484- for dtb in $dtb_path/bcm*.dtb; do
8585- dst="/boot/$(basename $dtb)"
8686- copyForced $dtb "$dst"
8787- filesCopied[$dst]=1
8888- done
8989- cp "$(readlink -f "$path/init")" /boot/nixos-init
9090- echo "`cat $path/kernel-params` init=$path/init" >/boot/cmdline.txt
9191-9292- echo "$2" > /boot/defaultgeneration
9393- fi
9494-}
9595-9696-# Add all generations of the system profile to the menu, in reverse
9797-# (most recent to least recent) order.
9898-for generation in $(
9999- (cd /nix/var/nix/profiles && ls -d system-*-link) \
100100- | sed 's/system-\([0-9]\+\)-link/\1/' \
101101- | sort -n -r); do
102102- link=/nix/var/nix/profiles/system-$generation-link
103103- addEntry $link $generation
104104-done
105105-106106-# Add the firmware files
107107-fwdir=@firmware@/share/raspberrypi/boot/
108108-copyForced $fwdir/bootcode.bin /boot/bootcode.bin
109109-copyForced $fwdir/fixup.dat /boot/fixup.dat
110110-copyForced $fwdir/fixup_cd.dat /boot/fixup_cd.dat
111111-copyForced $fwdir/fixup_db.dat /boot/fixup_db.dat
112112-copyForced $fwdir/fixup_x.dat /boot/fixup_x.dat
113113-copyForced $fwdir/start.elf /boot/start.elf
114114-copyForced $fwdir/start_cd.elf /boot/start_cd.elf
115115-copyForced $fwdir/start_db.elf /boot/start_db.elf
116116-copyForced $fwdir/start_x.elf /boot/start_x.elf
117117-118118-# Add the config.txt
119119-copyForced @configTxt@ /boot/config.txt
120120-121121-# Remove obsolete files from /boot and /boot/old.
122122-for fn in /boot/old/*linux* /boot/old/*initrd-initrd* /boot/bcm*.dtb; do
123123- if ! test "${filesCopied[$fn]}" = 1; then
124124- rm -vf -- "$fn"
125125- fi
126126-done
···11+#! @bash@/bin/sh -e
22+33+shopt -s nullglob
44+55+export PATH=/empty
66+for i in @path@; do PATH=$PATH:$i/bin; done
77+88+usage() {
99+ echo "usage: $0 -c <path-to-default-configuration> [-d <boot-dir>]" >&2
1010+ exit 1
1111+}
1212+1313+default= # Default configuration
1414+target=/boot # Target directory
1515+1616+while getopts "c:d:" opt; do
1717+ case "$opt" in
1818+ c) default="$OPTARG" ;;
1919+ d) target="$OPTARG" ;;
2020+ \?) usage ;;
2121+ esac
2222+done
2323+2424+echo "updating the boot generations directory..."
2525+2626+mkdir -p $target/old
2727+2828+# Convert a path to a file in the Nix store such as
2929+# /nix/store/<hash>-<name>/file to <hash>-<name>-<file>.
3030+cleanName() {
3131+ local path="$1"
3232+ echo "$path" | sed 's|^/nix/store/||' | sed 's|/|-|g'
3333+}
3434+3535+# Copy a file from the Nix store to $target/kernels.
3636+declare -A filesCopied
3737+3838+copyToKernelsDir() {
3939+ local src="$1"
4040+ local dst="$target/old/$(cleanName $src)"
4141+ # Don't copy the file if $dst already exists. This means that we
4242+ # have to create $dst atomically to prevent partially copied
4343+ # kernels or initrd if this script is ever interrupted.
4444+ if ! test -e $dst; then
4545+ local dstTmp=$dst.tmp.$$
4646+ cp $src $dstTmp
4747+ mv $dstTmp $dst
4848+ fi
4949+ filesCopied[$dst]=1
5050+ result=$dst
5151+}
5252+5353+copyForced() {
5454+ local src="$1"
5555+ local dst="$2"
5656+ cp $src $dst.tmp
5757+ mv $dst.tmp $dst
5858+}
5959+6060+outdir=$target/old
6161+mkdir -p $outdir || true
6262+6363+# Copy its kernel and initrd to $target/old.
6464+addEntry() {
6565+ local path="$1"
6666+ local generation="$2"
6767+6868+ if ! test -e $path/kernel -a -e $path/initrd; then
6969+ return
7070+ fi
7171+7272+ local kernel=$(readlink -f $path/kernel)
7373+ local initrd=$(readlink -f $path/initrd)
7474+ local dtb_path=$(readlink -f $path/kernel-modules/dtbs)
7575+7676+ if test -n "@copyKernels@"; then
7777+ copyToKernelsDir $kernel; kernel=$result
7878+ copyToKernelsDir $initrd; initrd=$result
7979+ fi
8080+8181+ echo $(readlink -f $path) > $outdir/$generation-system
8282+ echo $(readlink -f $path/init) > $outdir/$generation-init
8383+ cp $path/kernel-params $outdir/$generation-cmdline.txt
8484+ echo $initrd > $outdir/$generation-initrd
8585+ echo $kernel > $outdir/$generation-kernel
8686+8787+ if test "$generation" = "default"; then
8888+ copyForced $kernel $target/kernel.img
8989+ copyForced $initrd $target/initrd
9090+ for dtb in $dtb_path/{broadcom,}/bcm*.dtb; do
9191+ dst="$target/$(basename $dtb)"
9292+ copyForced $dtb "$dst"
9393+ filesCopied[$dst]=1
9494+ done
9595+ cp "$(readlink -f "$path/init")" $target/nixos-init
9696+ echo "`cat $path/kernel-params` init=$path/init" >$target/cmdline.txt
9797+ fi
9898+}
9999+100100+addEntry $default default
101101+102102+# Add all generations of the system profile to the menu, in reverse
103103+# (most recent to least recent) order.
104104+for generation in $(
105105+ (cd /nix/var/nix/profiles && ls -d system-*-link) \
106106+ | sed 's/system-\([0-9]\+\)-link/\1/' \
107107+ | sort -n -r); do
108108+ link=/nix/var/nix/profiles/system-$generation-link
109109+ addEntry $link $generation
110110+done
111111+112112+# Add the firmware files
113113+fwdir=@firmware@/share/raspberrypi/boot/
114114+copyForced $fwdir/bootcode.bin $target/bootcode.bin
115115+copyForced $fwdir/fixup.dat $target/fixup.dat
116116+copyForced $fwdir/fixup_cd.dat $target/fixup_cd.dat
117117+copyForced $fwdir/fixup_db.dat $target/fixup_db.dat
118118+copyForced $fwdir/fixup_x.dat $target/fixup_x.dat
119119+copyForced $fwdir/start.elf $target/start.elf
120120+copyForced $fwdir/start_cd.elf $target/start_cd.elf
121121+copyForced $fwdir/start_db.elf $target/start_db.elf
122122+copyForced $fwdir/start_x.elf $target/start_x.elf
123123+124124+# Add the config.txt
125125+copyForced @configTxt@ $target/config.txt
126126+127127+# Remove obsolete files from $target and $target/old.
128128+for fn in $target/old/*linux* $target/old/*initrd-initrd* $target/bcm*.dtb; do
129129+ if ! test "${filesCopied[$fn]}" = 1; then
130130+ rm -vf -- "$fn"
131131+ fi
132132+done
···11-channel="stable" # stable/candidate/edge
11+#!/usr/bin/env nix-shell
22+#! nix-shell -i bash -p curl jq git gnused gnugrep
33+44+55+# executing this script without arguments will
66+# - find the newest stable spotify version avaiable on snapcraft (https://snapcraft.io/spotify)
77+# - read the current spotify version from the current nix expression
88+# - update the nix expression if the versions differ
99+# - try to build the updated version, exit if that fails
1010+# - give instructions for upstreaming
1111+1212+# Please test the update manually before pushing. There have been errors before
1313+# and because the service is proprietary and a paid account is necessary to do
1414+# anything with spotify automatic testing is not possible.
1515+1616+# As an optional argument you can specify the snapcraft channel to update to.
1717+# Default is `stable` and only stable updates should be pushed to nixpkgs. For
1818+# testing you may specify `candidate` or `edge`.
1919+2020+2121+channel="${1:-stable}" # stable/candidate/edge
222nixpkgs="$(git rev-parse --show-toplevel)"
323spotify_nix="$nixpkgs/pkgs/applications/audio/spotify/default.nix"
4245252626+#
2727+# find the newest stable spotify version avaiable on snapcraft
2828+#
629730# create bash array from snap info
831snap_info=($(
···1235 '.revision,.download_sha512,.version,.last_updated'
1336))
14373838+# "revision" is the actual version identifier on snapcraft, the "version" is
3939+# just for human consumption. Revision is just an integer that gets increased
4040+# by one every (stable or unstable) release.
1541revision="${snap_info[0]}"
1642sha512="${snap_info[1]}"
1717-version="${snap_info[2]}"
4343+upstream_version="${snap_info[2]}"
1844last_updated="${snap_info[3]}"
19452020-# find the last commited version
2121-version_pre=$(
2222- git grep 'version\s*=' HEAD "$spotify_nix" \
4646+echo "Latest $channel release is $upstream_version from $last_updated."
4747+4848+#
4949+# read the current spotify version from the currently *committed* nix expression
5050+#
5151+5252+current_nix_version=$(
5353+ grep 'version\s*=' "$spotify_nix" \
2354 | sed -Ene 's/.*"(.*)".*/\1/p'
2455)
25562626-if [[ "$version_pre" = "$version" ]]; then
5757+echo "Current nix version: $current_nix_version"
5858+5959+#
6060+# update the nix expression if the versions differ
6161+#
6262+6363+if [[ "$current_nix_version" = "$upstream_version" ]]; then
2764 echo "Spotify is already up ot date"
2865 exit 0
2966fi
30673131-echo "Updating from ${version_pre} to ${version}, released on ${last_updated}"
6868+echo "Updating from ${current_nix_version} to ${upstream_version}, released on ${last_updated}"
32693333-# search-andreplace revision, hash and version
7070+# search-and-replace revision, hash and version
3471sed --regexp-extended \
3572 -e 's/rev\s*=\s*"[0-9]+"\s*;/rev = "'"${revision}"'";/' \
3636- -e 's/sha512\s*=\s*".{128}"\s*;/sha512 = "'"${sha512}"'";/' \
3737- -e 's/version\s*=\s*".*"\s*;/version = "'"${version}"'";/' \
7373+ -e 's/sha512\s*=\s*"[^"]*"\s*;/sha512 = "'"${sha512}"'";/' \
7474+ -e 's/version\s*=\s*".*"\s*;/version = "'"${upstream_version}"'";/' \
3875 -i "$spotify_nix"
39767777+#
7878+# try to build the updated version
7979+#
8080+4081if ! nix-build -A spotify "$nixpkgs"; then
4182 echo "The updated spotify failed to build."
4283 exit 1
4384fi
44858686+#
8787+# give instructions for upstreaming
8888+#
8989+4590git add "$spotify_nix"
4646-# show diff for review
4747-git diff HEAD
4848-# prepare commit message, but allow edit
4949-git commit --edit --message "spotify: $version_pre -> $version"
9191+# show changes for review
9292+git status
9393+echo 'Please review and test the changes (./result/bin/spotify).'
9494+echo 'Then stage the changes with `git add` and commit with:'
9595+# prepare commit message
9696+echo "git commit -m 'spotify: $current_nix_version -> $upstream_version'"
+2-2
pkgs/applications/audio/whipper/default.nix
···66 version = "0.7.0";
7788 src = fetchFromGitHub {
99- owner = "JoeLametta";
99+ owner = "whipper-team";
1010 repo = "whipper";
1111 rev = "v${version}";
1212 sha256 = "04m8s0s9dcnly9l6id8vv99n9kbjrjid79bss52ay9yvwng0frmj";
···3939 '';
40404141 meta = with stdenv.lib; {
4242- homepage = https://github.com/JoeLametta/whipper;
4242+ homepage = https://github.com/whipper-team/whipper;
4343 description = "A CD ripper aiming for accuracy over speed";
4444 maintainers = with maintainers; [ rycee jgeerds ];
4545 license = licenses.gpl3Plus;
···11+commit f1c59929c3c180ac283334c2b3c901ac8c82f6b1
22+Author: Timo Kaufmann <timokau@zoho.com>
33+Date: Sat Oct 20 20:07:41 2018 +0200
44+55+ Revert "Something related to the sphinxbuild seems to be leaking memory"
66+77+ This reverts commit 7d85dc796c58c3de57401bc22d3587b94e205091.
88+99+diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py
1010+index 0b24b1a60b..084c3f89d7 100644
1111+--- a/src/sage_setup/docbuild/__init__.py
1212++++ b/src/sage_setup/docbuild/__init__.py
1313+@@ -265,29 +265,35 @@ class DocBuilder(object):
1414+ # import the customized builder for object.inv files
1515+ inventory = builder_helper('inventory')
1616+1717+-def build_many(target, args):
1818+- # Pool() uses an actual fork() to run each new instance. This is important
1919+- # for performance reasons, i.e., don't use a forkserver when it becomes
2020+- # available with Python 3: Here, sage is already initialized which is quite
2121+- # costly, with a forkserver we would have to reinitialize it for every
2222+- # document we build. At the same time, don't serialize this by taking the
2323+- # pool (and thus the call to fork()) out completely: The call to Sphinx
2424+- # leaks memory, so we need to build each document in its own process to
2525+- # control the RAM usage.
2626+- from multiprocessing import Pool
2727+- pool = Pool(NUM_THREADS, maxtasksperchild=1)
2828+- # map_async handles KeyboardInterrupt correctly. Plain map and
2929+- # apply_async does not, so don't use it.
3030+- x = pool.map_async(target, args, 1)
3131+- try:
3232+- ret = x.get(99999)
3333+- pool.close()
3434+- pool.join()
3535+- except Exception:
3636+- pool.terminate()
3737+- if ABORT_ON_ERROR:
3838+- raise
3939+- return ret
4040++if NUM_THREADS > 1:
4141++ def build_many(target, args):
4242++ from multiprocessing import Pool
4343++ pool = Pool(NUM_THREADS, maxtasksperchild=1)
4444++ # map_async handles KeyboardInterrupt correctly. Plain map and
4545++ # apply_async does not, so don't use it.
4646++ x = pool.map_async(target, args, 1)
4747++ try:
4848++ ret = x.get(99999)
4949++ pool.close()
5050++ pool.join()
5151++ except Exception:
5252++ pool.terminate()
5353++ if ABORT_ON_ERROR:
5454++ raise
5555++ return ret
5656++else:
5757++ def build_many(target, args):
5858++ results = []
5959++
6060++ for arg in args:
6161++ try:
6262++ results.append(target(arg))
6363++ except Exception:
6464++ if ABORT_ON_ERROR:
6565++ raise
6666++
6767++ return results
6868++
6969+7070+ ##########################################
7171+ # Parallel Building Ref Manual #
+10
pkgs/applications/science/math/sage/sage-src.nix
···2727 # https://trac.sagemath.org/ticket/25316
2828 # https://github.com/python/cpython/pull/7476
2929 ./patches/python-5755-hotpatch.patch
3030+3131+ # Revert the commit that made the sphinx build fork even in the single thread
3232+ # case. For some yet unknown reason, that breaks the docbuild on nix and archlinux.
3333+ # See https://groups.google.com/forum/#!msg/sage-packaging/VU4h8IWGFLA/mrmCMocYBwAJ.
3434+ ./patches/revert-sphinx-always-fork.patch
3535+3636+ # Make sure py2/py3 tests are only run when their expected context (all "sage"
3737+ # tests) are also run. That is necessary to test dochtml individually. See
3838+ # https://trac.sagemath.org/ticket/26110 for an upstream discussion.
3939+ ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
3040 ];
31413242 packageUpgradePatches = [
···2233stdenv.mkDerivation rec {
44 name = "clipgrab-${version}";
55- version = "3.7.0";
55+ version = "3.7.1";
6677 src = fetchurl {
88- sha256 = "0rx12218yy6h27z3xsmmxfsw8ldlsf4y862adkz6ybrygppsaib4";
88+ sha256 = "0bhzkmcinlsfp5ldgqp59xnkaz6ikzdnq78drcdf1w7q4z05ipxd";
99 # The .tar.bz2 "Download" link is a binary blob, the source is the .tar.gz!
1010 url = "https://download.clipgrab.org/${name}.tar.gz";
1111 };
···1515 meta = with stdenv.lib; {
1616 description = "A forked version of log4cpp that has been created for the Shibboleth project";
1717 maintainers = [ maintainers.jammerful ];
1818+ license = licenses.lgpl21;
1919+ homepage = http://log4cpp.sf.net;
1820 };
1921}
+3-2
pkgs/development/libraries/loudmouth/default.nix
···18181919 nativeBuildInputs = [ pkgconfig ];
20202121- meta = {
2121+ meta = with stdenv.lib; {
2222 description = "A lightweight C library for the Jabber protocol";
2323- platforms = stdenv.lib.platforms.linux;
2323+ platforms = platforms.linux;
2424 downloadPage = "http://mcabber.com/files/loudmouth/";
2525 downloadURLRegexp = "loudmouth-[0-9.]+[.]tar[.]bz2$";
2626 updateWalker = true;
2727+ license = licenses.lgpl21;
2728 };
2829}
+1
pkgs/development/libraries/martyr/default.nix
···2020 meta = {
2121 description = "Martyr is a Java framework around the IRC protocol to allow application writers easy manipulation of the protocol and client state";
2222 homepage = http://martyr.sourceforge.net/;
2323+ license = stdenv.lib.licenses.lgpl21;
2324 };
2425}
+3-2
pkgs/development/libraries/mdds/0.12.1.nix
···99 sha256 = "0gg8mb9kxh3wggh7njj1gf90xy27p0yq2cw88wqar9hhg2fmwmi3";
1010 };
11111212- meta = {
1212+ meta = with stdenv.lib; {
1313 homepage = https://gitlab.com/mdds/mdds;
1414 description = "A collection of multi-dimensional data structure and indexing algorithm";
1515- platforms = stdenv.lib.platforms.all;
1515+ platforms = platforms.all;
1616+ license = licenses.mit;
1617 };
1718}
+3-2
pkgs/development/libraries/mdds/0.7.1.nix
···99 sha256 = "0zhrx7m04pknc8i2cialmbna1hmwa0fzs8qphan4rdxibf0c4yzy";
1010 };
11111212- meta = {
1212+ meta = with stdenv.lib; {
1313 homepage = https://gitlab.com/mdds/mdds/;
1414 description = "A collection of multi-dimensional data structure and indexing algorithm";
1515- platforms = stdenv.lib.platforms.all;
1515+ platforms = platforms.all;
1616+ license = licenses.mit;
1617 };
1718}
+3-2
pkgs/development/libraries/mdds/default.nix
···16161717 checkInputs = [ boost ];
18181919- meta = {
1919+ meta = with stdenv.lib; {
2020 inherit version;
2121 homepage = https://gitlab.com/mdds/mdds;
2222 description = "A collection of multi-dimensional data structure and indexing algorithm";
2323- platforms = stdenv.lib.platforms.all;
2323+ platforms = platforms.all;
2424+ license = licenses.mit;
2425 };
2526}
···11111212buildPythonPackage rec {
1313 pname = "cypari2";
1414- version = "1.2.1";
1414+ # upgrade may break sage, please test the sage build or ping @timokau on upgrade
1515+ version = "1.3.1";
15161617 src = fetchPypi {
1718 inherit pname version;
1818- sha256 = "0v2kikwf0advq8j76nwzhlacwj1yys9cvajm4fqgmasjdsnf1q4k";
1919+ sha256 = "04f00xp8aaz37v00iqg1mv5wjq00a5qhk8cqa93s13009s9x984r";
1920 };
20212122 # This differs slightly from the default python installPhase in that it pip-installs
+2-2
pkgs/development/python-modules/d2to1/default.nix
···55}:
66buildPythonPackage rec {
77 pname = "d2to1";
88- version = "0.2.12";
88+ version = "0.2.12.post1";
991010 checkInputs = [ nose ];
1111···1313 owner = "embray";
1414 repo = pname;
1515 rev = version;
1616- sha256 = "1q04ab8vjvx7fmq9ckkl8r9hlwwbqiyjbzaa4v1mv5zicfssxwsi";
1616+ sha256 = "1hzq51qbzsc27yy8swp08kf42mamag7qcabbrigzj4m6ivb5chi2";
1717 };
18181919 meta = with lib;{
···44 inherit (vscode-utils) buildVscodeMarketplaceExtension;
55in
66#
77-# Unless there is a good reason not to, we attemp to use the same name as the
77+# Unless there is a good reason not to, we attempt to use the same name as the
88# extension's unique identifier (the name the extension gets when installed
99# from vscode under `~/.vscode`) and found on the marketplace extension page.
1010-# So an extension's attribute name should be of the form:
1010+# So an extension's attribute name should be of the form:
1111# "${mktplcRef.publisher}.${mktplcRef.name}".
1212#
1313rec {
···2424 };
25252626 ms-vscode.cpptools = callPackage ./cpptools {};
2727-2727+2828 ms-python.python = callPackage ./python {};
2929-}2929+}
···3737 sed -e "s@/etc/@$out/etc/@g" -e "/chmod u+s/d" -i Makefile
3838 '';
39394040+ # We need to set the directory for the .local override files back to
4141+ # /etc/firejail so we can actually override them
4242+ postInstall = ''
4343+ sed -E -e 's@^include (.*)(/firejail/.*.local)$@include /etc\2@g' -i $out/etc/firejail/*.profile
4444+ '';
4545+4646+ enableParallelBuilding = true;
4747+4048 meta = {
4149 inherit (s) version;
4250 description = ''Namespace-based sandboxing tool for Linux'';
+52-6
pkgs/os-specific/linux/kernel-headers/default.nix
···11{ stdenvNoCC, lib, buildPackages
22-, fetchurl, perl
22+, fetchurl, fetchpatch, perl
33+, elf-header
34}:
4556let
66- common = { version, sha256, patches ? [] }: stdenvNoCC.mkDerivation {
77+ common = { version, sha256, patches ? [] }: stdenvNoCC.mkDerivation ({
78 name = "linux-headers-${version}";
89910 src = fetchurl {
···1617 # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.
1718 # We do this so we have a build->build, not build->host, C compiler.
1819 depsBuildBuild = [ buildPackages.stdenv.cc ];
1919- nativeBuildInputs = [ perl ];
2020+ # TODO make unconditional next mass rebuild
2121+ nativeBuildInputs = [ perl ] ++ lib.optional
2222+ (stdenvNoCC.hostPlatform != stdenvNoCC.buildPlatform)
2323+ elf-header;
20242125 extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
22262727+ # "patches" array defaults to 'null' to avoid changing hash
2828+ # and causing mass rebuild
2329 inherit patches;
24302525- buildPhase = ''
3131+ # TODO avoid native hack next rebuild
3232+ makeFlags = if stdenvNoCC.hostPlatform == stdenvNoCC.buildPlatform then null else [
3333+ "SHELL=bash"
3434+ # Avoid use of runtime build->host compilers for checks. These
3535+ # checks only cared to work around bugs in very old compilers, so
3636+ # these changes should be safe.
3737+ "cc-version:=9999"
3838+ "cc-fullversion:=999999"
3939+ # `$(..)` expanded by make alone
4040+ "HOSTCC:=$(BUILD_CC)"
4141+ "HOSTCXX:=$(BUILD_CXX)"
4242+ ];
4343+4444+ # TODO avoid native hack next rebuild
4545+ # Skip clean on darwin, case-sensitivity issues.
4646+ buildPhase = if stdenvNoCC.hostPlatform == stdenvNoCC.buildPlatform then ''
2647 make mrproper headers_check SHELL=bash
4848+ '' else lib.optionalString (!stdenvNoCC.buildPlatform.isDarwin) ''
4949+ make mrproper $makeFlags
5050+ ''
5151+ # For some reason, doing `make install_headers` twice, first without
5252+ # INSTALL_HDR_PATH=$out then with, is neccessary to get this to work
5353+ # for darwin cross. @Ericson2314 has no idea why.
5454+ + ''
5555+ make headers_install $makeFlags
2756 '';
28572929- installPhase = ''
5858+ # TODO avoid native hack next rebuild
5959+ checkPhase = if stdenvNoCC.hostPlatform == stdenvNoCC.buildPlatform then null else ''
6060+ make headers_check $makeFlags
6161+ '';
6262+6363+ # TODO avoid native hack next rebuild
6464+ installPhase = (if stdenvNoCC.hostPlatform == stdenvNoCC.buildPlatform then ''
3065 make INSTALL_HDR_PATH=$out headers_install
6666+ '' else ''
6767+ make headers_install INSTALL_HDR_PATH=$out $makeFlags
6868+ '') + ''
31693270 # Some builds (e.g. KVM) want a kernel.release.
3371 mkdir -p $out/include/config
···3977 license = licenses.gpl2;
4078 platforms = platforms.linux;
4179 };
4242- };
8080+ } // lib.optionalAttrs (stdenvNoCC.hostPlatform != stdenvNoCC.buildPlatform) {
8181+ # TODO Make unconditional next mass rebuild
8282+ hardeningDisable = lib.optional stdenvNoCC.buildPlatform.isDarwin "format";
8383+ });
4384in {
44854586 linuxHeaders = common {
4687 version = "4.18.3";
4788 sha256 = "1m23hjd02bg8mqnd8dc4z4m3kxds1cyrc6j5saiwnhzbz373rvc1";
8989+ # TODO make unconditional next mass rebuild
9090+ patches = lib.optionals (stdenvNoCC.hostPlatform != stdenvNoCC.buildPlatform) [
9191+ ./no-relocs.patch # for building x86 kernel headers on non-ELF platforms
9292+ ./no-dynamic-cc-version-check.patch # so we can use `stdenvNoCC`, see `makeFlags` above
9393+ ];
4894 };
4995}
···3737 # Now we need to patch up the executables and libraries to work on Nix.
3838 # Side note: PLEASE don't put spaces in your binary names. This is stupid.
3939 for bin in "Plex Media Server" \
4040+ "Plex Commercial Skipper" \
4041 "Plex DLNA Server" \
4142 "Plex Media Scanner" \
4243 "Plex Relay" \
···11-/*
22-33-Systeemvereisten
44-55-* libz >= 1.1.4
66-* glib >= 2.2.0
77-* gtk >= 2.2.0
88-99-Glib 2 is een 'dependency' van gtk2. Als je gtk2 op je systeem hebt staan dan heb je ongetwijfeld ook glib2 op je systeem. Zie: www.gtk.org voor meer informatie omtrent Glib/gtk2
1010-Alhoewel FTD4Linux gtk 2.2 als minimumvereiste heeft raden we toch aan om gtk 2.4 te gebruiken. Dit vanwege een bug in gtk versies 2.2.2 t/m 2.2.4.
1111-1212-* libxml2 >= 2.2.5
1313-* libxslt >= 1.0.5
1414-1515-* mozilla (gecompileerd met gtk2 support)
1616-Mozilla is de opensource browser die is voortgekomen uit het vrijgeven van de netscape navigator source code. Als je mozilla reeds op je systeem hebt staan zou je even moeten nagaan of deze tegen gtk2 is gelinkt. Dit kun je doen met behulp van het programma ldd.
1717-ldd /usr/X11R6/lib/mozilla-gtk2/libgtkembedmoz.so | grep gtk
1818-/usr/X11R6/lib/mozilla-gtk2/libgtkembedmoz.so:
1919-libgtk-x11-2.0.so.200 => /usr/X11R6/lib/libgtk-x11-2.0.so.200 (0x282c3000)
2020-In de output van het ldd programma kun je zien of er inderdaad wordt gelink tegen gtk2. (libgtk-x11-2.0.so.200).
2121-Heb je geen mozilla, maar heb je wel de firebird/firefox variant geinstalleerd staan dan kun je ook met de mozilla compatible onderdelen van firebird/firefox aan de gang. Je hebt hier echter wel de header (development) bestanden bij nodig. Controleer dus even of jouw firebird/firefox installatie hiermee is geleverd. (gtkembedmoz/gtkmozembed.h) Een 'locate gtkmozembed.h' zou hier snel genoeg uitsluitsel over moeten geven.
2222-2323-* OpenSSL
2424-* LibCURL
2525-2626-*/
2727-2828-{ stdenv, fetchurl
2929-, zlib, libxml2, libxslt, firefox, openssl, curl
3030-, glib, gtk, libgnomeui, libgtkhtml
3131-, pkgconfig, dbus-glib, realCurl, pcre, libsexy, gtkspell, libnotify
3232-}:
3333-3434-stdenv.mkDerivation {
3535- name = "openftd-0.98.6";
3636- #builder = ./builder.sh;
3737-3838- src = fetchurl {
3939- url = http://speeldoos.eweka.nl/~paul/openftd/openftd-1.0.1.tar.bz2;
4040- sha256 = "e0710865f852fdf209949788a1ced65e9ecf82b4eaa0992a7a1dde1511a3b6e7";
4141- };
4242-4343- buildInputs = [
4444- zlib libxml2 libxslt firefox openssl curl
4545- glib gtk pkgconfig dbus-glib realCurl pcre libsexy libgnomeui gtkspell libnotify libgtkhtml
4646- ];
4747-4848- configureFlags="--with-libcurl-libraries=${curl.out}/lib --with-libcurl-headers=${curl.dev}/include --with-pcre_libraries=${pcre.out}/lib --with-pcre_headers=${pcre.dev}/include";
4949-}
···11diff --git a/libinput-gestures b/libinput-gestures
22-index f337ba3..5f5b05d 100755
22+index aca94ac..c2f03ca 100755
33--- a/libinput-gestures
44+++ b/libinput-gestures
55-@@ -75,17 +75,13 @@ def get_libinput_vers():
55+@@ -77,7 +77,7 @@ def get_libinput_vers():
66 'Return the libinput installed version number string'
77 # Try to use newer libinput interface then fall back to old
88 # (depreciated) interface.
99- res = run(('libinput', '--version'), check=False)
1010+ res = run(('@libinput@', '--version'), check=False)
1111- return res.strip() if res else run(('libinput-list-devices', '--version'))
1111+ return res.strip() if res else \
1212+ run(('libinput-list-devices', '--version'), check=False)
1313+1414+@@ -87,8 +87,8 @@ if not libvers:
1515+ sys.exit('libinput helper tools do not seem to be installed?')
12161313- # Libinput changed the way in which it's utilities are called
1414- libvers = get_libinput_vers()
1515--if Version(libvers) >= Version('1.8'):
1717+ if Version(libvers) >= Version('1.8'):
1618- cmd_debug_events = 'libinput debug-events'
1719- cmd_list_devices = 'libinput list-devices'
1818--else:
1919-- cmd_debug_events = 'libinput-debug-events'
2020-- cmd_list_devices = 'libinput-list-devices'
2121-+cmd_debug_events = '@libinput@ debug-events'
2222-+cmd_list_devices = '@libinput@ list-devices'
2323-2424- def get_devices_list():
2525- 'Get list of devices and their attributes (as a dict) from libinput'
2626-@@ -187,7 +183,7 @@ class COMMAND_internal(COMMAND):
2020++ cmd_debug_events = '@libinput@ debug-events'
2121++ cmd_list_devices = '@libinput@ list-devices'
2222+ else:
2323+ cmd_debug_events = 'libinput-debug-events'
2424+ cmd_list_devices = 'libinput-list-devices'
2525+@@ -199,7 +199,7 @@ class COMMAND_internal(COMMAND):
27262827 def run(self):
2928 'Get list of current workspaces and select next one'
···3231 if not stdout:
3332 # This command can fail on GNOME when you have only a single
3433 # dynamic workspace using Xorg (probably a GNOME bug) so let's
3535-@@ -220,7 +216,7 @@ class COMMAND_internal(COMMAND):
3434+@@ -233,7 +233,7 @@ class COMMAND_internal(COMMAND):
36353736 # Switch to desired workspace
3837 if index >= minindex and index < maxindex:
···41404241 # Table of gesture handlers
4342 handlers = OrderedDict()
4343+--
4444+2.19.1
4545+
···22*/
3344{ # The platforms *from* which we cross compile.
55- supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
55+ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ]
66, # Strip most of attributes when evaluating to spare memory usage
77 scrubJobs ? true
88}:
···1010with import ./release-lib.nix { inherit supportedSystems scrubJobs; };
11111212let
1313- nativePlatforms = linux;
1313+ nativePlatforms = all;
14141515 common = {
1616 buildPackages.binutils = nativePlatforms;
+14-1
pkgs/top-level/stage.nix
···5656, # A list of overlays (Additional `self: super: { .. }` customization
5757 # functions) to be fixed together in the produced package set
5858 overlays
5959-}:
5959+} @args:
60606161let
6262 stdenvAdapters = self: super:
···159159 };
160160 };
161161 };
162162+163163+ # Extend the package set with zero or more overlays. This preserves
164164+ # preexisting overlays. Prefer to initialize with the right overlays
165165+ # in one go when calling Nixpkgs, for performance and simplicity.
166166+ appendOverlays = extraOverlays:
167167+ import ./stage.nix (args // { overlays = args.overlays ++ extraOverlays; });
168168+169169+ # Extend the package set with a single overlay. This preserves
170170+ # preexisting overlays. Prefer to initialize with the right overlays
171171+ # in one go when calling Nixpkgs, for performance and simplicity.
172172+ # Prefer appendOverlays if used repeatedly.
173173+ extend = f: self.appendOverlays [f];
174174+162175 };
163176164177 # The complete chain of package set builders, applied from top to bottom.