···67 <para>
8 Sometimes one wants to override parts of <literal>nixpkgs</literal>, e.g.
9- derivation attributes, the results of derivations or even the whole package
10- set.
00000011 </para>
1213 <section xml:id="sec-pkg-override">
···25 <para>
26 Example usages:
27<programlisting>pkgs.foo.override { arg1 = val1; arg2 = val2; ... }</programlisting>
00028<programlisting>
29import pkgs.path { overlays = [ (self: super: {
30 foo = super.foo.override { barSupport = true ; };
···86 in this case, as it overrides only the attributes of the final derivation.
87 It is for this reason that <varname>overrideAttrs</varname> should be
88 preferred in (almost) all cases to <varname>overrideDerivation</varname>,
89- i.e. to allow using <varname>sdenv.mkDerivation</varname> to process input
90 arguments, as well as the fact that it is easier to use (you can use the
91 same attribute names you see in your Nix code, instead of the ones
92 generated (e.g. <varname>buildInputs</varname> vs
93- <varname>nativeBuildInputs</varname>, and involves less typing.
94 </para>
95 </note>
96 </section>
···67 <para>
8 Sometimes one wants to override parts of <literal>nixpkgs</literal>, e.g.
9+ derivation attributes, the results of derivations.
10+ </para>
11+12+ <para>
13+ These functions are used to make changes to packages, returning only single
14+ packages. <link xlink:href="#chap-overlays">Overlays</link>, on the other
15+ hand, can be used to combine the overridden packages across the entire
16+ package set of Nixpkgs.
17 </para>
1819 <section xml:id="sec-pkg-override">
···31 <para>
32 Example usages:
33<programlisting>pkgs.foo.override { arg1 = val1; arg2 = val2; ... }</programlisting>
34+<!-- TODO: move below programlisting to a new section about extending and overlays
35+ and reference it
36+ -->
37<programlisting>
38import pkgs.path { overlays = [ (self: super: {
39 foo = super.foo.override { barSupport = true ; };
···95 in this case, as it overrides only the attributes of the final derivation.
96 It is for this reason that <varname>overrideAttrs</varname> should be
97 preferred in (almost) all cases to <varname>overrideDerivation</varname>,
98+ i.e. to allow using <varname>stdenv.mkDerivation</varname> to process input
99 arguments, as well as the fact that it is easier to use (you can use the
100 same attribute names you see in your Nix code, instead of the ones
101 generated (e.g. <varname>buildInputs</varname> vs
102+ <varname>nativeBuildInputs</varname>), and it involves less typing).
103 </para>
104 </note>
105 </section>
+111-80
doc/overlays.xml
···17 <title>Installing overlays</title>
1819 <para>
20- The list of overlays is determined as follows.
0021 </para>
2223- <para>
24- If the <varname>overlays</varname> argument is not provided explicitly, we
25- look for overlays in a path. The path is determined as follows:
26- <orderedlist>
27- <listitem>
28- <para>
29- First, if an <varname>overlays</varname> argument to the nixpkgs function
30- itself is given, then that is used.
31- </para>
32- <para>
33- This can be passed explicitly when importing nipxkgs, for example
34- <literal>import <nixpkgs> { overlays = [ overlay1 overlay2 ];
35- }</literal>.
36- </para>
37- </listitem>
38- <listitem>
39- <para>
40- Otherwise, if the Nix path entry <literal><nixpkgs-overlays></literal>
41- exists, we look for overlays at that path, as described below.
42- </para>
43- <para>
44- See the section on <literal>NIX_PATH</literal> in the Nix manual for more
45- details on how to set a value for
46- <literal><nixpkgs-overlays>.</literal>
47- </para>
48- </listitem>
49- <listitem>
50- <para>
51- If one of <filename>~/.config/nixpkgs/overlays.nix</filename> and
52- <filename>~/.config/nixpkgs/overlays/</filename> exists, then we look for
53- overlays at that path, as described below. It is an error if both exist.
54- </para>
55- </listitem>
56- </orderedlist>
57- </para>
000000000000000000000000000005859- <para>
60- If we are looking for overlays at a path, then there are two cases:
61- <itemizedlist>
62- <listitem>
63- <para>
64- If the path is a file, then the file is imported as a Nix expression and
65- used as the list of overlays.
66- </para>
67- </listitem>
68- <listitem>
69- <para>
70- If the path is a directory, then we take the content of the directory,
71- order it lexicographically, and attempt to interpret each as an overlay
72- by:
73- <itemizedlist>
74- <listitem>
75- <para>
76- Importing the file, if it is a <literal>.nix</literal> file.
77- </para>
78- </listitem>
79- <listitem>
80- <para>
81- Importing a top-level <filename>default.nix</filename> file, if it is
82- a directory.
83- </para>
84- </listitem>
85- </itemizedlist>
86- </para>
87- </listitem>
88- </itemizedlist>
89- </para>
9091- <para>
92- On a NixOS system the value of the <literal>nixpkgs.overlays</literal>
93- option, if present, is passed to the system Nixpkgs directly as an argument.
94- Note that this does not affect the overlays for non-NixOS operations (e.g.
95- <literal>nix-env</literal>), which are looked up independently.
96- </para>
009798- <para>
99- The <filename>overlays.nix</filename> option therefore provides a convenient
100- way to use the same overlays for a NixOS system configuration and user
101- configuration: the same file can be used as
102- <filename>overlays.nix</filename> and imported as the value of
103- <literal>nixpkgs.overlays</literal>.
104- </para>
105 </section>
106<!--============================================================-->
107 <section xml:id="sec-overlays-definition">
···17 <title>Installing overlays</title>
1819 <para>
20+ The list of overlays can be set either explicitly in a Nix expression, or
21+ through <literal><nixpkgs-overlays></literal> or user configuration
22+ files.
23 </para>
2425+ <section xml:id="sec-overlays-argument">
26+ <title>Set overlays in NixOS or Nix expressions</title>
27+28+ <para>
29+ On a NixOS system the value of the <literal>nixpkgs.overlays</literal>
30+ option, if present, is passed to the system Nixpkgs directly as an
31+ argument. Note that this does not affect the overlays for non-NixOS
32+ operations (e.g. <literal>nix-env</literal>), which are
33+ <link xlink:href="#sec-overlays-lookup">looked</link> up independently.
34+ </para>
35+36+ <para>
37+ The list of overlays can be passed explicitly when importing nixpkgs, for
38+ example <literal>import <nixpkgs> { overlays = [ overlay1 overlay2 ];
39+ }</literal>.
40+ </para>
41+42+ <para>
43+ Further overlays can be added by calling the <literal>pkgs.extend</literal>
44+ or <literal>pkgs.appendOverlays</literal>, although it is often preferable
45+ to avoid these functions, because they recompute the Nixpkgs fixpoint,
46+ which is somewhat expensive to do.
47+ </para>
48+ </section>
49+50+ <section xml:id="sec-overlays-lookup">
51+ <title>Install overlays via configuration lookup</title>
52+53+ <para>
54+ The list of overlays is determined as follows.
55+ </para>
56+57+ <para>
58+ <orderedlist>
59+ <listitem>
60+ <para>
61+ First, if an
62+ <link xlink:href="#sec-overlays-argument"><varname>overlays</varname>
63+ argument</link> to the nixpkgs function itself is given, then that is
64+ used and no path lookup will be performed.
65+ </para>
66+ </listitem>
67+ <listitem>
68+ <para>
69+ Otherwise, if the Nix path entry
70+ <literal><nixpkgs-overlays></literal> exists, we look for overlays at
71+ that path, as described below.
72+ </para>
73+ <para>
74+ See the section on <literal>NIX_PATH</literal> in the Nix manual for
75+ more details on how to set a value for
76+ <literal><nixpkgs-overlays>.</literal>
77+ </para>
78+ </listitem>
79+ <listitem>
80+ <para>
81+ If one of <filename>~/.config/nixpkgs/overlays.nix</filename> and
82+ <filename>~/.config/nixpkgs/overlays/</filename> exists, then we look
83+ for overlays at that path, as described below. It is an error if both
84+ exist.
85+ </para>
86+ </listitem>
87+ </orderedlist>
88+ </para>
8990+ <para>
91+ If we are looking for overlays at a path, then there are two cases:
92+ <itemizedlist>
93+ <listitem>
94+ <para>
95+ If the path is a file, then the file is imported as a Nix expression and
96+ used as the list of overlays.
97+ </para>
98+ </listitem>
99+ <listitem>
100+ <para>
101+ If the path is a directory, then we take the content of the directory,
102+ order it lexicographically, and attempt to interpret each as an overlay
103+ by:
104+ <itemizedlist>
105+ <listitem>
106+ <para>
107+ Importing the file, if it is a <literal>.nix</literal> file.
108+ </para>
109+ </listitem>
110+ <listitem>
111+ <para>
112+ Importing a top-level <filename>default.nix</filename> file, if it is
113+ a directory.
114+ </para>
115+ </listitem>
116+ </itemizedlist>
117+ </para>
118+ </listitem>
119+ </itemizedlist>
120+ </para>
121122+ <para>
123+ Because overlays that are set in NixOS configuration do not affect
124+ non-NixOS operations such as <literal>nix-env</literal>, the
125+ <filename>overlays.nix</filename> option provides a convenient way to use
126+ the same overlays for a NixOS system configuration and user configuration:
127+ the same file can be used as <filename>overlays.nix</filename> and imported
128+ as the value of <literal>nixpkgs.overlays</literal>.
129+ </para>
130131+<!-- TODO: Example of sharing overlays between NixOS configuration
132+ and configuration lookup. Also reference the example
133+ from the sec-overlays-argument paragraph about NixOS.
134+ -->
135+ </section>
00136 </section>
137<!--============================================================-->
138 <section xml:id="sec-overlays-definition">
+4-4
doc/package-notes.xml
···681 </para>
682683 <para>
684- The python plugin allows the addition of extra libraries. For instance, the
685- <literal>inotify.py</literal> script in weechat-scripts requires D-Bus or
686- libnotify, and the <literal>fish.py</literal> script requires pycrypto. To
687- use these scripts, use the <literal>python</literal> plugin's
688 <literal>withPackages</literal> attribute:
689<programlisting>weechat.override { configure = {availablePlugins, ...}: {
690 plugins = with availablePlugins; [
···681 </para>
682683 <para>
684+ The python and perl plugins allows the addition of extra libraries. For
685+ instance, the <literal>inotify.py</literal> script in weechat-scripts
686+ requires D-Bus or libnotify, and the <literal>fish.py</literal> script
687+ requires pycrypto. To use these scripts, use the plugin's
688 <literal>withPackages</literal> attribute:
689<programlisting>weechat.override { configure = {availablePlugins, ...}: {
690 plugins = with availablePlugins; [
···130 were removed. They were never used for anything and can therefore safely be removed.
131 </para>
132 </listitem>
0000000133 </itemizedlist>
134 </section>
135
···130 were removed. They were never used for anything and can therefore safely be removed.
131 </para>
132 </listitem>
133+ <listitem>
134+ <para>
135+ Package <literal>wasm</literal> has been renamed <literal>proglodyte-wasm</literal>. The package
136+ <literal>wasm</literal> will be pointed to <literal>ocamlPackages.wasm</literal> in 19.09, so
137+ make sure to update your configuration if you want to keep <literal>proglodyte-wasm</literal>
138+ </para>
139+ </listitem>
140 </itemizedlist>
141 </section>
142
···180 # programs to be wrapped.
181 WRAPPER_PATH=${config.system.path}/bin:${config.system.path}/sbin
182183- # Remove the old /var/setuid-wrappers path from the system...
184- #
185- # TODO: this is only necessary for upgrades 16.09 => 17.x;
186- # this conditional removal block needs to be removed after
187- # the release.
188- if [ -d /var/setuid-wrappers ]; then
189- rm -rf /var/setuid-wrappers
190- ln -s /run/wrappers/bin /var/setuid-wrappers
191- fi
192-193- # Remove the old /run/setuid-wrappers-dir path from the
194- # system as well...
195- #
196- # TODO: this is only necessary for upgrades 16.09 => 17.x;
197- # this conditional removal block needs to be removed after
198- # the release.
199- if [ -d /run/setuid-wrapper-dirs ]; then
200- rm -rf /run/setuid-wrapper-dirs
201- ln -s /run/wrappers/bin /run/setuid-wrapper-dirs
202- fi
203-204- # TODO: this is only necessary for upgrades 16.09 => 17.x;
205- # this conditional removal block needs to be removed after
206- # the release.
207- if readlink -f /run/booted-system | grep nixos-17 > /dev/null; then
208- rm -rf /run/setuid-wrapper-dirs
209- rm -rf /var/setuid-wrappers
210- fi
211-212 # We want to place the tmpdirs for the wrappers to the parent dir.
213 wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX)
214 chmod a+rx $wrapperDir
···180 # programs to be wrapped.
181 WRAPPER_PATH=${config.system.path}/bin:${config.system.path}/sbin
18200000000000000000000000000000183 # We want to place the tmpdirs for the wrappers to the parent dir.
184 wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX)
185 chmod a+rx $wrapperDir
+5-1
nixos/modules/services/mail/dovecot.nix
···311 { name = "dovenull";
312 uid = config.ids.uids.dovenull2;
313 description = "Dovecot user for untrusted logins";
314- group = cfg.group;
315 }
316 ] ++ optional (cfg.user == "dovecot2")
317 { name = "dovecot2";
···332 }
333 ++ optional (cfg.createMailUser && cfg.mailGroup != null)
334 { name = cfg.mailGroup;
0000335 };
336337 environment.etc."dovecot/modules".source = modulesDir;
···311 { name = "dovenull";
312 uid = config.ids.uids.dovenull2;
313 description = "Dovecot user for untrusted logins";
314+ group = "dovenull";
315 }
316 ] ++ optional (cfg.user == "dovecot2")
317 { name = "dovecot2";
···332 }
333 ++ optional (cfg.createMailUser && cfg.mailGroup != null)
334 { name = cfg.mailGroup;
335+ }
336+ ++ singleton
337+ { name = "dovenull";
338+ gid = config.ids.gids.dovenull2;
339 };
340341 environment.etc."dovecot/modules".source = modulesDir;
···1-#! @bash@/bin/sh -e
2-3-shopt -s nullglob
4-5-export PATH=/empty
6-for i in @path@; do PATH=$PATH:$i/bin; done
7-8-default=$1
9-if test -z "$1"; then
10- echo "Syntax: builder.sh <DEFAULT-CONFIG>"
11- exit 1
12-fi
13-14-echo "updating the boot generations directory..."
15-16-mkdir -p /boot/old
17-18-# Convert a path to a file in the Nix store such as
19-# /nix/store/<hash>-<name>/file to <hash>-<name>-<file>.
20-cleanName() {
21- local path="$1"
22- echo "$path" | sed 's|^/nix/store/||' | sed 's|/|-|g'
23-}
24-25-# Copy a file from the Nix store to /boot/kernels.
26-declare -A filesCopied
27-28-copyToKernelsDir() {
29- local src="$1"
30- local dst="/boot/old/$(cleanName $src)"
31- # Don't copy the file if $dst already exists. This means that we
32- # have to create $dst atomically to prevent partially copied
33- # kernels or initrd if this script is ever interrupted.
34- if ! test -e $dst; then
35- local dstTmp=$dst.tmp.$$
36- cp $src $dstTmp
37- mv $dstTmp $dst
38- fi
39- filesCopied[$dst]=1
40- result=$dst
41-}
42-43-copyForced() {
44- local src="$1"
45- local dst="$2"
46- cp $src $dst.tmp
47- mv $dst.tmp $dst
48-}
49-50-outdir=/boot/old
51-mkdir -p $outdir || true
52-53-# Copy its kernel and initrd to /boot/kernels.
54-addEntry() {
55- local path="$1"
56- local generation="$2"
57-58- if ! test -e $path/kernel -a -e $path/initrd; then
59- return
60- fi
61-62- local kernel=$(readlink -f $path/kernel)
63- local initrd=$(readlink -f $path/initrd)
64- local dtb_path=$(readlink -f $path/kernel-modules/dtbs)
65-66- if test -n "@copyKernels@"; then
67- copyToKernelsDir $kernel; kernel=$result
68- copyToKernelsDir $initrd; initrd=$result
69- fi
70-71- echo $(readlink -f $path) > $outdir/$generation-system
72- echo $(readlink -f $path/init) > $outdir/$generation-init
73- cp $path/kernel-params $outdir/$generation-cmdline.txt
74- echo $initrd > $outdir/$generation-initrd
75- echo $kernel > $outdir/$generation-kernel
76-77- if test $(readlink -f "$path") = "$default"; then
78- if [ @version@ -eq 1 ]; then
79- copyForced $kernel /boot/kernel.img
80- else
81- copyForced $kernel /boot/kernel7.img
82- fi
83- copyForced $initrd /boot/initrd
84- for dtb in $dtb_path/bcm*.dtb; do
85- dst="/boot/$(basename $dtb)"
86- copyForced $dtb "$dst"
87- filesCopied[$dst]=1
88- done
89- cp "$(readlink -f "$path/init")" /boot/nixos-init
90- echo "`cat $path/kernel-params` init=$path/init" >/boot/cmdline.txt
91-92- echo "$2" > /boot/defaultgeneration
93- fi
94-}
95-96-# Add all generations of the system profile to the menu, in reverse
97-# (most recent to least recent) order.
98-for generation in $(
99- (cd /nix/var/nix/profiles && ls -d system-*-link) \
100- | sed 's/system-\([0-9]\+\)-link/\1/' \
101- | sort -n -r); do
102- link=/nix/var/nix/profiles/system-$generation-link
103- addEntry $link $generation
104-done
105-106-# Add the firmware files
107-fwdir=@firmware@/share/raspberrypi/boot/
108-copyForced $fwdir/bootcode.bin /boot/bootcode.bin
109-copyForced $fwdir/fixup.dat /boot/fixup.dat
110-copyForced $fwdir/fixup_cd.dat /boot/fixup_cd.dat
111-copyForced $fwdir/fixup_db.dat /boot/fixup_db.dat
112-copyForced $fwdir/fixup_x.dat /boot/fixup_x.dat
113-copyForced $fwdir/start.elf /boot/start.elf
114-copyForced $fwdir/start_cd.elf /boot/start_cd.elf
115-copyForced $fwdir/start_db.elf /boot/start_db.elf
116-copyForced $fwdir/start_x.elf /boot/start_x.elf
117-118-# Add the config.txt
119-copyForced @configTxt@ /boot/config.txt
120-121-# Remove obsolete files from /boot and /boot/old.
122-for fn in /boot/old/*linux* /boot/old/*initrd-initrd* /boot/bcm*.dtb; do
123- if ! test "${filesCopied[$fn]}" = 1; then
124- rm -vf -- "$fn"
125- fi
126-done
···1+#! @bash@/bin/sh -e
2+3+shopt -s nullglob
4+5+export PATH=/empty
6+for i in @path@; do PATH=$PATH:$i/bin; done
7+8+usage() {
9+ echo "usage: $0 -c <path-to-default-configuration> [-d <boot-dir>]" >&2
10+ exit 1
11+}
12+13+default= # Default configuration
14+target=/boot # Target directory
15+16+while getopts "c:d:" opt; do
17+ case "$opt" in
18+ c) default="$OPTARG" ;;
19+ d) target="$OPTARG" ;;
20+ \?) usage ;;
21+ esac
22+done
23+24+echo "updating the boot generations directory..."
25+26+mkdir -p $target/old
27+28+# Convert a path to a file in the Nix store such as
29+# /nix/store/<hash>-<name>/file to <hash>-<name>-<file>.
30+cleanName() {
31+ local path="$1"
32+ echo "$path" | sed 's|^/nix/store/||' | sed 's|/|-|g'
33+}
34+35+# Copy a file from the Nix store to $target/kernels.
36+declare -A filesCopied
37+38+copyToKernelsDir() {
39+ local src="$1"
40+ local dst="$target/old/$(cleanName $src)"
41+ # Don't copy the file if $dst already exists. This means that we
42+ # have to create $dst atomically to prevent partially copied
43+ # kernels or initrd if this script is ever interrupted.
44+ if ! test -e $dst; then
45+ local dstTmp=$dst.tmp.$$
46+ cp $src $dstTmp
47+ mv $dstTmp $dst
48+ fi
49+ filesCopied[$dst]=1
50+ result=$dst
51+}
52+53+copyForced() {
54+ local src="$1"
55+ local dst="$2"
56+ cp $src $dst.tmp
57+ mv $dst.tmp $dst
58+}
59+60+outdir=$target/old
61+mkdir -p $outdir || true
62+63+# Copy its kernel and initrd to $target/old.
64+addEntry() {
65+ local path="$1"
66+ local generation="$2"
67+68+ if ! test -e $path/kernel -a -e $path/initrd; then
69+ return
70+ fi
71+72+ local kernel=$(readlink -f $path/kernel)
73+ local initrd=$(readlink -f $path/initrd)
74+ local dtb_path=$(readlink -f $path/kernel-modules/dtbs)
75+76+ if test -n "@copyKernels@"; then
77+ copyToKernelsDir $kernel; kernel=$result
78+ copyToKernelsDir $initrd; initrd=$result
79+ fi
80+81+ echo $(readlink -f $path) > $outdir/$generation-system
82+ echo $(readlink -f $path/init) > $outdir/$generation-init
83+ cp $path/kernel-params $outdir/$generation-cmdline.txt
84+ echo $initrd > $outdir/$generation-initrd
85+ echo $kernel > $outdir/$generation-kernel
86+87+ if test "$generation" = "default"; then
88+ copyForced $kernel $target/kernel.img
89+ copyForced $initrd $target/initrd
90+ for dtb in $dtb_path/{broadcom,}/bcm*.dtb; do
91+ dst="$target/$(basename $dtb)"
92+ copyForced $dtb "$dst"
93+ filesCopied[$dst]=1
94+ done
95+ cp "$(readlink -f "$path/init")" $target/nixos-init
96+ echo "`cat $path/kernel-params` init=$path/init" >$target/cmdline.txt
97+ fi
98+}
99+100+addEntry $default default
101+102+# Add all generations of the system profile to the menu, in reverse
103+# (most recent to least recent) order.
104+for generation in $(
105+ (cd /nix/var/nix/profiles && ls -d system-*-link) \
106+ | sed 's/system-\([0-9]\+\)-link/\1/' \
107+ | sort -n -r); do
108+ link=/nix/var/nix/profiles/system-$generation-link
109+ addEntry $link $generation
110+done
111+112+# Add the firmware files
113+fwdir=@firmware@/share/raspberrypi/boot/
114+copyForced $fwdir/bootcode.bin $target/bootcode.bin
115+copyForced $fwdir/fixup.dat $target/fixup.dat
116+copyForced $fwdir/fixup_cd.dat $target/fixup_cd.dat
117+copyForced $fwdir/fixup_db.dat $target/fixup_db.dat
118+copyForced $fwdir/fixup_x.dat $target/fixup_x.dat
119+copyForced $fwdir/start.elf $target/start.elf
120+copyForced $fwdir/start_cd.elf $target/start_cd.elf
121+copyForced $fwdir/start_db.elf $target/start_db.elf
122+copyForced $fwdir/start_x.elf $target/start_x.elf
123+124+# Add the config.txt
125+copyForced @configTxt@ $target/config.txt
126+127+# Remove obsolete files from $target and $target/old.
128+for fn in $target/old/*linux* $target/old/*initrd-initrd* $target/bcm*.dtb; do
129+ if ! test "${filesCopied[$fn]}" = 1; then
130+ rm -vf -- "$fn"
131+ fi
132+done
···1-channel="stable" # stable/candidate/edge
000000000000000000002nixpkgs="$(git rev-parse --show-toplevel)"
3spotify_nix="$nixpkgs/pkgs/applications/audio/spotify/default.nix"
4500067# create bash array from snap info
8snap_info=($(
···12 '.revision,.download_sha512,.version,.last_updated'
13))
1400015revision="${snap_info[0]}"
16sha512="${snap_info[1]}"
17-version="${snap_info[2]}"
18last_updated="${snap_info[3]}"
1920-# find the last commited version
21-version_pre=$(
22- git grep 'version\s*=' HEAD "$spotify_nix" \
0000023 | sed -Ene 's/.*"(.*)".*/\1/p'
24)
2526-if [[ "$version_pre" = "$version" ]]; then
00000027 echo "Spotify is already up ot date"
28 exit 0
29fi
3031-echo "Updating from ${version_pre} to ${version}, released on ${last_updated}"
3233-# search-andreplace revision, hash and version
34sed --regexp-extended \
35 -e 's/rev\s*=\s*"[0-9]+"\s*;/rev = "'"${revision}"'";/' \
36- -e 's/sha512\s*=\s*".{128}"\s*;/sha512 = "'"${sha512}"'";/' \
37- -e 's/version\s*=\s*".*"\s*;/version = "'"${version}"'";/' \
38 -i "$spotify_nix"
39000040if ! nix-build -A spotify "$nixpkgs"; then
41 echo "The updated spotify failed to build."
42 exit 1
43fi
44000045git add "$spotify_nix"
46-# show diff for review
47-git diff HEAD
48-# prepare commit message, but allow edit
49-git commit --edit --message "spotify: $version_pre -> $version"
00
···1+#!/usr/bin/env nix-shell
2+#! nix-shell -i bash -p curl jq git gnused gnugrep
3+4+5+# executing this script without arguments will
6+# - find the newest stable spotify version avaiable on snapcraft (https://snapcraft.io/spotify)
7+# - read the current spotify version from the current nix expression
8+# - update the nix expression if the versions differ
9+# - try to build the updated version, exit if that fails
10+# - give instructions for upstreaming
11+12+# Please test the update manually before pushing. There have been errors before
13+# and because the service is proprietary and a paid account is necessary to do
14+# anything with spotify automatic testing is not possible.
15+16+# As an optional argument you can specify the snapcraft channel to update to.
17+# Default is `stable` and only stable updates should be pushed to nixpkgs. For
18+# testing you may specify `candidate` or `edge`.
19+20+21+channel="${1:-stable}" # stable/candidate/edge
22nixpkgs="$(git rev-parse --show-toplevel)"
23spotify_nix="$nixpkgs/pkgs/applications/audio/spotify/default.nix"
242526+#
27+# find the newest stable spotify version avaiable on snapcraft
28+#
2930# create bash array from snap info
31snap_info=($(
···35 '.revision,.download_sha512,.version,.last_updated'
36))
3738+# "revision" is the actual version identifier on snapcraft, the "version" is
39+# just for human consumption. Revision is just an integer that gets increased
40+# by one every (stable or unstable) release.
41revision="${snap_info[0]}"
42sha512="${snap_info[1]}"
43+upstream_version="${snap_info[2]}"
44last_updated="${snap_info[3]}"
4546+echo "Latest $channel release is $upstream_version from $last_updated."
47+48+#
49+# read the current spotify version from the currently *committed* nix expression
50+#
51+52+current_nix_version=$(
53+ grep 'version\s*=' "$spotify_nix" \
54 | sed -Ene 's/.*"(.*)".*/\1/p'
55)
5657+echo "Current nix version: $current_nix_version"
58+59+#
60+# update the nix expression if the versions differ
61+#
62+63+if [[ "$current_nix_version" = "$upstream_version" ]]; then
64 echo "Spotify is already up ot date"
65 exit 0
66fi
6768+echo "Updating from ${current_nix_version} to ${upstream_version}, released on ${last_updated}"
6970+# search-and-replace revision, hash and version
71sed --regexp-extended \
72 -e 's/rev\s*=\s*"[0-9]+"\s*;/rev = "'"${revision}"'";/' \
73+ -e 's/sha512\s*=\s*"[^"]*"\s*;/sha512 = "'"${sha512}"'";/' \
74+ -e 's/version\s*=\s*".*"\s*;/version = "'"${upstream_version}"'";/' \
75 -i "$spotify_nix"
7677+#
78+# try to build the updated version
79+#
80+81if ! nix-build -A spotify "$nixpkgs"; then
82 echo "The updated spotify failed to build."
83 exit 1
84fi
8586+#
87+# give instructions for upstreaming
88+#
89+90git add "$spotify_nix"
91+# show changes for review
92+git status
93+echo 'Please review and test the changes (./result/bin/spotify).'
94+echo 'Then stage the changes with `git add` and commit with:'
95+# prepare commit message
96+echo "git commit -m 'spotify: $current_nix_version -> $upstream_version'"
+2-2
pkgs/applications/audio/whipper/default.nix
···6 version = "0.7.0";
78 src = fetchFromGitHub {
9- owner = "JoeLametta";
10 repo = "whipper";
11 rev = "v${version}";
12 sha256 = "04m8s0s9dcnly9l6id8vv99n9kbjrjid79bss52ay9yvwng0frmj";
···39 '';
4041 meta = with stdenv.lib; {
42- homepage = https://github.com/JoeLametta/whipper;
43 description = "A CD ripper aiming for accuracy over speed";
44 maintainers = with maintainers; [ rycee jgeerds ];
45 license = licenses.gpl3Plus;
···6 version = "0.7.0";
78 src = fetchFromGitHub {
9+ owner = "whipper-team";
10 repo = "whipper";
11 rev = "v${version}";
12 sha256 = "04m8s0s9dcnly9l6id8vv99n9kbjrjid79bss52ay9yvwng0frmj";
···39 '';
4041 meta = with stdenv.lib; {
42+ homepage = https://github.com/whipper-team/whipper;
43 description = "A CD ripper aiming for accuracy over speed";
44 maintainers = with maintainers; [ rycee jgeerds ];
45 license = licenses.gpl3Plus;
···1+commit f1c59929c3c180ac283334c2b3c901ac8c82f6b1
2+Author: Timo Kaufmann <timokau@zoho.com>
3+Date: Sat Oct 20 20:07:41 2018 +0200
4+5+ Revert "Something related to the sphinxbuild seems to be leaking memory"
6+7+ This reverts commit 7d85dc796c58c3de57401bc22d3587b94e205091.
8+9+diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py
10+index 0b24b1a60b..084c3f89d7 100644
11+--- a/src/sage_setup/docbuild/__init__.py
12++++ b/src/sage_setup/docbuild/__init__.py
13+@@ -265,29 +265,35 @@ class DocBuilder(object):
14+ # import the customized builder for object.inv files
15+ inventory = builder_helper('inventory')
16+17+-def build_many(target, args):
18+- # Pool() uses an actual fork() to run each new instance. This is important
19+- # for performance reasons, i.e., don't use a forkserver when it becomes
20+- # available with Python 3: Here, sage is already initialized which is quite
21+- # costly, with a forkserver we would have to reinitialize it for every
22+- # document we build. At the same time, don't serialize this by taking the
23+- # pool (and thus the call to fork()) out completely: The call to Sphinx
24+- # leaks memory, so we need to build each document in its own process to
25+- # control the RAM usage.
26+- from multiprocessing import Pool
27+- pool = Pool(NUM_THREADS, maxtasksperchild=1)
28+- # map_async handles KeyboardInterrupt correctly. Plain map and
29+- # apply_async does not, so don't use it.
30+- x = pool.map_async(target, args, 1)
31+- try:
32+- ret = x.get(99999)
33+- pool.close()
34+- pool.join()
35+- except Exception:
36+- pool.terminate()
37+- if ABORT_ON_ERROR:
38+- raise
39+- return ret
40++if NUM_THREADS > 1:
41++ def build_many(target, args):
42++ from multiprocessing import Pool
43++ pool = Pool(NUM_THREADS, maxtasksperchild=1)
44++ # map_async handles KeyboardInterrupt correctly. Plain map and
45++ # apply_async does not, so don't use it.
46++ x = pool.map_async(target, args, 1)
47++ try:
48++ ret = x.get(99999)
49++ pool.close()
50++ pool.join()
51++ except Exception:
52++ pool.terminate()
53++ if ABORT_ON_ERROR:
54++ raise
55++ return ret
56++else:
57++ def build_many(target, args):
58++ results = []
59++
60++ for arg in args:
61++ try:
62++ results.append(target(arg))
63++ except Exception:
64++ if ABORT_ON_ERROR:
65++ raise
66++
67++ return results
68++
69+70+ ##########################################
71+ # Parallel Building Ref Manual #
···27 # https://trac.sagemath.org/ticket/25316
28 # https://github.com/python/cpython/pull/7476
29 ./patches/python-5755-hotpatch.patch
30+31+ # Revert the commit that made the sphinx build fork even in the single thread
32+ # case. For some yet unknown reason, that breaks the docbuild on nix and archlinux.
33+ # See https://groups.google.com/forum/#!msg/sage-packaging/VU4h8IWGFLA/mrmCMocYBwAJ.
34+ ./patches/revert-sphinx-always-fork.patch
35+36+ # Make sure py2/py3 tests are only run when their expected context (all "sage"
37+ # tests) are also run. That is necessary to test dochtml individually. See
38+ # https://trac.sagemath.org/ticket/26110 for an upstream discussion.
39+ ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
40 ];
4142 packageUpgradePatches = [
···23stdenv.mkDerivation rec {
4 name = "clipgrab-${version}";
5- version = "3.7.0";
67 src = fetchurl {
8- sha256 = "0rx12218yy6h27z3xsmmxfsw8ldlsf4y862adkz6ybrygppsaib4";
9 # The .tar.bz2 "Download" link is a binary blob, the source is the .tar.gz!
10 url = "https://download.clipgrab.org/${name}.tar.gz";
11 };
···23stdenv.mkDerivation rec {
4 name = "clipgrab-${version}";
5+ version = "3.7.1";
67 src = fetchurl {
8+ sha256 = "0bhzkmcinlsfp5ldgqp59xnkaz6ikzdnq78drcdf1w7q4z05ipxd";
9 # The .tar.bz2 "Download" link is a binary blob, the source is the .tar.gz!
10 url = "https://download.clipgrab.org/${name}.tar.gz";
11 };
···133134 depsBuildBuild = [ buildPackages.stdenv.cc ];
135 nativeBuildInputs = [ bison ];
136- buildInputs = lib.optionals withGd [ gd libpng ];
00137138 # Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to
139 # prevent a retained dependency on the bootstrap tools in the stdenv-linux
···133134 depsBuildBuild = [ buildPackages.stdenv.cc ];
135 nativeBuildInputs = [ bison ];
136+ # TODO make linuxHeaders unconditional next mass rebuild
137+ buildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) linuxHeaders
138+ ++ lib.optionals withGd [ gd libpng ];
139140 # Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to
141 # prevent a retained dependency on the bootstrap tools in the stdenv-linux
+36
pkgs/development/libraries/libaosd/default.nix
···000000000000000000000000000000000000
···1+{ stdenv, lib, fetchFromGitHub, pkgconfig, cairo, pango,
2+ libX11, libXcomposite, autoconf, automake }:
3+4+stdenv.mkDerivation rec {
5+ version = "0.2.7-9-g177589f";
6+ name = "libaosd-${version}";
7+8+ src = fetchFromGitHub {
9+ owner = "atheme-legacy";
10+ repo = "libaosd";
11+ rev = "${version}";
12+ sha256 = "1cn7k0n74p6jp25kxwcyblhmbdvgw3mikvj0m2jh4c6xccfrgb9a";
13+ };
14+15+ nativeBuildInputs = [ autoconf automake pkgconfig ];
16+ buildInputs = [ cairo pango libX11 libXcomposite ];
17+ enableParallelBuilding = true;
18+19+ preConfigure = ''
20+ ./autogen.sh
21+ '';
22+23+ meta = with stdenv.lib; {
24+ longDescription = ''
25+ libaosd is an advanced on screen display library.
26+27+ It supports many modern features like anti-aliased text and
28+ composited rendering via XComposite, as well as support for
29+ rendering Cairo and Pango layouts.
30+ '';
31+ homepage = https://github.com/atheme-legacy/libaosd;
32+ license = licenses.mit;
33+ maintainers = with maintainers; [ unode ];
34+ platforms = with platforms; unix;
35+ };
36+}
···15 meta = with stdenv.lib; {
16 description = "A forked version of log4cpp that has been created for the Shibboleth project";
17 maintainers = [ maintainers.jammerful ];
0018 };
19}
···15 meta = with stdenv.lib; {
16 description = "A forked version of log4cpp that has been created for the Shibboleth project";
17 maintainers = [ maintainers.jammerful ];
18+ license = licenses.lgpl21;
19+ homepage = http://log4cpp.sf.net;
20 };
21}
+3-2
pkgs/development/libraries/loudmouth/default.nix
···1819 nativeBuildInputs = [ pkgconfig ];
2021- meta = {
22 description = "A lightweight C library for the Jabber protocol";
23- platforms = stdenv.lib.platforms.linux;
24 downloadPage = "http://mcabber.com/files/loudmouth/";
25 downloadURLRegexp = "loudmouth-[0-9.]+[.]tar[.]bz2$";
26 updateWalker = true;
027 };
28}
···1819 nativeBuildInputs = [ pkgconfig ];
2021+ meta = with stdenv.lib; {
22 description = "A lightweight C library for the Jabber protocol";
23+ platforms = platforms.linux;
24 downloadPage = "http://mcabber.com/files/loudmouth/";
25 downloadURLRegexp = "loudmouth-[0-9.]+[.]tar[.]bz2$";
26 updateWalker = true;
27+ license = licenses.lgpl21;
28 };
29}
+1
pkgs/development/libraries/martyr/default.nix
···20 meta = {
21 description = "Martyr is a Java framework around the IRC protocol to allow application writers easy manipulation of the protocol and client state";
22 homepage = http://martyr.sourceforge.net/;
023 };
24}
···20 meta = {
21 description = "Martyr is a Java framework around the IRC protocol to allow application writers easy manipulation of the protocol and client state";
22 homepage = http://martyr.sourceforge.net/;
23+ license = stdenv.lib.licenses.lgpl21;
24 };
25}
+3-2
pkgs/development/libraries/mdds/0.12.1.nix
···9 sha256 = "0gg8mb9kxh3wggh7njj1gf90xy27p0yq2cw88wqar9hhg2fmwmi3";
10 };
1112- meta = {
13 homepage = https://gitlab.com/mdds/mdds;
14 description = "A collection of multi-dimensional data structure and indexing algorithm";
15- platforms = stdenv.lib.platforms.all;
016 };
17}
···9 sha256 = "0gg8mb9kxh3wggh7njj1gf90xy27p0yq2cw88wqar9hhg2fmwmi3";
10 };
1112+ meta = with stdenv.lib; {
13 homepage = https://gitlab.com/mdds/mdds;
14 description = "A collection of multi-dimensional data structure and indexing algorithm";
15+ platforms = platforms.all;
16+ license = licenses.mit;
17 };
18}
+3-2
pkgs/development/libraries/mdds/0.7.1.nix
···9 sha256 = "0zhrx7m04pknc8i2cialmbna1hmwa0fzs8qphan4rdxibf0c4yzy";
10 };
1112- meta = {
13 homepage = https://gitlab.com/mdds/mdds/;
14 description = "A collection of multi-dimensional data structure and indexing algorithm";
15- platforms = stdenv.lib.platforms.all;
016 };
17}
···9 sha256 = "0zhrx7m04pknc8i2cialmbna1hmwa0fzs8qphan4rdxibf0c4yzy";
10 };
1112+ meta = with stdenv.lib; {
13 homepage = https://gitlab.com/mdds/mdds/;
14 description = "A collection of multi-dimensional data structure and indexing algorithm";
15+ platforms = platforms.all;
16+ license = licenses.mit;
17 };
18}
+3-2
pkgs/development/libraries/mdds/default.nix
···1617 checkInputs = [ boost ];
1819- meta = {
20 inherit version;
21 homepage = https://gitlab.com/mdds/mdds;
22 description = "A collection of multi-dimensional data structure and indexing algorithm";
23- platforms = stdenv.lib.platforms.all;
024 };
25}
···1617 checkInputs = [ boost ];
1819+ meta = with stdenv.lib; {
20 inherit version;
21 homepage = https://gitlab.com/mdds/mdds;
22 description = "A collection of multi-dimensional data structure and indexing algorithm";
23+ platforms = platforms.all;
24+ license = licenses.mit;
25 };
26}
···1112buildPythonPackage rec {
13 pname = "cypari2";
14- version = "1.2.1";
01516 src = fetchPypi {
17 inherit pname version;
18- sha256 = "0v2kikwf0advq8j76nwzhlacwj1yys9cvajm4fqgmasjdsnf1q4k";
19 };
2021 # This differs slightly from the default python installPhase in that it pip-installs
···1112buildPythonPackage rec {
13 pname = "cypari2";
14+ # upgrade may break sage, please test the sage build or ping @timokau on upgrade
15+ version = "1.3.1";
1617 src = fetchPypi {
18 inherit pname version;
19+ sha256 = "04f00xp8aaz37v00iqg1mv5wjq00a5qhk8cqa93s13009s9x984r";
20 };
2122 # This differs slightly from the default python installPhase in that it pip-installs
···4 inherit (vscode-utils) buildVscodeMarketplaceExtension;
5in
6#
7-# Unless there is a good reason not to, we attemp to use the same name as the
8# extension's unique identifier (the name the extension gets when installed
9# from vscode under `~/.vscode`) and found on the marketplace extension page.
10-# So an extension's attribute name should be of the form:
11# "${mktplcRef.publisher}.${mktplcRef.name}".
12#
13rec {
···24 };
2526 ms-vscode.cpptools = callPackage ./cpptools {};
27-28 ms-python.python = callPackage ./python {};
29-}
···4 inherit (vscode-utils) buildVscodeMarketplaceExtension;
5in
6#
7+# Unless there is a good reason not to, we attempt to use the same name as the
8# extension's unique identifier (the name the extension gets when installed
9# from vscode under `~/.vscode`) and found on the marketplace extension page.
10+# So an extension's attribute name should be of the form:
11# "${mktplcRef.publisher}.${mktplcRef.name}".
12#
13rec {
···24 };
2526 ms-vscode.cpptools = callPackage ./cpptools {};
27+28 ms-python.python = callPackage ./python {};
29+}
···37 sed -e "s@/etc/@$out/etc/@g" -e "/chmod u+s/d" -i Makefile
38 '';
390000000040 meta = {
41 inherit (s) version;
42 description = ''Namespace-based sandboxing tool for Linux'';
···37 sed -e "s@/etc/@$out/etc/@g" -e "/chmod u+s/d" -i Makefile
38 '';
3940+ # We need to set the directory for the .local override files back to
41+ # /etc/firejail so we can actually override them
42+ postInstall = ''
43+ sed -E -e 's@^include (.*)(/firejail/.*.local)$@include /etc\2@g' -i $out/etc/firejail/*.profile
44+ '';
45+46+ enableParallelBuilding = true;
47+48 meta = {
49 inherit (s) version;
50 description = ''Namespace-based sandboxing tool for Linux'';
+52-6
pkgs/os-specific/linux/kernel-headers/default.nix
···1{ stdenvNoCC, lib, buildPackages
2-, fetchurl, perl
03}:
45let
6- common = { version, sha256, patches ? [] }: stdenvNoCC.mkDerivation {
7 name = "linux-headers-${version}";
89 src = fetchurl {
···16 # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.
17 # We do this so we have a build->build, not build->host, C compiler.
18 depsBuildBuild = [ buildPackages.stdenv.cc ];
19- nativeBuildInputs = [ perl ];
0002021 extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
220023 inherit patches;
2425- buildPhase = ''
00000000000000026 make mrproper headers_check SHELL=bash
0000000027 '';
2829- installPhase = ''
00000030 make INSTALL_HDR_PATH=$out headers_install
0003132 # Some builds (e.g. KVM) want a kernel.release.
33 mkdir -p $out/include/config
···39 license = licenses.gpl2;
40 platforms = platforms.linux;
41 };
42- };
00043in {
4445 linuxHeaders = common {
46 version = "4.18.3";
47 sha256 = "1m23hjd02bg8mqnd8dc4z4m3kxds1cyrc6j5saiwnhzbz373rvc1";
0000048 };
49}
···1{ stdenvNoCC, lib, buildPackages
2+, fetchurl, fetchpatch, perl
3+, elf-header
4}:
56let
7+ common = { version, sha256, patches ? [] }: stdenvNoCC.mkDerivation ({
8 name = "linux-headers-${version}";
910 src = fetchurl {
···17 # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.
18 # We do this so we have a build->build, not build->host, C compiler.
19 depsBuildBuild = [ buildPackages.stdenv.cc ];
20+ # TODO make unconditional next mass rebuild
21+ nativeBuildInputs = [ perl ] ++ lib.optional
22+ (stdenvNoCC.hostPlatform != stdenvNoCC.buildPlatform)
23+ elf-header;
2425 extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
2627+ # "patches" array defaults to 'null' to avoid changing hash
28+ # and causing mass rebuild
29 inherit patches;
3031+ # TODO avoid native hack next rebuild
32+ makeFlags = if stdenvNoCC.hostPlatform == stdenvNoCC.buildPlatform then null else [
33+ "SHELL=bash"
34+ # Avoid use of runtime build->host compilers for checks. These
35+ # checks only cared to work around bugs in very old compilers, so
36+ # these changes should be safe.
37+ "cc-version:=9999"
38+ "cc-fullversion:=999999"
39+ # `$(..)` expanded by make alone
40+ "HOSTCC:=$(BUILD_CC)"
41+ "HOSTCXX:=$(BUILD_CXX)"
42+ ];
43+44+ # TODO avoid native hack next rebuild
45+ # Skip clean on darwin, case-sensitivity issues.
46+ buildPhase = if stdenvNoCC.hostPlatform == stdenvNoCC.buildPlatform then ''
47 make mrproper headers_check SHELL=bash
48+ '' else lib.optionalString (!stdenvNoCC.buildPlatform.isDarwin) ''
49+ make mrproper $makeFlags
50+ ''
51+ # For some reason, doing `make install_headers` twice, first without
52+ # INSTALL_HDR_PATH=$out then with, is neccessary to get this to work
53+ # for darwin cross. @Ericson2314 has no idea why.
54+ + ''
55+ make headers_install $makeFlags
56 '';
5758+ # TODO avoid native hack next rebuild
59+ checkPhase = if stdenvNoCC.hostPlatform == stdenvNoCC.buildPlatform then null else ''
60+ make headers_check $makeFlags
61+ '';
62+63+ # TODO avoid native hack next rebuild
64+ installPhase = (if stdenvNoCC.hostPlatform == stdenvNoCC.buildPlatform then ''
65 make INSTALL_HDR_PATH=$out headers_install
66+ '' else ''
67+ make headers_install INSTALL_HDR_PATH=$out $makeFlags
68+ '') + ''
6970 # Some builds (e.g. KVM) want a kernel.release.
71 mkdir -p $out/include/config
···77 license = licenses.gpl2;
78 platforms = platforms.linux;
79 };
80+ } // lib.optionalAttrs (stdenvNoCC.hostPlatform != stdenvNoCC.buildPlatform) {
81+ # TODO Make unconditional next mass rebuild
82+ hardeningDisable = lib.optional stdenvNoCC.buildPlatform.isDarwin "format";
83+ });
84in {
8586 linuxHeaders = common {
87 version = "4.18.3";
88 sha256 = "1m23hjd02bg8mqnd8dc4z4m3kxds1cyrc6j5saiwnhzbz373rvc1";
89+ # TODO make unconditional next mass rebuild
90+ patches = lib.optionals (stdenvNoCC.hostPlatform != stdenvNoCC.buildPlatform) [
91+ ./no-relocs.patch # for building x86 kernel headers on non-ELF platforms
92+ ./no-dynamic-cc-version-check.patch # so we can use `stdenvNoCC`, see `makeFlags` above
93+ ];
94 };
95}
···37 # Now we need to patch up the executables and libraries to work on Nix.
38 # Side note: PLEASE don't put spaces in your binary names. This is stupid.
39 for bin in "Plex Media Server" \
040 "Plex DLNA Server" \
41 "Plex Media Scanner" \
42 "Plex Relay" \
···37 # Now we need to patch up the executables and libraries to work on Nix.
38 # Side note: PLEASE don't put spaces in your binary names. This is stupid.
39 for bin in "Plex Media Server" \
40+ "Plex Commercial Skipper" \
41 "Plex DLNA Server" \
42 "Plex Media Scanner" \
43 "Plex Relay" \
···1-/*
2-3-Systeemvereisten
4-5-* libz >= 1.1.4
6-* glib >= 2.2.0
7-* gtk >= 2.2.0
8-9-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
10-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.
11-12-* libxml2 >= 2.2.5
13-* libxslt >= 1.0.5
14-15-* mozilla (gecompileerd met gtk2 support)
16-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.
17-ldd /usr/X11R6/lib/mozilla-gtk2/libgtkembedmoz.so | grep gtk
18-/usr/X11R6/lib/mozilla-gtk2/libgtkembedmoz.so:
19-libgtk-x11-2.0.so.200 => /usr/X11R6/lib/libgtk-x11-2.0.so.200 (0x282c3000)
20-In de output van het ldd programma kun je zien of er inderdaad wordt gelink tegen gtk2. (libgtk-x11-2.0.so.200).
21-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.
22-23-* OpenSSL
24-* LibCURL
25-26-*/
27-28-{ stdenv, fetchurl
29-, zlib, libxml2, libxslt, firefox, openssl, curl
30-, glib, gtk, libgnomeui, libgtkhtml
31-, pkgconfig, dbus-glib, realCurl, pcre, libsexy, gtkspell, libnotify
32-}:
33-34-stdenv.mkDerivation {
35- name = "openftd-0.98.6";
36- #builder = ./builder.sh;
37-38- src = fetchurl {
39- url = http://speeldoos.eweka.nl/~paul/openftd/openftd-1.0.1.tar.bz2;
40- sha256 = "e0710865f852fdf209949788a1ced65e9ecf82b4eaa0992a7a1dde1511a3b6e7";
41- };
42-43- buildInputs = [
44- zlib libxml2 libxslt firefox openssl curl
45- glib gtk pkgconfig dbus-glib realCurl pcre libsexy libgnomeui gtkspell libnotify libgtkhtml
46- ];
47-48- 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";
49-}
···1diff --git a/libinput-gestures b/libinput-gestures
2-index f337ba3..5f5b05d 100755
3--- a/libinput-gestures
4+++ b/libinput-gestures
5-@@ -75,17 +75,13 @@ def get_libinput_vers():
6 'Return the libinput installed version number string'
7 # Try to use newer libinput interface then fall back to old
8 # (depreciated) interface.
9- res = run(('libinput', '--version'), check=False)
10+ res = run(('@libinput@', '--version'), check=False)
11- return res.strip() if res else run(('libinput-list-devices', '--version'))
00001213- # Libinput changed the way in which it's utilities are called
14- libvers = get_libinput_vers()
15--if Version(libvers) >= Version('1.8'):
16- cmd_debug_events = 'libinput debug-events'
17- cmd_list_devices = 'libinput list-devices'
18--else:
19-- cmd_debug_events = 'libinput-debug-events'
20-- cmd_list_devices = 'libinput-list-devices'
21-+cmd_debug_events = '@libinput@ debug-events'
22-+cmd_list_devices = '@libinput@ list-devices'
23-24- def get_devices_list():
25- 'Get list of devices and their attributes (as a dict) from libinput'
26-@@ -187,7 +183,7 @@ class COMMAND_internal(COMMAND):
2728 def run(self):
29 'Get list of current workspaces and select next one'
···32 if not stdout:
33 # This command can fail on GNOME when you have only a single
34 # dynamic workspace using Xorg (probably a GNOME bug) so let's
35-@@ -220,7 +216,7 @@ class COMMAND_internal(COMMAND):
3637 # Switch to desired workspace
38 if index >= minindex and index < maxindex:
···4142 # Table of gesture handlers
43 handlers = OrderedDict()
000
···1diff --git a/libinput-gestures b/libinput-gestures
2+index aca94ac..c2f03ca 100755
3--- a/libinput-gestures
4+++ b/libinput-gestures
5+@@ -77,7 +77,7 @@ def get_libinput_vers():
6 'Return the libinput installed version number string'
7 # Try to use newer libinput interface then fall back to old
8 # (depreciated) interface.
9- res = run(('libinput', '--version'), check=False)
10+ res = run(('@libinput@', '--version'), check=False)
11+ return res.strip() if res else \
12+ run(('libinput-list-devices', '--version'), check=False)
13+14+@@ -87,8 +87,8 @@ if not libvers:
15+ sys.exit('libinput helper tools do not seem to be installed?')
1617+ if Version(libvers) >= Version('1.8'):
0018- cmd_debug_events = 'libinput debug-events'
19- cmd_list_devices = 'libinput list-devices'
20++ cmd_debug_events = '@libinput@ debug-events'
21++ cmd_list_devices = '@libinput@ list-devices'
22+ else:
23+ cmd_debug_events = 'libinput-debug-events'
24+ cmd_list_devices = 'libinput-list-devices'
25+@@ -199,7 +199,7 @@ class COMMAND_internal(COMMAND):
0002627 def run(self):
28 'Get list of current workspaces and select next one'
···31 if not stdout:
32 # This command can fail on GNOME when you have only a single
33 # dynamic workspace using Xorg (probably a GNOME bug) so let's
34+@@ -233,7 +233,7 @@ class COMMAND_internal(COMMAND):
3536 # Switch to desired workspace
37 if index >= minindex and index < maxindex:
···4041 # Table of gesture handlers
42 handlers = OrderedDict()
43+--
44+2.19.1
45+
···2*/
34{ # The platforms *from* which we cross compile.
5- supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
6, # Strip most of attributes when evaluating to spare memory usage
7 scrubJobs ? true
8}:
···10with import ./release-lib.nix { inherit supportedSystems scrubJobs; };
1112let
13- nativePlatforms = linux;
1415 common = {
16 buildPackages.binutils = nativePlatforms;
···2*/
34{ # The platforms *from* which we cross compile.
5+ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ]
6, # Strip most of attributes when evaluating to spare memory usage
7 scrubJobs ? true
8}:
···10with import ./release-lib.nix { inherit supportedSystems scrubJobs; };
1112let
13+ nativePlatforms = all;
1415 common = {
16 buildPackages.binutils = nativePlatforms;
+14-1
pkgs/top-level/stage.nix
···56, # A list of overlays (Additional `self: super: { .. }` customization
57 # functions) to be fixed together in the produced package set
58 overlays
59-}:
6061let
62 stdenvAdapters = self: super:
···159 };
160 };
161 };
0000000000000162 };
163164 # The complete chain of package set builders, applied from top to bottom.
···56, # A list of overlays (Additional `self: super: { .. }` customization
57 # functions) to be fixed together in the produced package set
58 overlays
59+} @args:
6061let
62 stdenvAdapters = self: super:
···159 };
160 };
161 };
162+163+ # Extend the package set with zero or more overlays. This preserves
164+ # preexisting overlays. Prefer to initialize with the right overlays
165+ # in one go when calling Nixpkgs, for performance and simplicity.
166+ appendOverlays = extraOverlays:
167+ import ./stage.nix (args // { overlays = args.overlays ++ extraOverlays; });
168+169+ # Extend the package set with a single overlay. This preserves
170+ # preexisting overlays. Prefer to initialize with the right overlays
171+ # in one go when calling Nixpkgs, for performance and simplicity.
172+ # Prefer appendOverlays if used repeatedly.
173+ extend = f: self.appendOverlays [f];
174+175 };
176177 # The complete chain of package set builders, applied from top to bottom.