git.iko.soy/typeable/nixpkgs
on master help sign in
Revert "Revert "Merge master into staging-next""

In 87a19e9048773d5a363679617406ad148d36c3b8 I merged staging-next into master using the GitHub gui as intended. In ac241fb7a570d6cf81d229ad22a8889602639160 I merged master into staging-next for the next staging cycle, however, I accidentally pushed it to master. Thinking this may cause trouble, I reverted it in 0be87c79797a5fa384fbc356c74ed54f9f7829ea. This was however wrong, as it "removed" master. This reverts commit 0be87c79797a5fa384fbc356c74ed54f9f7829ea.

commit419bc0a4cdc0f577062f6c439809f4bf6e3b0c63 authorFrederik Rietdijk <fridh@fridh.nl> dateWed 5 Feb 2020, 19:27 (7 years ago) parent873e6a4
28 files changed+290−415
lib/strings.nix+1−1 nixos/modules/installer/cd-dvd/iso-image.nix+9−5 nixos/modules/installer/netboot/netboot.nix+9−5 nixos/modules/misc/ids.nix+2−2 nixos/modules/services/networking/kresd.nix+63−83 nixos/modules/system/boot/stage-1-init.sh+8−5 nixos/tests/lorri/default.nix+3−3 pkgs/applications/graphics/paraview/default.nix+10−14 pkgs/applications/science/biology/spades/default.nix+2−2 pkgs/development/libraries/imlib2/default.nix+23−14 pkgs/development/python-modules/dask/default.nix+2−2 pkgs/development/tools/electron/5.x.nix−86 pkgs/development/tools/electron/default.nix+37−77 pkgs/development/tools/electron/6.x.nix → pkgs/development/tools/electron/generic.nix+25−31 pkgs/development/tools/electron/print-hashes.sh+9−5 pkgs/development/tools/vagrant/default.nix+12−4 pkgs/development/tools/vagrant/gemset.nix+16−16 pkgs/os-specific/linux/kernel/linux-4.4.nix+2−2 pkgs/os-specific/linux/kernel/linux-4.9.nix+2−2 pkgs/os-specific/linux/kernel/linux-5.5.nix+2−2 pkgs/os-specific/linux/wireguard/default.nix+2−2 pkgs/servers/dns/knot-resolver/default.nix+36−34 pkgs/servers/documize-community/default.nix+2−2 pkgs/shells/zsh/oh-my-zsh/default.nix+2−2 pkgs/tools/misc/lorri/default.nix+4−4 pkgs/tools/security/sequoia/default.nix+3−3 pkgs/tools/security/sudo/default.nix+2−2 pkgs/top-level/all-packages.nix+2−5
lib/strings.nix+1−1
@@ -244,7 +244,7 @@ rec {
244244 Also note that Nix treats strings as a list of bytes and thus doesn't
245245 handle unicode.
246246
247− Type: stringtoCharacters :: string -> [string]
247+ Type: stringToCharacters :: string -> [string]
248248
249249 Example:
250250 stringToCharacters ""
nixos/modules/installer/cd-dvd/iso-image.nix+9−5
@@ -569,14 +569,18 @@ in
569569 };
570570
571571 fileSystems."/nix/store" =
572− { fsType = "unionfs-fuse";
573− device = "unionfs";
574− options = [ "allow_other" "cow" "nonempty" "chroot=/mnt-root" "max_files=32768" "hide_meta_files" "dirs=/nix/.rw-store=rw:/nix/.ro-store=ro" ];
572+ { fsType = "overlay";
573+ device = "overlay";
574+ options = [
575+ "lowerdir=/nix/.ro-store"
576+ "upperdir=/nix/.rw-store/store"
577+ "workdir=/nix/.rw-store/work"
578+ ];
575579 };
576580
577− boot.initrd.availableKernelModules = [ "squashfs" "iso9660" "uas" ];
581+ boot.initrd.availableKernelModules = [ "squashfs" "iso9660" "uas" "overlay" ];
578582
579− boot.initrd.kernelModules = [ "loop" ];
583+ boot.initrd.kernelModules = [ "loop" "overlay" ];
580584
581585 # Closures to be copied to the Nix store on the CD, namely the init
582586 # script and the top-level system configuration directory.
nixos/modules/installer/netboot/netboot.nix+9−5
@@ -50,14 +50,18 @@ with lib;
5050 };
5151
5252 fileSystems."/nix/store" =
53− { fsType = "unionfs-fuse";
54− device = "unionfs";
55− options = [ "allow_other" "cow" "nonempty" "chroot=/mnt-root" "max_files=32768" "hide_meta_files" "dirs=/nix/.rw-store=rw:/nix/.ro-store=ro" ];
53+ { fsType = "overlay";
54+ device = "overlay";
55+ options = [
56+ "lowerdir=/nix/.ro-store"
57+ "upperdir=/nix/.rw-store/store"
58+ "workdir=/nix/.rw-store/work"
59+ ];
5660 };
5761
58− boot.initrd.availableKernelModules = [ "squashfs" ];
62+ boot.initrd.availableKernelModules = [ "squashfs" "overlay" ];
5963
60− boot.initrd.kernelModules = [ "loop" ];
64+ boot.initrd.kernelModules = [ "loop" "overlay" ];
6165
6266 # Closures to be copied to the Nix store, namely the init
6367 # script and the top-level system configuration directory.
nixos/modules/misc/ids.nix+2−2
@@ -299,7 +299,7 @@ in
299299 couchpotato = 267;
300300 gogs = 268;
301301 pdns-recursor = 269;
302− kresd = 270;
302+ #kresd = 270; # switched to "knot-resolver" with dynamic ID
303303 rpc = 271;
304304 geoip = 272;
305305 fcron = 273;
@@ -600,7 +600,7 @@ in
600600 headphones = 266;
601601 couchpotato = 267;
602602 gogs = 268;
603− kresd = 270;
603+ #kresd = 270; # switched to "knot-resolver" with dynamic ID
604604 #rpc = 271; # unused
605605 #geoip = 272; # unused
606606 fcron = 273;
nixos/modules/services/networking/kresd.nix+63−83
@@ -3,12 +3,34 @@
33with lib;
44
55let
6−
76 cfg = config.services.kresd;
8− configFile = pkgs.writeText "kresd.conf" ''
9− ${optionalString (cfg.listenDoH != []) "modules.load('http')"}
10− ${cfg.extraConfig};
11− '';
7+
8+ # Convert systemd-style address specification to kresd config line(s).
9+ # On Nix level we don't attempt to precisely validate the address specifications.
10+ mkListen = kind: addr: let
11+ al_v4 = builtins.match "([0-9.]\+):([0-9]\+)" addr;
12+ al_v6 = builtins.match "\\[(.\+)]:([0-9]\+)" addr;
13+ al_portOnly = builtins.match "()([0-9]\+)" addr;
14+ al = findFirst (a: a != null)
15+ (throw "services.kresd.*: incorrect address specification '${addr}'")
16+ [ al_v4 al_v6 al_portOnly ];
17+ port = last al;
18+ addrSpec = if al_portOnly == null then "'${head al}'" else "{'::', '127.0.0.1'}";
19+ in # freebind is set for compatibility with earlier kresd services;
20+ # it could be configurable, for example.
21+ ''
22+ net.listen(${addrSpec}, ${port}, { kind = '${kind}', freebind = true })
23+ '';
24+
25+ configFile = pkgs.writeText "kresd.conf" (
26+ optionalString (cfg.listenDoH != []) ''
27+ modules.load('http')
28+ ''
29+ + concatMapStrings (mkListen "dns") cfg.listenPlain
30+ + concatMapStrings (mkListen "tls") cfg.listenTLS
31+ + concatMapStrings (mkListen "doh") cfg.listenDoH
32+ + cfg.extraConfig
33+ );
1234
1335 package = pkgs.knot-resolver.override {
1436 extraFeatures = cfg.listenDoH != [];
@@ -25,6 +47,7 @@ in {
2547 value
2648 )
2749 )
50+ (mkRemovedOptionModule [ "services" "kresd" "cacheDir" ] "Please use (bind-)mounting instead.")
2851 ];
2952
3053 ###### interface
@@ -35,8 +58,8 @@ in {
3558 description = ''
3659 Whether to enable knot-resolver domain name server.
3760 DNSSEC validation is turned on by default.
38− You can run <literal>sudo nc -U /run/kresd/control</literal>
39− and give commands interactively to kresd.
61+ You can run <literal>sudo nc -U /run/knot-resolver/control/1</literal>
62+ and give commands interactively to kresd@1.service.
4063 '';
4164 };
4265 extraConfig = mkOption {
@@ -46,16 +69,10 @@ in {
4669 Extra lines to be added verbatim to the generated configuration file.
4770 '';
4871 };
49− cacheDir = mkOption {
50− type = types.path;
51− default = "/var/cache/kresd";
52− description = ''
53− Directory for caches. They are intended to survive reboots.
54− '';
55− };
5672 listenPlain = mkOption {
5773 type = with types; listOf str;
5874 default = [ "[::1]:53" "127.0.0.1:53" ];
75+ example = [ "53" ];
5976 description = ''
6077 What addresses and ports the server should listen on.
6178 For detailed syntax see ListenStream in man systemd.socket.
@@ -75,91 +92,54 @@ in {
7592 default = [];
7693 example = [ "198.51.100.1:443" "[2001:db8::1]:443" "443" ];
7794 description = ''
78− Addresses and ports on which kresd should provide DNS over HTTPS (see RFC 7858).
95+ Addresses and ports on which kresd should provide DNS over HTTPS (see RFC 8484).
7996 For detailed syntax see ListenStream in man systemd.socket.
8097 '';
8198 };
99+ instances = mkOption {
100+ type = types.ints.unsigned;
101+ default = 1;
102+ description = ''
103+ The number of instances to start. They will be called kresd@{1,2,...}.service.
104+ Knot Resolver uses no threads, so this is the way to scale.
105+ You can dynamically start/stop them at will, so this is just system default.
106+ '';
107+ };
82108 # TODO: perhaps options for more common stuff like cache size or forwarding
83109 };
84110
85111 ###### implementation
86112 config = mkIf cfg.enable {
87− environment.etc."kresd.conf".source = configFile; # not required
113+ environment.etc."knot-resolver/kresd.conf".source = configFile; # not required
88114
89− users.users.kresd =
90− { uid = config.ids.uids.kresd;
91− group = "kresd";
115+ users.users.knot-resolver =
116+ { isSystemUser = true;
117+ group = "knot-resolver";
92118 description = "Knot-resolver daemon user";
93119 };
94− users.groups.kresd.gid = config.ids.gids.kresd;
95−
96− systemd.sockets.kresd = rec {
97− wantedBy = [ "sockets.target" ];
98− before = wantedBy;
99− listenStreams = cfg.listenPlain;
100− socketConfig = {
101− ListenDatagram = listenStreams;
102− FreeBind = true;
103− FileDescriptorName = "dns";
104− };
105− };
120+ users.groups.knot-resolver.gid = null;
106121
107− systemd.sockets.kresd-tls = mkIf (cfg.listenTLS != []) rec {
108− wantedBy = [ "sockets.target" ];
109− before = wantedBy;
110− partOf = [ "kresd.socket" ];
111− listenStreams = cfg.listenTLS;
112− socketConfig = {
113− FileDescriptorName = "tls";
114− FreeBind = true;
115− Service = "kresd.service";
116− };
117− };
122+ systemd.packages = [ package ]; # the units are patched inside the package a bit
118123
119− systemd.sockets.kresd-doh = mkIf (cfg.listenDoH != []) rec {
120− wantedBy = [ "sockets.target" ];
121− before = wantedBy;
122− partOf = [ "kresd.socket" ];
123− listenStreams = cfg.listenDoH;
124− socketConfig = {
125− FileDescriptorName = "doh";
126− FreeBind = true;
127− Service = "kresd.service";
128− };
124+ systemd.targets.kresd = { # configure units started by default
125+ wantedBy = [ "multi-user.target" ];
126+ wants = [ "kres-cache-gc.service" ]
127+ ++ map (i: "kresd@${toString i}.service") (range 1 cfg.instances);
129128 };
130−
131− systemd.sockets.kresd-control = rec {
132− wantedBy = [ "sockets.target" ];
133− before = wantedBy;
134− partOf = [ "kresd.socket" ];
135− listenStreams = [ "/run/kresd/control" ];
136− socketConfig = {
137− FileDescriptorName = "control";
138− Service = "kresd.service";
139− SocketMode = "0660"; # only root user/group may connect and control kresd
140− };
129+ systemd.services."kresd@".serviceConfig = {
130+ ExecStart = "${package}/bin/kresd --noninteractive "
131+ + "-c ${package}/lib/knot-resolver/distro-preconfig.lua -c ${configFile}";
132+ # Ensure correct ownership in case UID or GID changes.
133+ CacheDirectory = "knot-resolver";
134+ CacheDirectoryMode = "0750";
141135 };
142136
143− systemd.tmpfiles.rules = [ "d '${cfg.cacheDir}' 0770 kresd kresd - -" ];
137+ environment.etc."tmpfiles.d/knot-resolver.conf".source =
138+ "${package}/lib/tmpfiles.d/knot-resolver.conf";
144139
145− systemd.services.kresd = {
146− description = "Knot-resolver daemon";
147−
148− serviceConfig = {
149− User = "kresd";
150− Type = "notify";
151− WorkingDirectory = cfg.cacheDir;
152− Restart = "on-failure";
153− Sockets = [ "kresd.socket" "kresd-control.socket" ]
154− ++ optional (cfg.listenTLS != []) "kresd-tls.socket";
155− };
156−
157− # Trust anchor goes from dns-root-data by default.
158− script = ''
159− exec '${package}/bin/kresd' --config '${configFile}' --forks=1
160− '';
161−
162− requires = [ "kresd.socket" ];
163− };
140+ # Try cleaning up the previously default location of cache file.
141+ # Note that /var/cache/* should always be safe to remove.
142+ # TODO: remove later, probably between 20.09 and 21.03
143+ systemd.tmpfiles.rules = [ "R /var/cache/kresd" ];
164144 };
165145}
nixos/modules/system/boot/stage-1-init.sh+8−5
@@ -334,8 +334,10 @@ mountFS() {
334334
335335 # Filter out x- options, which busybox doesn't do yet.
336336 local optionsFiltered="$(IFS=,; for i in $options; do if [ "${i:0:2}" != "x-" ]; then echo -n $i,; fi; done)"
337+ # Prefix (lower|upper|work)dir with /mnt-root (overlayfs)
338+ local optionsPrefixed="$( echo "$optionsFiltered" | sed -E 's#\<(lowerdir|upperdir|workdir)=#\1=/mnt-root#g' )"
337339
338− echo "$device /mnt-root$mountPoint $fsType $optionsFiltered" >> /etc/fstab
340+ echo "$device /mnt-root$mountPoint $fsType $optionsPrefixed" >> /etc/fstab
339341
340342 checkFS "$device" "$fsType"
341343
@@ -354,10 +356,11 @@ mountFS() {
354356 ;;
355357 esac
356358
357− # Create backing directories for unionfs-fuse.
358− if [ "$fsType" = unionfs-fuse ]; then
359− for i in $(IFS=:; echo ${options##*,dirs=}); do
360− mkdir -m 0700 -p /mnt-root"${i%=*}"
359+ # Create backing directories for overlayfs
360+ if [ "$fsType" = overlay ]; then
361+ for i in upper work; do
362+ dir="$( echo "$optionsPrefixed" | grep -o "${i}dir=[^,]*" )"
363+ mkdir -m 0700 -p "${dir##*=}"
361364 done
362365 fi
363366
nixos/tests/lorri/default.nix+3−3
@@ -15,12 +15,12 @@ import ../make-test-python.nix {
1515
1616 # Start the daemon and wait until it is ready
1717 machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr &")
18− machine.wait_until_succeeds("grep --fixed-strings 'lorri: ready' lorri.stdout")
18+ machine.wait_until_succeeds("grep --fixed-strings 'ready' lorri.stdout")
1919
2020 # Ping the daemon
21− machine.execute("lorri ping_ $(readlink -f shell.nix)")
21+ machine.succeed("lorri internal__ping shell.nix")
2222
2323 # Wait for the daemon to finish the build
24− machine.wait_until_succeeds("grep --fixed-strings 'OutputPaths' lorri.stdout")
24+ machine.wait_until_succeeds("grep --fixed-strings 'Completed' lorri.stdout")
2525 '';
2626}
pkgs/applications/graphics/paraview/default.nix+10−14
@@ -1,9 +1,5 @@
1−{
2−stdenv, fetchFromGitHub, cmake, makeWrapper
3−,qtbase, qttools, python, libGLU, libGL
4−,libXt, qtx11extras, qtxmlpatterns
5−, mkDerivation
6−}:
1+{ stdenv, fetchFromGitHub, cmake, makeWrapper, qtbase , qttools, python
2+, libGLU, libGL , libXt, qtx11extras, qtxmlpatterns , mkDerivation }:
73
84mkDerivation rec {
95 pname = "paraview";
@@ -53,20 +49,20 @@ mkDerivation rec {
5349
5450 # Paraview links into the Python library, resolving symbolic links on the way,
5551 # so we need to put the correct sitePackages (with numpy) back on the path
56− postInstall = ''
57− wrapProgram $out/bin/paraview \
52+ preFixup = ''
53+ wrapQtApp $out/bin/paraview \
5854 --prefix PYTHONPATH "${python.pkgs.numpy}/${python.sitePackages}"
59− wrapProgram $out/bin/pvbatch \
55+ wrapQtApp $out/bin/pvbatch \
6056 --prefix PYTHONPATH "${python.pkgs.numpy}/${python.sitePackages}"
61− wrapProgram $out/bin/pvpython \
57+ wrapQtApp $out/bin/pvpython \
6258 --prefix PYTHONPATH "${python.pkgs.numpy}/${python.sitePackages}"
6359 '';
6460
65− meta = {
61+ meta = with stdenv.lib; {
6662 homepage = http://www.paraview.org/;
6763 description = "3D Data analysis and visualization application";
68− license = stdenv.lib.licenses.free;
69− maintainers = with stdenv.lib.maintainers; [guibert];
70− platforms = with stdenv.lib.platforms; linux;
64+ license = licenses.free;
65+ maintainers = with maintainers; [ guibert ];
66+ platforms = platforms.linux;
7167 };
7268}
pkgs/applications/science/biology/spades/default.nix+2−2
@@ -2,11 +2,11 @@
22
33stdenv.mkDerivation rec {
44 pname = "SPAdes";
5− version = "3.13.1";
5+ version = "3.14.0";
66
77 src = fetchurl {
88 url = "http://cab.spbu.ru/files/release${version}/${pname}-${version}.tar.gz";
9− sha256 = "0giayz197lmq2108filkn9izma3i803sb3iskv9hs5snzdr9p8ld";
9+ sha256 = "1ffxswd2ngkpy1d6l3lb6a9cmyy1fglbdsws00b3m1k22zaqv60q";
1010 };
1111
1212 nativeBuildInputs = [ cmake ];
pkgs/development/libraries/imlib2/default.nix+23−14
@@ -1,19 +1,28 @@
1−{ stdenv, fetchurl, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig
2−, freetype, libid3tag
3−, x11Support ? true, xlibsWrapper ? null }:
4−
5−with stdenv.lib;
6−
1+{ stdenv, fetchurl
2+# Image file formats
3+, libjpeg, libtiff, giflib, libpng, libwebp
4+# imlib2 can load images from ID3 tags.
5+, libid3tag
6+, freetype , bzip2, pkgconfig
7+, x11Support ? true, xlibsWrapper ? null
8+}:
9+
10+let
11+ inherit (stdenv.lib) optional;
12+in
713stdenv.mkDerivation rec {
8− name = "imlib2-1.5.1";
14+ pname = "imlib2";
15+ version = "1.6.1";
916
1017 src = fetchurl {
11− url = "mirror://sourceforge/enlightenment/${name}.tar.bz2";
12− sha256 = "1bms2iwmvnvpz5jqq3r52glarqkafif47zbh1ykz8hw85d2mfkps";
18+ url = "mirror://sourceforge/enlightenment/${pname}-${version}.tar.bz2";
19+ sha256 = "0v8n3dswx7rxqfd0q03xwc7j2w1mv8lv18rdxv487a1xw5vklfad";
1320 };
1421
15− buildInputs = [ libjpeg libtiff giflib libpng bzip2 freetype libid3tag ]
16− ++ optional x11Support xlibsWrapper;
22+ buildInputs = [
23+ libjpeg libtiff giflib libpng libwebp
24+ bzip2 freetype libid3tag
25+ ] ++ optional x11Support xlibsWrapper;
1726
1827 nativeBuildInputs = [ pkgconfig ];
1928
@@ -35,7 +44,7 @@ stdenv.mkDerivation rec {
3544 moveToOutput bin/imlib2-config "$dev"
3645 '';
3746
38− meta = {
47+ meta = with stdenv.lib; {
3948 description = "Image manipulation library";
4049
4150 longDescription = ''
@@ -46,8 +55,8 @@ stdenv.mkDerivation rec {
4655 easily, without sacrificing speed.
4756 '';
4857
49− homepage = http://docs.enlightenment.org/api/imlib2/html;
50− license = licenses.free;
58+ homepage = "https://docs.enlightenment.org/api/imlib2/html";
59+ license = licenses.mit;
5160 platforms = platforms.unix;
5261 maintainers = with maintainers; [ spwhitt ];
5362 };
pkgs/development/python-modules/dask/default.nix+2−2
@@ -15,7 +15,7 @@
1515
1616buildPythonPackage rec {
1717 pname = "dask";
18− version = "2.9.1";
18+ version = "2.10.1";
1919
2020 disabled = pythonOlder "3.5";
2121
@@ -23,7 +23,7 @@ buildPythonPackage rec {
2323 owner = "dask";
2424 repo = pname;
2525 rev = version;
26− sha256 = "1xayr4gkp4slvmh2ksdr0d196giz3yhknqjjg1vw2j0la9gwfwxs";
26+ sha256 = "035mr7385yf5ng5wf60qxr80529h8dsla5hymkyg68dxhkd0jvbr";
2727 };
2828
2929 checkInputs = [
pkgs/development/tools/electron/5.x.nixdeleted−86
@@ -1,86 +0,0 @@
1−{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core }:
2−
3−let
4− version = "5.0.8";
5− name = "electron-${version}";
6−
7− throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
8−
9− meta = with stdenv.lib; {
10− description = "Cross platform desktop application shell";
11− homepage = https://github.com/electron/electron;
12− license = licenses.mit;
13− maintainers = with maintainers; [ travisbhartwell manveru ];
14− platforms = [ "x86_64-darwin" "x86_64-linux" "i686-linux" "armv7l-linux" "aarch64-linux" ];
15− };
16−
17− linux = {
18− inherit name version meta;
19− src = {
20− i686-linux = fetchurl {
21− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-ia32.zip";
22− sha256 = "1blw38x4fp4w2vs6r1d0jz3pg0m78417i0q9bvwpnwbn6wil857y";
23− };
24− x86_64-linux = fetchurl {
25− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip";
26− sha256 = "1gz5n8gkgka7343qcwckagd4ply1lxwiaccdjv16srk2wwc9bc9m";
27− };
28− armv7l-linux = fetchurl {
29− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-armv7l.zip";
30− sha256 = "1y8yna6z7xc378k6hsgngv9v98yjwq36knnr4qan0pw26paw1m82";
31− };
32− aarch64-linux = fetchurl {
33− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip";
34− sha256 = "1ha4ajvi0z051b6npigw6w4xi3bj3hhpxfr3xw4fgx6g6bvf1vpx";
35− };
36− }.${stdenv.hostPlatform.system} or throwSystem;
37−
38− buildInputs = [ gtk3 ];
39−
40− nativeBuildInputs = [
41− unzip
42− makeWrapper
43− wrapGAppsHook
44− ];
45−
46− dontWrapGApps = true; # electron is in lib, we need to wrap it manually
47−
48− buildCommand = ''
49− mkdir -p $out/lib/electron $out/bin
50− unzip -d $out/lib/electron $src
51− ln -s $out/lib/electron/electron $out/bin
52−
53− fixupPhase
54−
55− patchelf \
56− --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
57− --set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [ libuuid at-spi2-atk at-spi2-core ]}:$out/lib/electron" \
58− $out/lib/electron/electron
59−
60− wrapProgram $out/lib/electron/electron \
61− --prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 \
62− "''${gappsWrapperArgs[@]}"
63− '';
64− };
65−
66− darwin = {
67− inherit name version meta;
68−
69− src = fetchurl {
70− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-x64.zip";
71− sha256 = "1h7i2ik6wms5v6ji0mp33kzfh9sd89m7w3m2nm6wrjny7m0b43ww";
72− };
73−
74− buildInputs = [ unzip ];
75−
76− buildCommand = ''
77− mkdir -p $out/Applications
78− unzip $src
79− mv Electron.app $out/Applications
80− mkdir -p $out/bin
81− ln -s $out/Applications/Electron.app/Contents/MacOs/Electron $out/bin/electron
82− '';
83− };
84−in
85−
86− stdenv.mkDerivation (if stdenv.isDarwin then darwin else linux)
pkgs/development/tools/electron/default.nix+37−77
@@ -1,86 +1,46 @@
1−{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, gtk3, unzip, atomEnv, libuuid, at-spi2-atk }:
1+{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core }@args:
22
33let
4− version = "4.2.8";
5− name = "electron-${version}";
6−
7− throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
8−
9− meta = with stdenv.lib; {
10− description = "Cross platform desktop application shell";
11− homepage = https://github.com/electron/electron;
12− license = licenses.mit;
13− maintainers = with maintainers; [ travisbhartwell manveru ];
14− platforms = [ "x86_64-darwin" "x86_64-linux" "i686-linux" "armv7l-linux" "aarch64-linux" ];
4+ mkElectron = import ./generic.nix args;
5+in
6+{
7+ electron_4 = mkElectron "4.2.12" {
8+ x86_64-linux = "72c5319c92baa7101bea3254a036c0cd3bcf257f4a03a0bb153668b7292ee2dd";
9+ x86_64-darwin = "89b0e16bb9b7072ed7ed1906fccd08540acdd9f42dd8a29c97fa17d811b8c5e5";
10+ i686-linux = "bf96b1736141737bb064e48bdb543302fd259de634b1790b7cf930525f47859f";
11+ armv7l-linux = "2d970b3020627e5381fd4916dd8fa50ca9556202c118ab4cba09c293960689e9";
12+ aarch64-linux = "938b7cc5f917247a120920df30374f86414b0c06f9f3dc7ab02be1cadc944e55";
1513 };
1614
17− linux = {
18− inherit name version meta;
19− src = {
20− i686-linux = fetchurl {
21− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-ia32.zip";
22− sha256 = "1sikxr0pfpi3wrf1d7fia1vhb1gacsy9pr7qc0fycgnzsy2nvf8n";
23− };
24− x86_64-linux = fetchurl {
25− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip";
26− sha256 = "0wc954cjc13flvdh8rkmnifdx6nirf273v1n76lsklbsq6c73i4h";
27− };
28− armv7l-linux = fetchurl {
29− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-armv7l.zip";
30− sha256 = "0370ygpsm42drm70gj12i6mg960wchhqis7zz8i9is2ax1b2xjp5";
31− };
32− aarch64-linux = fetchurl {
33− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip";
34− sha256 = "0vl90lsjcsgcxivbaq526ffbx3lsh6axfmpkfxl8cj2jlbsg593k";
35− };
36− }.${stdenv.hostPlatform.system} or throwSystem;
37−
38− buildInputs = [ gtk3 ];
39−
40− nativeBuildInputs = [
41− unzip
42− makeWrapper
43− wrapGAppsHook
44− ];
45−
46− dontWrapGApps = true; # electron is in lib, we need to wrap it manually
47−
48− buildCommand = ''
49− mkdir -p $out/lib/electron $out/bin
50− unzip -d $out/lib/electron $src
51− ln -s $out/lib/electron/electron $out/bin
52−
53− fixupPhase
54−
55− patchelf \
56− --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
57− --set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [ libuuid at-spi2-atk ]}:$out/lib/electron" \
58− $out/lib/electron/electron
59−
60− wrapProgram $out/lib/electron/electron \
61− --prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 \
62− "''${gappsWrapperArgs[@]}"
63− '';
15+ electron_5 = mkElectron "5.0.13" {
16+ x86_64-linux = "8ded43241c4b7a6f04f2ff21c75ae10e4e6db1794e8b1b4f7656c0ed21667f8f";
17+ x86_64-darwin = "589834815fb9667b3c1c1aa6ccbd87d50e5660ecb430f6b475168b772b9857cd";
18+ i686-linux = "ccf4a5ed226928a30bd3ea830913d99853abb089bd4a6299ffa9fa0daa8d026a";
19+ armv7l-linux = "96ad83802bc61d87bb952027d49e5dd297f58e4493e66e393b26e51e09065add";
20+ aarch64-linux = "01f0fd313b060fb28a1022d68fb224d415fa22986e2a8f4aded6424b65e35add";
6421 };
6522
66− darwin = {
67− inherit name version meta;
68−
69− src = fetchurl {
70− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-x64.zip";
71− sha256 = "083v8k17b596fa63a7qrwyn2k8pd5vmg9yijbqbnpfcg4ja3bjx9";
72− };
73−
74− buildInputs = [ unzip ];
23+ electron_6 = mkElectron "6.1.7" {
24+ x86_64-linux = "7fe94fc1edebe2f5645056a4300fc642c04155e55da8dd4ee058a0c0ef835ae8";
25+ x86_64-darwin = "1c790a4cbda05f1c136d18fa6a09bdb09a1941f521207466756a3e95e343c485";
26+ i686-linux = "1afd8ea79acb2b4782fb459e084549ed4cd4ead779764829b1d862148359eae5";
27+ armv7l-linux = "14f2ea0459f0dda8c566b0fa4a2fe755f4220bbae313ea0c453861ac2f803196";
28+ aarch64-linux = "80e05c1a0b51c335483666e959c1631a089246986b7fc3a4f9ee1288a57a602a";
29+ };
7530
76− buildCommand = ''
77− mkdir -p $out/Applications
78− unzip $src
79− mv Electron.app $out/Applications
80− mkdir -p $out/bin
81− ln -s $out/Applications/Electron.app/Contents/MacOs/Electron $out/bin/electron
82− '';
31+ electron_7 = mkElectron "7.1.10" {
32+ x86_64-linux = "296f034ac9a00afa4dc99ed145410c015af3f59cd7e9becc7709d70a4f8a9ebf";
33+ x86_64-darwin = "10eb453c2b19948777a6f404fbdbdd48464a4cd63db16bd3ce66b60dda016724";
34+ i686-linux = "681b6440d4f0f7ffa29a34610ef41103d72937d6e524d81fd2d0fa8d9eb67936";
35+ armv7l-linux = "2c09e9a77f1da152d766dc2e43719e2852b70f917229466a2ac457416d1374f7";
36+ aarch64-linux = "1dad780b872bbc069eb1cac9ff4ec8f0b8d200153ab7f51397e27219094db1f0";
8337 };
84−in
8538
86− stdenv.mkDerivation (if stdenv.isDarwin then darwin else linux)
39+ electron_8 = mkElectron "8.0.0" {
40+ x86_64-linux = "b457a2ece83bb8a2efea42e75403740cbba051a64e325288760046b8999dd1c9";
41+ x86_64-darwin = "3f96dfa1d4e0313d11b9e5c66e2df161cfdb30685ee9dadcc779bcad2fb3876e";
42+ i686-linux = "0633ac2b6b6d00302e0e5df224d0e808e4ea9ecc14643e8534027e49b20436fb";
43+ armv7l-linux = "8d1f3daa86c77e7aceb8c8e4491c094e789951c7d475fc536b85fe7d279794bf";
44+ aarch64-linux = "484c04204478e8594d66f8bd332529c0c5eecfd71ee1705cc0478fa59c6818ee";
45+ };
46+}
pkgs/development/tools/electron/6.x.nix → pkgs/development/tools/electron/generic.nixrenamed+25−31
@@ -1,11 +1,9 @@
11{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core}:
22
3+version: hashes:
34let
4− version = "6.0.1";
55 name = "electron-${version}";
66
7− throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
8−
97 meta = with stdenv.lib; {
108 description = "Cross platform desktop application shell";
119 homepage = https://github.com/electron/electron;
@@ -14,27 +12,28 @@ let
1412 platforms = [ "x86_64-darwin" "x86_64-linux" "i686-linux" "armv7l-linux" "aarch64-linux" ];
1513 };
1614
17− linux = {
15+ fetcher = vers: tag: hash: fetchurl {
16+ url = "https://github.com/electron/electron/releases/download/v${vers}/electron-v${vers}-${tag}.zip";
17+ sha256 = hash;
18+ };
19+
20+ tags = {
21+ i686-linux = "linux-ia32";
22+ x86_64-linux = "linux-x64";
23+ armv7l-linux = "linux-armv7l";
24+ aarch64-linux = "linux-arm64";
25+ x86_64-darwin = "darwin-x64";
26+ };
27+
28+ get = as: platform: as.${platform.system} or
29+ "Unsupported system: ${platform.system}";
30+
31+ common = platform: {
1832 inherit name version meta;
19− src = {
20− i686-linux = fetchurl {
21− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-ia32.zip";
22− sha256 = "0ly6mjcljw0axkkrz7dsvfywmjb3pmspalfk2259gyqqxj8a37pb";
23− };
24− x86_64-linux = fetchurl {
25− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip";
26− sha256 = "0l8k6v16ynikf6x59w5byzhji0d6mqp2q0kjlrby56546qzyfkh6";
27− };
28− armv7l-linux = fetchurl {
29− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-armv7l.zip";
30− sha256 = "0c2xl8dm9fmj0d92w53zbn2np2fiwr88hw0dqjdn1rwczhw7zqss";
31− };
32− aarch64-linux = fetchurl {
33− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip";
34− sha256 = "0iyq229snm7z411xxfsv7f0bqg6hbw2l8y6ymys110f83hp01f8a";
35− };
36− }.${stdenv.hostPlatform.system} or throwSystem;
33+ src = fetcher version (get tags platform) (get hashes platform);
34+ };
3735
36+ linux = {
3837 buildInputs = [ gtk3 ];
3938
4039 nativeBuildInputs = [
@@ -64,13 +63,6 @@ let
6463 };
6564
6665 darwin = {
67− inherit name version meta;
68−
69− src = fetchurl {
70− url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-x64.zip";
71− sha256 = "0m8v5fs69kanrd1yk6smbmaaj9gb5j3q487z3wicifry0xn381i2";
72− };
73−
7466 buildInputs = [ unzip ];
7567
7668 buildCommand = ''
@@ -82,5 +74,7 @@ let
8274 '';
8375 };
8476in
85−
86− stdenv.mkDerivation (if stdenv.isDarwin then darwin else linux)
77+ stdenv.mkDerivation (
78+ (common stdenv.hostPlatform) //
79+ (if stdenv.isDarwin then darwin else linux)
80+ )
pkgs/development/tools/electron/print-hashes.sh+9−5
@@ -19,11 +19,15 @@ SYSTEMS=(
1919 [x86_64-darwin]=darwin-x64
2020)
2121
22+hashfile="$(nix-prefetch-url --print-path "https://github.com/electron/electron/releases/download/v${VERSION}/SHASUMS256.txt" 2>/dev/null | tail -n1)"
23+
24+echo "Entry similar to the following goes in default.nix:"
25+echo
26+echo " electron_${VERSION%%.*} = mkElectron \"${VERSION}\" {"
27+
2228for S in "${!SYSTEMS[@]}"; do
23− HASHES["$S"]=$(nix-prefetch-url "https://github.com/electron/electron/releases/download/v${VERSION}/electron-v${VERSION}-${SYSTEMS[$S]}.zip")
29+ hash="$(grep " *electron-v${VERSION}-${SYSTEMS[$S]}.zip$" "$hashfile"|cut -f1 -d' ')"
30+ echo " $S = \"$hash\";"
2431done
2532
26−for S in "${!HASHES[@]}"; do
27− echo "$S"
28− echo "sha256 = \"${HASHES[$S]}\";"
29−done
33+echo " };"
pkgs/development/tools/vagrant/default.nix+12−4
@@ -1,12 +1,13 @@
11{ stdenv, lib, fetchurl, buildRubyGem, bundlerEnv, ruby, libarchive
2−, libguestfs, qemu, writeText, withLibvirt ? stdenv.isLinux }:
2+, libguestfs, qemu, writeText, withLibvirt ? stdenv.isLinux, fetchpatch
3+}:
34
45let
56 # NOTE: bumping the version and updating the hash is insufficient;
67 # you must use bundix to generate a new gemset.nix in the Vagrant source.
7− version = "2.2.6";
8+ version = "2.2.7";
89 url = "https://github.com/hashicorp/vagrant/archive/v${version}.tar.gz";
9− sha256 = "0nssq2i4riif0q72h5qp7dlxd4shqcyvm1bx9adppcacb77gpnhv";
10+ sha256 = "1z31y1nqiyj6rml9lz8gcbr29myhs5wcap8jsvgm3pb7p9p9y8m9";
1011
1112 deps = bundlerEnv rec {
1213 name = "${pname}-${version}";
@@ -53,6 +54,13 @@ in buildRubyGem rec {
5354 ./unofficial-installation-nowarn.patch
5455 ./use-system-bundler-version.patch
5556 ./0004-Support-system-installed-plugins.patch
57+
58+ # fix deprecation warning on ruby 2.6.5.
59+ # See also https://github.com/hashicorp/vagrant/pull/11307
60+ (fetchpatch {
61+ url = "https://github.com/hashicorp/vagrant/commit/d18ed567aaa5da23c9e91ab87f360e7bf6760f13.patch";
62+ sha256 = "0f61qj41rc3fdggmnha4jrqg4pzmfiriwpsz4fcgf7c0bx6qha7q";
63+ })
5664 ];
5765
5866 postPatch = ''
@@ -110,7 +118,7 @@ in buildRubyGem rec {
110118 description = "A tool for building complete development environments";
111119 homepage = https://www.vagrantup.com/;
112120 license = licenses.mit;
113− maintainers = with maintainers; [ aneeshusa ];
121+ maintainers = with maintainers; [ aneeshusa ma27 ];
114122 platforms = with platforms; linux ++ darwin;
115123 };
116124}
pkgs/development/tools/vagrant/gemset.nix+16−16
@@ -14,10 +14,10 @@
1414 platforms = [];
1515 source = {
1616 remotes = ["https://rubygems.org"];
17− sha256 = "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1";
17+ sha256 = "045wzckxpwcqzrjr353cxnyaxgf0qg22jh00dcx7z38cys5g1jlr";
1818 type = "gem";
1919 };
20− version = "3.2.3";
20+ version = "3.2.4";
2121 };
2222 childprocess = {
2323 dependencies = ["ffi"];
@@ -86,10 +86,10 @@
8686 platforms = [];
8787 source = {
8888 remotes = ["https://rubygems.org"];
89− sha256 = "06mvxpjply8qh4j3fj9wh08kdzwkbnvsiysh0vrhlk5cwxzjmblh";
89+ sha256 = "10lfhahnnc91v63xpvk65apn61pib086zha3z5sp1xk9acfx12h4";
9090 type = "gem";
9191 };
92− version = "1.11.1";
92+ version = "1.12.2";
9393 };
9494 gssapi = {
9595 dependencies = ["ffi"];
@@ -150,10 +150,10 @@
150150 platforms = [];
151151 source = {
152152 remotes = ["https://rubygems.org"];
153− sha256 = "1gcp1m1p6dpasycfz2sj82ci9ggz7lsskz9c9q6gvfwxrl8y9dx7";
153+ sha256 = "0jwrd1l4mxz06iyx6053lr6hz2zy7ah2k3ranfzisvych5q19kwm";
154154 type = "gem";
155155 };
156− version = "1.1.1";
156+ version = "1.8.2";
157157 };
158158 listen = {
159159 dependencies = ["rb-fsevent" "rb-inotify" "ruby_dep"];
@@ -203,10 +203,10 @@
203203 platforms = [];
204204 source = {
205205 remotes = ["https://rubygems.org"];
206− sha256 = "0g7l18igjb9z7q4b2ykvyxyvjxlx5pwsmx5z3ibdbr6372xgfglk";
206+ sha256 = "1zj12l9qk62anvk9bjvandpa6vy4xslil15wl6wlivyf51z773vh";
207207 type = "gem";
208208 };
209− version = "3.3";
209+ version = "3.3.1";
210210 };
211211 mime-types-data = {
212212 groups = ["default"];
@@ -296,10 +296,10 @@
296296 platforms = [];
297297 source = {
298298 remotes = ["https://rubygems.org"];
299− sha256 = "1fs7hxm9g6ywv2yih83b879klhc4fs8i0p9166z795qmd77dk0a4";
299+ sha256 = "1jm76h8f8hji38z3ggf4bzi8vps6p7sagxn3ab57qc0xyga64005";
300300 type = "gem";
301301 };
302− version = "0.10.0";
302+ version = "0.10.1";
303303 };
304304 rb-kqueue = {
305305 dependencies = ["ffi"];
@@ -348,10 +348,10 @@
348348 platforms = [];
349349 source = {
350350 remotes = ["https://rubygems.org"];
351− sha256 = "0i5dhyiavmk2yc7xyfwzp3m476f7d9mhigibsw37jqpdq4vmi4cv";
351+ sha256 = "1qxc2zxwwipm6kviiar4gfhcakpx1jdcs89v6lvzivn5hq1xk78l";
352352 type = "gem";
353353 };
354− version = "1.2.4";
354+ version = "1.3.0";
355355 };
356356 unf = {
357357 dependencies = ["unf_ext"];
@@ -401,10 +401,10 @@
401401 platforms = [];
402402 source = {
403403 remotes = ["https://rubygems.org"];
404− sha256 = "1sl14qdshkmficdsy9z57xmdp5z9riv7jc5lv005n0h04mg7d47b";
404+ sha256 = "13c0vf32vinkp3ia86rvq779dacl37v4v2814v4g9qrk3liv0dym";
405405 type = "gem";
406406 };
407− version = "2.3.3";
407+ version = "2.3.4";
408408 };
409409 winrm-elevated = {
410410 dependencies = ["erubi" "winrm" "winrm-fs"];
@@ -412,10 +412,10 @@
412412 platforms = [];
413413 source = {
414414 remotes = ["https://rubygems.org"];
415− sha256 = "13d0pjzffbqicg08fsx4dsl6ibsqda5vx5d9f6hsds2z6mdilrab";
415+ sha256 = "12fzg9liydl244xq6r7x0wy06zn1n4czdbnjavy3150c3qsnv71a";
416416 type = "gem";
417417 };
418− version = "1.1.2";
418+ version = "1.2.0";
419419 };
420420 winrm-fs = {
421421 dependencies = ["erubi" "logging" "rubyzip" "winrm"];
pkgs/os-specific/linux/kernel/linux-4.4.nix+2−2
@@ -1,11 +1,11 @@
11{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
22
33buildLinux (args // rec {
4− version = "4.4.212";
4+ version = "4.4.213";
55 extraMeta.branch = "4.4";
66
77 src = fetchurl {
88 url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
9− sha256 = "0mx3qyj6w6h7gw7drsfsgl4iyz1695sjnf9hqh4kczci48kw5rj7";
9+ sha256 = "1cmwn9zvz14jqjy6qkszglhs2p5h6yh82b2269cbzvibg8y3rxq0";
1010 };
1111} // (args.argsOverride or {}))
pkgs/os-specific/linux/kernel/linux-4.9.nix+2−2
@@ -1,11 +1,11 @@
11{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
22
33buildLinux (args // rec {
4− version = "4.9.212";
4+ version = "4.9.213";
55 extraMeta.branch = "4.9";
66
77 src = fetchurl {
88 url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
9− sha256 = "0c5yjilaq86j6i2hzlxbp2ia7jhnf7kv952ffv7jxdf90sk3irxd";
9+ sha256 = "0r7bqpvbpiiniwsm338b38mv6flfgm1r09avxqsakhkh8rvgz1dg";
1010 };
1111} // (args.argsOverride or {}))
pkgs/os-specific/linux/kernel/linux-5.5.nix+2−2
@@ -3,7 +3,7 @@
33with stdenv.lib;
44
55buildLinux (args // rec {
6− version = "5.5.1";
6+ version = "5.5.2";
77
88 # modDirVersion needs to be x.y.z, will automatically add .0 if needed
99 modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
1313
1414 src = fetchurl {
1515 url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
16− sha256 = "1n9hwzbhp43a4lvmyb0mbayfnb9s1h6nbg23i93wzg7391hr28q3";
16+ sha256 = "17pr9v04g3lrar585l1zpnsmrivryqxwyfvjc3qp8wrkn21z7x94";
1717 };
1818} // (args.argsOverride or {}))
pkgs/os-specific/linux/wireguard/default.nix+2−2
@@ -7,11 +7,11 @@ assert stdenv.lib.versionOlder kernel.version "5.6";
77
88stdenv.mkDerivation rec {
99 pname = "wireguard";
10− version = "0.0.20200128";
10+ version = "0.0.20200205";
1111
1212 src = fetchzip {
1313 url = "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${version}.tar.xz";
14− sha256 = "05iz0pl0znx5yham8qzpym2ggc9babh36xaa504k99qqvddg8b11";
14+ sha256 = "084bvjhfqxvbh5wv7a2cj8k1i1lfix2l9972xwr36hw9kvqpynnm";
1515 };
1616
1717 preConfigure = ''
pkgs/servers/dns/knot-resolver/default.nix+36−34
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl
1+{ stdenv, fetchurl, fetchpatch
22# native deps.
33, runCommand, pkgconfig, meson, ninja, makeWrapper
44# build+runtime deps.
@@ -11,31 +11,38 @@ let # un-indented, over the whole file
1111
1212result = if extraFeatures then wrapped-full else unwrapped;
1313
14−inherit (stdenv.lib) optional optionals concatStringsSep;
14+inherit (stdenv.lib) optional optionals;
1515lua = luajitPackages;
1616
17−# FIXME: remove these usages once resolving
18−# https://github.com/NixOS/nixpkgs/pull/63108#issuecomment-508670438
19−exportLuaPathsFor = luaPkgs: ''
20− export LUA_PATH='${ concatStringsSep ";" (map lua.getLuaPath luaPkgs)}'
21− export LUA_CPATH='${concatStringsSep ";" (map lua.getLuaCPath luaPkgs)}'
22−'';
23−
2417unwrapped = stdenv.mkDerivation rec {
2518 pname = "knot-resolver";
26− version = "4.3.0";
19+ version = "5.0.1";
2720
2821 src = fetchurl {
2922 url = "https://secure.nic.cz/files/knot-resolver/${pname}-${version}.tar.xz";
30− sha256 = "0ca0f171ae2b2d76830967a5150eb0fa496b48b2a48f41b2be65d3743aaece25";
23+ sha256 = "4a93264ad0cda7ea2252d1ba057e474722f77848165f2893e0c76e21ae406415";
3124 };
3225
3326 outputs = [ "out" "dev" ];
3427
28+ # Path fixups for the NixOS service.
29+ postPatch = ''
30+ patch meson.build <<EOF
31+ @@ -50,2 +50,2 @@
32+ -systemd_work_dir = join_paths(prefix, get_option('localstatedir'), 'lib', 'knot-resolver')
33+ -systemd_cache_dir = join_paths(prefix, get_option('localstatedir'), 'cache', 'knot-resolver')
34+ +systemd_work_dir = '/var/lib/knot-resolver'
35+ +systemd_cache_dir = '/var/cache/knot-resolver'
36+ EOF
37+
38+ # ExecStart can't be overwritten in overrides.
39+ # We need that to use wrapped executable and correct config file.
40+ sed '/^ExecStart=/d' -i systemd/kresd@.service.in
41+ '';
42+
3543 preConfigure = ''
3644 patchShebangs scripts/
37− ''
38− + stdenv.lib.optionalString doInstallCheck (exportLuaPathsFor [ lua.cqueues lua.basexx ]);
45+ '';
3946
4047 nativeBuildInputs = [ pkgconfig meson ninja ];
4148
@@ -53,16 +60,17 @@ unwrapped = stdenv.mkDerivation rec {
5360 ]
5461 ++ optional doInstallCheck "-Dunit_tests=enabled"
5562 ++ optional (doInstallCheck && !stdenv.isDarwin) "-Dconfig_tests=enabled"
63+ ++ optional stdenv.isLinux "-Dsystemd_files=enabled" # used by NixOS service
5664 #"-Dextra_tests=enabled" # not suitable as in-distro tests; many deps, too.
5765 ;
5866
5967 postInstall = ''
6068 rm "$out"/lib/libkres.a
69+ rm "$out"/lib/knot-resolver/upgrade-4-to-5.lua # not meaningful on NixOS
6170 '';
6271
63− # aarch64: see https://github.com/wahern/cqueues/issues/223
64− doInstallCheck = with stdenv; hostPlatform == buildPlatform && !hostPlatform.isAarch64;
65− installCheckInputs = [ cmocka which cacert ];
72+ doInstallCheck = with stdenv; hostPlatform == buildPlatform;
73+ installCheckInputs = [ cmocka which cacert lua.cqueues lua.basexx ];
6674 installCheckPhase = ''
6775 meson test --print-errorlogs
6876 '';
@@ -76,37 +84,31 @@ unwrapped = stdenv.mkDerivation rec {
7684 };
7785};
7886
79−# FIXME: revert this back after resolving
80−# https://github.com/NixOS/nixpkgs/pull/63108#issuecomment-508670438
81−wrapped-full =
82− with stdenv.lib;
83− with luajitPackages;
84− let
85− luaPkgs = [
86− luasec luasocket # trust anchor bootstrap, prefill module
87− luafilesystem # prefill module
88− http # for http module; brings lots of deps; some are useful elsewhere
89− cqueues fifo lpeg lpeg_patterns luaossl compat53 basexx binaryheap
90− ];
91− in runCommand unwrapped.name
87+wrapped-full = runCommand unwrapped.name
9288 {
9389 nativeBuildInputs = [ makeWrapper ];
90+ buildInputs = with luajitPackages; [
91+ # For http module, prefill module, trust anchor bootstrap.
92+ # It brings lots of deps; some are useful elsewhere (e.g. cqueues).
93+ http
94+ # psl isn't in nixpkgs yet, but policy.slice_randomize_psl() seems not important.
95+ ];
9496 preferLocalBuild = true;
9597 allowSubstitutes = false;
9698 }
97− (exportLuaPathsFor luaPkgs
98− + ''
99− mkdir -p "$out"/{bin,share}
99+ ''
100+ mkdir -p "$out"/bin
100101 makeWrapper '${unwrapped}/bin/kresd' "$out"/bin/kresd \
101102 --set LUA_PATH "$LUA_PATH" \
102103 --set LUA_CPATH "$LUA_CPATH"
103104
104− ln -sr '${unwrapped}/share/man' "$out"/share/
105+ ln -sr '${unwrapped}/share' "$out"/
106+ ln -sr '${unwrapped}/lib' "$out"/ # useful in NixOS service
105107 ln -sr "$out"/{bin,sbin}
106108
107109 echo "Checking that 'http' module loads, i.e. lua search paths work:"
108110 echo "modules.load('http')" > test-http.lua
109111 echo -e 'quit()' | env -i "$out"/bin/kresd -a 127.0.0.1#53535 -c test-http.lua
110− '');
112+ '';
111113
112114in result
pkgs/servers/documize-community/default.nix+2−2
@@ -2,13 +2,13 @@
22
33buildGoModule rec {
44 pname = "documize-community";
5− version = "3.6.0";
5+ version = "3.7.0";
66
77 src = fetchFromGitHub {
88 owner = "documize";
99 repo = "community";
1010 rev = "v${version}";
11− sha256 = "0wic4j7spw9ya1m6yz0mkpqi1px6jd2vk60w8ldx0m0k606wy6ir";
11+ sha256 = "1pcldf9lqvpb2h2a3kr3mahj2v1jasjwrszj6czjmkyml7x2sz7c";
1212 };
1313
1414 modSha256 = "1z0v7n8klaxcqv7mvzf3jzgrp78zb4yiibx899ppk6i5qnj4xiv0";
pkgs/shells/zsh/oh-my-zsh/default.nix+2−2
@@ -6,11 +6,11 @@
66stdenv.mkDerivation rec {
77 version = "2020-02-04";
88 pname = "oh-my-zsh";
9− rev = "6bebc254e88ac9b7fdaa7491d031f82ec107e418";
9+ rev = "77aa1795d2f05583d4fc63a63abb0144beb5ecff";
1010
1111 src = fetchgit { inherit rev;
1212 url = "https://github.com/ohmyzsh/ohmyzsh";
13− sha256 = "1lmg1givymr4hgmvmngklm7q3g7dpqwm7aj5xild72cdhx0g5qqw";
13+ sha256 = "0n36wpdlr1w4gr0cja48mcywi8av71p3diigkiv3n45a9hh94fxx";
1414 };
1515
1616 pathsToLink = [ "/share/oh-my-zsh" ];
pkgs/tools/misc/lorri/default.nix+4−4
@@ -14,7 +14,7 @@
1414
1515rustPlatform.buildRustPackage rec {
1616 pname = "lorri";
17− version = "unstable-2020-01-09";
17+ version = "1.0";
1818
1919 meta = with stdenv.lib; {
2020 description = "Your project's nix-env";
@@ -27,11 +27,11 @@ rustPlatform.buildRustPackage rec {
2727 owner = "target";
2828 repo = pname;
2929 # Run `eval $(nix-build -A lorri.updater)` after updating the revision!
30− rev = "7b84837b9988d121dd72178e81afd440288106c5";
31− sha256 = "0rkga944jl6i0051vbsddfqbvzy12168cbg4ly2ng1rk0x97dbr8";
30+ rev = "88c680c9abf0f04f2e294436d20073ccf26f0781";
31+ sha256 = "1415mhdr0pwvshs04clfz1ys76r5qf9jz8jchm63l6llaj6m7mrv";
3232 };
3333
34− cargoSha256 = "0k7l0zhk2vzf4nlwv4xr207irqib2dqjxfdjk1fprff84c4kblx8";
34+ cargoSha256 = "1kdpzbn3353yk7i65hll480fcy16wdvppdr6xgfh06x88xhim4mp";
3535 doCheck = false;
3636
3737 BUILD_REV_COUNT = src.revCount or 1;
pkgs/tools/security/sequoia/default.nix+3−3
@@ -9,16 +9,16 @@ assert pythonSupport -> pythonPackages != null;
99
1010rustPlatform.buildRustPackage rec {
1111 pname = "sequoia";
12− version = "0.11.0";
12+ version = "0.13.0";
1313
1414 src = fetchFromGitLab {
1515 owner = "sequoia-pgp";
1616 repo = pname;
1717 rev = "v${version}";
18− sha256 = "1k0pr3vn77fpfzyvbg7xb4jwm6srsiws9bsd8q7i3hl6j56a880i";
18+ sha256 = "0hxdjzd2qjwf9pbnkzrnzlg0xa8vf1f65aryq7pd9895bpnk7740";
1919 };
2020
21− cargoSha256 = "15bhg7b88rq8p0bn6y5wwv2l42kqb1qyx2s3kw0r0v0wadf823q3";
21+ cargoSha256 = "0w968ynxqkznp9g1ah040iv6ghwqwqjk1cjlr2f0j5fs57rspzf2";
2222
2323 nativeBuildInputs = [
2424 pkgconfig
pkgs/tools/security/sudo/default.nix+2−2
@@ -6,11 +6,11 @@
66
77stdenv.mkDerivation rec {
88 pname = "sudo";
9− version = "1.8.30";
9+ version = "1.8.31";
1010
1111 src = fetchurl {
1212 url = "ftp://ftp.sudo.ws/pub/sudo/${pname}-${version}.tar.gz";
13− sha256 = "1rvrqlqrrjsd06dczgj9cwjdkpkqil5zzlwh87h06ms6qzfx6nm3";
13+ sha256 = "0ks5mm9hda5idivncyfpiz4lrd8fv0dpmsl711788k7f7ixdka3y";
1414 };
1515
1616 prePatch = ''
pkgs/top-level/all-packages.nix+2−5
@@ -9667,11 +9667,8 @@ in
96679667
96689668 aws-adfs = with python3Packages; toPythonApplication aws-adfs;
96699669
9670− electron_6 = callPackage ../development/tools/electron/6.x.nix { };
9671−
9672− electron_5 = callPackage ../development/tools/electron/5.x.nix { };
9673−
9674− electron_4 = callPackage ../development/tools/electron { };
9670+ inherit (callPackages ../development/tools/electron { })
9671+ electron_4 electron_5 electron_6 electron_7 electron_8;
96759672
96769673 electron_3 = callPackage ../development/tools/electron/3.x.nix { };
96779674 electron = electron_4;