git.iko.soy/typeable/nixpkgs
on master help sign in
Merge master into staging-next
commite5381cdeceeb150535998cee5518e6fa678e4dc0 authorFrederik Rietdijk <fridh@fridh.nl> dateSun 6 Jan 2019, 09:36 (8 years ago) parentd84a33d7d864c6
55 files changed+496−1338
doc/package-notes.xml+7−11 nixos/modules/profiles/hardened.nix+9 nixos/modules/programs/xss-lock.nix+2−1 nixos/modules/services/hardware/lirc.nix+3−3 nixos/modules/services/hardware/vdr.nix+12−2 nixos/tests/xss-lock.nix+1−2 pkgs/applications/altcoins/bitcoin.nix+2−2 pkgs/applications/editors/geany/default.nix+2−2 pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix+3−3 pkgs/applications/science/logic/cryptominisat/default.nix+5−11 pkgs/applications/video/obs-studio/default.nix+1−1 pkgs/applications/video/vlc/default.nix+2−2 pkgs/development/compilers/elm/README.md+24 pkgs/development/compilers/elm/default.nix+7−62 pkgs/development/compilers/elm/elm2nix.rb−26 pkgs/development/compilers/elm/packages/elm-elm.nix−50 pkgs/development/compilers/elm/packages/elm-srcs.nix+62 pkgs/development/compilers/elm/packages/elm.nix+1 pkgs/development/compilers/elm/packages/tasty-quickcheck.nix−14 pkgs/development/compilers/elm/update.sh+8−1 pkgs/development/compilers/elm/versions.dat pkgs/development/haskell-modules/configuration-common.nix+4 pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix+2 pkgs/development/libraries/getdns/default.nix+3−3 pkgs/development/python-modules/easywatch/default.nix+28 pkgs/development/python-modules/gcutil/default.nix−41 pkgs/development/python-modules/google-api-python-client/default.nix+4−3 pkgs/development/python-modules/ldap3/default.nix+12−4 pkgs/development/python-modules/simplejson/default.nix+2−2 pkgs/development/python-modules/staticjinja/default.nix+30 pkgs/development/python-modules/weboob/default.nix+15−4 pkgs/development/tools/gllvm/default.nix+2−2 pkgs/development/tools/minizinc/ide.nix+42 pkgs/games/anki/default.nix+10−5 pkgs/misc/emulators/wine/base.nix+1−1 pkgs/os-specific/linux/i2c-tools/default.nix+6−5 pkgs/os-specific/linux/kernel/hardened-config.nix+24−11 pkgs/os-specific/linux/sysstat/default.nix+2−2 pkgs/tools/networking/offlineimap/default.nix+4−1 pkgs/tools/networking/stubby/default.nix+2−2 pkgs/tools/security/afl/default.nix+58−64 pkgs/tools/security/afl/qemu-patches/afl-config.h−335 pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.h−296 pkgs/tools/security/afl/qemu-patches/afl-types.h−79 pkgs/tools/security/afl/qemu-patches/cpu-exec.patch−33 pkgs/tools/security/afl/qemu-patches/elfload.patch−32 pkgs/tools/security/afl/qemu-patches/no-etc-install.patch+5−6 pkgs/tools/security/afl/qemu-patches/qemu-2.10.0-glibc-2.27.patch+28 pkgs/tools/security/afl/qemu-patches/qemu-2.3.0-glibc-2.26.patch−121 pkgs/tools/security/afl/qemu-patches/syscall.patch−25 pkgs/tools/security/afl/qemu-patches/translate-all.patch−18 pkgs/tools/security/afl/qemu.nix+42−36 pkgs/tools/system/bfs/default.nix+5−11 pkgs/top-level/all-packages.nix+5−2 pkgs/top-level/python-packages.nix+9−1
doc/package-notes.xml+7−11
@@ -307,23 +307,19 @@ packageOverrides = pkgs: {
307307</screen>
308308 </para>
309309 </section>
310+
310311 <section xml:id="sec-elm">
311312 <title>Elm</title>
312313
313314 <para>
314− The Nix expressions for Elm reside in
315− <filename>pkgs/development/compilers/elm</filename>. They are generated
316− automatically by <command>update-elm.rb</command> script. One should specify
317− versions of Elm packages inside the script, clear the
318− <filename>packages</filename> directory and run the script from inside it.
319− <literal>elm-reactor</literal> is special because it also has Elm package
320− dependencies. The process is not automated very much for now -- you should
321− get the <literal>elm-reactor</literal> source tree (e.g. with
322− <command>nix-shell</command>) and run <command>elm2nix.rb</command> inside
323− it. Place the resulting <filename>package.nix</filename> file into
324− <filename>packages/elm-reactor-elm.nix</filename>.
315+ To update Elm compiler, see <filename>nixpkgs/pkgs/development/compilers/elm/README.md</filename>.
316+ </para>
317+
318+ <para>
319+ To package Elm applications, <link xlink:href="https://github.com/hercules-ci/elm2nix#elm2nix">read about elm2nix</link>.
325320 </para>
326321 </section>
322+
327323 <section xml:id="sec-shell-helpers">
328324 <title>Interactive shell helpers</title>
329325
nixos/modules/profiles/hardened.nix+9
@@ -29,11 +29,20 @@ with lib;
2929 security.apparmor.enable = mkDefault true;
3030
3131 boot.kernelParams = [
32+ # Slab/slub sanity checks, redzoning, and poisoning
33+ "slub_debug=FZP"
34+
35+ # Disable slab merging to make certain heap overflow attacks harder
36+ "slab_nomerge"
37+
3238 # Overwrite free'd memory
3339 "page_poison=1"
3440
3541 # Disable legacy virtual syscalls
3642 "vsyscall=none"
43+
44+ # Enable PTI even if CPU claims to be safe from meltdown
45+ "pti=on"
3746 ];
3847
3948 boot.blacklistedKernelModules = [
nixos/modules/programs/xss-lock.nix+2−1
@@ -9,7 +9,8 @@ in
99 options.programs.xss-lock = {
1010 enable = mkEnableOption "xss-lock";
1111 lockerCommand = mkOption {
12− example = "xlock";
12+ default = "${pkgs.i3lock}/bin/i3lock";
13+ example = literalExample ''''${pkgs.i3lock-fancy}/bin/i3lock-fancy'';
1314 type = types.string;
1415 description = "Locker to be used with xsslock";
1516 };
nixos/modules/services/hardware/lirc.nix+3−3
@@ -32,7 +32,6 @@ in {
3232 default = [];
3333 description = "Extra arguments to lircd.";
3434 };
35−
3635 };
3736 };
3837
@@ -43,14 +42,15 @@ in {
4342 # Note: LIRC executables raises a warning, if lirc_options.conf do not exists
4443 environment.etc."lirc/lirc_options.conf".text = cfg.options;
4544
45+ passthru.lirc.socket = "/run/lirc/lircd";
46+
4647 environment.systemPackages = [ pkgs.lirc ];
4748
4849 systemd.sockets.lircd = {
4950 description = "LIRC daemon socket";
5051 wantedBy = [ "sockets.target" ];
5152 socketConfig = {
52− # default search path
53− ListenStream = "/run/lirc/lircd";
53+ ListenStream = config.passthru.lirc.socket;
5454 SocketUser = "lirc";
5555 SocketMode = "0660";
5656 };
nixos/modules/services/hardware/vdr.nix+12−2
@@ -33,12 +33,14 @@ in {
3333 default = [];
3434 description = "Additional command line arguments to pass to VDR.";
3535 };
36+
37+ enableLirc = mkEnableOption "enable LIRC";
3638 };
3739 };
3840
3941 ###### implementation
4042
41− config = mkIf cfg.enable {
43+ config = mkIf cfg.enable (mkMerge [{
4244 systemd.tmpfiles.rules = [
4345 "d ${cfg.videoDir} 0755 vdr vdr -"
4446 "Z ${cfg.videoDir} - vdr vdr -"
@@ -67,5 +69,13 @@ in {
6769 };
6870
6971 users.groups.vdr = {};
70− };
72+ }
73+
74+ (mkIf cfg.enableLirc {
75+ services.lirc.enable = true;
76+ users.users.vdr.extraGroups = [ "lirc" ];
77+ services.vdr.extraArguments = [
78+ "--lirc=${config.passthru.lirc.socket}"
79+ ];
80+ })]);
7181}
nixos/tests/xss-lock.nix+1−2
@@ -9,7 +9,6 @@ with lib;
99 machine = {
1010 imports = [ ./common/x11.nix ./common/user-account.nix ];
1111 programs.xss-lock.enable = true;
12− programs.xss-lock.lockerCommand = "${pkgs.xlockmore}/bin/xlock";
1312 services.xserver.displayManager.auto.user = "alice";
1413 };
1514
@@ -20,6 +19,6 @@ with lib;
2019
2120 $machine->fail("pgrep xlock");
2221 $machine->succeed("su -l alice -c 'xset dpms force standby'");
23− $machine->waitUntilSucceeds("pgrep xlock");
22+ $machine->waitUntilSucceeds("pgrep i3lock");
2423 '';
2524})
pkgs/applications/altcoins/bitcoin.nix+2−2
@@ -5,13 +5,13 @@
55with stdenv.lib;
66stdenv.mkDerivation rec{
77 name = "bitcoin" + (toString (optional (!withGui) "d")) + "-" + version;
8− version = "0.17.0";
8+ version = "0.17.1";
99
1010 src = fetchurl {
1111 urls = [ "https://bitcoincore.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz"
1212 "https://bitcoin.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz"
1313 ];
14− sha256 = "0pkq28d2dj22qrxyyg9kh0whmhj7ghyabnhyqldbljv4a7l3kvwq";
14+ sha256 = "0am4pnaf2cisv172jqx6jdpzx770agm8777163lkjbw3ryslymiy";
1515 };
1616
1717 nativeBuildInputs = [ pkgconfig autoreconfHook ]
pkgs/applications/editors/geany/default.nix+2−2
@@ -3,7 +3,7 @@
33with stdenv.lib;
44
55let
6− version = "1.34";
6+ version = "1.34.1";
77in
88
99stdenv.mkDerivation rec {
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
1111
1212 src = fetchurl {
1313 url = "https://download.geany.org/${name}.tar.bz2";
14− sha256 = "63b93d25d037eaffa77895ae6dd29c91bca570e4053eff5cc8490f87e6021f8e";
14+ sha256 = "e765efd89e759defe3fd797d8a2052afbb4b23522efbcc72e3a72b7f1093ec11";
1515 };
1616
1717 nativeBuildInputs = [ pkgconfig intltool libintl ];
pkgs/applications/networking/irc/weechat/scripts/weechat-matrix-bridge/default.nix+3−3
@@ -1,12 +1,12 @@
11{ stdenv, curl, fetchFromGitHub, cjson, olm, luaffi }:
22
33stdenv.mkDerivation {
4− name = "weechat-matrix-bridge-2018-05-29";
4+ name = "weechat-matrix-bridge-2018-11-19";
55 src = fetchFromGitHub {
66 owner = "torhve";
77 repo = "weechat-matrix-protocol-script";
8− rev = "ace3fefc0e35a627f8a528032df2e3111e41eb1b";
9− sha256 = "1snf8vn5n9wzrnqnvdrcli4199s5p114jbjlgrj5c27i53173wqw";
8+ rev = "8d32e90d864a8f3f09ecc2857cd5dd6e39a8c3f7";
9+ sha256 = "0qqd6qmkrdc0r3rnl53c3yp93fbcz7d3mdw3vq5gmdqxyym4s9lj";
1010 };
1111
1212 patches = [
pkgs/applications/science/logic/cryptominisat/default.nix+5−11
@@ -1,24 +1,18 @@
1−{ stdenv, fetchFromGitHub, fetchpatch, cmake, python, xxd }:
1+{ stdenv, fetchFromGitHub, fetchpatch, cmake, python3, xxd, boost }:
22
33stdenv.mkDerivation rec {
44 name = "cryptominisat-${version}";
5− version = "5.0.1";
5+ version = "5.6.6";
66
77 src = fetchFromGitHub {
88 owner = "msoos";
99 repo = "cryptominisat";
1010 rev = version;
11− sha256 = "0cpw5d9vplxvv3aaplhnga55gz1hy29p7s4pkw1306knkbhlzvkb";
11+ sha256 = "1a1494gj4j73yij0hjbzsn2hglk9zy5c5wfwgig3j67cis28saf5";
1212 };
1313
14− buildInputs = [ python xxd ];
15− nativeBuildInputs = [ cmake ];
16−
17− patches = [(fetchpatch rec {
18− name = "fix-exported-library-name.patch";
19− url = "https://github.com/msoos/cryptominisat/commit/7a47795cbe5ad5a899731102d297f234bcade077.patch";
20− sha256 = "11hf3cfqs4cykn7rlgjglq29lzqfxvlm0f20qasi0kdrz01cr30f";
21− })];
14+ buildInputs = [ python3 boost ];
15+ nativeBuildInputs = [ cmake xxd ];
2216
2317 meta = with stdenv.lib; {
2418 description = "An advanced SAT Solver";
pkgs/applications/video/obs-studio/default.nix+1−1
@@ -91,6 +91,6 @@ in stdenv.mkDerivation rec {
9191 homepage = https://obsproject.com;
9292 maintainers = with maintainers; [ jb55 MP2E ];
9393 license = licenses.gpl2;
94− platforms = with platforms; linux;
94+ platforms = [ "x86_64-linux" "i686-linux" ];
9595 };
9696}
pkgs/applications/video/vlc/default.nix+2−2
@@ -21,11 +21,11 @@ assert (withQt5 -> qtbase != null && qtsvg != null && qtx11extras != null);
2121
2222stdenv.mkDerivation rec {
2323 name = "vlc-${version}";
24− version = "3.0.4";
24+ version = "3.0.5";
2525
2626 src = fetchurl {
2727 url = "http://get.videolan.org/vlc/${version}/${name}.tar.xz";
28− sha256 = "17jsq0zqpqyxw4ckvjba0hf6zk8ywc4wf8sy3z03hh3ij0vxpwq1";
28+ sha256 = "1nvj00khy08sing0mdnw6virmiq579mrk5rvpx9710nlxggqgh7m";
2929 };
3030
3131 # VLC uses a *ton* of libraries for various pieces of functionality, many of
pkgs/development/compilers/elm/README.mdnew file+24
@@ -0,0 +1,24 @@
1+# To update Elm:
2+
3+Modify revision in ./update.sh and run it
4+
5+# Notes about the build process:
6+
7+The elm binary embeds a piece of pre-compiled elm code, used by 'elm
8+reactor'. This means that the build process for 'elm' effectively
9+executes 'elm make'. that in turn expects to retrieve the elm
10+dependencies of that code (elm/core, etc.) from
11+package.elm-lang.org, as well as a cached bit of metadata
12+(versions.dat).
13+
14+The makeDotElm function lets us retrieve these dependencies in the
15+standard nix way. we have to copy them in (rather than symlink) and
16+make them writable because the elm compiler writes other .dat files
17+alongside the source code. versions.dat was produced during an
18+impure build of this same code; the build complains that it can't
19+update this cache, but continues past that warning.
20+
21+Finally, we set ELM_HOME to point to these pre-fetched artifacts so
22+that the default of ~/.elm isn't used.
23+
24+More: https://blog.hercules-ci.com/elm/2019/01/03/elm2nix-0.1/
pkgs/development/compilers/elm/default.nix+7−62
@@ -2,95 +2,40 @@
22, haskell, nodejs
33, fetchurl, fetchpatch, makeWrapper, git }:
44
5−# To update:
6−
7−# 1) Modify ./update.sh and run it
8−
9−# 2) to generate versions.dat:
10−# 2.1) git clone https://github.com/elm/compiler.git
11−# 2.2) cd compiler
12−# 2.3) cabal2nix --shell . | sed 's/"default",/"ghc822",/' > shell.nix
13−# 2.4) nix-shell
14−# 2.5) mkdir .elm
15−# 2.6) export ELM_HOME=$(pwd)/.elm
16−# 2.7) cabal build
17−# 2.8) cp .elm/0.19.0/package/versions.dat ...
18−
19−# 3) generate a template for elm-elm.nix with:
20−# (
21−# echo "{";
22−# jq '.dependencies | .direct, .indirect | to_entries | .[] | { (.key) : { version : .value, sha256: "" } } ' \
23−# < ui/browser/elm.json \
24−# | sed 's/:/ =/' \
25−# | sed 's/^[{}]//' \
26−# | sed -E 's/(["}]),?$/\1;/' \
27−# | sed -E 's/"(version|sha256)"/\1/' \
28−# | grep -v '^$';
29−# echo "}"
30−# )
31−#
32−# ... then fill in the sha256s
33−
34−# Notes:
35−
36−# the elm binary embeds a piece of pre-compiled elm code, used by 'elm
37−# reactor'. this means that the build process for 'elm' effectively
38−# executes 'elm make'. that in turn expects to retrieve the elm
39−# dependencies of that code (elm/core, etc.) from
40−# package.elm-lang.org, as well as a cached bit of metadata
41−# (versions.dat).
42−
43−# the makeDotElm function lets us retrieve these dependencies in the
44−# standard nix way. we have to copy them in (rather than symlink) and
45−# make them writable because the elm compiler writes other .dat files
46−# alongside the source code. versions.dat was produced during an
47−# impure build of this same code; the build complains that it can't
48−# update this cache, but continues past that warning.
49−
50−# finally, we set ELM_HOME to point to these pre-fetched artifacts so
51−# that the default of ~/.elm isn't used.
52−
535let
546 fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
55− hsPkgs = haskell.packages.ghc822.override {
7+ hsPkgs = haskell.packages.ghc863.override {
568 overrides = self: super: with haskell.lib;
579 let elmPkgs = {
5810 elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
5911 # sadly with parallelism most of the time breaks compilation
6012 enableParallelBuilding = false;
61− preConfigure = fetchElmDeps {
62− elmPackages = (import ./packages/elm-elm.nix);
13+ preConfigure = self.fetchElmDeps {
14+ elmPackages = (import ./packages/elm-srcs.nix);
6315 versionsDat = ./versions.dat;
6416 };
6517 buildTools = drv.buildTools or [] ++ [ makeWrapper ];
66− patches = [
67− (fetchpatch {
68− url = "https://github.com/elm/compiler/pull/1784/commits/78d2d8eab310552b1b877a3e90e1e57e7a09ddec.patch";
69− sha256 = "0vdhk16xqm2hxw12s1b91a0bmi8w4wsxc086qlzglgnjxrl5b3w4";
70− })
71− ];
18+ jailbreak = true;
7219 postInstall = ''
7320 wrapProgram $out/bin/elm \
7421 --prefix PATH ':' ${lib.makeBinPath [ nodejs ]}
7522 '';
7623 });
7724
78−
79−
8025 /*
8126 The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
8227 `pacakge/nix/build.sh`
8328 */
84− elm-format = self.callPackage ./packages/elm-format.nix {};
29+ elm-format = justStaticExecutables (doJailbreak (self.callPackage ./packages/elm-format.nix {}));
30+
8531 inherit fetchElmDeps;
32+ elmVersion = elmPkgs.elm.version;
8633 };
8734 in elmPkgs // {
8835 inherit elmPkgs;
89− elmVersion = elmPkgs.elm.version;
9036
9137 # Needed for elm-format
9238 indents = self.callPackage ./packages/indents.nix {};
93− tasty-quickcheck = self.callPackage ./packages/tasty-quickcheck.nix {};
9439 };
9540 };
9641in hsPkgs.elmPkgs
pkgs/development/compilers/elm/elm2nix.rbdeleted−26
@@ -1,26 +0,0 @@
1−#!/usr/bin/env ruby
2−
3−require 'json'
4−
5−system("elm-package install -y")
6−depsSrc = JSON.parse(File.read("elm-stuff/exact-dependencies.json"))
7−deps = Hash[ depsSrc.map { |pkg, ver|
8− url = "https://github.com/#{pkg}/archive/#{ver}.tar.gz"
9− sha256 = `nix-prefetch-url #{url}`
10−
11− [ pkg, { version: ver,
12− sha256: sha256.strip
13− }
14− ]
15−} ]
16−
17−File.open("package.nix", 'w') do |file|
18− file.puts "{"
19− for pkg, info in deps
20− file.puts " \"#{pkg}\" = {"
21− file.puts " version = \"#{info[:version]}\";"
22− file.puts " sha256 = \"#{info[:sha256]}\";"
23− file.puts " };"
24− end
25− file.puts "}"
26−end
pkgs/development/compilers/elm/packages/elm-elm.nixdeleted−50
@@ -1,50 +0,0 @@
1−{
2− "elm/browser" = {
3− version = "1.0.0";
4− sha256 = "1apmvyax93nvmagwj00y16zx10kfv640cxpi64xgqbgy7d2wphy4";
5− };
6− "elm/core" = {
7− version = "1.0.0";
8− sha256 = "10kr86h4v5h4p0586q406a5wbl8xvr1jyrf6097zp2wb8sv21ylw";
9− };
10− "elm/html" = {
11− version = "1.0.0";
12− sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k";
13− };
14− "elm/http" = {
15− version = "1.0.0";
16− sha256 = "1igmm89ialzrjib1j8xagkxalq1x2gj4l0hfxcd66mpwmvg7psl8";
17− };
18− "elm/json" = {
19− version = "1.0.0";
20− sha256 = "1g0hafkqf2q633r7ir9wxpb1lnlzskhpsyi0h5bkzj0gl072zfnb";
21− };
22− "elm/project-metadata-utils" = {
23− version = "1.0.0";
24− sha256 = "1d4rd4grrnbdvj9gf00h7dr6hbkjzawgkzpizfrkp1z1pyr3mvq9";
25− };
26− "elm/svg" = {
27− version = "1.0.0";
28− sha256 = "08x0v8p9wm699jjmsnbq69pxv3jh60j4f6fg7y6hyr7xxj85y390";
29− };
30− "elm-explorations/markdown" = {
31− version = "1.0.0";
32− sha256 = "0k3110ixa4wwf3vkkdplagwah9ypr965qxr1y147rnsc1xsxmr6y";
33− };
34− "elm/parser" = {
35− version = "1.0.0";
36− sha256 = "0k4zlq30lrvawqvzwbvsl0hrmwf9s832mb41z7fdspm4549dj7wc";
37− };
38− "elm/time" = {
39− version = "1.0.0";
40− sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1";
41− };
42− "elm/url" = {
43− version = "1.0.0";
44− sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4";
45− };
46− "elm/virtual-dom" = {
47− version = "1.0.0";
48− sha256 = "0hm8g92h7z39km325dlnhk8n00nlyjkqp3r3jppr37k2k13md6aq";
49− };
50−}
pkgs/development/compilers/elm/packages/elm-srcs.nixnew file+62
@@ -0,0 +1,62 @@
1+{
2+
3+ "elm-explorations/markdown" = {
4+ sha256 = "0k3110ixa4wwf3vkkdplagwah9ypr965qxr1y147rnsc1xsxmr6y";
5+ version = "1.0.0";
6+ };
7+
8+ "elm/json" = {
9+ sha256 = "1g0hafkqf2q633r7ir9wxpb1lnlzskhpsyi0h5bkzj0gl072zfnb";
10+ version = "1.0.0";
11+ };
12+
13+ "elm/html" = {
14+ sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k";
15+ version = "1.0.0";
16+ };
17+
18+ "elm/svg" = {
19+ sha256 = "08x0v8p9wm699jjmsnbq69pxv3jh60j4f6fg7y6hyr7xxj85y390";
20+ version = "1.0.0";
21+ };
22+
23+ "elm/project-metadata-utils" = {
24+ sha256 = "1d4rd4grrnbdvj9gf00h7dr6hbkjzawgkzpizfrkp1z1pyr3mvq9";
25+ version = "1.0.0";
26+ };
27+
28+ "elm/browser" = {
29+ sha256 = "1apmvyax93nvmagwj00y16zx10kfv640cxpi64xgqbgy7d2wphy4";
30+ version = "1.0.0";
31+ };
32+
33+ "elm/core" = {
34+ sha256 = "10kr86h4v5h4p0586q406a5wbl8xvr1jyrf6097zp2wb8sv21ylw";
35+ version = "1.0.0";
36+ };
37+
38+ "elm/http" = {
39+ sha256 = "1igmm89ialzrjib1j8xagkxalq1x2gj4l0hfxcd66mpwmvg7psl8";
40+ version = "1.0.0";
41+ };
42+
43+ "elm/parser" = {
44+ sha256 = "0k4zlq30lrvawqvzwbvsl0hrmwf9s832mb41z7fdspm4549dj7wc";
45+ version = "1.0.0";
46+ };
47+
48+ "elm/url" = {
49+ sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4";
50+ version = "1.0.0";
51+ };
52+
53+ "elm/time" = {
54+ sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1";
55+ version = "1.0.0";
56+ };
57+
58+ "elm/virtual-dom" = {
59+ sha256 = "0hm8g92h7z39km325dlnhk8n00nlyjkqp3r3jppr37k2k13md6aq";
60+ version = "1.0.0";
61+ };
62+}
pkgs/development/compilers/elm/packages/elm.nix+1
@@ -13,6 +13,7 @@ mkDerivation {
1313 url = "https://github.com/elm/compiler";
1414 sha256 = "13jks6c6i80z71mjjfg46ri570g5ini0k3xw3857v6z66zcl56x4";
1515 rev = "d5cbc41aac23da463236bbc250933d037da4055a";
16+ fetchSubmodules = true;
1617 };
1718 isLibrary = false;
1819 isExecutable = true;
pkgs/development/compilers/elm/packages/tasty-quickcheck.nixdeleted−14
@@ -1,14 +0,0 @@
1−{ mkDerivation, base, pcre-light, QuickCheck, random, stdenv
2−, tagged, tasty, tasty-hunit
3−}:
4−mkDerivation {
5− pname = "tasty-quickcheck";
6− version = "0.9.2";
7− sha256 = "c5920adeab6e283d5e3ab45f3c80a1b011bedfbe4a3246a52606da2e1da95873";
8− libraryHaskellDepends = [ base QuickCheck random tagged tasty ];
9− testHaskellDepends = [ base pcre-light tasty tasty-hunit ];
10− doCheck = false;
11− homepage = "https://github.com/feuerbach/tasty";
12− description = "QuickCheck support for the Tasty test framework";
13− license = stdenv.lib.licenses.mit;
14−}
pkgs/development/compilers/elm/update.sh+8−1
@@ -1 +1,8 @@
1−cabal2nix https://github.com/elm/compiler --revision 32059a289d27e303fa1665e9ada0a52eb688f302 > packages/elm.nix
1+#!/usr/bin/env nix-shell
2+#!nix-shell -p cabal2nix elm2nix -i bash ../../..
3+
4+cabal2nix https://github.com/elm/compiler --revision d5cbc41aac23da463236bbc250933d037da4055a > packages/elm.nix
5+elm2nix snapshot > versions.dat
6+pushd "$(nix-build -A elmPackages.elm.src --no-out-link ../../../..)/ui/browser"
7+ elm2nix convert > $OLDPWD/packages/elm-srcs.nix
8+popd
pkgs/development/compilers/elm/versions.dat

Binary file not shown.

pkgs/development/haskell-modules/configuration-common.nix+4
@@ -517,6 +517,10 @@ self: super: {
517517 # generic-deriving bound is too tight
518518 aeson = doJailbreak super.aeson;
519519
520+ # containers >=0.4 && <0.6 is too tight
521+ # https://github.com/RaphaelJ/friday/issues/34
522+ friday = doJailbreak super.friday;
523+
520524 # Won't compile with recent versions of QuickCheck.
521525 inilist = dontCheck super.inilist;
522526 MissingH = dontCheck super.MissingH;
pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix+2
@@ -55,6 +55,8 @@ self: super: {
5555 unicode-transforms = dontCheck super.unicode-transforms;
5656 RSA = dontCheck super.RSA; # https://github.com/GaloisInc/RSA/issues/14
5757 monad-par = dontCheck super.monad-par; # https://github.com/simonmar/monad-par/issues/66
58+ github = dontCheck super.github; # hspec upper bound exceeded; https://github.com/phadej/github/pull/341
59+ binary-orphans = dontCheck super.binary-orphans; # tasty upper bound exceeded; https://github.com/phadej/binary-orphans/commit/8ce857226595dd520236ff4c51fa1a45d8387b33
5860
5961 # https://github.com/jgm/skylighting/issues/55
6062 skylighting-core = dontCheck super.skylighting-core;
pkgs/development/libraries/getdns/default.nix+3−3
@@ -4,11 +4,11 @@
44stdenv.mkDerivation rec {
55 pname = "getdns";
66 name = "${pname}-${version}";
7− version = "1.4.2";
7+ version = "1.5.0";
88
99 src = fetchurl {
10− url = "https://getdnsapi.net/releases/${pname}-1-4-2/${pname}-${version}.tar.gz";
11− sha256 = "100fzjpvajvnv0kym8g5lkwyv8w8vhy7g2p0pb2gyz19zqnvi18n";
10+ url = "https://getdnsapi.net/releases/${pname}-1-5-0/${pname}-${version}.tar.gz";
11+ sha256 = "577182c3ace919ee70cee5629505581a10dc530bd53fe5c241603ea91c84fa84";
1212 };
1313
1414 nativeBuildInputs = [ libtool m4 autoreconfHook automake file ];
pkgs/development/python-modules/easywatch/default.nixnew file+28
@@ -0,0 +1,28 @@
1+{ lib
2+, fetchPypi
3+, buildPythonPackage
4+, watchdog
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "easywatch";
9+ version = "0.0.5";
10+
11+ src = fetchPypi {
12+ inherit pname version;
13+ sha256 = "1b40cjigv7s9qj8hxxy6yhwv0320z7qywrigwgkasgh80q0xgphc";
14+ };
15+
16+ propagatedBuildInputs = [ watchdog ];
17+
18+ # There are no tests
19+ doCheck = false;
20+
21+ meta = with lib; {
22+ description = "Dead-simple way to watch a directory";
23+ homepage = https://github.com/Ceasar/easywatch;
24+ license = licenses.mit;
25+ maintainers = with maintainers; [ fgaz ];
26+ };
27+}
28+
pkgs/development/python-modules/gcutil/default.nixdeleted−41
@@ -1,41 +0,0 @@
1−{ stdenv
2−, buildPythonPackage
3−, fetchurl
4−, gflags
5−, iso8601
6−, ipaddr
7−, httplib2
8−, google_apputils
9−, google_api_python_client
10−, isPy3k
11−}:
12−
13−buildPythonPackage rec {
14− name = "gcutil-1.16.1";
15− disabled = isPy3k;
16−
17− src = fetchurl {
18− url = https://dl.google.com/dl/cloudsdk/release/artifacts/gcutil-1.16.1.tar.gz;
19− sha256 = "00jaf7x1ji9y46fbkww2sg6r6almrqfsprydz3q2swr4jrnrsx9x";
20− };
21−
22− propagatedBuildInputs = [ gflags iso8601 ipaddr httplib2 google_apputils google_api_python_client ];
23−
24− prePatch = ''
25− sed -i -e "s|google-apputils==0.4.0|google-apputils==0.4.1|g" setup.py
26− substituteInPlace setup.py \
27− --replace "httplib2==0.8" "httplib2" \
28− --replace "iso8601==0.1.4" "iso8601" \
29− --replace "ipaddr==2.1.10" "ipaddr" \
30− --replace "google-api-python-client==1.2" "google-api-python-client" \
31− --replace "python-gflags==2.0" "python-gflags"
32− '';
33−
34− meta = with stdenv.lib; {
35− description = "Command-line tool for interacting with Google Compute Engine";
36− homepage = "https://cloud.google.com/compute/docs/gcutil/";
37− license = licenses.asl20;
38− maintainers = with maintainers; [ phreedom ];
39− };
40−
41−}
pkgs/development/python-modules/google-api-python-client/default.nix+4−3
@@ -1,13 +1,14 @@
1−{ lib, buildPythonPackage, fetchPypi
1+{ lib, buildPythonPackage, fetchPypi, isPy3k
22, httplib2, google_auth, google-auth-httplib2, six, uritemplate, oauth2client }:
33
44buildPythonPackage rec {
55 pname = "google-api-python-client";
6− version = "1.7.4";
6+ version = "1.7.7";
7+ #disabled = !isPy3k; # TODO: Python 2.7 was deprecated but weboob still depends on it.
78
89 src = fetchPypi {
910 inherit pname version;
10− sha256 = "5d5cb02c6f3112c68eed51b74891a49c0e35263380672d662f8bfe85b8114d7c";
11+ sha256 = "1nlsp8cll6v9w4649j98xw545bfnqa2xs7m9faa9mxc0kp8ff1li";
1112 };
1213
1314 # No tests included in archive
pkgs/development/python-modules/ldap3/default.nix+12−4
@@ -1,12 +1,20 @@
1−{ stdenv, fetchPypi, buildPythonPackage, gssapi, pyasn1 }:
1+{ stdenv, fetchPypi, fetchFromGitHub, buildPythonPackage, gssapi, pyasn1 }:
22
33buildPythonPackage rec {
44 version = "2.5.2";
55 pname = "ldap3";
66
7− src = fetchPypi {
8− inherit pname version;
9− sha256 = "063dacy01mphc3n7z2qc2avykjavqm1gllkbvy7xzw5ihlqwhrrz";
7+## This should work, but 2.5.2 has a weird tarball with empty source files
8+## where upstream repository has non-empty ones
9+# src = fetchPypi {
10+# inherit pname version;
11+# sha256 = "063dacy01mphc3n7z2qc2avykjavqm1gllkbvy7xzw5ihlqwhrrz";
12+# };
13+ src = fetchFromGitHub {
14+ owner = "cannatag";
15+ repo = pname;
16+ rev = "v${version}";
17+ sha256 = "0p5l4bhy6j2nvvlxz5zvznbaqb72x791v9la2jr2wpwr60mzz9hw";
1018 };
1119
1220 buildInputs = [ gssapi ];
pkgs/development/python-modules/simplejson/default.nix+2−2
@@ -33,7 +33,7 @@ buildPythonPackage rec {
3333 default, encoding is done in an encoding neutral fashion (plain
3434 ASCII with \uXXXX escapes for unicode characters).
3535 '';
36− homepage = http://code.google.com/p/simplejson/;
37− license = lib.licenses.mit;
36+ homepage = https://github.com/simplejson/simplejson;
37+ license = with lib.licenses; [ mit afl21 ];
3838 };
3939}
pkgs/development/python-modules/staticjinja/default.nixnew file+30
@@ -0,0 +1,30 @@
1+{ lib
2+, fetchPypi
3+, buildPythonPackage
4+, docopt
5+, easywatch
6+, jinja2
7+}:
8+
9+buildPythonPackage rec {
10+ pname = "staticjinja";
11+ version = "0.3.4";
12+
13+ src = fetchPypi {
14+ inherit pname version;
15+ sha256 = "1mxv7yy35657mfxx9xhbzihh10m5lb29fmscfh9q455zd4ikr032";
16+ };
17+
18+ propagatedBuildInputs = [ jinja2 docopt easywatch ];
19+
20+ # There are no tests on pypi
21+ doCheck = false;
22+
23+ meta = with lib; {
24+ description = "A library and cli tool that makes it easy to build static sites using Jinja2";
25+ homepage = https://staticjinja.readthedocs.io/en/latest/;
26+ license = licenses.mit;
27+ maintainers = with maintainers; [ fgaz ];
28+ };
29+}
30+
pkgs/development/python-modules/weboob/default.nix+15−4
@@ -1,4 +1,4 @@
1−{ buildPythonPackage, fetchurl, stdenv, isPy27
1+{ buildPythonPackage, fetchurl, fetchPypi, stdenv, isPy27
22, nose, pillow, prettytable, pyyaml, dateutil, gdata
33, requests, mechanize, feedparser, lxml, gnupg, pyqt5
44, libyaml, simplejson, cssselect, futures, pdfminer
@@ -6,7 +6,18 @@
66, unidecode
77}:
88
9−buildPythonPackage rec {
9+let
10+ # Support for Python 2.7 was dropped in 1.7.7
11+ google_api_python_client_python27 = google_api_python_client.overrideDerivation
12+ (oldAttrs: rec {
13+ pname = "google-api-python-client";
14+ version = "1.7.6";
15+ src = fetchPypi {
16+ inherit pname version;
17+ sha256 = "14w5sdrp0bk9n0r2lmpqmrbf2zclpfq6q7giyahnskkfzdkb165z";
18+ };
19+ });
20+in buildPythonPackage rec {
1021 pname = "weboob";
1122 version = "1.3";
1223 disabled = ! isPy27;
@@ -35,8 +46,8 @@ buildPythonPackage rec {
3546
3647 propagatedBuildInputs = [ pillow prettytable pyyaml dateutil
3748 gdata requests mechanize feedparser lxml gnupg pyqt5 libyaml
38− simplejson cssselect futures pdfminer termcolor google_api_python_client
39− html2text unidecode ];
49+ simplejson cssselect futures pdfminer termcolor
50+ google_api_python_client_python27 html2text unidecode ];
4051
4152 checkPhase = ''
4253 nosetests
pkgs/development/tools/gllvm/default.nix+2−2
@@ -2,7 +2,7 @@
22
33buildGoPackage rec {
44 name = "gllvm-${version}";
5− version = "1.2.2";
5+ version = "1.2.3";
66
77 goPackagePath = "github.com/SRI-CSL/gllvm";
88
@@ -10,7 +10,7 @@ buildGoPackage rec {
1010 owner = "SRI-CSL";
1111 repo = "gllvm";
1212 rev = "v${version}";
13− sha256 = "1k6081frnc6i6h3fa8d796cirhbf5kkshw7qyarz5wi3fcgijn4s";
13+ sha256 = "12kdgsma62nzksvw266qm3ivkbz62ma93dd25wy0p19789v4fi7s";
1414 };
1515
1616 meta = with stdenv.lib; {
pkgs/development/tools/minizinc/ide.nixnew file+42
@@ -0,0 +1,42 @@
1+{ stdenv, fetchFromGitHub, qtbase, qtwebengine, qtwebkit, qmake, makeWrapper, minizinc }:
2+let
3+ version = "2.2.3";
4+in
5+stdenv.mkDerivation {
6+ name = "minizinc-ide-${version}";
7+
8+ nativeBuildInputs = [ qmake makeWrapper ];
9+ buildInputs = [ qtbase qtwebengine qtwebkit ];
10+
11+ src = fetchFromGitHub {
12+ owner = "MiniZinc";
13+ repo = "MiniZincIDE";
14+ rev = version;
15+ sha256 = "1hanq7c6li59awlwghgvpd8w93a7zb6iw7p4062nphnbd1dmg92f";
16+ };
17+
18+ sourceRoot = "source/MiniZincIDE";
19+
20+ enableParallelBuilding = true;
21+
22+ postInstall = ''
23+ wrapProgram $out/bin/MiniZincIDE --prefix PATH ":" ${stdenv.lib.makeBinPath [ minizinc ]}
24+ '';
25+
26+ meta = with stdenv.lib; {
27+ homepage = https://www.minizinc.org/;
28+ description = "IDE for MiniZinc, a medium-level constraint modelling language";
29+
30+ longDescription = ''
31+ MiniZinc is a medium-level constraint modelling
32+ language. It is high-level enough to express most
33+ constraint problems easily, but low-level enough
34+ that it can be mapped onto existing solvers easily and consistently.
35+ It is a subset of the higher-level language Zinc.
36+ '';
37+
38+ license = licenses.mpl20;
39+ platforms = platforms.linux;
40+ maintainers = [ maintainers.dtzWill ];
41+ };
42+}
pkgs/games/anki/default.nix+10−5
@@ -20,13 +20,14 @@
2020, glibcLocales
2121, nose
2222, send2trash
23+, CoreAudio
2324# This little flag adds a huge number of dependencies, but we assume that
2425# everyone wants Anki to draw plots with statistics by default.
2526, plotsSupport ? true
2627}:
2728
2829buildPythonApplication rec {
29− version = "2.1.7";
30+ version = "2.1.8";
3031 name = "anki-${version}";
3132
3233 src = fetchurl {
@@ -36,12 +37,16 @@ buildPythonApplication rec {
3637 # "http://ankisrs.net/download/mirror/${name}.tgz"
3738 # "http://ankisrs.net/download/mirror/archive/${name}.tgz"
3839 ];
39− sha256 = "0cvlimfxb7kficlf20hg7a345pahvr093b7yqvssww15h4y4va9d";
40+ sha256 = "08wb9hwpmbq7636h7sinim33qygdwwlh3frqqh2gfgm49f46di2p";
4041 };
4142
42− propagatedBuildInputs = [ pyqt5 sqlalchemy
43− beautifulsoup4 send2trash pyaudio requests decorator markdown ]
44− ++ lib.optional plotsSupport matplotlib;
43+ propagatedBuildInputs = [
44+ pyqt5 sqlalchemy beautifulsoup4 send2trash pyaudio requests decorator
45+ markdown
46+ ]
47+ ++ lib.optional plotsSupport matplotlib
48+ ++ lib.optional stdenv.isDarwin [ CoreAudio ]
49+ ;
4550
4651 checkInputs = [ pytest glibcLocales nose ];
4752
pkgs/misc/emulators/wine/base.nix+1−1
@@ -59,7 +59,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
5959 ++ lib.optionals stdenv.isLinux (with pkgs.xorg; [
6060 libXi libXcursor libXrandr libXrender libXxf86vm libXcomposite libXext
6161 ])
62− ++ [ pkgs.xorg.libX11 ]));
62+ ++ [ pkgs.xorg.libX11 pkgs.perl ]));
6363
6464 # Wine locates a lot of libraries dynamically through dlopen(). Add
6565 # them to the RPATH so that the user doesn't have to set them in
pkgs/os-specific/linux/i2c-tools/default.nix+6−5
@@ -2,22 +2,23 @@
22
33stdenv.mkDerivation rec {
44 name = "i2c-tools-${version}";
5− version = "4.0";
5+ version = "4.1";
66
77 src = fetchurl {
88 url = "https://www.kernel.org/pub/software/utils/i2c-tools/${name}.tar.xz";
9− sha256 = "1mi8mykvl89y6liinc9jv1x8m2q093wrdc2hm86a47n524fcl06r";
9+ sha256 = "1m97hpwqfaqjl9xvr4pvz2vdrsdvxbcn0nnx8pamnyc3s7pikcjp";
1010 };
1111
1212 buildInputs = [ perl ];
1313
14− patchPhase = ''
14+ postPatch = ''
1515 substituteInPlace eeprom/decode-edid --replace "/usr/sbin/parse-edid" "${read-edid}/bin/parse-edid"
1616 substituteInPlace stub/i2c-stub-from-dump --replace "/sbin/" ""
1717 '';
1818
19− installPhase = ''
20− make install prefix=$out
19+ makeFlags = [ "PREFIX=${placeholder "out"}" ];
20+
21+ postInstall = ''
2122 rm -rf $out/include # Installs include/linux/i2c-dev.h that conflics with kernel headers
2223 '';
2324
pkgs/os-specific/linux/kernel/hardened-config.nix+24−11
@@ -28,9 +28,9 @@ ${optionalString (stdenv.hostPlatform.platform.kernelArch == "x86_64") ''
2828 # Reduce attack surface by disabling various emulations
2929 IA32_EMULATION n
3030 X86_X32 n
31− ${optionalString (versionOlder version "4.17") ''
32− MODIFY_LDT_SYSCALL? n
33− ''}
31+ # Note: this config depends on EXPERT y and so will not take effect, hence
32+ # it is left "optional" for now.
33+ MODIFY_LDT_SYSCALL? n
3434
3535 VMAP_STACK y # Catch kernel stack overflows
3636
@@ -52,18 +52,23 @@ ${optionalString (versionOlder version "4.11") ''
5252 DEBUG_SET_MODULE_RONX y
5353''}
5454
55−# Mark LSM hooks read-only after init. Conflicts with SECURITY_SELINUX_DISABLE
56−# (disabling SELinux at runtime); hence, SELinux can only be disabled at boot
57−# via the selinux=0 boot parameter.
55+# Mark LSM hooks read-only after init. SECURITY_WRITABLE_HOOKS n
56+# conflicts with SECURITY_SELINUX_DISABLE y; disabling the latter
57+# implicitly marks LSM hooks read-only after init.
58+#
59+# SELinux can only be disabled at boot via selinux=0
60+#
61+# We set SECURITY_WRITABLE_HOOKS n primarily for documentation purposes; the
62+# config builder fails to detect that it has indeed been unset.
5863${optionalString (versionAtLeast version "4.12") ''
5964 SECURITY_SELINUX_DISABLE n
60−''}
61−
62−${optionalString ((versionAtLeast version "4.12") && (versionOlder version "4.17")) ''
63− SECURITY_WRITABLE_HOOKS n
65+ SECURITY_WRITABLE_HOOKS? n
6466''}
6567
6668DEBUG_WX y # boot-time warning on RWX mappings
69+${optionalString (versionAtLeast version "4.11") ''
70+ STRICT_KERNEL_RWX y
71+''}
6772
6873# Stricter /dev/mem
6974STRICT_DEVMEM? y
@@ -84,7 +89,7 @@ ${optionalString (versionAtLeast version "4.13") ''
8489# Perform usercopy bounds checking.
8590HARDENED_USERCOPY y
8691${optionalString (versionAtLeast version "4.16") ''
87− HARDENED_USERCOPY_FALLBACK n
92+ HARDENED_USERCOPY_FALLBACK n # for full whitelist enforcement
8893''}
8994
9095# Randomize allocator freelists.
@@ -94,6 +99,9 @@ ${optionalString (versionAtLeast version "4.14") ''
9499 SLAB_FREELIST_HARDENED y
95100''}
96101
102+# Allow enabling slub/slab free poisoning with slub_debug=P
103+SLUB_DEBUG y
104+
97105# Wipe higher-level memory allocations on free() with page_poison=1
98106PAGE_POISONING y
99107PAGE_POISONING_NO_SANITY y
@@ -117,6 +125,11 @@ ${optionalString (versionAtLeast version "4.20") ''
117125 GCC_PLUGIN_STACKLEAK y # A port of the PaX stackleak plugin
118126''}
119127
128+${optionalString (versionAtLeast version "4.13") ''
129+ GCC_PLUGIN_RANDSTRUCT y # A port of the PaX randstruct plugin
130+ GCC_PLUGIN_RANDSTRUCT_PERFORMANCE y
131+''}
132+
120133# Disable various dangerous settings
121134ACPI_CUSTOM_METHOD n # Allows writing directly to physical memory
122135PROC_KCORE n # Exposes kernel text image layout
pkgs/os-specific/linux/sysstat/default.nix+2−2
@@ -1,11 +1,11 @@
11{ stdenv, fetchurl, gettext, bzip2 }:
22
33stdenv.mkDerivation rec {
4− name = "sysstat-12.1.1";
4+ name = "sysstat-12.1.2";
55
66 src = fetchurl {
77 url = "http://perso.orange.fr/sebastien.godard/${name}.tar.xz";
8− sha256 = "0drrlv2fr64g5zf0a2bkla2rql4nmq4n192wvcr9r4zppg58d8k4";
8+ sha256 = "0xiv70x4n24fcycvlq95lqgb3jwjxfzq61bnyqai57x54hhn46yp";
99 };
1010
1111 buildInputs = [ gettext ];
pkgs/tools/networking/offlineimap/default.nix+4−1
@@ -1,5 +1,5 @@
11{ stdenv, fetchFromGitHub, python2Packages,
2− asciidoc, libxml2, libxslt, docbook_xsl }:
2+ asciidoc, cacert, libxml2, libxslt, docbook_xsl }:
33
44python2Packages.buildPythonApplication rec {
55 version = "7.2.2";
@@ -15,6 +15,9 @@ python2Packages.buildPythonApplication rec {
1515 postPatch = ''
1616 # Skip xmllint to stop failures due to no network access
1717 sed -i docs/Makefile -e "s|a2x -v -d |a2x -L -v -d |"
18+
19+ # Provide CA certificates (Used when "sslcacertfile = OS-DEFAULT" is configured")
20+ sed -i offlineimap/utils/distro.py -e '/def get_os_sslcertfile():/a\ \ \ \ return "${cacert}/etc/ssl/certs/ca-bundle.crt"'
1821 '';
1922
2023 doCheck = false;
pkgs/tools/networking/stubby/default.nix+2−2
@@ -4,13 +4,13 @@
44stdenv.mkDerivation rec {
55 pname = "stubby";
66 name = "${pname}-${version}";
7− version = "0.2.3";
7+ version = "0.2.4";
88
99 src = fetchFromGitHub {
1010 owner = "getdnsapi";
1111 repo = pname;
1212 rev = "v${version}";
13− sha256 = "1n02dj1hvh0aml54asxj42f0j9wfgiyavbh0gr0j9lm4f2xcd60w";
13+ sha256 = "1c0jqbxcrwc8kvpx7v0bmdladf20myyi2672r2r87m2q0jvsmgpr";
1414 };
1515
1616 nativeBuildInputs = [ libtool m4 libbsd libyaml autoreconfHook ];
pkgs/tools/security/afl/default.nix+58−64
@@ -3,79 +3,73 @@
33}:
44
55let
6− afl-qemu = callPackage ./qemu.nix {};
6+ afl-qemu = callPackage ./qemu.nix { inherit afl; };
77 qemu-exe-name = if stdenv.hostPlatform.system == "x86_64-linux" then "qemu-x86_64"
88 else if stdenv.hostPlatform.system == "i686-linux" then "qemu-i386"
99 else throw "afl: no support for ${stdenv.hostPlatform.system}!";
10−in
10+ afl = stdenv.mkDerivation rec {
11+ name = "afl-${version}";
12+ version = "2.52b";
1113
12−stdenv.mkDerivation rec {
13− name = "afl-${version}";
14− version = "2.52b";
14+ src = fetchurl {
15+ url = "http://lcamtuf.coredump.cx/afl/releases/${name}.tgz";
16+ sha256 = "0ig0ij4n1pwry5dw1hk4q88801jzzy2cric6y2gd6560j55lnqa3";
17+ };
18+ enableParallelBuilding = true;
1519
16− src = fetchurl {
17− url = "http://lcamtuf.coredump.cx/afl/releases/${name}.tgz";
18− sha256 = "0ig0ij4n1pwry5dw1hk4q88801jzzy2cric6y2gd6560j55lnqa3";
19− };
20−
21− # Note: libcgroup isn't needed for building, just for the afl-cgroup
22− # script.
23− buildInputs = [ makeWrapper llvm which ];
20+ # Note: libcgroup isn't needed for building, just for the afl-cgroup
21+ # script.
22+ nativeBuildInputs = [ makeWrapper which ];
23+ buildInputs = [ llvm ];
2424
25− buildPhase = ''
26− make PREFIX=$out
27− cd llvm_mode
28− make PREFIX=$out
29− cd ..
30− '';
31− installPhase = ''
32− # Do the normal installation
33− make install PREFIX=$out
34−
35− # Install the custom QEMU emulator for binary blob fuzzing.
36− cp ${afl-qemu}/bin/${qemu-exe-name} $out/bin/afl-qemu-trace
25+ makeFlags = [ "PREFIX=$(out)" ];
26+ postBuild = ''
27+ make -C llvm_mode $makeFlags -j$NIX_BUILD_CORES
28+ '';
29+ postInstall = ''
30+ # Install the custom QEMU emulator for binary blob fuzzing.
31+ cp ${afl-qemu}/bin/${qemu-exe-name} $out/bin/afl-qemu-trace
3732
38− # Install the cgroups wrapper for asan-based fuzzing.
39− cp experimental/asan_cgroups/limit_memory.sh $out/bin/afl-cgroup
40− chmod +x $out/bin/afl-cgroup
41− substituteInPlace $out/bin/afl-cgroup \
42− --replace "cgcreate" "${libcgroup}/bin/cgcreate" \
43− --replace "cgexec" "${libcgroup}/bin/cgexec" \
44− --replace "cgdelete" "${libcgroup}/bin/cgdelete"
33+ # Install the cgroups wrapper for asan-based fuzzing.
34+ cp experimental/asan_cgroups/limit_memory.sh $out/bin/afl-cgroup
35+ chmod +x $out/bin/afl-cgroup
36+ substituteInPlace $out/bin/afl-cgroup \
37+ --replace "cgcreate" "${libcgroup}/bin/cgcreate" \
38+ --replace "cgexec" "${libcgroup}/bin/cgexec" \
39+ --replace "cgdelete" "${libcgroup}/bin/cgdelete"
4540
46− # Patch shebangs before wrapping
47− patchShebangs $out/bin
41+ # Patch shebangs before wrapping
42+ patchShebangs $out/bin
4843
49− # Wrap afl-clang-fast(++) with a *different* AFL_PATH, because it
50− # has totally different semantics in that case(?) - and also set a
51− # proper AFL_CC and AFL_CXX so we don't pick up the wrong one out
52− # of $PATH.
53− for x in $out/bin/afl-clang-fast $out/bin/afl-clang-fast++; do
54− wrapProgram $x \
55− --prefix AFL_PATH : "$out/lib/afl" \
56− --run 'export AFL_CC=''${AFL_CC:-${clang}/bin/clang} AFL_CXX=''${AFL_CXX:-${clang}/bin/clang++}'
57− done
58− '';
44+ # Wrap afl-clang-fast(++) with a *different* AFL_PATH, because it
45+ # has totally different semantics in that case(?) - and also set a
46+ # proper AFL_CC and AFL_CXX so we don't pick up the wrong one out
47+ # of $PATH.
48+ for x in $out/bin/afl-clang-fast $out/bin/afl-clang-fast++; do
49+ wrapProgram $x \
50+ --prefix AFL_PATH : "$out/lib/afl" \
51+ --run 'export AFL_CC=''${AFL_CC:-${clang}/bin/clang} AFL_CXX=''${AFL_CXX:-${clang}/bin/clang++}'
52+ done
53+ '';
5954
60− passthru = {
61− qemu = afl-qemu;
62− };
55+ passthru.qemu = afl-qemu;
6356
64− meta = {
65− description = "Powerful fuzzer via genetic algorithms and instrumentation";
66− longDescription = ''
67− American fuzzy lop is a fuzzer that employs a novel type of
68− compile-time instrumentation and genetic algorithms to
69− automatically discover clean, interesting test cases that
70− trigger new internal states in the targeted binary. This
71− substantially improves the functional coverage for the fuzzed
72− code. The compact synthesized corpora produced by the tool are
73− also useful for seeding other, more labor or resource-intensive
74− testing regimes down the road.
75− '';
76− homepage = "http://lcamtuf.coredump.cx/afl/";
77− license = stdenv.lib.licenses.asl20;
78− platforms = ["x86_64-linux" "i686-linux"];
79− maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
57+ meta = {
58+ description = "Powerful fuzzer via genetic algorithms and instrumentation";
59+ longDescription = ''
60+ American fuzzy lop is a fuzzer that employs a novel type of
61+ compile-time instrumentation and genetic algorithms to
62+ automatically discover clean, interesting test cases that
63+ trigger new internal states in the targeted binary. This
64+ substantially improves the functional coverage for the fuzzed
65+ code. The compact synthesized corpora produced by the tool are
66+ also useful for seeding other, more labor or resource-intensive
67+ testing regimes down the road.
68+ '';
69+ homepage = "http://lcamtuf.coredump.cx/afl/";
70+ license = stdenv.lib.licenses.asl20;
71+ platforms = ["x86_64-linux" "i686-linux"];
72+ maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
73+ };
8074 };
81−}
75+in afl
pkgs/tools/security/afl/qemu-patches/afl-config.hdeleted−335
@@ -1,335 +0,0 @@
1−/*
2− american fuzzy lop - vaguely configurable bits
3− ----------------------------------------------
4−
5− Written and maintained by Michal Zalewski <lcamtuf@google.com>
6−
7− Copyright 2013, 2014, 2015 Google Inc. All rights reserved.
8−
9− Licensed under the Apache License, Version 2.0 (the "License");
10− you may not use this file except in compliance with the License.
11− You may obtain a copy of the License at:
12−
13− http://www.apache.org/licenses/LICENSE-2.0
14−
15− */
16−
17−#ifndef _HAVE_CONFIG_H
18−#define _HAVE_CONFIG_H
19−
20−#include "afl-types.h"
21−
22−/******************************************************
23− * *
24− * Settings that may be of interest to power users: *
25− * *
26− ******************************************************/
27−
28−/* Comment out to disable terminal colors: */
29−
30−#define USE_COLOR
31−
32−/* Comment out to disable fancy ANSI boxes and use poor man's 7-bit UI: */
33−
34−#define FANCY_BOXES
35−
36−/* Default timeout for fuzzed code (milliseconds): */
37−
38−#define EXEC_TIMEOUT 1000
39−
40−/* Timeout rounding factor when auto-scaling (milliseconds): */
41−
42−#define EXEC_TM_ROUND 20
43−
44−/* Default memory limit for child process (MB): */
45−
46−#ifndef __x86_64__
47−# define MEM_LIMIT 25
48−#else
49−# define MEM_LIMIT 50
50−#endif /* ^!__x86_64__ */
51−
52−/* Default memory limit when running in QEMU mode (MB): */
53−
54−#define MEM_LIMIT_QEMU 200
55−
56−/* Number of calibration cycles per every new test case (and for test
57− cases that show variable behavior): */
58−
59−#define CAL_CYCLES 10
60−#define CAL_CYCLES_LONG 40
61−
62−/* The same, but when AFL_NO_VAR_CHECK is set in the environment: */
63−
64−#define CAL_CYCLES_NO_VAR 4
65−
66−/* Number of subsequent hangs before abandoning an input file: */
67−
68−#define HANG_LIMIT 250
69−
70−/* Maximum number of unique hangs or crashes to record: */
71−
72−#define KEEP_UNIQUE_HANG 500
73−#define KEEP_UNIQUE_CRASH 5000
74−
75−/* Baseline number of random tweaks during a single 'havoc' stage: */
76−
77−#define HAVOC_CYCLES 5000
78−
79−/* Maximum multiplier for the above (should be a power of two, beware
80− of 32-bit int overflows): */
81−
82−#define HAVOC_MAX_MULT 16
83−
84−/* Absolute minimum number of havoc cycles (after all adjustments): */
85−
86−#define HAVOC_MIN 10
87−
88−/* Maximum stacking for havoc-stage tweaks. The actual value is calculated
89− like this:
90−
91− n = random between 1 and HAVOC_STACK_POW2
92− stacking = 2^n
93−
94− In other words, the default (n = 7) produces 2, 4, 8, 16, 32, 64, or
95− 128 stacked tweaks: */
96−
97−#define HAVOC_STACK_POW2 7
98−
99−/* Caps on block sizes for cloning and deletion operations. Each of these
100− ranges has a 33% probability of getting picked, except for the first
101− two cycles where smaller blocks are favored: */
102−
103−#define HAVOC_BLK_SMALL 32
104−#define HAVOC_BLK_MEDIUM 128
105−#define HAVOC_BLK_LARGE 1500
106−
107−/* Probabilities of skipping non-favored entries in the queue, expressed as
108− percentages: */
109−
110−#define SKIP_TO_NEW_PROB 99 /* ...when there are new, pending favorites */
111−#define SKIP_NFAV_OLD_PROB 95 /* ...no new favs, cur entry already fuzzed */
112−#define SKIP_NFAV_NEW_PROB 75 /* ...no new favs, cur entry not fuzzed yet */
113−
114−/* Splicing cycle count: */
115−
116−#define SPLICE_CYCLES 20
117−
118−/* Nominal per-splice havoc cycle length: */
119−
120−#define SPLICE_HAVOC 500
121−
122−/* Maximum offset for integer addition / subtraction stages: */
123−
124−#define ARITH_MAX 35
125−
126−/* Limits for the test case trimmer. The absolute minimum chunk size; and
127− the starting and ending divisors for chopping up the input file: */
128−
129−#define TRIM_MIN_BYTES 4
130−#define TRIM_START_STEPS 16
131−#define TRIM_END_STEPS 1024
132−
133−/* Maximum size of input file, in bytes (keep under 100MB): */
134−
135−#define MAX_FILE (1 * 1024 * 1024)
136−
137−/* The same, for the test case minimizer: */
138−
139−#define TMIN_MAX_FILE (10 * 1024 * 1024)
140−
141−/* Block normalization steps for afl-tmin: */
142−
143−#define TMIN_SET_MIN_SIZE 4
144−#define TMIN_SET_STEPS 128
145−
146−/* Maximum dictionary token size (-x), in bytes: */
147−
148−#define MAX_DICT_FILE 128
149−
150−/* Length limits for auto-detected dictionary tokens: */
151−
152−#define MIN_AUTO_EXTRA 3
153−#define MAX_AUTO_EXTRA 32
154−
155−/* Maximum number of user-specified dictionary tokens to use in deterministic
156− steps; past this point, the "extras/user" step will be still carried out,
157− but with proportionally lower odds: */
158−
159−#define MAX_DET_EXTRAS 200
160−
161−/* Maximum number of auto-extracted dictionary tokens to actually use in fuzzing
162− (first value), and to keep in memory as candidates. The latter should be much
163− higher than the former. */
164−
165−#define USE_AUTO_EXTRAS 50
166−#define MAX_AUTO_EXTRAS (USE_AUTO_EXTRAS * 10)
167−
168−/* Scaling factor for the effector map used to skip some of the more
169− expensive deterministic steps. The actual divisor is set to
170− 2^EFF_MAP_SCALE2 bytes: */
171−
172−#define EFF_MAP_SCALE2 3
173−
174−/* Minimum input file length at which the effector logic kicks in: */
175−
176−#define EFF_MIN_LEN 128
177−
178−/* Maximum effector density past which everything is just fuzzed
179− unconditionally (%): */
180−
181−#define EFF_MAX_PERC 90
182−
183−/* UI refresh frequency (Hz): */
184−
185−#define UI_TARGET_HZ 5
186−
187−/* Fuzzer stats file and plot update intervals (sec): */
188−
189−#define STATS_UPDATE_SEC 60
190−#define PLOT_UPDATE_SEC 5
191−
192−/* Smoothing divisor for CPU load and exec speed stats (1 - no smoothing). */
193−
194−#define AVG_SMOOTHING 16
195−
196−/* Sync interval (every n havoc cycles): */
197−
198−#define SYNC_INTERVAL 5
199−
200−/* Output directory reuse grace period (minutes): */
201−
202−#define OUTPUT_GRACE 25
203−
204−/* Uncomment to use simple file names (id_NNNNNN): */
205−
206−// #define SIMPLE_FILES
207−
208−/* List of interesting values to use in fuzzing. */
209−
210−#define INTERESTING_8 \
211− -128, /* Overflow signed 8-bit when decremented */ \
212− -1, /* */ \
213− 0, /* */ \
214− 1, /* */ \
215− 16, /* One-off with common buffer size */ \
216− 32, /* One-off with common buffer size */ \
217− 64, /* One-off with common buffer size */ \
218− 100, /* One-off with common buffer size */ \
219− 127 /* Overflow signed 8-bit when incremented */
220−
221−#define INTERESTING_16 \
222− -32768, /* Overflow signed 16-bit when decremented */ \
223− -129, /* Overflow signed 8-bit */ \
224− 128, /* Overflow signed 8-bit */ \
225− 255, /* Overflow unsig 8-bit when incremented */ \
226− 256, /* Overflow unsig 8-bit */ \
227− 512, /* One-off with common buffer size */ \
228− 1000, /* One-off with common buffer size */ \
229− 1024, /* One-off with common buffer size */ \
230− 4096, /* One-off with common buffer size */ \
231− 32767 /* Overflow signed 16-bit when incremented */
232−
233−#define INTERESTING_32 \
234− -2147483648LL, /* Overflow signed 32-bit when decremented */ \
235− -100663046, /* Large negative number (endian-agnostic) */ \
236− -32769, /* Overflow signed 16-bit */ \
237− 32768, /* Overflow signed 16-bit */ \
238− 65535, /* Overflow unsig 16-bit when incremented */ \
239− 65536, /* Overflow unsig 16 bit */ \
240− 100663045, /* Large positive number (endian-agnostic) */ \
241− 2147483647 /* Overflow signed 32-bit when incremented */
242−
243−/***********************************************************
244− * *
245− * Really exotic stuff you probably don't want to touch: *
246− * *
247− ***********************************************************/
248−
249−/* Call count interval between reseeding the libc PRNG from /dev/urandom: */
250−
251−#define RESEED_RNG 10000
252−
253−/* Maximum line length passed from GCC to 'as' and used for parsing
254− configuration files: */
255−
256−#define MAX_LINE 8192
257−
258−/* Environment variable used to pass SHM ID to the called program. */
259−
260−#define SHM_ENV_VAR "__AFL_SHM_ID"
261−
262−/* Other less interesting, internal-only variables. */
263−
264−#define CLANG_ENV_VAR "__AFL_CLANG_MODE"
265−#define AS_LOOP_ENV_VAR "__AFL_AS_LOOPCHECK"
266−
267−/* Distinctive bitmap signature used to indicate failed execution: */
268−
269−#define EXEC_FAIL_SIG 0xfee1dead
270−
271−/* Distinctive exit code used to indicate MSAN trip condition: */
272−
273−#define MSAN_ERROR 86
274−
275−/* Designated file descriptors for forkserver commands (the application will
276− use FORKSRV_FD and FORKSRV_FD + 1): */
277−
278−#define FORKSRV_FD 198
279−
280−/* Fork server init timeout multiplier: we'll wait the user-selected
281− timeout plus this much for the fork server to spin up. */
282−
283−#define FORK_WAIT_MULT 10
284−
285−/* Calibration timeout adjustments, to be a bit more generous when resuming
286− fuzzing sessions or trying to calibrate already-added internal finds.
287− The first value is a percentage, the other is in milliseconds: */
288−
289−#define CAL_TMOUT_PERC 125
290−#define CAL_TMOUT_ADD 50
291−
292−/* Number of chances to calibrate a case before giving up: */
293−
294−#define CAL_CHANCES 3
295−
296−/* Map size for the traced binary (2^MAP_SIZE_POW2). Must be greater than
297− 2; you probably want to keep it under 18 or so for performance reasons
298− (adjusting AFL_INST_RATIO when compiling is probably a better way to solve
299− problems with complex programs). You need to recompile the target binary
300− after changing this - otherwise, SEGVs may ensue. */
301−
302−#define MAP_SIZE_POW2 16
303−#define MAP_SIZE (1 << MAP_SIZE_POW2)
304−
305−/* Maximum allocator request size (keep well under INT_MAX): */
306−
307−#define MAX_ALLOC 0x40000000
308−
309−/* A made-up hashing seed: */
310−
311−#define HASH_CONST 0xa5b35705
312−
313−/* Constants for afl-gotcpu to control busy loop timing: */
314−
315−#define CTEST_TARGET_MS 5000
316−#define CTEST_BUSY_CYCLES (10 * 1000 * 1000)
317−
318−/* Uncomment this to use inferior block-coverage-based instrumentation. Note
319− that you need to recompile the target binary for this to have any effect: */
320−
321−// #define COVERAGE_ONLY
322−
323−/* Uncomment this to ignore hit counts and output just one bit per tuple.
324− As with the previous setting, you will need to recompile the target
325− binary: */
326−
327−// #define SKIP_COUNTS
328−
329−/* Uncomment this to use instrumentation data to record newly discovered paths,
330− but do not use them as seeds for fuzzing. This is useful for conveniently
331− measuring coverage that could be attained by a "dumb" fuzzing algorithm: */
332−
333−// #define IGNORE_FINDS
334−
335−#endif /* ! _HAVE_CONFIG_H */
pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.hdeleted−296
@@ -1,296 +0,0 @@
1−/*
2− american fuzzy lop - high-performance binary-only instrumentation
3− -----------------------------------------------------------------
4−
5− Written by Andrew Griffiths <agriffiths@google.com> and
6− Michal Zalewski <lcamtuf@google.com>
7−
8− Idea & design very much by Andrew Griffiths.
9−
10− Copyright 2015 Google Inc. All rights reserved.
11−
12− Licensed under the Apache License, Version 2.0 (the "License");
13− you may not use this file except in compliance with the License.
14− You may obtain a copy of the License at:
15−
16− http://www.apache.org/licenses/LICENSE-2.0
17−
18− This code is a shim patched into the separately-distributed source
19− code of QEMU 2.2.0. It leverages the built-in QEMU tracing functionality
20− to implement AFL-style instrumentation and to take care of the remaining
21− parts of the AFL fork server logic.
22−
23− The resulting QEMU binary is essentially a standalone instrumentation
24− tool; for an example of how to leverage it for other purposes, you can
25− have a look at afl-showmap.c.
26−
27− */
28−
29−#include <sys/shm.h>
30−#include "afl-config.h"
31−
32−/***************************
33− * VARIOUS AUXILIARY STUFF *
34− ***************************/
35−
36−/* A snippet patched into tb_find_slow to inform the parent process that
37− we have hit a new block that hasn't been translated yet, and to tell
38− it to translate within its own context, too (this avoids translation
39− overhead in the next forked-off copy). */
40−
41−#define AFL_QEMU_CPU_SNIPPET1 do { \
42− afl_request_tsl(pc, cs_base, flags); \
43− } while (0)
44−
45−/* This snippet kicks in when the instruction pointer is positioned at
46− _start and does the usual forkserver stuff, not very different from
47− regular instrumentation injected via afl-as.h. */
48−
49−#define AFL_QEMU_CPU_SNIPPET2 do { \
50− if(tb->pc == afl_entry_point) { \
51− afl_setup(); \
52− afl_forkserver(env); \
53− } \
54− afl_maybe_log(tb->pc); \
55− } while (0)
56−
57−/* We use one additional file descriptor to relay "needs translation"
58− messages between the child and the fork server. */
59−
60−#define TSL_FD (FORKSRV_FD - 1)
61−
62−/* This is equivalent to afl-as.h: */
63−
64−static unsigned char *afl_area_ptr;
65−
66−/* Exported variables populated by the code patched into elfload.c: */
67−
68−abi_ulong afl_entry_point, /* ELF entry point (_start) */
69− afl_start_code, /* .text start pointer */
70− afl_end_code; /* .text end pointer */
71−
72−/* Set in the child process in forkserver mode: */
73−
74−static unsigned char afl_fork_child;
75−unsigned int afl_forksrv_pid;
76−
77−/* Instrumentation ratio: */
78−
79−static unsigned int afl_inst_rms = MAP_SIZE;
80−
81−/* Function declarations. */
82−
83−static void afl_setup(void);
84−static void afl_forkserver(CPUArchState*);
85−static inline void afl_maybe_log(abi_ulong);
86−
87−static void afl_wait_tsl(CPUArchState*, int);
88−static void afl_request_tsl(target_ulong, target_ulong, uint64_t);
89−
90−static TranslationBlock *tb_find_slow(CPUArchState*, target_ulong,
91− target_ulong, uint64_t);
92−
93−
94−/* Data structure passed around by the translate handlers: */
95−
96−struct afl_tsl {
97− target_ulong pc;
98− target_ulong cs_base;
99− uint64_t flags;
100−};
101−
102−
103−/*************************
104− * ACTUAL IMPLEMENTATION *
105− *************************/
106−
107−
108−/* Set up SHM region and initialize other stuff. */
109−
110−static void afl_setup(void) {
111−
112− char *id_str = getenv(SHM_ENV_VAR),
113− *inst_r = getenv("AFL_INST_RATIO");
114−
115− int shm_id;
116−
117− if (inst_r) {
118−
119− unsigned int r;
120−
121− r = atoi(inst_r);
122−
123− if (r > 100) r = 100;
124− if (!r) r = 1;
125−
126− afl_inst_rms = MAP_SIZE * r / 100;
127−
128− }
129−
130− if (id_str) {
131−
132− shm_id = atoi(id_str);
133− afl_area_ptr = shmat(shm_id, NULL, 0);
134−
135− if (afl_area_ptr == (void*)-1) exit(1);
136−
137− /* With AFL_INST_RATIO set to a low value, we want to touch the bitmap
138− so that the parent doesn't give up on us. */
139−
140− if (inst_r) afl_area_ptr[0] = 1;
141−
142−
143− }
144−
145− if (getenv("AFL_INST_LIBS")) {
146−
147− afl_start_code = 0;
148− afl_end_code = (abi_ulong)-1;
149−
150− }
151−
152−}
153−
154−
155−/* Fork server logic, invoked once we hit _start. */
156−
157−static void afl_forkserver(CPUArchState *env) {
158−
159− static unsigned char tmp[4];
160−
161− if (!afl_area_ptr) return;
162−
163− /* Tell the parent that we're alive. If the parent doesn't want
164− to talk, assume that we're not running in forkserver mode. */
165−
166− if (write(FORKSRV_FD + 1, tmp, 4) != 4) return;
167−
168− afl_forksrv_pid = getpid();
169−
170− /* All right, let's await orders... */
171−
172− while (1) {
173−
174− pid_t child_pid;
175− int status, t_fd[2];
176−
177− /* Whoops, parent dead? */
178−
179− if (read(FORKSRV_FD, tmp, 4) != 4) exit(2);
180−
181− /* Establish a channel with child to grab translation commands. We'll
182− read from t_fd[0], child will write to TSL_FD. */
183−
184− if (pipe(t_fd) || dup2(t_fd[1], TSL_FD) < 0) exit(3);
185− close(t_fd[1]);
186−
187− child_pid = fork();
188− if (child_pid < 0) exit(4);
189−
190− if (!child_pid) {
191−
192− /* Child process. Close descriptors and run free. */
193−
194− afl_fork_child = 1;
195− close(FORKSRV_FD);
196− close(FORKSRV_FD + 1);
197− close(t_fd[0]);
198− return;
199−
200− }
201−
202− /* Parent. */
203−
204− close(TSL_FD);
205−
206− if (write(FORKSRV_FD + 1, &child_pid, 4) != 4) exit(5);
207−
208− /* Collect translation requests until child dies and closes the pipe. */
209−
210− afl_wait_tsl(env, t_fd[0]);
211−
212− /* Get and relay exit status to parent. */
213−
214− if (waitpid(child_pid, &status, WUNTRACED) < 0) exit(6);
215− if (write(FORKSRV_FD + 1, &status, 4) != 4) exit(7);
216−
217− }
218−
219−}
220−
221−
222−/* The equivalent of the tuple logging routine from afl-as.h. */
223−
224−static inline void afl_maybe_log(abi_ulong cur_loc) {
225−
226− static abi_ulong prev_loc;
227−
228− /* Optimize for cur_loc > afl_end_code, which is the most likely case on
229− Linux systems. */
230−
231− if (cur_loc > afl_end_code || cur_loc < afl_start_code || !afl_area_ptr)
232− return;
233−
234− /* Looks like QEMU always maps to fixed locations, so we can skip this:
235− cur_loc -= afl_start_code; */
236−
237− /* Instruction addresses may be aligned. Let's mangle the value to get
238− something quasi-uniform. */
239−
240− cur_loc = (cur_loc >> 4) ^ (cur_loc << 8);
241− cur_loc &= MAP_SIZE - 1;
242−
243− /* Implement probabilistic instrumentation by looking at scrambled block
244− address. This keeps the instrumented locations stable across runs. */
245−
246− if (cur_loc >= afl_inst_rms) return;
247−
248− afl_area_ptr[cur_loc ^ prev_loc]++;
249− prev_loc = cur_loc >> 1;
250−
251−}
252−
253−
254−/* This code is invoked whenever QEMU decides that it doesn't have a
255− translation of a particular block and needs to compute it. When this happens,
256− we tell the parent to mirror the operation, so that the next fork() has a
257− cached copy. */
258−
259−static void afl_request_tsl(target_ulong pc, target_ulong cb, uint64_t flags) {
260−
261− struct afl_tsl t;
262−
263− if (!afl_fork_child) return;
264−
265− t.pc = pc;
266− t.cs_base = cb;
267− t.flags = flags;
268−
269− if (write(TSL_FD, &t, sizeof(struct afl_tsl)) != sizeof(struct afl_tsl))
270− return;
271−
272−}
273−
274−
275−/* This is the other side of the same channel. Since timeouts are handled by
276− afl-fuzz simply killing the child, we can just wait until the pipe breaks. */
277−
278−static void afl_wait_tsl(CPUArchState *env, int fd) {
279−
280− struct afl_tsl t;
281−
282− while (1) {
283−
284− /* Broken pipe means it's time to return to the fork server routine. */
285−
286− if (read(fd, &t, sizeof(struct afl_tsl)) != sizeof(struct afl_tsl))
287− break;
288−
289− tb_find_slow(env, t.pc, t.cs_base, t.flags);
290−
291− }
292−
293− close(fd);
294−
295−}
296−
pkgs/tools/security/afl/qemu-patches/afl-types.hdeleted−79
@@ -1,79 +0,0 @@
1−/*
2− american fuzzy lop - type definitions and minor macros
3− ------------------------------------------------------
4−
5− Written and maintained by Michal Zalewski <lcamtuf@google.com>
6−
7− Copyright 2013, 2014, 2015 Google Inc. All rights reserved.
8−
9− Licensed under the Apache License, Version 2.0 (the "License");
10− you may not use this file except in compliance with the License.
11− You may obtain a copy of the License at:
12−
13− http://www.apache.org/licenses/LICENSE-2.0
14−
15− */
16−
17−#ifndef _HAVE_TYPES_H
18−#define _HAVE_TYPES_H
19−
20−#include <stdint.h>
21−#include <stdlib.h>
22−
23−typedef uint8_t u8;
24−typedef uint16_t u16;
25−typedef uint32_t u32;
26−
27−/*
28−
29− Ugh. There is an unintended compiler / glibc #include glitch caused by
30− combining the u64 type an %llu in format strings, necessitating a workaround.
31−
32− In essence, the compiler is always looking for 'unsigned long long' for %llu.
33− On 32-bit systems, the u64 type (aliased to uint64_t) is expanded to
34− 'unsigned long long' in <bits/types.h>, so everything checks out.
35−
36− But on 64-bit systems, it is #ifdef'ed in the same file as 'unsigned long'.
37− Now, it only happens in circumstances where the type happens to have the
38− expected bit width, *but* the compiler does not know that... and complains
39− about 'unsigned long' being unsafe to pass to %llu.
40−
41− */
42−
43−#ifdef __x86_64__
44−typedef unsigned long long u64;
45−#else
46−typedef uint64_t u64;
47−#endif /* ^sizeof(...) */
48−
49−typedef int8_t s8;
50−typedef int16_t s16;
51−typedef int32_t s32;
52−typedef int64_t s64;
53−
54−#ifndef MIN
55−# define MIN(_a,_b) ((_a) > (_b) ? (_b) : (_a))
56−# define MAX(_a,_b) ((_a) > (_b) ? (_a) : (_b))
57−#endif /* !MIN */
58−
59−#define SWAP16(_x) ({ \
60− u16 _ret = (_x); \
61− (u16)((_ret << 8) | (_ret >> 8)); \
62− })
63−
64−#define SWAP32(_x) ({ \
65− u32 _ret = (_x); \
66− (u32)((_ret << 24) | (_ret >> 24) | \
67− ((_ret << 8) & 0x00FF0000) | \
68− ((_ret >> 8) & 0x0000FF00)); \
69− })
70−
71−#define R(x) (random() % (x))
72−
73−#define STRINGIFY_INTERNAL(x) #x
74−#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
75−
76−#define MEM_BARRIER() \
77− asm volatile("" ::: "memory")
78−
79−#endif /* ! _HAVE_TYPES_H */
pkgs/tools/security/afl/qemu-patches/cpu-exec.patchdeleted−33
@@ -1,33 +0,0 @@
1−--- qemu-2.3.0/cpu-exec.c.orig 2014-12-09 14:45:40.000000000 +0000
2−+++ qemu-2.3.0/cpu-exec.c 2015-02-20 22:07:02.966000000 +0000
3−@@ -28,6 +28,8 @@
4− #include "exec/memory-internal.h"
5− #include "qemu/rcu.h"
6−
7−+#include "afl-qemu-cpu-inl.h"
8−+
9− /* -icount align implementation. */
10−
11− typedef struct SyncClocks {
12−@@ -296,8 +298,11 @@
13− }
14− not_found:
15− /* if no translated code available, then translate it now */
16−+
17− tb = tb_gen_code(cpu, pc, cs_base, flags, 0);
18−
19−+ AFL_QEMU_CPU_SNIPPET1;
20−+
21− found:
22− /* Move the last found TB to the head of the list */
23− if (likely(*ptb1)) {
24−@@ -492,6 +497,9 @@
25− next_tb = 0;
26− tcg_ctx.tb_ctx.tb_invalidated_flag = 0;
27− }
28−+
29−+ AFL_QEMU_CPU_SNIPPET2;
30−+
31− if (qemu_loglevel_mask(CPU_LOG_EXEC)) {
32− qemu_log("Trace %p [" TARGET_FMT_lx "] %s\n",
33− tb->tc_ptr, tb->pc, lookup_symbol(tb->pc));
pkgs/tools/security/afl/qemu-patches/elfload.patchdeleted−32
@@ -1,32 +0,0 @@
1−--- qemu-2.3.0/linux-user/elfload.c.orig 2014-12-09 14:45:42.000000000 +0000
2−+++ qemu-2.3.0/linux-user/elfload.c 2015-01-28 02:51:23.719000000 +0000
3−@@ -28,6 +28,8 @@
4−
5− #define ELF_OSABI ELFOSABI_SYSV
6−
7−+extern abi_ulong afl_entry_point, afl_start_code, afl_end_code;
8−+
9− /* from personality.h */
10−
11− /*
12−@@ -1889,6 +1891,8 @@
13− info->brk = 0;
14− info->elf_flags = ehdr->e_flags;
15−
16−+ if (!afl_entry_point) afl_entry_point = info->entry;
17−+
18− for (i = 0; i < ehdr->e_phnum; i++) {
19− struct elf_phdr *eppnt = phdr + i;
20− if (eppnt->p_type == PT_LOAD) {
21−@@ -1922,9 +1926,11 @@
22− if (elf_prot & PROT_EXEC) {
23− if (vaddr < info->start_code) {
24− info->start_code = vaddr;
25−+ if (!afl_start_code) afl_start_code = vaddr;
26− }
27− if (vaddr_ef > info->end_code) {
28− info->end_code = vaddr_ef;
29−+ if (!afl_end_code) afl_end_code = vaddr_ef;
30− }
31− }
32− if (elf_prot & PROT_WRITE) {
pkgs/tools/security/afl/qemu-patches/no-etc-install.patch+5−6
@@ -2,13 +2,12 @@ diff --git a/Makefile b/Makefile
22index d6b9dc1..ce7c493 100644
33--- a/Makefile
44+++ b/Makefile
5−@@ -384,8 +384,7 @@ install-confdir:
6− install-sysconfig: install-datadir install-confdir
7− $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
5+@@ -601,7 +601,7 @@ install-localstatedir:
6+ endif
7+
88
9−-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
10−-install-datadir install-localstatedir
9+-install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir
1110+install: all $(if $(BUILD_DOCS),install-doc) install-datadir
1211 ifneq ($(TOOLS),)
13− $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
12+ $(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)$(bindir))
1413 endif
pkgs/tools/security/afl/qemu-patches/qemu-2.10.0-glibc-2.27.patchnew file+28
@@ -0,0 +1,28 @@
1+A modified version of qemu commit 75e5b70e6b5dcc4f2219992d7cffa462aa406af0
2+diff --git a/configure b/configure
3+index 9c8aa5a..99ccc17 100755
4+--- a/configure
5++++ b/configure
6+@@ -3855,7 +3855,7 @@ fi
7+ # check if memfd is supported
8+ memfd=no
9+ cat > $TMPC << EOF
10+-#include <sys/memfd.h>
11++#include <sys/mman.h>
12+
13+ int main(void)
14+ {
15+diff --git a/util/memfd.c b/util/memfd.c
16+index 4571d1a..412e94a 100644
17+--- a/util/memfd.c
18++++ b/util/memfd.c
19+@@ -31,9 +31,7 @@
20+
21+ #include "qemu/memfd.h"
22+
23+-#ifdef CONFIG_MEMFD
24+-#include <sys/memfd.h>
25+-#elif defined CONFIG_LINUX
26++#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
27+ #include <sys/syscall.h>
28+ #include <asm/unistd.h>
pkgs/tools/security/afl/qemu-patches/qemu-2.3.0-glibc-2.26.patchdeleted−121
@@ -1,121 +0,0 @@
1−diff --git a/user-exec.c b/user-exec.c
2−index 8f57e8a..957f9f7 100644
3−--- a/user-exec.c
4−+++ b/user-exec.c
5−@@ -57,7 +57,7 @@ static void exception_action(CPUState *cpu)
6− void cpu_resume_from_signal(CPUState *cpu, void *puc)
7− {
8− #ifdef __linux__
9−- struct ucontext *uc = puc;
10−+ ucontext_t *uc = puc;
11− #elif defined(__OpenBSD__)
12− struct sigcontext *uc = puc;
13− #endif
14−@@ -171,7 +171,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
15− #elif defined(__OpenBSD__)
16− struct sigcontext *uc = puc;
17− #else
18−- struct ucontext *uc = puc;
19−+ ucontext_t *uc = puc;
20− #endif
21− unsigned long pc;
22− int trapno;
23−@@ -226,7 +226,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
24− #elif defined(__OpenBSD__)
25− struct sigcontext *uc = puc;
26− #else
27−- struct ucontext *uc = puc;
28−+ ucontext_t *uc = puc;
29− #endif
30−
31− pc = PC_sig(uc);
32−@@ -288,7 +288,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
33−
34− #ifdef __APPLE__
35− #include <sys/ucontext.h>
36−-typedef struct ucontext SIGCONTEXT;
37−+typedef ucontext_t SIGCONTEXT;
38− /* All Registers access - only for local access */
39− #define REG_sig(reg_name, context) \
40− ((context)->uc_mcontext->ss.reg_name)
41−@@ -331,7 +331,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
42− #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
43− ucontext_t *uc = puc;
44− #else
45−- struct ucontext *uc = puc;
46−+ ucontext_t *uc = puc;
47− #endif
48− unsigned long pc;
49− int is_write;
50−@@ -358,7 +358,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
51− void *puc)
52− {
53− siginfo_t *info = pinfo;
54−- struct ucontext *uc = puc;
55−+ ucontext_t *uc = puc;
56− uint32_t *pc = uc->uc_mcontext.sc_pc;
57− uint32_t insn = *pc;
58− int is_write = 0;
59−@@ -456,7 +456,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
60− #if defined(__NetBSD__)
61− ucontext_t *uc = puc;
62− #else
63−- struct ucontext *uc = puc;
64−+ ucontext_t *uc = puc;
65− #endif
66− unsigned long pc;
67− int is_write;
68−@@ -483,7 +483,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
69− int cpu_signal_handler(int host_signum, void *pinfo, void *puc)
70− {
71− siginfo_t *info = pinfo;
72−- struct ucontext *uc = puc;
73−+ ucontext_t *uc = puc;
74− uintptr_t pc = uc->uc_mcontext.pc;
75− uint32_t insn = *(uint32_t *)pc;
76− bool is_write;
77−@@ -512,7 +512,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
78− void *puc)
79− {
80− siginfo_t *info = pinfo;
81−- struct ucontext *uc = puc;
82−+ ucontext_t *uc = puc;
83− unsigned long pc;
84− int is_write;
85−
86−@@ -534,7 +534,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
87− int cpu_signal_handler(int host_signum, void *pinfo, void *puc)
88− {
89− siginfo_t *info = pinfo;
90−- struct ucontext *uc = puc;
91−+ ucontext_t *uc = puc;
92− unsigned long ip;
93− int is_write = 0;
94−
95−@@ -565,7 +565,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
96− void *puc)
97− {
98− siginfo_t *info = pinfo;
99−- struct ucontext *uc = puc;
100−+ ucontext_t *uc = puc;
101− unsigned long pc;
102− uint16_t *pinsn;
103− int is_write = 0;
104−@@ -618,7 +618,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
105− void *puc)
106− {
107− siginfo_t *info = pinfo;
108−- struct ucontext *uc = puc;
109−+ ucontext_t *uc = puc;
110− greg_t pc = uc->uc_mcontext.pc;
111− int is_write;
112−
113−@@ -634,7 +634,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
114− void *puc)
115− {
116− siginfo_t *info = pinfo;
117−- struct ucontext *uc = puc;
118−+ ucontext_t *uc = puc;
119− unsigned long pc = uc->uc_mcontext.sc_iaoq[0];
120− uint32_t insn = *(uint32_t *)pc;
121− int is_write = 0;
pkgs/tools/security/afl/qemu-patches/syscall.patchdeleted−25
@@ -1,25 +0,0 @@
1−--- qemu-2.3.0/linux-user/syscall.c.orig 2014-12-09 14:45:43.000000000 +0000
2−+++ qemu-2.3.0/linux-user/syscall.c 2015-03-27 06:33:00.736000000 +0000
3−@@ -227,7 +227,21 @@
4− _syscall3(int,sys_rt_sigqueueinfo,int,pid,int,sig,siginfo_t *,uinfo)
5− _syscall3(int,sys_syslog,int,type,char*,bufp,int,len)
6− #if defined(TARGET_NR_tgkill) && defined(__NR_tgkill)
7−-_syscall3(int,sys_tgkill,int,tgid,int,pid,int,sig)
8−+
9−+extern unsigned int afl_forksrv_pid;
10−+
11−+static int sys_tgkill(int tgid, int pid, int sig) {
12−+
13−+ /* Workaround for -lpthread to make abort() work properly, without
14−+ killing the forkserver due to a prematurely cached PID. */
15−+
16−+ if (afl_forksrv_pid && afl_forksrv_pid == pid && sig == SIGABRT)
17−+ pid = tgid = getpid();
18−+
19−+ return syscall(__NR_sys_tgkill, pid, tgid, sig);
20−+
21−+}
22−+
23− #endif
24− #if defined(TARGET_NR_tkill) && defined(__NR_tkill)
25− _syscall2(int,sys_tkill,int,tid,int,sig)
pkgs/tools/security/afl/qemu-patches/translate-all.patchdeleted−18
@@ -1,18 +0,0 @@
1−--- qemu-2.3.0/translate-all.c.orig 2014-12-09 14:45:46.000000000 +0000
2−+++ qemu-2.3.0/translate-all.c 2015-01-28 22:37:42.383000000 +0000
3−@@ -393,8 +393,13 @@
4− /* We can't use g_malloc because it may recurse into a locked mutex. */
5− # define ALLOC(P, SIZE) \
6− do { \
7−- P = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, \
8−- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \
9−+ void* _tmp = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, \
10−+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \
11−+ if (_tmp == (void*)-1) { \
12−+ qemu_log(">>> Out of memory for stack, bailing out. <<<\n"); \
13−+ exit(1); \
14−+ } \
15−+ (P) = _tmp; \
16− } while (0)
17− #else
18− # define ALLOC(P, SIZE) \
pkgs/tools/security/afl/qemu.nix+42−36
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, python2, zlib, pkgconfig, glib, ncurses, perl
1+{ stdenv, fetchurl, afl, python2, zlib, pkgconfig, glib, ncurses, perl
22, attr, libcap, vde2, texinfo, libuuid, flex, bison, lzo, snappy
33, libaio, libcap_ng, gnutls, pixman, autoconf
44, writeText
@@ -7,59 +7,65 @@
77with stdenv.lib;
88
99let
10− n = "qemu-2.3.0";
11−
12− aflHeaderFile = writeText "afl-qemu-cpu-inl.h"
13− (builtins.readFile ./qemu-patches/afl-qemu-cpu-inl.h);
14− aflConfigFile = writeText "afl-config.h"
15− (builtins.readFile ./qemu-patches/afl-config.h);
16− aflTypesFile = writeText "afl-types.h"
17− (builtins.readFile ./qemu-patches/afl-types.h);
18−
10+ qemuName = "qemu-2.10.0";
11+ aflName = afl.name;
1912 cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user"
2013 else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user"
2114 else throw "afl: no support for ${stdenv.hostPlatform.system}!";
2215in
2316stdenv.mkDerivation rec {
24− name = "afl-${n}";
17+ name = "afl-${qemuName}";
2518
26− src = fetchurl {
27− url = "http://wiki.qemu.org/download/${n}.tar.bz2";
28− sha256 = "120m53c3p28qxmfzllicjzr8syjv6v4d9rsyrgkp7gnmcgvvgfmn";
29− };
19+ srcs = [
20+ (fetchurl {
21+ url = "http://wiki.qemu.org/download/${qemuName}.tar.bz2";
22+ sha256 = "0j3dfxzrzdp1w21k21fjvmakzc6lcha1rsclaicwqvbf63hkk7vy";
23+ })
24+ afl.src
25+ ];
3026
31− buildInputs =
32− [ python2 zlib pkgconfig glib pixman ncurses perl attr libcap
33− vde2 texinfo libuuid flex bison lzo snappy autoconf
34− libcap_ng gnutls
35− ]
36− ++ optionals (hasSuffix "linux" stdenv.hostPlatform.system) [ libaio ];
27+ sourceRoot = qemuName;
3728
38− enableParallelBuilding = true;
29+ postUnpack = ''
30+ cp ${aflName}/types.h $sourceRoot/afl-types.h
31+ substitute ${aflName}/config.h $sourceRoot/afl-config.h \
32+ --replace "types.h" "afl-types.h"
33+ substitute ${aflName}/qemu_mode/patches/afl-qemu-cpu-inl.h $sourceRoot/afl-qemu-cpu-inl.h \
34+ --replace "../../config.h" "afl-config.h"
35+ substituteInPlace ${aflName}/qemu_mode/patches/cpu-exec.diff \
36+ --replace "../patches/afl-qemu-cpu-inl.h" "afl-qemu-cpu-inl.h"
37+ '';
3938
40− patches =
41− [ ./qemu-patches/elfload.patch
42− ./qemu-patches/cpu-exec.patch
43− ./qemu-patches/no-etc-install.patch
44− ./qemu-patches/translate-all.patch
45− ./qemu-patches/syscall.patch
46− ./qemu-patches/qemu-2.3.0-glibc-2.26.patch
47− ];
39+ nativeBuildInputs = [
40+ python2 perl pkgconfig flex bison autoconf texinfo
41+ ];
4842
49− preConfigure = ''
50− cp ${aflTypesFile} afl-types.h
51− cp ${aflConfigFile} afl-config.h
52− cp ${aflHeaderFile} afl-qemu-cpu-inl.h
53− '';
43+ buildInputs = [
44+ zlib glib pixman ncurses attr libcap
45+ vde2 libuuid lzo snappy libcap_ng gnutls
46+ ] ++ optionals (stdenv.isLinux) [ libaio ];
47+
48+ enableParallelBuilding = true;
49+
50+ patches = [
51+ # patches extracted from afl source
52+ "../${aflName}/qemu_mode/patches/cpu-exec.diff"
53+ "../${aflName}/qemu_mode/patches/elfload.diff"
54+ "../${aflName}/qemu_mode/patches/syscall.diff"
55+ # nix-specific patches to make installation more well-behaved
56+ ./qemu-patches/no-etc-install.patch
57+ ./qemu-patches/qemu-2.10.0-glibc-2.27.patch
58+ ];
5459
5560 configureFlags =
5661 [ "--disable-system"
5762 "--enable-linux-user"
58− "--enable-guest-base"
5963 "--disable-gtk"
6064 "--disable-sdl"
6165 "--disable-vnc"
6266 "--target-list=${cpuTarget}"
67+ "--enable-pie"
68+ "--enable-kvm"
6369 "--sysconfdir=/etc"
6470 "--localstatedir=/var"
6571 ];
pkgs/tools/system/bfs/default.nix+5−11
@@ -1,23 +1,17 @@
1−{ stdenv, fetchFromGitHub, bash }:
1+{ stdenv, fetchFromGitHub, libcap, acl }:
22
33stdenv.mkDerivation rec {
44 name = "bfs-${version}";
5− version = "1.2.4";
5+ version = "1.3.1";
66
77 src = fetchFromGitHub {
88 repo = "bfs";
99 owner = "tavianator";
1010 rev = version;
11− sha256 = "0nxx2njjp04ik6msfmf07hprw0j88wg04m0q1sf17mhkliw2d78s";
11+ sha256 = "0gv9hrcsz7miv40v6wmkmb1a58ji5d1dlgwq6gwczd8rzlmhddmc";
1212 };
1313
14− postPatch = ''
15− # Patch tests (both shebangs and usage in scripts)
16− for f in $(find -type f -name '*.sh'); do
17− substituteInPlace $f --replace "/bin/bash" "${bash}/bin/bash"
18− done
19− '';
20− doCheck = true;
14+ buildInputs = stdenv.lib.optionals stdenv.isLinux [ libcap acl ];
2115
2216 makeFlags = [ "PREFIX=$(out)" ];
2317 buildFlags = [ "release" ]; # "release" enables compiler optimizations
@@ -30,7 +24,7 @@ stdenv.mkDerivation rec {
3024 '';
3125 homepage = https://github.com/tavianator/bfs;
3226 license = licenses.bsd0;
33− platforms = platforms.linux;
27+ platforms = platforms.unix;
3428 maintainers = with maintainers; [ yesbox ];
3529 };
3630}
pkgs/top-level/all-packages.nix+5−2
@@ -8837,6 +8837,7 @@ in
88378837 minify = callPackage ../development/web/minify { };
88388838
88398839 minizinc = callPackage ../development/tools/minizinc { };
8840+ minizincide = qt5.callPackage ../development/tools/minizinc/ide.nix { };
88408841
88418842 mk = callPackage ../development/tools/build-managers/mk { };
88428843
@@ -13475,7 +13476,7 @@ in
1347513476 clamsmtp = callPackage ../servers/mail/clamsmtp { };
1347613477
1347713478 clickhouse = callPackage ../servers/clickhouse {
13478− inherit (llvmPackages_6) clang-unwrapped lld llvm;
13479+ inherit (llvmPackages_latest) clang-unwrapped lld llvm;
1347913480 };
1348013481
1348113482 couchdb = callPackage ../servers/http/couchdb {
@@ -20402,7 +20403,9 @@ in
2040220403
2040320404 angband = callPackage ../games/angband { };
2040420405
20405− anki = python3Packages.callPackage ../games/anki { };
20406+ anki = python3Packages.callPackage ../games/anki {
20407+ inherit (darwin.apple_sdk.frameworks) CoreAudio;
20408+ };
2040620409
2040720410 armagetronad = callPackage ../games/armagetronad { };
2040820411
pkgs/top-level/python-packages.nix+9−1
@@ -1732,7 +1732,11 @@ in {
17321732
17331733 gateone = callPackage ../development/python-modules/gateone { };
17341734
1735− gcutil = callPackage ../development/python-modules/gcutil { };
1735+ # TODO: Remove after 19.03 is branched off:
1736+ gcutil = throw ''
1737+ pythonPackages.gcutil is deprecated and can be replaced with "gcloud
1738+ compute" from the package google-cloud-sdk.
1739+ '';
17361740
17371741 GeoIP = callPackage ../development/python-modules/GeoIP { };
17381742
@@ -2295,6 +2299,8 @@ in {
22952299
22962300 dtopt = callPackage ../development/python-modules/dtopt { };
22972301
2302+ easywatch = callPackage ../development/python-modules/easywatch { };
2303+
22982304 ecdsa = callPackage ../development/python-modules/ecdsa { };
22992305
23002306 effect = callPackage ../development/python-modules/effect {};
@@ -4000,6 +4006,8 @@ in {
40004006
40014007 sqlalchemy_migrate = callPackage ../development/python-modules/sqlalchemy-migrate { };
40024008
4009+ staticjinja = callPackage ../development/python-modules/staticjinja { };
4010+
40034011 statsmodels = callPackage ../development/python-modules/statsmodels { };
40044012
40054013 structlog = callPackage ../development/python-modules/structlog { };