summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--maintainers/maintainer-list.nix5
-rw-r--r--nixos/doc/manual/release-notes/rl-1903.xml7
-rw-r--r--nixos/modules/misc/ids.nix2
-rw-r--r--nixos/modules/programs/bash/bash.nix2
-rw-r--r--nixos/modules/programs/sway-beta.nix33
-rw-r--r--nixos/modules/services/mail/rspamd.nix79
-rw-r--r--nixos/modules/services/misc/gitlab.nix7
-rw-r--r--nixos/modules/services/monitoring/prometheus/default.nix29
-rw-r--r--nixos/modules/services/search/solr.nix181
-rw-r--r--nixos/release.nix1
-rw-r--r--nixos/tests/rspamd.nix77
-rw-r--r--nixos/tests/solr.nix47
-rw-r--r--pkgs/applications/audio/lollypop/default.nix4
-rw-r--r--pkgs/applications/audio/pulseaudio-modules-bt/default.nix10
-rw-r--r--pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch15
-rw-r--r--pkgs/applications/audio/spotify/default.nix6
-rw-r--r--pkgs/applications/editors/rstudio/clang-location.patch25
-rw-r--r--pkgs/applications/editors/rstudio/fix-cmake.patch15
-rw-r--r--pkgs/applications/editors/rstudio/preview.nix119
-rw-r--r--pkgs/applications/misc/alacritty/default.nix5
-rw-r--r--pkgs/applications/networking/instant-messengers/slack-term/default.nix23
-rw-r--r--pkgs/applications/science/logic/coq/default.nix1
-rw-r--r--pkgs/desktops/gnome-3/core/mutter/default.nix10
-rw-r--r--pkgs/development/compilers/ghc/7.10.3.nix194
-rw-r--r--pkgs/development/compilers/ghc/8.0.2.nix201
-rw-r--r--pkgs/development/compilers/ghc/8.4.3.nix247
-rw-r--r--pkgs/development/compilers/ghc/ghc-8.0.2-no-cpp-warnings.patch23
-rw-r--r--pkgs/development/compilers/ghc/ghc-gold-linker.patch54
-rw-r--r--pkgs/development/compilers/ghc/ghc-no-madv-free.patch18
-rw-r--r--pkgs/development/compilers/ghc/relocation.patch27
-rw-r--r--pkgs/development/compilers/ghcjs/7.10/boot.patch104
-rw-r--r--pkgs/development/compilers/ghcjs/7.10/default.nix50
-rw-r--r--pkgs/development/compilers/ghcjs/7.10/shims.nix7
-rw-r--r--pkgs/development/compilers/ghcjs/7.10/stage2.nix344
-rw-r--r--pkgs/development/compilers/ghcjs/8.0/boot.patch86
-rw-r--r--pkgs/development/compilers/ghcjs/8.0/default.nix50
-rw-r--r--pkgs/development/compilers/ghcjs/8.0/shims.nix7
-rw-r--r--pkgs/development/compilers/ghcjs/8.0/stage2.nix545
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix239
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.0.x.nix91
-rw-r--r--pkgs/development/haskell-modules/configuration-halvm-2.4.0.nix59
-rw-r--r--pkgs/development/libraries/grpc/default.nix2
-rw-r--r--pkgs/development/libraries/kerberos/krb5.nix2
-rw-r--r--pkgs/development/libraries/libmtp/default.nix4
-rw-r--r--pkgs/development/libraries/openjpeg/2.x.nix8
-rw-r--r--pkgs/development/libraries/v8/plv8_6_x.nix187
-rw-r--r--pkgs/development/libraries/xapian/default.nix2
-rw-r--r--pkgs/development/python-modules/sslib/default.nix22
-rw-r--r--pkgs/misc/vim-plugins/generated.nix107
-rw-r--r--pkgs/misc/vim-plugins/overrides.nix9
-rw-r--r--pkgs/misc/vim-plugins/vim-plugin-names3
-rw-r--r--pkgs/os-specific/linux/ati-drivers/default.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-beagleboard.nix34
-rw-r--r--pkgs/os-specific/linux/kernel/linux-samus-4.12.nix16
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/default.nix8
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix25
-rw-r--r--pkgs/servers/search/solr/default.nix23
-rw-r--r--pkgs/servers/sql/postgresql/pg_hll/default.nix6
-rw-r--r--pkgs/servers/sql/postgresql/pg_repack/default.nix54
-rw-r--r--pkgs/servers/sql/postgresql/plv8/default.nix12
-rw-r--r--pkgs/servers/sql/postgresql/timescaledb/default.nix10
-rw-r--r--pkgs/servers/sql/postgresql/topn/default.nix4
-rw-r--r--pkgs/servers/sql/postgresql/tsearch_extras/default.nix10
-rw-r--r--pkgs/shells/zsh/zsh-git-prompt/default.nix4
-rw-r--r--pkgs/tools/misc/jdupes/default.nix4
-rw-r--r--pkgs/top-level/all-packages.nix48
-rw-r--r--pkgs/top-level/coq-packages.nix10
-rw-r--r--pkgs/top-level/haskell-packages.nix40
-rw-r--r--pkgs/top-level/python-packages.nix2
-rw-r--r--pkgs/top-level/release-cross.nix2
70 files changed, 972 insertions, 2739 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index ec4289f19ead..60354432ad9b 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -406,6 +406,11 @@
     github = "AveryLychee";
     name = "Avery Lychee";
   };
+  averelld = {
+    email = "averell+nixos@rxd4.com";
+    github = "averelld";
+    name = "averelld";
+  };
   avnik = {
     email = "avn@avnik.info";
     github = "avnik";
diff --git a/nixos/doc/manual/release-notes/rl-1903.xml b/nixos/doc/manual/release-notes/rl-1903.xml
index fb5d475f693a..189961476b32 100644
--- a/nixos/doc/manual/release-notes/rl-1903.xml
+++ b/nixos/doc/manual/release-notes/rl-1903.xml
@@ -190,6 +190,13 @@
       options can occour more than once in the configuration.
     </para>
    </listitem>
+   <listitem>
+    <para>
+      The <literal>solr</literal> package has been upgraded from 4.10.3 to 7.5.0 and has undergone
+      some major changes. The <literal>services.solr</literal> module has been updated to reflect
+      these changes. Please review http://lucene.apache.org/solr/ carefully before upgrading.
+    </para>
+   </listitem>
   </itemizedlist>
  </section>
 
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index 16737efb1856..6e7f0a007bc2 100644
--- a/nixos/modules/misc/ids.nix
+++ b/nixos/modules/misc/ids.nix
@@ -333,6 +333,7 @@
       lidarr = 306;
       slurm = 307;
       kapacitor = 308;
+      solr = 309;
 
       # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
 
@@ -626,6 +627,7 @@
       lidarr = 306;
       slurm = 307;
       kapacitor = 308;
+      solr = 309;
 
       # When adding a gid, make sure it doesn't match an existing
       # uid. Users and groups with the same name should have equal
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix
index 0fbc77ea44cf..d325fff6a572 100644
--- a/nixos/modules/programs/bash/bash.nix
+++ b/nixos/modules/programs/bash/bash.nix
@@ -16,7 +16,7 @@ let
     # programmable completion. If we do, enable all modules installed in
     # the system and user profile in obsolete /etc/bash_completion.d/
     # directories. Bash loads completions in all
-    # $XDG_DATA_DIRS/share/bash-completion/completions/
+    # $XDG_DATA_DIRS/bash-completion/completions/
     # on demand, so they do not need to be sourced here.
     if shopt -q progcomp &>/dev/null; then
       . "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
diff --git a/nixos/modules/programs/sway-beta.nix b/nixos/modules/programs/sway-beta.nix
index 04f2e0662b86..e651ea4cca33 100644
--- a/nixos/modules/programs/sway-beta.nix
+++ b/nixos/modules/programs/sway-beta.nix
@@ -5,6 +5,15 @@ with lib;
 let
   cfg = config.programs.sway-beta;
   swayPackage = cfg.package;
+
+  swayWrapped = pkgs.writeShellScriptBin "sway" ''
+    ${cfg.extraSessionCommands}
+    exec ${pkgs.dbus.dbus-launch} --exit-with-session ${swayPackage}/bin/sway
+  '';
+  swayJoined = pkgs.symlinkJoin {
+    name = "sway-joined";
+    paths = [ swayWrapped swayPackage ];
+  };
 in {
   options.programs.sway-beta = {
     enable = mkEnableOption ''
@@ -20,13 +29,30 @@ in {
       '';
     };
 
+    extraSessionCommands = mkOption {
+      type = types.lines;
+      default = "";
+      example = ''
+        export SDL_VIDEODRIVER=wayland
+        # needs qt5.qtwayland in systemPackages
+        export QT_QPA_PLATFORM=wayland
+        export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
+        # Fix for some Java AWT applications (e.g. Android Studio),
+        # use this if they aren't displayed properly:
+        export _JAVA_AWT_WM_NONREPARENTING=1
+      '';
+      description = ''
+        Shell commands executed just before Sway is started.
+      '';
+    };
+
     extraPackages = mkOption {
       type = with types; listOf package;
       default = with pkgs; [
-        xwayland dmenu
+        xwayland rxvt_unicode dmenu
       ];
       defaultText = literalExample ''
-        with pkgs; [ xwayland dmenu ];
+        with pkgs; [ xwayland rxvt_unicode dmenu ];
       '';
       example = literalExample ''
         with pkgs; [
@@ -42,7 +68,7 @@ in {
   };
 
   config = mkIf cfg.enable {
-    environment.systemPackages = [ swayPackage ] ++ cfg.extraPackages;
+    environment.systemPackages = [ swayJoined ] ++ cfg.extraPackages;
     security.pam.services.swaylock = {};
     hardware.opengl.enable = mkDefault true;
     fonts.enableDefaultFonts = mkDefault true;
@@ -51,4 +77,3 @@ in {
 
   meta.maintainers = with lib.maintainers; [ gnidorah primeos colemickens ];
 }
-
diff --git a/nixos/modules/services/mail/rspamd.nix b/nixos/modules/services/mail/rspamd.nix
index ff01a5dee53d..d83d6f1f750c 100644
--- a/nixos/modules/services/mail/rspamd.nix
+++ b/nixos/modules/services/mail/rspamd.nix
@@ -127,11 +127,15 @@ let
       options {
         pidfile = "$RUNDIR/rspamd.pid";
         .include "$CONFDIR/options.inc"
+        .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/options.inc"
+        .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/options.inc"
       }
 
       logging {
         type = "syslog";
         .include "$CONFDIR/logging.inc"
+        .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/logging.inc"
+        .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/logging.inc"
       }
 
       ${concatStringsSep "\n" (mapAttrsToList (name: value: ''
@@ -149,6 +153,41 @@ let
       ${cfg.extraConfig}
    '';
 
+  rspamdDir = pkgs.linkFarm "etc-rspamd-dir" (
+    (mapAttrsToList (name: file: { name = "local.d/${name}"; path = file.source; }) cfg.locals) ++
+    (mapAttrsToList (name: file: { name = "override.d/${name}"; path = file.source; }) cfg.overrides) ++
+    (optional (cfg.localLuaRules != null) { name = "rspamd.local.lua"; path = cfg.localLuaRules; }) ++
+    [ { name = "rspamd.conf"; path = rspamdConfFile; } ]
+  );
+
+  configFileModule = prefix: { name, config, ... }: {
+    options = {
+      enable = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+          Whether this file ${prefix} should be generated.  This
+          option allows specific ${prefix} files to be disabled.
+        '';
+      };
+
+      text = mkOption {
+        default = null;
+        type = types.nullOr types.lines;
+        description = "Text of the file.";
+      };
+
+      source = mkOption {
+        type = types.path;
+        description = "Path of the source file.";
+      };
+    };
+    config = {
+      source = mkIf (config.text != null) (
+        let name' = "rspamd-${prefix}-" + baseNameOf name;
+        in mkDefault (pkgs.writeText name' config.text));
+    };
+  };
 in
 
 {
@@ -167,6 +206,41 @@ in
         description = "Whether to run the rspamd daemon in debug mode.";
       };
 
+      locals = mkOption {
+        type = with types; loaOf (submodule (configFileModule "locals"));
+        default = {};
+        description = ''
+          Local configuration files, written into <filename>/etc/rspamd/local.d/{name}</filename>.
+        '';
+        example = literalExample ''
+          { "redis.conf".source = "/nix/store/.../etc/dir/redis.conf";
+            "arc.conf".text = "allow_envfrom_empty = true;";
+          }
+        '';
+      };
+
+      overrides = mkOption {
+        type = with types; loaOf (submodule (configFileModule "overrides"));
+        default = {};
+        description = ''
+          Overridden configuration files, written into <filename>/etc/rspamd/override.d/{name}</filename>.
+        '';
+        example = literalExample ''
+          { "redis.conf".source = "/nix/store/.../etc/dir/redis.conf";
+            "arc.conf".text = "allow_envfrom_empty = true;";
+          }
+        '';
+      };
+
+      localLuaRules = mkOption {
+        default = null;
+        type = types.nullOr types.path;
+        description = ''
+          Path of file to link to <filename>/etc/rspamd/rspamd.local.lua</filename> for local
+          rules written in Lua
+        '';
+      };
+
       workers = mkOption {
         type = with types; attrsOf (submodule workerOpts);
         description = ''
@@ -242,16 +316,17 @@ in
       gid = config.ids.gids.rspamd;
     };
 
-    environment.etc."rspamd.conf".source = rspamdConfFile;
+    environment.etc."rspamd".source = rspamdDir;
 
     systemd.services.rspamd = {
       description = "Rspamd Service";
 
       wantedBy = [ "multi-user.target" ];
       after = [ "network.target" ];
+      restartTriggers = [ rspamdDir ];
 
       serviceConfig = {
-        ExecStart = "${pkgs.rspamd}/bin/rspamd ${optionalString cfg.debug "-d"} --user=${cfg.user} --group=${cfg.group} --pid=/run/rspamd.pid -c ${rspamdConfFile} -f";
+        ExecStart = "${pkgs.rspamd}/bin/rspamd ${optionalString cfg.debug "-d"} --user=${cfg.user} --group=${cfg.group} --pid=/run/rspamd.pid -c /etc/rspamd/rspamd.conf -f";
         Restart = "always";
         RuntimeDirectory = "rspamd";
         PrivateTmp = true;
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index ce1cb6ad37f2..aa72cda70453 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -552,10 +552,9 @@ in {
         gnupg
       ];
       preStart = ''
-        ${pkgs.openssl}/bin/openssl rand -hex 32 > ${cfg.statePath}/config/gitlab_shell_secret
-
         cp -rf ${cfg.packages.gitlab}/share/gitlab/db/* ${cfg.statePath}/db
-        cp -rf ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
+        rm -rf ${cfg.statePath}/config
+        mkdir ${cfg.statePath}/config
         if [ -e ${cfg.statePath}/lib ]; then
           rm ${cfg.statePath}/lib
         fi
@@ -569,6 +568,8 @@ in {
           ln -sf ${smtpSettings} ${cfg.statePath}/config/initializers/smtp_settings.rb
         ''}
         cp ${cfg.packages.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION
+        cp -rf ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
+        ${pkgs.openssl}/bin/openssl rand -hex 32 > ${cfg.statePath}/config/gitlab_shell_secret
 
         # JSON is a subset of YAML
         ln -sf ${pkgs.writeText "gitlab.yml" (builtins.toJSON gitlabConfig)} ${cfg.statePath}/config/gitlab.yml
diff --git a/nixos/modules/services/monitoring/prometheus/default.nix b/nixos/modules/services/monitoring/prometheus/default.nix
index e2ee995cea80..bf4dfc666bb6 100644
--- a/nixos/modules/services/monitoring/prometheus/default.nix
+++ b/nixos/modules/services/monitoring/prometheus/default.nix
@@ -10,6 +10,13 @@ let
   # Get a submodule without any embedded metadata:
   _filter = x: filterAttrs (k: v: k != "_module") x;
 
+  # a wrapper that verifies that the configuration is valid
+  promtoolCheck = what: name: file: pkgs.runCommand "${name}-${what}-checked"
+    { buildInputs = [ cfg.package ]; } ''
+    ln -s ${file} $out
+    promtool ${what} $out
+  '';
+
   # Pretty-print JSON to a file
   writePrettyJSON = name: x:
     pkgs.runCommand name { } ''
@@ -19,18 +26,19 @@ let
   # This becomes the main config file
   promConfig = {
     global = cfg.globalConfig;
-    rule_files = cfg.ruleFiles ++ [
+    rule_files = map (promtoolCheck "check-rules" "rules") (cfg.ruleFiles ++ [
       (pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg.rules))
-    ];
+    ]);
     scrape_configs = cfg.scrapeConfigs;
   };
 
   generatedPrometheusYml = writePrettyJSON "prometheus.yml" promConfig;
 
-  prometheusYml =
-    if cfg.configText != null then
+  prometheusYml = let
+    yml =  if cfg.configText != null then
       pkgs.writeText "prometheus.yml" cfg.configText
-    else generatedPrometheusYml;
+      else generatedPrometheusYml;
+    in promtoolCheck "check-config" "prometheus.yml" yml;
 
   cmdlineArgs = cfg.extraFlags ++ [
     "-storage.local.path=${cfg.dataDir}/metrics"
@@ -376,6 +384,15 @@ in {
         '';
       };
 
+      package = mkOption {
+        type = types.package;
+        default = pkgs.prometheus;
+        defaultText = "pkgs.prometheus";
+        description = ''
+          The prometheus package that should be used.
+        '';
+      };
+
       listenAddress = mkOption {
         type = types.str;
         default = "0.0.0.0:9090";
@@ -495,7 +512,7 @@ in {
       after    = [ "network.target" ];
       script = ''
         #!/bin/sh
-        exec ${pkgs.prometheus}/bin/prometheus \
+        exec ${cfg.package}/bin/prometheus \
           ${concatStringsSep " \\\n  " cmdlineArgs}
       '';
       serviceConfig = {
diff --git a/nixos/modules/services/search/solr.nix b/nixos/modules/services/search/solr.nix
index 90140a337ed8..7200c40e89f7 100644
--- a/nixos/modules/services/search/solr.nix
+++ b/nixos/modules/services/search/solr.nix
@@ -6,142 +6,105 @@ let
 
   cfg = config.services.solr;
 
-  # Assemble all jars needed for solr
-  solrJars = pkgs.stdenv.mkDerivation {
-    name = "solr-jars";
-
-    src = pkgs.fetchurl {
-      url = http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.36/bin/apache-tomcat-5.5.36.tar.gz;
-      sha256 = "01mzvh53wrs1p2ym765jwd00gl6kn8f9k3nhdrnhdqr8dhimfb2p";
-    };
-
-    installPhase = ''
-      mkdir -p $out/lib
-      cp common/lib/*.jar $out/lib/
-      ln -s ${pkgs.ant}/lib/ant/lib/ant.jar $out/lib/
-      ln -s ${cfg.solrPackage}/lib/ext/* $out/lib/
-      ln -s ${pkgs.jdk.home}/lib/tools.jar $out/lib/
-    '' + optionalString (cfg.extraJars != []) ''
-      for f in ${concatStringsSep " " cfg.extraJars}; do
-         cp $f $out/lib
-      done
-    '';
-  };
-
-in {
+in
 
+{
   options = {
     services.solr = {
-      enable = mkOption {
-        type = types.bool;
-        default = false;
-        description = ''
-          Enables the solr service.
-        '';
-      };
-
-      javaPackage = mkOption {
-        type = types.package;
-        default = pkgs.jre;
-        defaultText = "pkgs.jre";
-        description = ''
-          Which Java derivation to use for running solr.
-        '';
-      };
+      enable = mkEnableOption "Enables the solr service.";
 
-      solrPackage = mkOption {
+      package = mkOption {
         type = types.package;
         default = pkgs.solr;
         defaultText = "pkgs.solr";
-        description = ''
-          Which solr derivation to use for running solr.
-        '';
+        description = "Which Solr package to use.";
       };
 
-      extraJars = mkOption {
-        type = types.listOf types.path;
-        default = [];
-        description = ''
-          List of paths pointing to jars. Jars are copied to commonLibFolder to be available to java/solr.
-        '';
+      port = mkOption {
+        type = types.int;
+        default = 8983;
+        description = "Port on which Solr is ran.";
       };
 
-      log4jConfiguration = mkOption {
-        type = types.lines;
-        default = ''
-          log4j.rootLogger=INFO, stdout
-          log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-          log4j.appender.stdout.Target=System.out
-          log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-          log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
-        '';
-        description = ''
-          Contents of the <literal>log4j.properties</literal> used. By default,
-          everything is logged to stdout (picked up by systemd) with level INFO.
-        '';
+      stateDir = mkOption {
+        type = types.path;
+        default = "/var/lib/solr";
+        description = "The solr home directory containing config, data, and logging files.";
       };
 
-      user = mkOption {
-        type = types.str;
-        description = ''
-          The user that should run the solr process and.
-          the working directories.
-        '';
+      extraJavaOptions = mkOption {
+        type = types.listOf types.str;
+        default = [];
+        description = "Extra command line options given to the java process running Solr.";
       };
 
-      group = mkOption {
+      user = mkOption {
         type = types.str;
-        description = ''
-          The group that will own the working directory.
-        '';
+        default = "solr";
+        description = "User under which Solr is ran.";
       };
 
-      solrHome = mkOption {
+      group = mkOption {
         type = types.str;
-        description = ''
-          The solr home directory. It is your own responsibility to
-          make sure this directory contains a working solr configuration,
-          and is writeable by the the user running the solr service.
-          Failing to do so, the solr will not start properly.
-        '';
-      };
-
-      extraJavaOptions = mkOption {
-        type = types.listOf types.str;
-        default = [];
-        description = ''
-          Extra command line options given to the java process running
-          solr.
-        '';
-      };
-
-      extraWinstoneOptions = mkOption {
-        type = types.listOf types.str;
-        default = [];
-        description = ''
-          Extra command line options given to the Winstone, which is
-          the servlet container hosting solr.
-        '';
+        default = "solr";
+        description = "Group under which Solr is ran.";
       };
     };
   };
 
   config = mkIf cfg.enable {
 
-    services.winstone.solr = {
-      serviceName = "solr";
-      inherit (cfg) user group javaPackage;
-      warFile = "${cfg.solrPackage}/lib/solr.war";
-      extraOptions = [
-        "--commonLibFolder=${solrJars}/lib"
-        "--useJasper"
-      ] ++ cfg.extraWinstoneOptions;
-      extraJavaOptions = [
-        "-Dsolr.solr.home=${cfg.solrHome}"
-        "-Dlog4j.configuration=file://${pkgs.writeText "log4j.properties" cfg.log4jConfiguration}"
-      ] ++ cfg.extraJavaOptions;
+    environment.systemPackages = [ cfg.package ];
+
+    systemd.services.solr = {
+      after = [ "network.target" "remote-fs.target" "nss-lookup.target" "systemd-journald-dev-log.socket" ];
+      wantedBy = [ "multi-user.target" ];
+
+      environment = {
+        SOLR_HOME = "${cfg.stateDir}/data";
+        LOG4J_PROPS = "${cfg.stateDir}/log4j2.xml";
+        SOLR_LOGS_DIR = "${cfg.stateDir}/logs";
+        SOLR_PORT = "${toString cfg.port}";
+      };
+      path = with pkgs; [
+        gawk
+        procps
+      ];
+      preStart = ''
+        mkdir -p "${cfg.stateDir}/data";
+        mkdir -p "${cfg.stateDir}/logs";
+
+        if ! test -e "${cfg.stateDir}/data/solr.xml"; then
+          install -D -m0640 ${cfg.package}/server/solr/solr.xml "${cfg.stateDir}/data/solr.xml"
+          install -D -m0640 ${cfg.package}/server/solr/zoo.cfg "${cfg.stateDir}/data/zoo.cfg"
+        fi
+
+        if ! test -e "${cfg.stateDir}/log4j2.xml"; then
+          install -D -m0640 ${cfg.package}/server/resources/log4j2.xml "${cfg.stateDir}/log4j2.xml"
+        fi
+      '';
+
+      serviceConfig = {
+        User = cfg.user;
+        Group = cfg.group;
+        ExecStart="${cfg.package}/bin/solr start -f -a \"${concatStringsSep " " cfg.extraJavaOptions}\"";
+        ExecStop="${cfg.package}/bin/solr stop";
+      };
     };
 
+    users.users = optionalAttrs (cfg.user == "solr") (singleton
+      { name = "solr";
+        group = cfg.group;
+        home = cfg.stateDir;
+        createHome = true;
+        uid = config.ids.uids.solr;
+      });
+
+    users.groups = optionalAttrs (cfg.group == "solr") (singleton
+      { name = "solr";
+        gid = config.ids.gids.solr;
+      });
+
   };
 
 }
diff --git a/nixos/release.nix b/nixos/release.nix
index c3a10c9d3300..4647f28be186 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -410,6 +410,7 @@ in rec {
   tests.slurm = callTest tests/slurm.nix {};
   tests.smokeping = callTest tests/smokeping.nix {};
   tests.snapper = callTest tests/snapper.nix {};
+  tests.solr = callTest tests/solr.nix {};
   #tests.statsd = callTest tests/statsd.nix {}; # statsd is broken: #45946
   tests.strongswan-swanctl = callTest tests/strongswan-swanctl.nix {};
   tests.sudo = callTest tests/sudo.nix {};
diff --git a/nixos/tests/rspamd.nix b/nixos/tests/rspamd.nix
index a12622b6aa0b..af765f37b91b 100644
--- a/nixos/tests/rspamd.nix
+++ b/nixos/tests/rspamd.nix
@@ -27,7 +27,7 @@ let
       $machine->succeed("id \"rspamd\" >/dev/null");
       ${checkSocket "/run/rspamd/rspamd.sock" "rspamd" "rspamd" "660" }
       sleep 10;
-      $machine->log($machine->succeed("cat /etc/rspamd.conf"));
+      $machine->log($machine->succeed("cat /etc/rspamd/rspamd.conf"));
       $machine->log($machine->succeed("systemctl cat rspamd.service"));
       $machine->log($machine->succeed("curl http://localhost:11334/auth"));
       $machine->log($machine->succeed("curl http://127.0.0.1:11334/auth"));
@@ -55,7 +55,7 @@ in
       $machine->waitForFile("/run/rspamd.sock");
       ${checkSocket "/run/rspamd.sock" "root" "root" "600" }
       ${checkSocket "/run/rspamd-worker.sock" "root" "root" "666" }
-      $machine->log($machine->succeed("cat /etc/rspamd.conf"));
+      $machine->log($machine->succeed("cat /etc/rspamd/rspamd.conf"));
       $machine->log($machine->succeed("rspamc -h /run/rspamd-worker.sock stat"));
       $machine->log($machine->succeed("curl --unix-socket /run/rspamd-worker.sock http://localhost/ping"));
     '';
@@ -86,9 +86,80 @@ in
       $machine->waitForFile("/run/rspamd.sock");
       ${checkSocket "/run/rspamd.sock" "root" "root" "600" }
       ${checkSocket "/run/rspamd-worker.sock" "root" "root" "666" }
-      $machine->log($machine->succeed("cat /etc/rspamd.conf"));
+      $machine->log($machine->succeed("cat /etc/rspamd/rspamd.conf"));
       $machine->log($machine->succeed("rspamc -h /run/rspamd-worker.sock stat"));
       $machine->log($machine->succeed("curl --unix-socket /run/rspamd-worker.sock http://localhost/ping"));
     '';
   };
+  customLuaRules = makeTest {
+    name = "rspamd-custom-lua-rules";
+    machine = {
+      environment.etc."tests/no-muh.eml".text = ''
+        From: Sheep1<bah@example.com>
+        To: Sheep2<mah@example.com>
+        Subject: Evil cows
+
+        I find cows to be evil don't you?
+      '';
+      environment.etc."tests/muh.eml".text = ''
+        From: Cow<cow@example.com>
+        To: Sheep2<mah@example.com>
+        Subject: Evil cows
+
+        Cows are majestic creatures don't Muh agree?
+      '';
+      services.rspamd = {
+        enable = true;
+        locals."groups.conf".text = ''
+          group "cows" {
+            symbol {
+              NO_MUH = {
+                weight = 1.0;
+                description = "Mails should not muh";
+              }
+            }
+          }
+        '';
+        localLuaRules = pkgs.writeText "rspamd.local.lua" ''
+          local rspamd_logger = require "rspamd_logger"
+          rspamd_config.NO_MUH = {
+            callback = function (task)
+              local parts = task:get_text_parts()
+              if parts then
+                for _,part in ipairs(parts) do
+                  local content = tostring(part:get_content())
+                  rspamd_logger.infox(rspamd_config, 'Found content %s', content)
+                  local found = string.find(content, "Muh");
+                  rspamd_logger.infox(rspamd_config, 'Found muh %s', tostring(found))
+                  if found then
+                    return true
+                  end
+                end
+              end
+              return false
+            end,
+            score = 5.0,
+	          description = 'Allow no cows',
+            group = "cows",
+          }
+          rspamd_logger.infox(rspamd_config, 'Work dammit!!!')
+        '';
+      };
+    };
+    testScript = ''
+      ${initMachine}
+      $machine->waitForOpenPort(11334);
+      $machine->log($machine->succeed("cat /etc/rspamd/rspamd.conf"));
+      $machine->log($machine->succeed("cat /etc/rspamd/rspamd.local.lua"));
+      $machine->log($machine->succeed("cat /etc/rspamd/local.d/groups.conf"));
+      ${checkSocket "/run/rspamd/rspamd.sock" "rspamd" "rspamd" "660" }
+      $machine->log($machine->succeed("curl --unix-socket /run/rspamd/rspamd.sock http://localhost/ping"));
+      $machine->log($machine->succeed("rspamc -h 127.0.0.1:11334 stat"));
+      $machine->log($machine->succeed("cat /etc/tests/no-muh.eml | rspamc -h 127.0.0.1:11334"));
+      $machine->log($machine->succeed("cat /etc/tests/muh.eml | rspamc -h 127.0.0.1:11334 symbols"));
+      $machine->waitUntilSucceeds("journalctl -u rspamd | grep -i muh >&2");
+      $machine->log($machine->fail("cat /etc/tests/no-muh.eml | rspamc -h 127.0.0.1:11334 symbols | grep NO_MUH"));
+      $machine->log($machine->succeed("cat /etc/tests/muh.eml | rspamc -h 127.0.0.1:11334 symbols | grep NO_MUH"));
+    '';
+  };
 }
diff --git a/nixos/tests/solr.nix b/nixos/tests/solr.nix
new file mode 100644
index 000000000000..9ba3863411ea
--- /dev/null
+++ b/nixos/tests/solr.nix
@@ -0,0 +1,47 @@
+import ./make-test.nix ({ pkgs, lib, ... }:
+{
+  name = "solr";
+  meta.maintainers = [ lib.maintainers.aanderse ];
+
+  machine =
+    { config, pkgs, ... }:
+    {
+      # Ensure the virtual machine has enough memory for Solr to avoid the following error:
+      #
+      #   OpenJDK 64-Bit Server VM warning:
+      #     INFO: os::commit_memory(0x00000000e8000000, 402653184, 0)
+      #     failed; error='Cannot allocate memory' (errno=12)
+      #
+      #   There is insufficient memory for the Java Runtime Environment to continue.
+      #   Native memory allocation (mmap) failed to map 402653184 bytes for committing reserved memory.
+      virtualisation.memorySize = 2000;
+
+      services.solr.enable = true;
+    };
+
+  testScript = ''
+    startAll;
+
+    $machine->waitForUnit('solr.service');
+    $machine->waitForOpenPort('8983');
+    $machine->succeed('curl --fail http://localhost:8983/solr/');
+
+    # adapted from pkgs.solr/examples/films/README.txt
+    $machine->succeed('sudo -u solr solr create -c films');
+    $machine->succeed(q(curl http://localhost:8983/solr/films/schema -X POST -H 'Content-type:application/json' --data-binary '{
+      "add-field" : {
+        "name":"name",
+        "type":"text_general",
+        "multiValued":false,
+        "stored":true
+      },
+      "add-field" : {
+        "name":"initial_release_date",
+        "type":"pdate",
+        "stored":true
+      }
+    }')) =~ /"status":0/ or die;
+    $machine->succeed('sudo -u solr post -c films ${pkgs.solr}/example/films/films.json');
+    $machine->succeed('curl http://localhost:8983/solr/films/query?q=name:batman') =~ /"name":"Batman Begins"/ or die;
+  '';
+})
diff --git a/pkgs/applications/audio/lollypop/default.nix b/pkgs/applications/audio/lollypop/default.nix
index 034d2059283d..8df2be1a0391 100644
--- a/pkgs/applications/audio/lollypop/default.nix
+++ b/pkgs/applications/audio/lollypop/default.nix
@@ -4,7 +4,7 @@
 , gobjectIntrospection, wrapGAppsHook }:
 
 python3.pkgs.buildPythonApplication rec  {
-  version = "0.9.607";
+  version = "0.9.610";
   name = "lollypop-${version}";
 
   format = "other";
@@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec  {
     url = "https://gitlab.gnome.org/World/lollypop";
     rev = "refs/tags/${version}";
     fetchSubmodules = true;
-    sha256 = "04giwp4i7j1qad41fiqlb8s3w03f1ww0p2mhi8n162sajnflr1rd";
+    sha256 = "0nn4cjw0c2ysd3y2a7l08ybcd21v993wsz99f7w0881jhws3q5p4";
   };
 
   nativeBuildInputs = with python3.pkgs; [
diff --git a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
index b377db65c0c9..cb267d8bbb66 100644
--- a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
+++ b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
@@ -5,6 +5,7 @@
 , pkgconfig
 , ffmpeg_4
 , patchelf
+, fdk_aac
 , libtool
 , cmake
 , bluez
@@ -22,13 +23,13 @@ let
 
 in stdenv.mkDerivation rec {
   name = "pulseaudio-modules-bt-${version}";
-  version = "unstable-2018-10-16";
+  version = "unstable-2018-11-01";
 
   src = fetchFromGitHub {
     owner = "EHfive";
     repo = "pulseaudio-modules-bt";
-    rev = "552c2b48c0cc7dd44d0746b261f7c7d5559e8e30";
-    sha256 = "052jb1hjx1in7bafx4zpn78s7r6f2y7djriwi36dzqy9wmalmyjy";
+    rev = "a2f62fcaa702bb883c07d074ebca8d7135520ab8";
+    sha256 = "1fhg7q9064zikhy0xxldn4fvh49pc47mgikcbd9yhsk66gcn6zj3";
     fetchSubmodules = true;
   };
 
@@ -45,6 +46,7 @@ in stdenv.mkDerivation rec {
   buildInputs = [
     pulseaudio
     ffmpeg_4
+    fdk_aac
     libtool
     bluez
     dbus
@@ -72,7 +74,7 @@ in stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     homepage = https://github.com/EHfive/pulseaudio-modules-bt;
-    description = "SBC, Sony LDAC codec (A2DP Audio) support for Pulseaudio";
+    description = "LDAC, aptX, aptX HD, AAC codecs (A2DP Audio) support for Linux PulseAudio";
     platforms = platforms.linux;
     license = licenses.mit;
     maintainers = with maintainers; [ adisbladis ];
diff --git a/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch b/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch
index 2b4ff86ab71b..e500d1fb1333 100644
--- a/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch
+++ b/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch
@@ -1,11 +1,20 @@
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0f5baa0..1f35cce 100644
+index d869979..185144d 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -122,5 +121,4 @@ INSTALL(TARGETS
+@@ -143,13 +143,13 @@ INSTALL(TARGETS
          module-bluez5-device
          module-bluetooth-discover
          module-bluetooth-policy
 -        LIBRARY DESTINATION ${PulseAudio_modlibexecdir})
--
 +        LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pulse-${PulseAudio_VERSION}/modules/)
+ 
+ if(NOT ${HAVE_SYSTEM_LDAC})
+ 
+ INSTALL(TARGETS
+         ldacBT_enc
+         ldacBT_abr
+-        LIBRARY DESTINATION ${PulseAudio_modlibexecdir})
++        LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pulse-${PulseAudio_VERSION}/modules/)
+ 
+ endif()
diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix
index cbcf5220564b..15aaab40a678 100644
--- a/pkgs/applications/audio/spotify/default.nix
+++ b/pkgs/applications/audio/spotify/default.nix
@@ -5,14 +5,14 @@
 let
   # TO UPDATE: just execute the ./update.sh script (won't do anything if there is no update)
   # "rev" decides what is actually being downloaded
-  version = "1.0.83.316.ge96b6e67-5";
+  version = "1.0.93.242.gc2341a27-15";
   # To get the latest stable revision:
   # curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated'
   # To get general information:
   # curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.'
   # More examples of api usage:
   # https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py
-  rev = "17";
+  rev = "24";
 
 
   deps = [
@@ -65,7 +65,7 @@ stdenv.mkDerivation {
   # https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334
   src = fetchurl {
     url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap";
-    sha512 = "19bbr4142shsl4qrikf48vq7kyrd4k4jbsada13qxicxps46a9bx51vjm2hkijqv739c1gdkgzwx7llyk95z26lhrz53shm2n5ij8xi";
+    sha512 = "920d55b3dcad4ac6acd9bc73c8ad8eb1668327a175da465ce3d8bba2430da47aaefa5218659315fab43b5182611eb03047d4e2679c1345c57380b7def7a1212d";
   };
 
   buildInputs = [ squashfsTools makeWrapper ];
diff --git a/pkgs/applications/editors/rstudio/clang-location.patch b/pkgs/applications/editors/rstudio/clang-location.patch
new file mode 100644
index 000000000000..402abdd85636
--- /dev/null
+++ b/pkgs/applications/editors/rstudio/clang-location.patch
@@ -0,0 +1,25 @@
+diff --git i/src/cpp/core/libclang/LibClang.cpp w/src/cpp/core/libclang/LibClang.cpp
+index ec12a3a1ff..8c81b633ae 100644
+--- i/src/cpp/core/libclang/LibClang.cpp
++++ w/src/cpp/core/libclang/LibClang.cpp
+@@ -54,7 +54,7 @@ std::vector<std::string> defaultCompileArgs(LibraryVersion version)
+ 
+    // we need to add in the associated libclang headers as
+    // they are not discovered / used by default during compilation
+-   FilePath llvmPath = s_libraryPath.parent().parent();
++   FilePath llvmPath("@clang@");
+    boost::format fmt("%1%/lib/clang/%2%/include");
+    fmt % llvmPath.absolutePath() % version.asString();
+    std::string includePath = fmt.str();
+@@ -77,10 +77,7 @@ std::vector<std::string> systemClangVersions()
+ #elif defined(__unix__)
+    // default set of versions
+    clangVersions = {
+-      "/usr/lib/libclang.so",
+-      "/usr/lib/llvm/libclang.so",
+-      "/usr/lib64/libclang.so",
+-      "/usr/lib64/llvm/libclang.so",
++      "@libclang.so@"
+    };
+    
+    // iterate through the set of available 'llvm' directories
diff --git a/pkgs/applications/editors/rstudio/fix-cmake.patch b/pkgs/applications/editors/rstudio/fix-cmake.patch
new file mode 100644
index 000000000000..3effc0eaa32b
--- /dev/null
+++ b/pkgs/applications/editors/rstudio/fix-cmake.patch
@@ -0,0 +1,15 @@
+diff --git a/src/cpp/desktop/CMakeLists.txt b/src/cpp/desktop/CMakeLists.txt
+index f5701bf735..27af4148ff 100644
+--- a/src/cpp/desktop/CMakeLists.txt
++++ b/src/cpp/desktop/CMakeLists.txt
+@@ -112,6 +112,7 @@ find_package(Qt5WebEngine REQUIRED)
+ find_package(Qt5WebEngineWidgets REQUIRED)
+ find_package(Qt5PrintSupport REQUIRED)
+ find_package(Qt5Quick REQUIRED)
++find_package(Qt5QuickWidgets REQUIRED)
+ find_package(Qt5Positioning REQUIRED)
+ find_package(Qt5Sensors REQUIRED)
+ find_package(Qt5Svg REQUIRED)
+-- 
+2.17.1
+
diff --git a/pkgs/applications/editors/rstudio/preview.nix b/pkgs/applications/editors/rstudio/preview.nix
new file mode 100644
index 000000000000..340aeec15e0f
--- /dev/null
+++ b/pkgs/applications/editors/rstudio/preview.nix
@@ -0,0 +1,119 @@
+{ stdenv, fetchurl, fetchFromGitHub, makeDesktopItem, cmake, boost, zlib
+, openssl, R, qtbase, qtdeclarative, qtsensors, qtwebengine, qtwebchannel
+, libuuid, hunspellDicts, unzip, ant, jdk, gnumake, makeWrapper, pandoc
+, llvmPackages
+}:
+
+let
+  rev = "f33fb2b2f1";
+  ginVer = "2.1.2";
+  gwtVer = "2.8.1";
+in
+stdenv.mkDerivation rec {
+  name = "RStudio-preview-${rev}";
+
+  nativeBuildInputs = [ cmake unzip ant jdk makeWrapper pandoc ];
+
+  buildInputs = [ boost zlib openssl R qtbase qtdeclarative qtsensors
+                  qtwebengine qtwebchannel libuuid ];
+
+  src = fetchFromGitHub {
+    owner = "rstudio";
+    repo = "rstudio";
+    inherit rev;
+    sha256 = "0v3vzqjp74c3m4h9l6w2lrdnjqaimdjzbf7vhnlxj2qa0lwsnykb";
+  };
+
+  # Hack RStudio to only use the input R and provided libclang.
+  patches = [ ./r-location.patch ./clang-location.patch ];
+  postPatch = ''
+    substituteInPlace src/cpp/core/r_util/REnvironmentPosix.cpp --replace '@R@' ${R}
+    substituteInPlace src/cpp/core/libclang/LibClang.cpp \
+      --replace '@clang@' ${llvmPackages.clang.cc} \
+      --replace '@libclang.so@' ${llvmPackages.clang.cc.lib}/lib/libclang.so
+  '';
+
+  ginSrc = fetchurl {
+    url = "https://s3.amazonaws.com/rstudio-buildtools/gin-${ginVer}.zip";
+    sha256 = "16jzmljravpz6p2rxa87k5f7ir8vs7ya75lnfybfajzmci0p13mr";
+  };
+
+  gwtSrc = fetchurl {
+    url = "https://s3.amazonaws.com/rstudio-buildtools/gwt-${gwtVer}.zip";
+    sha256 = "19x000m3jwnkqgi6ic81lkzyjvvxcfacw2j0vcfcaknvvagzhyhb";
+  };
+
+  hunspellDictionaries = with stdenv.lib; filter isDerivation (attrValues hunspellDicts);
+
+  mathJaxSrc = fetchurl {
+    url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-26.zip;
+    sha256 = "0wbcqb9rbfqqvvhqr1pbqax75wp8ydqdyhp91fbqfqp26xzjv6lk";
+  };
+
+  rsconnectSrc = fetchFromGitHub {
+    owner = "rstudio";
+    repo = "rsconnect";
+    rev = "984745d8";
+    sha256 = "037z0y32k1gdda192y5qn5hi7wp8wyap44mkjlklrgcqkmlcylb9";
+  };
+
+  preConfigure =
+    ''
+      GWT_LIB_DIR=src/gwt/lib
+
+      mkdir -p $GWT_LIB_DIR/gin/${ginVer}
+      unzip ${ginSrc} -d $GWT_LIB_DIR/gin/${ginVer}
+
+      unzip ${gwtSrc}
+      mkdir -p $GWT_LIB_DIR/gwt
+      mv gwt-${gwtVer} $GWT_LIB_DIR/gwt/${gwtVer}
+
+      mkdir dependencies/common/dictionaries
+      for dict in ${builtins.concatStringsSep " " hunspellDictionaries}; do
+        for i in "$dict/share/hunspell/"*; do
+          ln -sv $i dependencies/common/dictionaries/
+        done
+      done
+
+      unzip ${mathJaxSrc} -d dependencies/common/mathjax-26
+
+      mkdir -p dependencies/common/pandoc
+      cp ${pandoc}/bin/pandoc dependencies/common/pandoc/
+
+      cp -r ${rsconnectSrc} dependencies/common/rsconnect
+      pushd dependencies/common
+      ${R}/bin/R CMD build -d --no-build-vignettes rsconnect
+      popd
+    '';
+
+  enableParallelBuilding = true;
+
+  cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" "-DQT_QMAKE_EXECUTABLE=$NIX_QT5_TMP/bin/qmake" ];
+
+  desktopItem = makeDesktopItem {
+    name = name;
+    exec = "rstudio %F";
+    icon = "rstudio";
+    desktopName = "RStudio Preview";
+    genericName = "IDE";
+    comment = meta.description;
+    categories = "Development;";
+    mimeType = "text/x-r-source;text/x-r;text/x-R;text/x-r-doc;text/x-r-sweave;text/x-r-markdown;text/x-r-html;text/x-r-presentation;application/x-r-data;application/x-r-project;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/html;text/css;text/javascript;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;";
+  };
+
+  postInstall = ''
+      wrapProgram $out/bin/rstudio --suffix PATH : ${gnumake}/bin
+      mkdir $out/share
+      cp -r ${desktopItem}/share/applications $out/share
+      mkdir $out/share/icons
+      ln $out/rstudio.png $out/share/icons
+  '';
+
+  meta = with stdenv.lib;
+    { description = "Set of integrated tools for the R language";
+      homepage = https://www.rstudio.com/;
+      license = licenses.agpl3;
+      maintainers = with maintainers; [ averelld ];
+      platforms = platforms.linux;
+    };
+}
diff --git a/pkgs/applications/misc/alacritty/default.nix b/pkgs/applications/misc/alacritty/default.nix
index e4dffa98f39a..594173f11c62 100644
--- a/pkgs/applications/misc/alacritty/default.nix
+++ b/pkgs/applications/misc/alacritty/default.nix
@@ -73,7 +73,10 @@ in buildRustPackage rec {
   buildInputs = rpathLibs
              ++ lib.optionals stdenv.isDarwin darwinFrameworks;
 
- outputs = [ "out" "terminfo" ];
+  outputs = [ "out" "terminfo" ];
+
+  # https://github.com/NixOS/nixpkgs/issues/49693
+  doCheck = !stdenv.isDarwin;
 
   postPatch = ''
     substituteInPlace copypasta/src/x11.rs \
diff --git a/pkgs/applications/networking/instant-messengers/slack-term/default.nix b/pkgs/applications/networking/instant-messengers/slack-term/default.nix
new file mode 100644
index 000000000000..79464f54232c
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/slack-term/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  # https://github.com/erroneousboat/slack-term
+  name = "slack-term-${version}";
+  version = "0.4.1";
+
+  goPackagePath = "github.com/erroneousboat/slack-term";
+
+  src = fetchFromGitHub {
+    owner = "erroneousboat";
+    repo = "slack-term";
+    rev = "v${version}";
+    sha256 = "1340bq7h31fxykxbxpn6hv7n2hmjf20f8vg5gan9pjf5jaa6kfza";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Slack client for your terminal";
+    homepage = https://github.com/erroneousboat/slack-term;
+    license = licenses.mit;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index 040d722f9410..5fab9788a94a 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -25,6 +25,7 @@ let
    "8.8.0" = "13a4fka22hdxsjk11mgjb9ffzplfxyxp1sg5v1c8nk1grxlscgw8";
    "8.8.1" = "1hlf58gwazywbmfa48219amid38vqdl94yz21i11b4map6jfwhbk";
    "8.8.2" = "1lip3xja924dm6qblisk1bk0x8ai24s5xxqxphbdxj6djglj68fd";
+   "8.9+beta1" = "1yxv2klqal3mh6symi3gc6gv3xm684zlld2c0b6ijhjmp865cin8";
   }."${version}";
   coq-version = builtins.substring 0 3 version;
   ideFlags = if buildIde then "-lablgtkdir ${ocamlPackages.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
diff --git a/pkgs/desktops/gnome-3/core/mutter/default.nix b/pkgs/desktops/gnome-3/core/mutter/default.nix
index a08e0fd3cd1a..34830117b777 100644
--- a/pkgs/desktops/gnome-3/core/mutter/default.nix
+++ b/pkgs/desktops/gnome-3/core/mutter/default.nix
@@ -1,7 +1,7 @@
 { fetchurl, stdenv, pkgconfig, gnome3, intltool, gobjectIntrospection, upower, cairo
 , pango, cogl, clutter, libstartup_notification, zenity, libcanberra-gtk3
 , libtool, makeWrapper, xkeyboard_config, libxkbfile, libxkbcommon, libXtst, libinput
-, pipewire, libgudev, libwacom, xwayland, autoreconfHook }:
+, pipewire, libgudev, libwacom, xwayland, autoreconfHook, fetchpatch }:
 
 stdenv.mkDerivation rec {
   name = "mutter-${version}";
@@ -16,6 +16,14 @@ stdenv.mkDerivation rec {
     updateScript = gnome3.updateScript { packageName = "mutter"; attrPath = "gnome3.mutter"; };
   };
 
+  patches = [
+    # https://gitlab.gnome.org/GNOME/mutter/merge_requests/172
+    (fetchpatch {
+      url = https://gitlab.gnome.org/GNOME/mutter/commit/62660bbd.patch;
+      sha256 = "1qq8vxlqnyrqh94dc0dh1aj1dsbyw6bwv3x46q5vsscbbxbiv9wk";
+    })
+  ];
+
   configureFlags = [
     "--with-x"
     "--disable-static"
diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix
deleted file mode 100644
index b69ae80d0db5..000000000000
--- a/pkgs/development/compilers/ghc/7.10.3.nix
+++ /dev/null
@@ -1,194 +0,0 @@
-{ stdenv, targetPackages
-
-# build-tools
-, bootPkgs
-, coreutils, fetchurl, perl
-, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, libxml2, libxslt
-
-, libiconv ? null, ncurses
-
-, useLLVM ? !stdenv.targetPlatform.isx86
-, # LLVM is conceptually a run-time-only depedendency, but for
-  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
-  # build-time dependency too.
-  buildLlvmPackages, llvmPackages
-
-, # If enabled, GHC will be built with the GPL-free but slower integer-simple
-  # library instead of the faster but GPLed integer-gmp library.
-  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
-
-, # If enabled, use -fPIC when compiling static libs.
-  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
-
-, # Whether to build dynamic libs for the standard library (on the target
-  # platform). Static libs are always built.
-  enableShared ? true
-
-, # What flavour to build. An empty string indicates no
-  # specific flavour and falls back to ghc default values.
-  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
-}:
-
-let
-  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
-
-  inherit (bootPkgs) ghc;
-
-  # TODO(@Ericson2314) Make unconditional
-  targetPrefix = stdenv.lib.optionalString
-    (targetPlatform != hostPlatform)
-    "${targetPlatform.config}-";
-
-  docFixes = fetchurl {
-    url = "https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3a.patch";
-    sha256 = "1j45z4kcd3w1rzm4hapap2xc16bbh942qnzzdbdjcwqznsccznf0";
-  };
-
-  buildMK = ''
-    BuildFlavour = ${ghcFlavour}
-    ifneq \"\$(BuildFlavour)\" \"\"
-    include mk/flavours/\$(BuildFlavour).mk
-    endif
-    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
-  '' + stdenv.lib.optionalString enableIntegerSimple ''
-    INTEGER_LIBRARY = integer-simple
-  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = YES
-    HADDOCK_DOCS = NO
-  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
-    GhcLibHcOpts += -fPIC
-    GhcRtsHcOpts += -fPIC
-  '';
-
-  # Splicer will pull out correct variations
-  libDeps = platform: [ ncurses ]
-    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
-    ++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
-
-  toolsForTarget =
-    if hostPlatform == buildPlatform then
-      [ targetPackages.stdenv.cc ] ++ stdenv.lib.optional useLLVM llvmPackages.llvm
-    else assert targetPlatform == hostPlatform; # build != host == target
-      [ stdenv.cc ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
-
-  targetCC = builtins.head toolsForTarget;
-
-in
-stdenv.mkDerivation rec {
-  version = "7.10.3";
-  name = "${targetPrefix}ghc-${version}";
-
-  src = fetchurl {
-    url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
-    sha256 = "1vsgmic8csczl62ciz51iv8nhrkm72lyhbz7p7id13y2w7fcx46g";
-  };
-
-  enableParallelBuilding = true;
-
-  outputs = [ "out" "doc" ];
-
-  patches = [
-    docFixes
-    ./relocation.patch
-  ];
-
-  postPatch = "patchShebangs .";
-
-  # GHC is a bit confused on its cross terminology.
-  preConfigure = ''
-    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
-      export "''${env#TARGET_}=''${!env}"
-    done
-    # GHC is a bit confused on its cross terminology, as these would normally be
-    # the *host* tools.
-    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
-    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
-    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld"
-    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
-    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
-    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
-    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
-    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
-    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
-
-    echo -n "${buildMK}" > mk/build.mk
-    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
-  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
-    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
-  '' + stdenv.lib.optionalString stdenv.isDarwin ''
-    export NIX_LDFLAGS+=" -no_dtrace_dof"
-  '';
-
-  # TODO(@Ericson2314): Always pass "--target" and always prefix.
-  configurePlatforms = [ "build" "host" ]
-    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
-  # `--with` flags for libraries needed for RTS linker
-  configureFlags = [
-    "--datadir=$doc/share/doc/ghc"
-    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
-  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
-    "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
-  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
-    "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
-  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
-    "--enable-bootstrap-with-devel-snapshot"
-  ] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [
-    # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
-    "--disable-large-address-space"
-  ];
-
-  # Make sure we never relax`$PATH` and hooks support for compatability.
-  strictDeps = true;
-
-  nativeBuildInputs = [
-    perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42
-    ghc bootPkgs.hscolour
-  ];
-
-  # For building runtime libs
-  depsBuildTarget = toolsForTarget;
-
-  buildInputs = libDeps hostPlatform;
-
-  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
-    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
-
-  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
-  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
-
-  # required, because otherwise all symbols from HSffi.o are stripped, and
-  # that in turn causes GHCi to abort
-  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
-
-  hardeningDisable = [ "format" ];
-
-  postInstall = ''
-    # Install the bash completion file.
-    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
-
-    # Patch scripts to include "readelf" and "cat" in $PATH.
-    for i in "$out/bin/"*; do
-      test ! -h $i || continue
-      egrep --quiet '^#!' <(head -n 1 $i) || continue
-      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
-    done
-  '';
-
-  passthru = {
-    inherit bootPkgs targetPrefix;
-
-    inherit llvmPackages;
-    inherit enableShared;
-
-    # Our Cabal compiler name
-    haskellCompilerName = "ghc-7.10.3";
-  };
-
-  meta = {
-    homepage = http://haskell.org/ghc;
-    description = "The Glasgow Haskell Compiler";
-    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
-    inherit (ghc.meta) license platforms;
-  };
-
-}
diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix
deleted file mode 100644
index f7422d150ac0..000000000000
--- a/pkgs/development/compilers/ghc/8.0.2.nix
+++ /dev/null
@@ -1,201 +0,0 @@
-{ stdenv, targetPackages
-
-# build-tools
-, bootPkgs
-, coreutils, fetchpatch, fetchurl, perl, sphinx
-
-, libiconv ? null, ncurses
-
-, useLLVM ? !stdenv.targetPlatform.isx86
-, # LLVM is conceptually a run-time-only depedendency, but for
-  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
-  # build-time dependency too.
-  buildLlvmPackages, llvmPackages
-
-, # If enabled, GHC will be built with the GPL-free but slower integer-simple
-  # library instead of the faster but GPLed integer-gmp library.
-  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
-
-, # If enabled, use -fPIC when compiling static libs.
-  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
-
-, # Whether to build dynamic libs for the standard library (on the target
-  # platform). Static libs are always built.
-  enableShared ? true
-
-, # What flavour to build. An empty string indicates no
-  # specific flavour and falls back to ghc default values.
-  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
-}:
-
-assert !enableIntegerSimple -> gmp != null;
-
-let
-  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
-
-  inherit (bootPkgs) ghc;
-
-  # TODO(@Ericson2314) Make unconditional
-  targetPrefix = stdenv.lib.optionalString
-    (targetPlatform != hostPlatform)
-    "${targetPlatform.config}-";
-
-  buildMK = ''
-    BuildFlavour = ${ghcFlavour}
-    ifneq \"\$(BuildFlavour)\" \"\"
-    include mk/flavours/\$(BuildFlavour).mk
-    endif
-    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
-    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
-  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = YES
-    HADDOCK_DOCS = NO
-  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
-    GhcLibHcOpts += -fPIC
-    GhcRtsHcOpts += -fPIC
-  '';
-
-  # Splicer will pull out correct variations
-  libDeps = platform: [ ncurses ]
-    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
-    ++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
-
-  toolsForTarget =
-    if hostPlatform == buildPlatform then
-      [ targetPackages.stdenv.cc ] ++ stdenv.lib.optional useLLVM llvmPackages.llvm
-    else assert targetPlatform == hostPlatform; # build != host == target
-      [ stdenv.cc ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
-
-  targetCC = builtins.head toolsForTarget;
-
-in
-stdenv.mkDerivation rec {
-  version = "8.0.2";
-  name = "${targetPrefix}ghc-${version}";
-
-  src = fetchurl {
-    url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
-    sha256 = "1c8qc4fhkycynk4g1f9hvk53dj6a1vvqi6bklqznns6hw59m8qhi";
-  };
-
-  enableParallelBuilding = true;
-
-  outputs = [ "out" "man" "doc" ];
-
-  patches = [
-    ./ghc-gold-linker.patch
-    (fetchpatch { # Unreleased 1.24.x commit
-      url = "https://github.com/haskell/cabal/commit/6394cb0b6eba91a8692a3d04b2b56935aed7cccd.patch";
-      sha256 = "14xxjg0nb1j1pw0riac3v385ka92qhxxblfmwyvbghz7kry6axy0";
-      stripLen = 1;
-      extraPrefix = "libraries/Cabal/";
-    })
-  ] ++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch
-    ++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch
-    ++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
-
-  postPatch = "patchShebangs .";
-
-  # GHC is a bit confused on its cross terminology.
-  preConfigure = ''
-    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
-      export "''${env#TARGET_}=''${!env}"
-    done
-    # GHC is a bit confused on its cross terminology, as these would normally be
-    # the *host* tools.
-    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
-    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
-    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld"
-    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
-    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
-    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
-    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
-    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
-    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
-
-    echo -n "${buildMK}" > mk/build.mk
-    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
-  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
-    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
-  '' + stdenv.lib.optionalString stdenv.isDarwin ''
-    export NIX_LDFLAGS+=" -no_dtrace_dof"
-  '';
-
-  # TODO(@Ericson2314): Always pass "--target" and always prefix.
-  configurePlatforms = [ "build" "host" ]
-    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
-  # `--with` flags for libraries needed for RTS linker
-  configureFlags = [
-    "--datadir=$doc/share/doc/ghc"
-    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
-  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
-    "--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
-  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
-    "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
-  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
-    "--enable-bootstrap-with-devel-snapshot"
-  ] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [
-    # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
-    "--disable-large-address-space"
-  ];
-
-  # Make sure we never relax`$PATH` and hooks support for compatability.
-  strictDeps = true;
-
-  nativeBuildInputs = [
-    perl sphinx
-    ghc bootPkgs.hscolour
-  ];
-
-  # For building runtime libs
-  depsBuildTarget = toolsForTarget;
-
-  buildInputs = libDeps hostPlatform;
-
-  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
-    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
-
-  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
-  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
-
-  # required, because otherwise all symbols from HSffi.o are stripped, and
-  # that in turn causes GHCi to abort
-  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
-
-  hardeningDisable = [ "format" ];
-
-  postInstall = ''
-    for bin in "$out"/lib/${name}/bin/*; do
-      isELF "$bin" || continue
-      paxmark m "$bin"
-    done
-
-    # Install the bash completion file.
-    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
-
-    # Patch scripts to include "readelf" and "cat" in $PATH.
-    for i in "$out/bin/"*; do
-      test ! -h $i || continue
-      egrep --quiet '^#!' <(head -n 1 $i) || continue
-      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
-    done
-  '';
-
-  passthru = {
-    inherit bootPkgs targetPrefix;
-
-    inherit llvmPackages;
-    inherit enableShared;
-
-    # Our Cabal compiler name
-    haskellCompilerName = "ghc-8.0.2";
-  };
-
-  meta = {
-    homepage = http://haskell.org/ghc;
-    description = "The Glasgow Haskell Compiler";
-    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
-    inherit (ghc.meta) license platforms;
-  };
-
-}
diff --git a/pkgs/development/compilers/ghc/8.4.3.nix b/pkgs/development/compilers/ghc/8.4.3.nix
deleted file mode 100644
index e43f9a57d0a4..000000000000
--- a/pkgs/development/compilers/ghc/8.4.3.nix
+++ /dev/null
@@ -1,247 +0,0 @@
-{ stdenv, targetPackages
-
-# build-tools
-, bootPkgs
-, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4
-
-, libiconv ? null, ncurses
-
-, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
-, # LLVM is conceptually a run-time-only depedendency, but for
-  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
-  # build-time dependency too.
-  buildLlvmPackages, llvmPackages
-
-, # If enabled, GHC will be built with the GPL-free but slower integer-simple
-  # library instead of the faster but GPLed integer-gmp library.
-  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
-
-, # If enabled, use -fPIC when compiling static libs.
-  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
-
-, # Whether to build dynamic libs for the standard library (on the target
-  # platform). Static libs are always built.
-  enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
-
-, # Whetherto build terminfo.
-  enableTerminfo ? !stdenv.targetPlatform.isWindows
-
-, # What flavour to build. An empty string indicates no
-  # specific flavour and falls back to ghc default values.
-  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
-, # Whether to backport https://phabricator.haskell.org/D4388 for
-  # deterministic profiling symbol names, at the cost of a slightly
-  # non-standard GHC API
-  deterministicProfiling ? false
-}:
-
-assert !enableIntegerSimple -> gmp != null;
-
-let
-  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
-
-  inherit (bootPkgs) ghc;
-
-  # TODO(@Ericson2314) Make unconditional
-  targetPrefix = stdenv.lib.optionalString
-    (targetPlatform != hostPlatform)
-    "${targetPlatform.config}-";
-
-  buildMK = ''
-    BuildFlavour = ${ghcFlavour}
-    ifneq \"\$(BuildFlavour)\" \"\"
-    include mk/flavours/\$(BuildFlavour).mk
-    endif
-    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
-    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
-  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
-    CrossCompilePrefix = ${targetPrefix}
-    HADDOCK_DOCS = NO
-    BUILD_SPHINX_HTML = NO
-    BUILD_SPHINX_PDF = NO
-  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
-    GhcLibHcOpts += -fPIC
-    GhcRtsHcOpts += -fPIC
-  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
-    EXTRA_CC_OPTS += -std=gnu99
-  '';
-
-  # Splicer will pull out correct variations
-  libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
-    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
-    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
-
-  toolsForTarget =
-    if hostPlatform == buildPlatform then
-      [ targetPackages.stdenv.cc ] ++ stdenv.lib.optional useLLVM llvmPackages.llvm
-    else assert targetPlatform == hostPlatform; # build != host == target
-      [ stdenv.cc ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
-
-  targetCC = builtins.head toolsForTarget;
-
-in
-stdenv.mkDerivation (rec {
-  version = "8.4.3";
-  name = "${targetPrefix}ghc-${version}";
-
-  src = fetchurl {
-    url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
-    sha256 = "1mk046vb561j75saz05rghhbkps46ym5aci4264dwc2qk3dayixf";
-  };
-
-  enableParallelBuilding = true;
-
-  outputs = [ "out" "doc" ];
-
-  patches = [(fetchpatch {
-    url = "https://git.haskell.org/hsc2hs.git/patch/738f3666c878ee9e79c3d5e819ef8b3460288edf";
-    sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
-    extraPrefix = "utils/hsc2hs/";
-    stripLen = 1;
-  }) (fetchpatch rec { # https://phabricator.haskell.org/D5123
-    url = "http://tarballs.nixos.org/sha256/${sha256}";
-    name = "D5123.diff";
-    sha256 = "0nhqwdamf2y4gbwqxcgjxs0kqx23w9gv5kj0zv6450dq19rji82n";
-  })] ++ stdenv.lib.optional deterministicProfiling
-    (fetchpatch rec {
-      url = "http://tarballs.nixos.org/sha256/${sha256}";
-      name = "D4388.diff";
-      sha256 = "0w6sdcvnqjlnlzpvnzw20b80v150ijjyjvs9548ildc1928j0w7s";
-    })
-    ++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
-
-  postPatch = "patchShebangs .";
-
-  # GHC is a bit confused on its cross terminology.
-  preConfigure = ''
-    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
-      export "''${env#TARGET_}=''${!env}"
-    done
-    # GHC is a bit confused on its cross terminology, as these would normally be
-    # the *host* tools.
-    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
-    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
-    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
-    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
-    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
-    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
-    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
-    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
-    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
-    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
-
-    echo -n "${buildMK}" > mk/build.mk
-    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
-  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
-    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
-  '' + stdenv.lib.optionalString stdenv.isDarwin ''
-    export NIX_LDFLAGS+=" -no_dtrace_dof"
-  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
-    sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
-  '' + stdenv.lib.optionalString targetPlatform.isMusl ''
-      echo "patching llvm-targets for musl targets..."
-      echo "Cloning these existing '*-linux-gnu*' targets:"
-      grep linux-gnu llvm-targets | sed 's/^/  /'
-      echo "(go go gadget sed)"
-      sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
-      echo "llvm-targets now contains these '*-linux-musl*' targets:"
-      grep linux-musl llvm-targets | sed 's/^/  /'
-
-      echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
-      # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
-      for x in configure aclocal.m4; do
-        substituteInPlace $x \
-          --replace '*-android*|*-gnueabi*)' \
-                    '*-android*|*-gnueabi*|*-musleabi*)'
-      done
-  '';
-
-  # TODO(@Ericson2314): Always pass "--target" and always prefix.
-  configurePlatforms = [ "build" "host" ]
-    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
-  # `--with` flags for libraries needed for RTS linker
-  configureFlags = [
-    "--datadir=$doc/share/doc/ghc"
-    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
-  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
-    "--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
-  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
-    "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
-  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
-    "--enable-bootstrap-with-devel-snapshot"
-  ] ++ stdenv.lib.optionals (targetPlatform.isAarch32) [
-    "CFLAGS=-fuse-ld=gold"
-    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
-    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
-  ] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [
-    # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
-    "--disable-large-address-space"
-  ];
-
-  # Make sure we never relax`$PATH` and hooks support for compatability.
-  strictDeps = true;
-
-  nativeBuildInputs = [
-    perl autoconf automake m4 python3
-    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
-  ];
-
-  # For building runtime libs
-  depsBuildTarget = toolsForTarget;
-
-  buildInputs = libDeps hostPlatform;
-
-  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
-    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
-
-  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
-  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
-
-  # required, because otherwise all symbols from HSffi.o are stripped, and
-  # that in turn causes GHCi to abort
-  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
-
-  checkTarget = "test";
-
-  hardeningDisable = [ "format" ];
-
-  postInstall = ''
-    for bin in "$out"/lib/${name}/bin/*; do
-      isELF "$bin" || continue
-      paxmark m "$bin"
-    done
-
-    # Install the bash completion file.
-    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
-
-    # Patch scripts to include "readelf" and "cat" in $PATH.
-    for i in "$out/bin/"*; do
-      test ! -h $i || continue
-      egrep --quiet '^#!' <(head -n 1 $i) || continue
-      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
-    done
-  '';
-
-  passthru = {
-    inherit bootPkgs targetPrefix;
-
-    inherit llvmPackages;
-    inherit enableShared;
-
-    # Our Cabal compiler name
-    haskellCompilerName = "ghc-8.4.3";
-  };
-
-  meta = {
-    homepage = http://haskell.org/ghc;
-    description = "The Glasgow Haskell Compiler";
-    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
-    inherit (ghc.meta) license platforms;
-  };
-
-} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
-  dontStrip = true;
-  dontPatchELF = true;
-  noAuditTmpdir = true;
-})
diff --git a/pkgs/development/compilers/ghc/ghc-8.0.2-no-cpp-warnings.patch b/pkgs/development/compilers/ghc/ghc-8.0.2-no-cpp-warnings.patch
deleted file mode 100644
index 90224df19f61..000000000000
--- a/pkgs/development/compilers/ghc/ghc-8.0.2-no-cpp-warnings.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- b/includes/rts/storage/ClosureMacros.h        2017-05-21 12:54:09.000000000 +0200
-+++ a/includes/rts/storage/ClosureMacros.h        2017-05-21 12:55:57.000000000 +0200
-@@ -499,8 +499,17 @@
-
-    -------------------------------------------------------------------------- */
-
--#define ZERO_SLOP_FOR_LDV_PROF     (defined(PROFILING))
--#define ZERO_SLOP_FOR_SANITY_CHECK (defined(DEBUG) && !defined(THREADED_RTS))
-+#if defined(PROFILING)
-+#define ZERO_SLOP_FOR_LDV_PROF 1
-+#else
-+#define ZERO_SLOP_FOR_LDV_PROF 0
-+#endif
-+
-+#if defined(DEBUG) && !defined(THREADED_RTS)
-+#define ZERO_SLOP_FOR_SANITY_CHECK 1
-+#else
-+#define ZERO_SLOP_FOR_SANITY_CHECK 0
-+#endif
-
- #if ZERO_SLOP_FOR_LDV_PROF || ZERO_SLOP_FOR_SANITY_CHECK
- #define OVERWRITING_CLOSURE(c) overwritingClosure(c)
-
diff --git a/pkgs/development/compilers/ghc/ghc-gold-linker.patch b/pkgs/development/compilers/ghc/ghc-gold-linker.patch
deleted file mode 100644
index edce7ef3a178..000000000000
--- a/pkgs/development/compilers/ghc/ghc-gold-linker.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 46fe80ab7c0013a929d0934e61429820042a70a9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
-Date: Fri, 21 Jul 2017 20:09:11 +0200
-Subject: [PATCH 1/2] base: Add `extra-libraries: m` because base uses libm
- functions.
-
-Linking with gold needs this because in contrast to ld, gold
-doesn't implicitly link libm.
-
-Found by Michael Bishop <cleverca22@gmail.com>.
----
- libraries/base/base.cabal | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
-index f00fb8768e5..fd91f268ffe 100644
---- a/libraries/base/base.cabal
-+++ b/libraries/base/base.cabal
-@@ -342,6 +342,10 @@ Library
-         WCsubst.h
-         consUtils.h
- 
-+    -- Base uses libm functions. ld.bfd links libm implicitly when necessary.
-+    -- Other linkers, like gold, don't, so we have to declare it explicitly.
-+    extra-libraries: m
-+
-     -- OS Specific
-     if os(windows)
-         -- Windows requires some extra libraries for linking because the RTS
-
-From 900a8f4931e9bc6d3219d9263cfecfc6af8fc766 Mon Sep 17 00:00:00 2001
-From: michael bishop <cleverca22@gmail.com>
-Date: Sat, 22 Jul 2017 13:12:39 -0300
-Subject: [PATCH 2/2] also add -lm to ghc-prim
-
----
- libraries/ghc-prim/ghc-prim.cabal | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal
-index 00a029efedf..6db85dd69fc 100644
---- a/libraries/ghc-prim/ghc-prim.cabal
-+++ b/libraries/ghc-prim/ghc-prim.cabal
-@@ -42,6 +42,10 @@ Library
-         UnliftedFFITypes
- 
-     build-depends: rts == 1.0.*
-+    
-+    -- Base uses libm functions. ld.bfd links libm implicitly when necessary.
-+    -- Other linkers, like gold, don't, so we have to declare it explicitly.
-+    extra-libraries: m
- 
-     exposed-modules:
-         GHC.CString
diff --git a/pkgs/development/compilers/ghc/ghc-no-madv-free.patch b/pkgs/development/compilers/ghc/ghc-no-madv-free.patch
deleted file mode 100644
index 8fea9f920126..000000000000
--- a/pkgs/development/compilers/ghc/ghc-no-madv-free.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
-index 99620ee..e052a84 100644
---- a/rts/posix/OSMem.c
-+++ b/rts/posix/OSMem.c
-@@ -523,13 +523,7 @@ void osDecommitMemory(void *at, W_ size)
-         sysErrorBelch("unable to make released memory unaccessible");
- #endif
- 
--#ifdef MADV_FREE
--    // Try MADV_FREE first, FreeBSD has both and MADV_DONTNEED
--    // just swaps memory out
--    r = madvise(at, size, MADV_FREE);
--#else
-     r = madvise(at, size, MADV_DONTNEED);
--#endif
-     if(r < 0)
-         sysErrorBelch("unable to decommit memory");
- }
diff --git a/pkgs/development/compilers/ghc/relocation.patch b/pkgs/development/compilers/ghc/relocation.patch
deleted file mode 100644
index b9becfc86b54..000000000000
--- a/pkgs/development/compilers/ghc/relocation.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Adding support for the R_X86_64_REX_GOTPCRELX relocation type. 
-This relocation is treated by the linker the same as the R_X86_64_GOTPCRELX type
-G + GOT + A - P to generate relative offsets to the GOT.
-The REX prefix has no influence in this stage.
-
-This caused breakage when enabling relro/bindnow hardening e.g. in ghcPaclages.vector
-
-Source: https://phabricator.haskell.org/D2303#67070
-diff --git a/rts/Linker.c b/rts/Linker.c
---- a/rts/Linker.c
-+++ b/rts/Linker.c
-@@ -5681,7 +5681,13 @@
-           *(Elf64_Sword *)P = (Elf64_Sword)value;
- #endif
-           break;
--
-+/* These two relocations were introduced in glibc 2.23 and binutils 2.26.
-+    But in order to use them the system which compiles the bindist for GHC needs
-+    to have glibc >= 2.23. So only use them if they're defined. */
-+#if defined(R_X86_64_REX_GOTPCRELX) && defined(R_X86_64_GOTPCRELX)
-+      case R_X86_64_REX_GOTPCRELX:
-+      case R_X86_64_GOTPCRELX:
-+#endif
-       case R_X86_64_GOTPCREL:
-       {
-           StgInt64 gotAddress = (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S)->addr;
-
diff --git a/pkgs/development/compilers/ghcjs/7.10/boot.patch b/pkgs/development/compilers/ghcjs/7.10/boot.patch
deleted file mode 100644
index 9f4fa3a8b7ae..000000000000
--- a/pkgs/development/compilers/ghcjs/7.10/boot.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs
-index db8b12e..7b815c5 100644
---- a/src-bin/Boot.hs
-+++ b/src-bin/Boot.hs
-@@ -540,9 +540,7 @@ initPackageDB :: B ()
- initPackageDB = do
-   msg info "creating package databases"
-   initDB "--global" <^> beLocations . blGlobalDB
--  traverseOf_ _Just initUser <^> beLocations . blUserDBDir
-   where
--    initUser dir = rm_f (dir </> "package.conf") >> initDB "--user" (dir </> "package.conf.d")
-     initDB dbName db = do
-       rm_rf db >> mkdir_p db
-       ghcjs_pkg_ ["init", toTextI db] `catchAny_` return ()
-@@ -566,29 +564,22 @@ installDevelopmentTree = subTop $ do
-   msgD info $ "preparing development boot tree"
-   checkpoint' "ghcjs-boot-git" "ghcjs-boot repository already cloned and prepared" $ do
-     testGit "ghcjs-boot" >>= \case
--      Just False -> failWith "ghcjs-boot already exists and is not a git repository"
--      Just True  -> do
--        msg info "ghcjs-boot repository already exists but checkpoint not reached, cleaning first, then cloning"
--        rm_rf "ghcjs-boot"
-+      Just _ -> do
-+        msg info "ghcjs-boot repository already exists; initializing ghcjs-boot"
-         initGhcjsBoot
-       Nothing    -> do
-         msgD info "cloning ghcjs-boot git repository"
-         initGhcjsBoot
-   checkpoint' "shims-git" "shims repository already cloned" $ do
-     testGit "shims" >>= \case
--      Just False -> failWith "shims already exists and is not a git repository"
--      Just True  -> do
--        msgD info "shims repository already exists but checkpoint not reached, cleaning first, then cloning"
--        rm_rf "shims"
--        cloneGit shimsDescr "shims" bsrcShimsDevBranch bsrcShimsDev
-+      Just _ -> do
-+        msgD info "shims repository already exists; moving on"
-       Nothing    -> do
-         msgD info "cloning shims git repository"
-         cloneGit shimsDescr "shims" bsrcShimsDevBranch bsrcShimsDev
-   where
-     initGhcjsBoot = sub $ do
--      cloneGit bootDescr "ghcjs-boot"  bsrcBootDevBranch bsrcBootDev
-       cd "ghcjs-boot"
--      git_ ["submodule", "update", "--init", "--recursive"]
-       mapM_ patchPackage =<< allPackages
-       preparePrimops
-       buildGenPrim
-@@ -1141,7 +1132,7 @@ cabalStage1 pkgs = sub $ do
-   globalFlags <- cabalGlobalFlags
-   flags <- cabalInstallFlags (length pkgs == 1)
-   let args = globalFlags ++ ("install" : pkgs) ++
--             [ "--solver=topdown" -- the modular solver refuses to install stage1 packages
-+             [ "--allow-boot-library-installs"
-              ] ++ map ("--configure-option="<>) configureOpts ++ flags
-   checkInstallPlan pkgs args
-   cabal_ args
-@@ -1162,7 +1153,7 @@ cabalInstall pkgs = do
- -- uses somewhat fragile parsing of --dry-run output, find a better way
- checkInstallPlan :: [Package] -> [Text] -> B ()
- checkInstallPlan pkgs opts = do
--  plan <- cabal (opts ++ ["-v2", "--dry-run"])
-+  plan <- cabal (opts ++ ["-vverbose+nowrap", "--dry-run"])
-   when (hasReinstalls plan || hasUnexpectedInstalls plan || hasNewVersion plan) (err plan)
-   where
-     hasReinstalls = T.isInfixOf "(reinstall)"   -- reject reinstalls
-@@ -1201,14 +1192,14 @@ cabalInstallFlags parmakeGhcjs = do
-            , "--avoid-reinstalls"
-            , "--builddir",      "dist"
-            , "--with-compiler", ghcjs ^. pgmLocText
-+           , "--with-gcc",      "@CC@"
-            , "--with-hc-pkg",   ghcjsPkg ^. pgmLocText
--           , "--prefix",        toTextI instDir
-+           , "--prefix",        "@PREFIX@"
-+           , "--libdir",        "$prefix/lib/$compiler"
-+           , "--libsubdir",     "$pkgid"
-            , bool haddock "--enable-documentation" "--disable-documentation"
-            , "--haddock-html"
---- workaround for hoogle support being broken in haddock for GHC 7.10RC1
--#if !(__GLASGOW_HASKELL__ >= 709)
-            , "--haddock-hoogle"
--#endif
-            , "--haddock-hyperlink-source"
- -- don't slow down Windows builds too much, on other platforms we get this more
- -- or less for free, thanks to dynamic-too
-diff --git a/src/Compiler/Info.hs b/src/Compiler/Info.hs
-index 33a401f..e2405a7 100644
---- a/src/Compiler/Info.hs
-+++ b/src/Compiler/Info.hs
-@@ -48,13 +48,7 @@ compilerInfo nativeToo dflags = do
- 
- -- | the directory to use if started without -B flag
- getDefaultTopDir :: IO FilePath
--getDefaultTopDir = do
--  appdir <- getAppUserDataDirectory "ghcjs"
--  return (appdir </> subdir </> "ghcjs")
--      where
--        targetARCH = arch
--        targetOS   = os
--        subdir     = targetARCH ++ '-':targetOS ++ '-':getFullCompilerVersion
-+getDefaultTopDir = return "@PREFIX@/lib/ghcjs-@VERSION@"
- 
- getDefaultLibDir :: IO FilePath
- getDefaultLibDir = getDefaultTopDir
diff --git a/pkgs/development/compilers/ghcjs/7.10/default.nix b/pkgs/development/compilers/ghcjs/7.10/default.nix
deleted file mode 100644
index f18a094aa3cf..000000000000
--- a/pkgs/development/compilers/ghcjs/7.10/default.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{ fetchgit, fetchFromGitHub, bootPkgs, cabal-install }:
-
-bootPkgs.callPackage ../base.nix {
-  version = "0.2.0";
-
-  inherit bootPkgs cabal-install;
-
-  ghcjsSrc = fetchFromGitHub {
-    owner = "ghcjs";
-    repo = "ghcjs";
-    rev = "689c7753f50353dd05606ed79c51cd5a94d3922a";
-    sha256 = "076020a9gjv8ldj5ckm43sbzq9s6c5xj6lpd8v28ybpiama3m6b4";
-  };
-  ghcjsBootSrc = fetchgit {
-    url = git://github.com/ghcjs/ghcjs-boot.git;
-    rev = "8c549931da27ba9e607f77195208ec156c840c8a";
-    sha256 = "0yg9bnabja39qysh9pg1335qbvbc0r2mdw6cky94p7kavacndfdv";
-    fetchSubmodules = true;
-  };
-
-  shims = import ./shims.nix { inherit fetchFromGitHub; };
-  stage1Packages = [
-    "array"
-    "base"
-    "binary"
-    "bytestring"
-    "containers"
-    "deepseq"
-    "directory"
-    "filepath"
-    "ghc-boot"
-    "ghc-boot-th"
-    "ghc-prim"
-    "ghci"
-    "ghcjs-prim"
-    "ghcjs-th"
-    "integer-gmp"
-    "pretty"
-    "primitive"
-    "process"
-    "rts"
-    "template-haskell"
-    "time"
-    "transformers"
-    "unix"
-  ];
-  stage2 = import ./stage2.nix;
-
-  patches = [ ./boot.patch ];
-}
diff --git a/pkgs/development/compilers/ghcjs/7.10/shims.nix b/pkgs/development/compilers/ghcjs/7.10/shims.nix
deleted file mode 100644
index fa706699449a..000000000000
--- a/pkgs/development/compilers/ghcjs/7.10/shims.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ fetchFromGitHub }:
-fetchFromGitHub {
-  owner = "ghcjs";
-  repo = "shims";
-  rev = "b97015229c58eeab7c1d0bb575794b14a9f6efca";
-  sha256 = "1p5adkqvmb1gsv9hnn3if0rdpnaq3v9a1zkfdy282yw05jaaaggz";
-}
diff --git a/pkgs/development/compilers/ghcjs/7.10/stage2.nix b/pkgs/development/compilers/ghcjs/7.10/stage2.nix
deleted file mode 100644
index 3483afc99ef0..000000000000
--- a/pkgs/development/compilers/ghcjs/7.10/stage2.nix
+++ /dev/null
@@ -1,344 +0,0 @@
-{ ghcjsBoot }: { callPackage }:
-
-{
-  async = callPackage
-    ({ mkDerivation, base, HUnit, stdenv, stm, test-framework
-      , test-framework-hunit
-      }:
-      mkDerivation {
-        pname = "async";
-        version = "2.0.1.6";
-        src = "${ghcjsBoot}/boot/async";
-        doCheck = false;
-        libraryHaskellDepends = [ base stm ];
-        testHaskellDepends = [
-          base HUnit test-framework test-framework-hunit
-        ];
-        jailbreak = true;
-        homepage = https://github.com/simonmar/async;
-        description = "Run IO operations asynchronously and wait for their results";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  aeson = callPackage
-    ({ mkDerivation, attoparsec, base, bytestring, containers, deepseq
-      , dlist, ghc-prim, hashable, HUnit, mtl, QuickCheck, scientific
-      , stdenv, syb, template-haskell, test-framework
-      , test-framework-hunit, test-framework-quickcheck2, text, time
-      , transformers, unordered-containers, vector
-      }:
-      mkDerivation {
-        pname = "aeson";
-        version = "0.9.0.1";
-        src = "${ghcjsBoot}/boot/aeson";
-        doCheck = false;
-        libraryHaskellDepends = [
-          attoparsec base bytestring containers deepseq dlist ghc-prim
-          hashable mtl scientific syb template-haskell text time transformers
-          unordered-containers vector
-        ];
-        testHaskellDepends = [
-          attoparsec base bytestring containers ghc-prim HUnit QuickCheck
-          template-haskell test-framework test-framework-hunit
-          test-framework-quickcheck2 text time unordered-containers vector
-        ];
-        jailbreak = true;
-        homepage = https://github.com/bos/aeson;
-        description = "Fast JSON parsing and encoding";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  attoparsec = callPackage
-    ({ mkDerivation, array, base, bytestring, containers, deepseq
-      , QuickCheck, quickcheck-unicode, scientific, stdenv
-      , test-framework, test-framework-quickcheck2, text, transformers
-      , vector
-      }:
-      mkDerivation {
-        pname = "attoparsec";
-        version = "0.13.0.1";
-        src = "${ghcjsBoot}/boot/attoparsec";
-        doCheck = false;
-        libraryHaskellDepends = [
-          array base bytestring containers deepseq scientific text
-          transformers
-        ];
-        testHaskellDepends = [
-          array base bytestring containers deepseq QuickCheck
-          quickcheck-unicode scientific test-framework
-          test-framework-quickcheck2 text transformers vector
-        ];
-        jailbreak = true;
-        homepage = https://github.com/bos/attoparsec;
-        description = "Fast combinator parsing for bytestrings and text";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  case-insensitive = callPackage
-    ({ mkDerivation, base, bytestring, deepseq, hashable, HUnit, stdenv
-      , test-framework, test-framework-hunit, text
-      }:
-      mkDerivation {
-        pname = "case-insensitive";
-        version = "1.2.0.4";
-        src = "${ghcjsBoot}/boot/case-insensitive";
-        doCheck = false;
-        libraryHaskellDepends = [ base bytestring deepseq hashable text ];
-        testHaskellDepends = [
-          base bytestring HUnit test-framework test-framework-hunit text
-        ];
-        jailbreak = true;
-        homepage = https://github.com/basvandijk/case-insensitive;
-        description = "Case insensitive string comparison";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  dlist = callPackage
-    ({ mkDerivation, base, Cabal, deepseq, QuickCheck, stdenv }:
-      mkDerivation {
-        pname = "dlist";
-        version = "0.7.1.1";
-        src = "${ghcjsBoot}/boot/dlist";
-        doCheck = false;
-        libraryHaskellDepends = [ base deepseq ];
-        testHaskellDepends = [ base Cabal QuickCheck ];
-        jailbreak = true;
-        homepage = https://github.com/spl/dlist;
-        description = "Difference lists";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  extensible-exceptions = callPackage
-    ({ mkDerivation, base, stdenv }:
-      mkDerivation {
-        pname = "extensible-exceptions";
-        version = "0.1.1.4";
-        src = "${ghcjsBoot}/boot/extensible-exceptions";
-        doCheck = false;
-        libraryHaskellDepends = [ base ];
-        jailbreak = true;
-        description = "Extensible exceptions";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  hashable = callPackage
-    ({ mkDerivation, base, bytestring, ghc-prim, HUnit, integer-gmp
-      , QuickCheck, random, stdenv, test-framework, test-framework-hunit
-      , test-framework-quickcheck2, text, unix
-      }:
-      mkDerivation {
-        pname = "hashable";
-        version = "1.2.3.2";
-        src = "${ghcjsBoot}/boot/hashable";
-        doCheck = false;
-        libraryHaskellDepends = [
-          base bytestring ghc-prim integer-gmp text
-        ];
-        testHaskellDepends = [
-          base bytestring ghc-prim HUnit QuickCheck random test-framework
-          test-framework-hunit test-framework-quickcheck2 text unix
-        ];
-        jailbreak = true;
-        homepage = https://github.com/tibbe/hashable;
-        description = "A class for types that can be converted to a hash value";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  mtl = callPackage
-    ({ mkDerivation, base, stdenv, transformers }:
-      mkDerivation {
-        pname = "mtl";
-        version = "2.2.1";
-        src = "${ghcjsBoot}/boot/mtl";
-        doCheck = false;
-        libraryHaskellDepends = [ base transformers ];
-        jailbreak = true;
-        homepage = https://github.com/ekmett/mtl;
-        description = "Monad classes, using functional dependencies";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  old-time = callPackage
-    ({ mkDerivation, base, old-locale, stdenv }:
-      mkDerivation {
-        pname = "old-time";
-        version = "1.1.0.3";
-        src = "${ghcjsBoot}/boot/old-time";
-        doCheck = false;
-        libraryHaskellDepends = [ base old-locale ];
-        jailbreak = true;
-        description = "Time library";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  parallel = callPackage
-    ({ mkDerivation, array, base, containers, deepseq, stdenv }:
-      mkDerivation {
-        pname = "parallel";
-        version = "3.2.0.6";
-        src = "${ghcjsBoot}/boot/parallel";
-        doCheck = false;
-        libraryHaskellDepends = [ array base containers deepseq ];
-        jailbreak = true;
-        description = "Parallel programming library";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  scientific = callPackage
-    ({ mkDerivation, array, base, bytestring, deepseq, ghc-prim
-      , hashable, integer-gmp, QuickCheck, smallcheck, stdenv, tasty
-      , tasty-ant-xml, tasty-hunit, tasty-quickcheck, tasty-smallcheck
-      , text
-      }:
-      mkDerivation {
-        pname = "scientific";
-        version = "0.3.3.8";
-        src = "${ghcjsBoot}/boot/scientific";
-        doCheck = false;
-        libraryHaskellDepends = [
-          array base bytestring deepseq ghc-prim hashable integer-gmp text
-        ];
-        testHaskellDepends = [
-          base bytestring QuickCheck smallcheck tasty tasty-ant-xml
-          tasty-hunit tasty-quickcheck tasty-smallcheck text
-        ];
-        jailbreak = true;
-        homepage = https://github.com/basvandijk/scientific;
-        description = "Numbers represented using scientific notation";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  stm = callPackage
-    ({ mkDerivation, array, base, stdenv }:
-      mkDerivation {
-        pname = "stm";
-        version = "2.4.4";
-        src = "${ghcjsBoot}/boot/stm";
-        doCheck = false;
-        libraryHaskellDepends = [ array base ];
-        jailbreak = true;
-        description = "Software Transactional Memory";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  syb = callPackage
-    ({ mkDerivation, base, containers, HUnit, mtl, stdenv }:
-      mkDerivation {
-        pname = "syb";
-        version = "0.5.1";
-        src = "${ghcjsBoot}/boot/syb";
-        doCheck = false;
-        libraryHaskellDepends = [ base ];
-        testHaskellDepends = [ base containers HUnit mtl ];
-        jailbreak = true;
-        homepage = http://www.cs.uu.nl/wiki/GenericProgramming/SYB;
-        description = "Scrap Your Boilerplate";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  text = callPackage
-    ({ mkDerivation, array, base, binary, bytestring, deepseq, directory
-      , ghc-prim, HUnit, integer-gmp, QuickCheck, quickcheck-unicode
-      , random, stdenv, test-framework, test-framework-hunit
-      , test-framework-quickcheck2
-      }:
-      mkDerivation {
-        pname = "text";
-        version = "1.2.1.1";
-        src = "${ghcjsBoot}/boot/text";
-        doCheck = false;
-        libraryHaskellDepends = [
-          array base binary bytestring deepseq ghc-prim integer-gmp
-        ];
-        testHaskellDepends = [
-          array base binary bytestring deepseq directory ghc-prim HUnit
-          integer-gmp QuickCheck quickcheck-unicode random test-framework
-          test-framework-hunit test-framework-quickcheck2
-        ];
-        jailbreak = true;
-        homepage = https://github.com/bos/text;
-        description = "An efficient packed Unicode text type";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  unordered-containers = callPackage
-    ({ mkDerivation, base, ChasingBottoms, containers, deepseq, hashable
-      , HUnit, QuickCheck, stdenv, test-framework, test-framework-hunit
-      , test-framework-quickcheck2
-      }:
-      mkDerivation {
-        pname = "unordered-containers";
-        version = "0.2.5.1";
-        src = "${ghcjsBoot}/boot/unordered-containers";
-        doCheck = false;
-        libraryHaskellDepends = [ base deepseq hashable ];
-        testHaskellDepends = [
-          base ChasingBottoms containers hashable HUnit QuickCheck
-          test-framework test-framework-hunit test-framework-quickcheck2
-        ];
-        jailbreak = true;
-        homepage = https://github.com/tibbe/unordered-containers;
-        description = "Efficient hashing-based container types";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  vector = callPackage
-    ({ mkDerivation, base, deepseq, ghc-prim, primitive, QuickCheck
-      , random, stdenv, template-haskell, test-framework
-      , test-framework-quickcheck2, transformers
-      }:
-      mkDerivation {
-        pname = "vector";
-        version = "0.11.0.0";
-        src = "${ghcjsBoot}/boot/vector";
-        doCheck = false;
-        libraryHaskellDepends = [ base deepseq ghc-prim primitive ];
-        testHaskellDepends = [
-          base QuickCheck random template-haskell test-framework
-          test-framework-quickcheck2 transformers
-        ];
-        jailbreak = true;
-        homepage = https://github.com/haskell/vector;
-        description = "Efficient Arrays";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  ghcjs-base = callPackage
-    ({ mkDerivation, aeson, array, attoparsec, base, bytestring
-      , containers, deepseq, directory, dlist, ghc-prim, ghcjs-prim
-      , hashable, HUnit, integer-gmp, primitive, QuickCheck
-      , quickcheck-unicode, random, scientific, stdenv, test-framework
-      , test-framework-hunit, test-framework-quickcheck2, text, time
-      , transformers, unordered-containers, vector
-      }:
-      mkDerivation {
-        pname = "ghcjs-base";
-        version = "0.2.0.0";
-        src = "${ghcjsBoot}/ghcjs/ghcjs-base";
-        doCheck = false;
-        libraryHaskellDepends = [
-          aeson attoparsec base bytestring containers deepseq dlist ghc-prim
-          ghcjs-prim hashable integer-gmp primitive scientific text time
-          transformers unordered-containers vector
-        ];
-        testHaskellDepends = [
-          array base bytestring deepseq directory ghc-prim ghcjs-prim HUnit
-          primitive QuickCheck quickcheck-unicode random test-framework
-          test-framework-hunit test-framework-quickcheck2 text
-        ];
-        jailbreak = true;
-        homepage = https://github.com/ghcjs/ghcjs-base;
-        description = "Base library for GHCJS";
-        license = stdenv.lib.licenses.mit;
-      }) {};
-  Cabal = callPackage
-    ({ mkDerivation, array, base, binary, bytestring, containers
-      , deepseq, directory, extensible-exceptions, filepath, HUnit
-      , old-time, pretty, process, QuickCheck, regex-posix, stdenv
-      , test-framework, test-framework-hunit, test-framework-quickcheck2
-      , time, unix
-      }:
-      mkDerivation {
-        pname = "Cabal";
-        version = "1.22.8.0";
-        src = "${ghcjsBoot}/boot/cabal/Cabal";
-        doCheck = false;
-        libraryHaskellDepends = [
-          array base binary bytestring containers deepseq directory filepath
-          pretty process time unix
-        ];
-        testHaskellDepends = [
-          base bytestring containers directory extensible-exceptions filepath
-          HUnit old-time process QuickCheck regex-posix test-framework
-          test-framework-hunit test-framework-quickcheck2 unix
-        ];
-        jailbreak = true;
-        homepage = http://www.haskell.org/cabal/;
-        description = "A framework for packaging Haskell software";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-}
diff --git a/pkgs/development/compilers/ghcjs/8.0/boot.patch b/pkgs/development/compilers/ghcjs/8.0/boot.patch
deleted file mode 100644
index bbb5b30468cb..000000000000
--- a/pkgs/development/compilers/ghcjs/8.0/boot.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs
-index db8b12e..7b815c5 100644
---- a/src-bin/Boot.hs
-+++ b/src-bin/Boot.hs
-@@ -540,9 +540,7 @@ initPackageDB :: B ()
- initPackageDB = do
-   msg info "creating package databases"
-   initDB "--global" <^> beLocations . blGlobalDB
--  traverseOf_ _Just initUser <^> beLocations . blUserDBDir
-   where
--    initUser dir = rm_f (dir </> "package.conf") >> initDB "--user" (dir </> "package.conf.d")
-     initDB dbName db = do
-       rm_rf db >> mkdir_p db
-       ghcjs_pkg_ ["init", toTextI db] `catchAny_` return ()
-@@ -566,29 +564,22 @@ installDevelopmentTree = subTop $ do
-   msgD info $ "preparing development boot tree"
-   checkpoint' "ghcjs-boot-git" "ghcjs-boot repository already cloned and prepared" $ do
-     testGit "ghcjs-boot" >>= \case
--      Just False -> failWith "ghcjs-boot already exists and is not a git repository"
--      Just True  -> do
--        msg info "ghcjs-boot repository already exists but checkpoint not reached, cleaning first, then cloning"
--        rm_rf "ghcjs-boot"
-+      Just _ -> do
-+        msg info "ghcjs-boot repository already exists; initializing ghcjs-boot"
-         initGhcjsBoot
-       Nothing    -> do
-         msgD info "cloning ghcjs-boot git repository"
-         initGhcjsBoot
-   checkpoint' "shims-git" "shims repository already cloned" $ do
-     testGit "shims" >>= \case
--      Just False -> failWith "shims already exists and is not a git repository"
--      Just True  -> do
--        msgD info "shims repository already exists but checkpoint not reached, cleaning first, then cloning"
--        rm_rf "shims"
--        cloneGit shimsDescr "shims" bsrcShimsDevBranch bsrcShimsDev
-+      Just _ -> do
-+        msgD info "shims repository already exists; moving on"
-       Nothing    -> do
-         msgD info "cloning shims git repository"
-         cloneGit shimsDescr "shims" bsrcShimsDevBranch bsrcShimsDev
-   where
-     initGhcjsBoot = sub $ do
--      cloneGit bootDescr "ghcjs-boot"  bsrcBootDevBranch bsrcBootDev
-       cd "ghcjs-boot"
--      git_ ["submodule", "update", "--init", "--recursive"]
-       mapM_ patchPackage =<< allPackages
-       preparePrimops
-       buildGenPrim
-@@ -1201,14 +1192,14 @@ cabalInstallFlags parmakeGhcjs = do
-            , "--avoid-reinstalls"
-            , "--builddir",      "dist"
-            , "--with-compiler", ghcjs ^. pgmLocText
-+           , "--with-gcc",      "@CC@"
-            , "--with-hc-pkg",   ghcjsPkg ^. pgmLocText
--           , "--prefix",        toTextI instDir
-+           , "--prefix",        "@PREFIX@"
-+           , "--libdir",        "$prefix/lib/$compiler"
-+           , "--libsubdir",     "$pkgid"
-            , bool haddock "--enable-documentation" "--disable-documentation"
-            , "--haddock-html"
---- workaround for hoogle support being broken in haddock for GHC 7.10RC1
--#if !(__GLASGOW_HASKELL__ >= 709)
-            , "--haddock-hoogle"
--#endif
-            , "--haddock-hyperlink-source"
- -- don't slow down Windows builds too much, on other platforms we get this more
- -- or less for free, thanks to dynamic-too
-diff --git a/src/Compiler/Info.hs b/src/Compiler/Info.hs
-index 33a401f..e2405a7 100644
---- a/src/Compiler/Info.hs
-+++ b/src/Compiler/Info.hs
-@@ -48,13 +48,7 @@ compilerInfo nativeToo dflags = do
- 
- -- | the directory to use if started without -B flag
- getDefaultTopDir :: IO FilePath
--getDefaultTopDir = do
--  appdir <- getAppUserDataDirectory "ghcjs"
--  return (appdir </> subdir </> "ghcjs")
--      where
--        targetARCH = arch
--        targetOS   = os
--        subdir     = targetARCH ++ '-':targetOS ++ '-':getFullCompilerVersion
-+getDefaultTopDir = return "@PREFIX@/lib/ghcjs-@VERSION@"
- 
- getDefaultLibDir :: IO FilePath
- getDefaultLibDir = getDefaultTopDir
diff --git a/pkgs/development/compilers/ghcjs/8.0/default.nix b/pkgs/development/compilers/ghcjs/8.0/default.nix
deleted file mode 100644
index a786f536eb9b..000000000000
--- a/pkgs/development/compilers/ghcjs/8.0/default.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{ fetchgit, fetchFromGitHub, bootPkgs, cabal-install }:
-
-bootPkgs.callPackage ../base.nix {
-  version = "0.2.020170323";
-
-  inherit bootPkgs cabal-install;
-
-  ghcjsSrc = fetchFromGitHub {
-    owner = "ghcjs";
-    repo = "ghcjs";
-    rev = "2b3759942fb5b2fc1a58d314d9b098d4622fa6b6";
-    sha256 = "15asapg0va8dvcdycsx8dgk4xcpdnhml4h31wka6vvxf5anzz8aw";
-  };
-  ghcjsBootSrc = fetchgit {
-    url = git://github.com/ghcjs/ghcjs-boot.git;
-    rev = "106e144cca6529a1b9612c11aea5d6ef65b96745";
-    sha256 = "0gxg8iiwvm93x1dwhxypczn9qiz4m1xvj8i7cf4snfdy2jdyhi5l";
-    fetchSubmodules = true;
-  };
-
-  shims = import ./shims.nix { inherit fetchFromGitHub; };
-  stage1Packages = [
-    "array"
-    "base"
-    "binary"
-    "bytestring"
-    "containers"
-    "deepseq"
-    "directory"
-    "filepath"
-    "ghc-boot"
-    "ghc-boot-th"
-    "ghc-prim"
-    "ghci"
-    "ghcjs-prim"
-    "ghcjs-th"
-    "integer-gmp"
-    "pretty"
-    "primitive"
-    "process"
-    "rts"
-    "template-haskell"
-    "time"
-    "transformers"
-    "unix"
-  ];
-  stage2 = import ./stage2.nix;
-
-  patches = [ ./boot.patch ];
-}
diff --git a/pkgs/development/compilers/ghcjs/8.0/shims.nix b/pkgs/development/compilers/ghcjs/8.0/shims.nix
deleted file mode 100644
index a9a7f8d45e27..000000000000
--- a/pkgs/development/compilers/ghcjs/8.0/shims.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ fetchFromGitHub }:
-fetchFromGitHub {
-  owner = "ghcjs";
-  repo = "shims";
-  rev = "85395dce971e23a39e5f93af4ed139ca36d4e448";
-  sha256 = "1kqgik75jx681s1kjx1s7dryigr3m940c3zb9vy0r3psxrw6sf2g";
-}
diff --git a/pkgs/development/compilers/ghcjs/8.0/stage2.nix b/pkgs/development/compilers/ghcjs/8.0/stage2.nix
deleted file mode 100644
index 18c7a76dd3af..000000000000
--- a/pkgs/development/compilers/ghcjs/8.0/stage2.nix
+++ /dev/null
@@ -1,545 +0,0 @@
-{ ghcjsBoot }: { callPackage }:
-
-{
-  async = callPackage
-    ({ mkDerivation, base, HUnit, stdenv, stm, test-framework
-      , test-framework-hunit
-      }:
-      mkDerivation {
-        pname = "async";
-        version = "2.1.1";
-        src = "${ghcjsBoot}/boot/async";
-        doCheck = false;
-        libraryHaskellDepends = [ base stm ];
-        testHaskellDepends = [
-          base HUnit test-framework test-framework-hunit
-        ];
-        jailbreak = true;
-        homepage = "https://github.com/simonmar/async";
-        description = "Run IO operations asynchronously and wait for their results";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  aeson = callPackage
-    ({ mkDerivation, attoparsec, base, base-compat, base-orphans
-      , base16-bytestring, bytestring, containers, deepseq, directory
-      , dlist, filepath, generic-deriving, ghc-prim, hashable
-      , hashable-time, HUnit, integer-logarithms, QuickCheck
-      , quickcheck-instances, scientific, stdenv, tagged
-      , template-haskell, test-framework, test-framework-hunit
-      , test-framework-quickcheck2, text, th-abstraction, time
-      , time-locale-compat, unordered-containers, uuid-types, vector
-      }:
-      mkDerivation {
-        pname = "aeson";
-        version = "1.2.2.0";
-        src = "${ghcjsBoot}/boot/aeson";
-        doCheck = false;
-        libraryHaskellDepends = [
-          attoparsec base base-compat bytestring containers deepseq dlist
-          ghc-prim hashable scientific tagged template-haskell text
-          th-abstraction time time-locale-compat unordered-containers
-          uuid-types vector
-        ];
-        testHaskellDepends = [
-          attoparsec base base-compat base-orphans base16-bytestring
-          bytestring containers directory dlist filepath generic-deriving
-          ghc-prim hashable hashable-time HUnit integer-logarithms QuickCheck
-          quickcheck-instances scientific tagged template-haskell
-          test-framework test-framework-hunit test-framework-quickcheck2 text
-          time time-locale-compat unordered-containers uuid-types vector
-        ];
-        jailbreak = true;
-        homepage = "https://github.com/bos/aeson";
-        description = "Fast JSON parsing and encoding";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  attoparsec = callPackage
-    ({ mkDerivation, array, base, bytestring, case-insensitive
-      , containers, criterion, deepseq, directory, filepath, ghc-prim
-      , http-types, parsec, QuickCheck, quickcheck-unicode, scientific
-      , stdenv, tasty, tasty-quickcheck, text, transformers
-      , unordered-containers, vector
-      }:
-      mkDerivation {
-        pname = "attoparsec";
-        version = "0.13.1.0";
-        src = "${ghcjsBoot}/boot/attoparsec";
-        doCheck = false;
-        libraryHaskellDepends = [
-          array base bytestring containers deepseq scientific text
-          transformers
-        ];
-        testHaskellDepends = [
-          array base bytestring deepseq QuickCheck quickcheck-unicode
-          scientific tasty tasty-quickcheck text transformers vector
-        ];
-        benchmarkHaskellDepends = [
-          array base bytestring case-insensitive containers criterion deepseq
-          directory filepath ghc-prim http-types parsec scientific text
-          transformers unordered-containers vector
-        ];
-        jailbreak = true;
-        homepage = "https://github.com/bos/attoparsec";
-        description = "Fast combinator parsing for bytestrings and text";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  base-compat = callPackage
-    ({ mkDerivation, base, hspec, QuickCheck, stdenv, unix }:
-      mkDerivation {
-        pname = "base-compat";
-        version = "0.9.3";
-        src = "${ghcjsBoot}/boot/base-compat";
-        doCheck = false;
-        libraryHaskellDepends = [ base unix ];
-        testHaskellDepends = [ base hspec QuickCheck ];
-        jailbreak = true;
-        description = "A compatibility layer for base";
-        license = stdenv.lib.licenses.mit;
-      }) {};
-  bytestring-builder = callPackage
-    ({ mkDerivation, base, bytestring, deepseq, stdenv }:
-      mkDerivation {
-        pname = "bytestring-builder";
-        version = "0.10.8.1.0";
-        src = "${ghcjsBoot}/boot/bytestring-builder";
-        doCheck = false;
-        libraryHaskellDepends = [ base bytestring deepseq ];
-        jailbreak = true;
-        description = "The new bytestring builder, packaged outside of GHC";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  case-insensitive = callPackage
-    ({ mkDerivation, base, bytestring, criterion, deepseq, hashable
-      , HUnit, stdenv, test-framework, test-framework-hunit, text
-      }:
-      mkDerivation {
-        pname = "case-insensitive";
-        version = "1.2.0.8";
-        src = "${ghcjsBoot}/boot/case-insensitive";
-        doCheck = false;
-        libraryHaskellDepends = [ base bytestring deepseq hashable text ];
-        testHaskellDepends = [
-          base bytestring HUnit test-framework test-framework-hunit text
-        ];
-        benchmarkHaskellDepends = [ base bytestring criterion deepseq ];
-        jailbreak = true;
-        homepage = "https://github.com/basvandijk/case-insensitive";
-        description = "Case insensitive string comparison";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  dlist = callPackage
-    ({ mkDerivation, base, Cabal, deepseq, QuickCheck, stdenv }:
-      mkDerivation {
-        pname = "dlist";
-        version = "0.8.0.2";
-        src = "${ghcjsBoot}/boot/dlist";
-        doCheck = false;
-        libraryHaskellDepends = [ base deepseq ];
-        testHaskellDepends = [ base Cabal QuickCheck ];
-        jailbreak = true;
-        homepage = "https://github.com/spl/dlist";
-        description = "Difference lists";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  extensible-exceptions = callPackage
-    ({ mkDerivation, base, stdenv }:
-      mkDerivation {
-        pname = "extensible-exceptions";
-        version = "0.1.1.4";
-        src = "${ghcjsBoot}/boot/extensible-exceptions";
-        doCheck = false;
-        libraryHaskellDepends = [ base ];
-        jailbreak = true;
-        description = "Extensible exceptions";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  fail = callPackage
-    ({ mkDerivation, stdenv }:
-      mkDerivation {
-        pname = "fail";
-        version = "4.9.0.0";
-        src = "${ghcjsBoot}/boot/fail";
-        jailbreak = true;
-        homepage = "https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail";
-        description = "Forward-compatible MonadFail class";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  hashable = callPackage
-    ({ mkDerivation, base, bytestring, criterion, ghc-prim, HUnit
-      , integer-gmp, QuickCheck, random, siphash, stdenv, test-framework
-      , test-framework-hunit, test-framework-quickcheck2, text, unix
-      }:
-      mkDerivation {
-        pname = "hashable";
-        version = "1.2.4.0";
-        src = "${ghcjsBoot}/boot/hashable";
-        doCheck = false;
-        libraryHaskellDepends = [
-          base bytestring ghc-prim integer-gmp text
-        ];
-        testHaskellDepends = [
-          base bytestring ghc-prim HUnit QuickCheck random test-framework
-          test-framework-hunit test-framework-quickcheck2 text unix
-        ];
-        benchmarkHaskellDepends = [
-          base bytestring criterion ghc-prim integer-gmp siphash text
-        ];
-        jailbreak = true;
-        homepage = "http://github.com/tibbe/hashable";
-        description = "A class for types that can be converted to a hash value";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  integer-logarithms = callPackage
-    ({ mkDerivation, array, base, ghc-prim, integer-gmp, QuickCheck
-      , smallcheck, stdenv, tasty, tasty-hunit, tasty-quickcheck
-      , tasty-smallcheck
-      }:
-      mkDerivation {
-        pname = "integer-logarithms";
-        version = "1.0.2";
-        src = "${ghcjsBoot}/boot/integer-logarithms";
-        doCheck = false;
-        libraryHaskellDepends = [ array base ghc-prim integer-gmp ];
-        testHaskellDepends = [
-          base QuickCheck smallcheck tasty tasty-hunit tasty-quickcheck
-          tasty-smallcheck
-        ];
-        jailbreak = true;
-        homepage = "https://github.com/phadej/integer-logarithms";
-        description = "Integer logarithms";
-        license = stdenv.lib.licenses.mit;
-      }) {};
-  mtl = callPackage
-    ({ mkDerivation, base, stdenv, transformers }:
-      mkDerivation {
-        pname = "mtl";
-        version = "2.2.1";
-        src = "${ghcjsBoot}/boot/mtl";
-        doCheck = false;
-        libraryHaskellDepends = [ base transformers ];
-        jailbreak = true;
-        homepage = "http://github.com/ekmett/mtl";
-        description = "Monad classes, using functional dependencies";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  nats = callPackage
-    ({ mkDerivation, stdenv }:
-      mkDerivation {
-        pname = "nats";
-        version = "1.1.1";
-        src = "${ghcjsBoot}/boot/nats";
-        jailbreak = true;
-        homepage = "http://github.com/ekmett/nats/";
-        description = "Natural numbers";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  old-time = callPackage
-    ({ mkDerivation, base, old-locale, stdenv }:
-      mkDerivation {
-        pname = "old-time";
-        version = "1.1.0.3";
-        src = "${ghcjsBoot}/boot/old-time";
-        doCheck = false;
-        libraryHaskellDepends = [ base old-locale ];
-        jailbreak = true;
-        description = "Time library";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  parallel = callPackage
-    ({ mkDerivation, array, base, containers, deepseq, stdenv }:
-      mkDerivation {
-        pname = "parallel";
-        version = "3.2.1.0";
-        src = "${ghcjsBoot}/boot/parallel";
-        doCheck = false;
-        libraryHaskellDepends = [ array base containers deepseq ];
-        jailbreak = true;
-        description = "Parallel programming library";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  random = callPackage
-    ({ mkDerivation, base, stdenv, time }:
-      mkDerivation {
-        pname = "random";
-        version = "1.1";
-        src = "${ghcjsBoot}/boot/random";
-        doCheck = false;
-        libraryHaskellDepends = [ base time ];
-        testHaskellDepends = [ base ];
-        jailbreak = true;
-        description = "random number library";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  scientific = callPackage
-    ({ mkDerivation, base, binary, bytestring, containers, criterion
-      , deepseq, ghc-prim, hashable, integer-gmp, integer-logarithms
-      , QuickCheck, smallcheck, stdenv, tasty, tasty-ant-xml, tasty-hunit
-      , tasty-quickcheck, tasty-smallcheck, text, vector
-      }:
-      mkDerivation {
-        pname = "scientific";
-        version = "0.3.4.10";
-        src = "${ghcjsBoot}/boot/scientific";
-        doCheck = false;
-        libraryHaskellDepends = [
-          base binary bytestring containers deepseq ghc-prim hashable
-          integer-gmp integer-logarithms text vector
-        ];
-        testHaskellDepends = [
-          base binary bytestring QuickCheck smallcheck tasty tasty-ant-xml
-          tasty-hunit tasty-quickcheck tasty-smallcheck text
-        ];
-        benchmarkHaskellDepends = [ base criterion ];
-        jailbreak = true;
-        homepage = "https://github.com/basvandijk/scientific";
-        description = "Numbers represented using scientific notation";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  semigroups = callPackage
-    ({ mkDerivation, base, stdenv }:
-      mkDerivation {
-        pname = "semigroups";
-        version = "0.18.3";
-        src = "${ghcjsBoot}/boot/semigroups";
-        doCheck = false;
-        libraryHaskellDepends = [ base ];
-        jailbreak = true;
-        homepage = "http://github.com/ekmett/semigroups/";
-        description = "Anything that associates";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  stm = callPackage
-    ({ mkDerivation, array, base, stdenv }:
-      mkDerivation {
-        pname = "stm";
-        version = "2.4.4.1";
-        src = "${ghcjsBoot}/boot/stm";
-        doCheck = false;
-        libraryHaskellDepends = [ array base ];
-        jailbreak = true;
-        description = "Software Transactional Memory";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  syb = callPackage
-    ({ mkDerivation, base, containers, HUnit, mtl, stdenv }:
-      mkDerivation {
-        pname = "syb";
-        version = "0.6";
-        src = "${ghcjsBoot}/boot/syb";
-        doCheck = false;
-        libraryHaskellDepends = [ base ];
-        testHaskellDepends = [ base containers HUnit mtl ];
-        jailbreak = true;
-        homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB";
-        description = "Scrap Your Boilerplate";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  tagged = callPackage
-    ({ mkDerivation, base, deepseq, stdenv, template-haskell
-      , transformers, transformers-compat
-      }:
-      mkDerivation {
-        pname = "tagged";
-        version = "0.8.5";
-        src = "${ghcjsBoot}/boot/tagged";
-        doCheck = false;
-        libraryHaskellDepends = [
-          base deepseq template-haskell transformers transformers-compat
-        ];
-        jailbreak = true;
-        homepage = "http://github.com/ekmett/tagged";
-        description = "Haskell 98 phantom types to avoid unsafely passing dummy arguments";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  text = callPackage
-    ({ mkDerivation, array, base, binary, bytestring, deepseq, directory
-      , ghc-prim, HUnit, integer-gmp, QuickCheck, quickcheck-unicode
-      , random, stdenv, test-framework, test-framework-hunit
-      , test-framework-quickcheck2
-      }:
-      mkDerivation {
-        pname = "text";
-        version = "1.2.2.1";
-        src = "${ghcjsBoot}/boot/text";
-        doCheck = false;
-        libraryHaskellDepends = [
-          array base binary bytestring deepseq ghc-prim integer-gmp
-        ];
-        testHaskellDepends = [
-          array base binary bytestring deepseq directory ghc-prim HUnit
-          integer-gmp QuickCheck quickcheck-unicode random test-framework
-          test-framework-hunit test-framework-quickcheck2
-        ];
-        jailbreak = true;
-        homepage = "https://github.com/bos/text";
-        description = "An efficient packed Unicode text type";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  th-abstraction = callPackage
-    ({ mkDerivation, base, containers, ghc-prim, stdenv
-      , template-haskell
-      }:
-      mkDerivation {
-        pname = "th-abstraction";
-        version = "0.2.6.0";
-        src = "${ghcjsBoot}/boot/th-abstraction";
-        doCheck = false;
-        libraryHaskellDepends = [
-          base containers ghc-prim template-haskell
-        ];
-        testHaskellDepends = [ base containers template-haskell ];
-        jailbreak = true;
-        homepage = "https://github.com/glguy/th-abstraction";
-        description = "Nicer interface for reified information about data types";
-        license = stdenv.lib.licenses.isc;
-      }) {};
-  time-locale-compat = callPackage
-    ({ mkDerivation, base, old-locale, stdenv, time }:
-      mkDerivation {
-        pname = "time-locale-compat";
-        version = "0.1.1.3";
-        src = "${ghcjsBoot}/boot/time-locale-compat";
-        doCheck = false;
-        libraryHaskellDepends = [ base old-locale time ];
-        jailbreak = true;
-        homepage = "https://github.com/khibino/haskell-time-locale-compat";
-        description = "Compatibility of TimeLocale between old-locale and time-1.5";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  transformers-compat = callPackage
-    ({ mkDerivation, base, ghc-prim, stdenv, transformers }:
-      mkDerivation {
-        pname = "transformers-compat";
-        version = "0.5.1.4";
-        src = "${ghcjsBoot}/boot/transformers-compat";
-        doCheck = false;
-        libraryHaskellDepends = [ base ghc-prim transformers ];
-        jailbreak = true;
-        homepage = "http://github.com/ekmett/transformers-compat/";
-        description = "A small compatibility shim exposing the new types from transformers 0.3 and 0.4 to older Haskell platforms.";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  unordered-containers = callPackage
-    ({ mkDerivation, base, bytestring, ChasingBottoms, containers
-      , criterion, deepseq, deepseq-generics, hashable, hashmap, HUnit
-      , mtl, QuickCheck, random, stdenv, test-framework
-      , test-framework-hunit, test-framework-quickcheck2
-      }:
-      mkDerivation {
-        pname = "unordered-containers";
-        version = "0.2.7.2";
-        src = "${ghcjsBoot}/boot/unordered-containers";
-        doCheck = false;
-        libraryHaskellDepends = [ base deepseq hashable ];
-        testHaskellDepends = [
-          base ChasingBottoms containers hashable HUnit QuickCheck
-          test-framework test-framework-hunit test-framework-quickcheck2
-        ];
-        benchmarkHaskellDepends = [
-          base bytestring containers criterion deepseq deepseq-generics
-          hashable hashmap mtl random
-        ];
-        jailbreak = true;
-        homepage = "https://github.com/tibbe/unordered-containers";
-        description = "Efficient hashing-based container types";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  uuid-types = callPackage
-    ({ mkDerivation, base, binary, bytestring, containers, criterion
-      , deepseq, hashable, HUnit, QuickCheck, random, stdenv, tasty
-      , tasty-hunit, tasty-quickcheck, text, unordered-containers
-      }:
-      mkDerivation {
-        pname = "uuid-types";
-        version = "1.0.3";
-        src = "${ghcjsBoot}/boot/uuid/uuid-types";
-        doCheck = false;
-        libraryHaskellDepends = [
-          base binary bytestring deepseq hashable random text
-        ];
-        testHaskellDepends = [
-          base bytestring HUnit QuickCheck tasty tasty-hunit tasty-quickcheck
-        ];
-        benchmarkHaskellDepends = [
-          base bytestring containers criterion deepseq random
-          unordered-containers
-        ];
-        jailbreak = true;
-        homepage = "https://github.com/hvr/uuid";
-        description = "Type definitions for Universally Unique Identifiers";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  vector = callPackage
-    ({ mkDerivation, base, deepseq, ghc-prim, primitive, QuickCheck
-      , random, stdenv, template-haskell, test-framework
-      , test-framework-quickcheck2, transformers
-      }:
-      mkDerivation {
-        pname = "vector";
-        version = "0.11.0.0";
-        src = "${ghcjsBoot}/boot/vector";
-        doCheck = false;
-        libraryHaskellDepends = [ base deepseq ghc-prim primitive ];
-        testHaskellDepends = [
-          base QuickCheck random template-haskell test-framework
-          test-framework-quickcheck2 transformers
-        ];
-        jailbreak = true;
-        homepage = "https://github.com/haskell/vector";
-        description = "Efficient Arrays";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-  ghcjs-base = callPackage
-    ({ mkDerivation, aeson, array, attoparsec, base, bytestring
-      , containers, deepseq, directory, dlist, ghc-prim, ghcjs-prim
-      , hashable, HUnit, integer-gmp, primitive, QuickCheck
-      , quickcheck-unicode, random, scientific, stdenv, test-framework
-      , test-framework-hunit, test-framework-quickcheck2, text, time
-      , transformers, unordered-containers, vector
-      }:
-      mkDerivation {
-        pname = "ghcjs-base";
-        version = "0.2.0.0";
-        src = "${ghcjsBoot}/ghcjs/ghcjs-base";
-        doCheck = false;
-        libraryHaskellDepends = [
-          aeson attoparsec base bytestring containers deepseq dlist ghc-prim
-          ghcjs-prim hashable integer-gmp primitive scientific text time
-          transformers unordered-containers vector
-        ];
-        testHaskellDepends = [
-          array base bytestring deepseq directory ghc-prim ghcjs-prim HUnit
-          primitive QuickCheck quickcheck-unicode random test-framework
-          test-framework-hunit test-framework-quickcheck2 text
-        ];
-        jailbreak = true;
-        homepage = "http://github.com/ghcjs/ghcjs-base";
-        description = "base library for GHCJS";
-        license = stdenv.lib.licenses.mit;
-      }) {};
-  Cabal = callPackage
-    ({ mkDerivation, array, base, binary, bytestring, containers
-      , deepseq, directory, exceptions, filepath, old-time, pretty
-      , process, QuickCheck, regex-posix, stdenv, tagged, tasty
-      , tasty-hunit, tasty-quickcheck, time, transformers, unix
-      }:
-      mkDerivation {
-        pname = "Cabal";
-        version = "1.24.0.0";
-        src = "${ghcjsBoot}/boot/cabal/Cabal";
-        doCheck = false;
-        libraryHaskellDepends = [
-          array base binary bytestring containers deepseq directory filepath
-          pretty process time unix
-        ];
-        testHaskellDepends = [
-          base bytestring containers directory exceptions filepath old-time
-          pretty process QuickCheck regex-posix tagged tasty tasty-hunit
-          tasty-quickcheck transformers unix
-        ];
-        jailbreak = true;
-        homepage = "http://www.haskell.org/cabal/";
-        description = "A framework for packaging Haskell software";
-        license = stdenv.lib.licenses.bsd3;
-      }) {};
-}
diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
deleted file mode 100644
index 85efecc8ed3b..000000000000
--- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
+++ /dev/null
@@ -1,239 +0,0 @@
-{ pkgs, haskellLib }:
-
-with haskellLib;
-
-self: super: {
-
-  # Suitable LLVM version.
-  llvmPackages = pkgs.llvmPackages_35;
-
-  # Disable GHC 7.10.x core libraries.
-  array = null;
-  base = null;
-  binary = null;
-  bin-package-db = null;
-  bytestring = null;
-  Cabal = null;
-  containers = null;
-  deepseq = null;
-  directory = null;
-  filepath = null;
-  ghc-boot = null;
-  ghc-boot-th = null;
-  ghc-prim = null;
-  ghci = null;
-  haskeline = null;
-  hoopl = null;
-  hpc = null;
-  integer-gmp = null;
-  pretty = null;
-  process = null;
-  rts = null;
-  template-haskell = null;
-  terminfo = null;
-  time = null;
-  transformers = null;
-  unix = null;
-  xhtml = null;
-
-  # These are now core libraries in GHC 8.4.x.
-  mtl = self.mtl_2_2_2;
-  parsec = self.parsec_3_1_13_0;
-  parsec_3_1_13_0 = addBuildDepends super.parsec_3_1_13_0 [self.fail self.semigroups];
-  stm = self.stm_2_5_0_0;
-  text = self.text_1_2_3_1;
-
-  # Build jailbreak-cabal with the latest version of Cabal.
-  jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_1_24_2_0; };
-
-  gtk2hs-buildtools = super.gtk2hs-buildtools.override { Cabal = self.buildHaskellPackages.Cabal_1_24_2_0; };
-
-  # https://github.com/mrkkrp/megaparsec/issues/282
-  megaparsec = addBuildDepend (dontCheck super.megaparsec) self.fail;
-
-  Extra = appendPatch super.Extra (pkgs.fetchpatch {
-    url = "https://github.com/seereason/sr-extra/commit/29787ad4c20c962924b823d02a7335da98143603.patch";
-    sha256 = "193i1xmq6z0jalwmq0mhqk1khz6zz0i1hs6lgfd7ybd6qyaqnf5f";
-  });
-
-  # Requires ghc 8.2
-  ghc-proofs = dontDistribute super.ghc-proofs;
-
-  # haddock: No input file(s).
-  nats = dontHaddock super.nats;
-  bytestring-builder = dontHaddock super.bytestring-builder;
-
-  # Setup: At least the following dependencies are missing: base <4.8
-  hspec-expectations = overrideCabal super.hspec-expectations (drv: {
-    postPatch = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
-  });
-  utf8-string = overrideCabal super.utf8-string (drv: {
-    postPatch = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
-  });
-
-  # acid-state/safecopy#25 acid-state/safecopy#26
-  safecopy = dontCheck (super.safecopy);
-
-  # test suite broken, some instance is declared twice.
-  # https://bitbucket.org/FlorianHartwig/attobencode/issue/1
-  AttoBencode = dontCheck super.AttoBencode;
-
-  # Test suite fails with some (seemingly harmless) error.
-  # https://code.google.com/p/scrapyourboilerplate/issues/detail?id=24
-  syb = dontCheck super.syb;
-
-  # Test suite has stricter version bounds
-  retry = dontCheck super.retry;
-
-  # test/System/Posix/Types/OrphansSpec.hs:19:13:
-  #    Not in scope: type constructor or class ‘Int32’
-  base-orphans = dontCheck super.base-orphans;
-
-  # Test suite fails with time >= 1.5
-  http-date = dontCheck super.http-date;
-
-  # Version 1.19.5 fails its test suite.
-  happy = dontCheck super.happy;
-
-  # Upstream was notified about the over-specified constraint on 'base'
-  # but refused to do anything about it because he "doesn't want to
-  # support a moving target". Go figure.
-  barecheck = doJailbreak super.barecheck;
-
-  # https://github.com/kazu-yamamoto/unix-time/issues/30
-  unix-time = dontCheck super.unix-time;
-
-  # diagrams/monoid-extras#19
-  monoid-extras = overrideCabal super.monoid-extras (drv: {
-    prePatch = "sed -i 's|4\.8|4.9|' monoid-extras.cabal";
-  });
-
-  # diagrams/statestack#5
-  statestack = overrideCabal super.statestack (drv: {
-    prePatch = "sed -i 's|4\.8|4.9|' statestack.cabal";
-  });
-
-  # diagrams/diagrams-core#83
-  diagrams-core = overrideCabal super.diagrams-core (drv: {
-    prePatch = "sed -i 's|4\.8|4.9|' diagrams-core.cabal";
-  });
-
-  timezone-olson = doJailbreak super.timezone-olson;
-  xmonad-extras = overrideCabal super.xmonad-extras (drv: {
-    postPatch = ''
-      sed -i -e "s,<\*,<¤,g" XMonad/Actions/Volume.hs
-    '';
-  });
-
-  # Workaround for a workaround, see comment for "ghcjs" flag.
-  jsaddle = let jsaddle' = disableCabalFlag super.jsaddle "ghcjs";
-            in addBuildDepends jsaddle' [ self.glib self.gtk3 self.webkitgtk3
-                                          self.webkitgtk3-javascriptcore ];
-
-  # https://github.com/lymar/hastache/issues/47
-  hastache = dontCheck super.hastache;
-
-  # The compat library is empty in the presence of mtl 2.2.x.
-  mtl-compat = dontHaddock super.mtl-compat;
-
-  # https://github.com/bos/bloomfilter/issues/11
-  bloomfilter = dontHaddock (appendConfigureFlag super.bloomfilter "--ghc-option=-XFlexibleContexts");
-
-  # https://github.com/ocharles/tasty-rerun/issues/5
-  tasty-rerun = dontHaddock (appendConfigureFlag super.tasty-rerun "--ghc-option=-XFlexibleContexts");
-
-  # http://hub.darcs.net/ivanm/graphviz/issue/5
-  graphviz = dontCheck (appendPatch super.graphviz ./patches/graphviz-fix-ghc710.patch);
-
-  # https://github.com/HugoDaniel/RFC3339/issues/14
-  timerep = dontCheck super.timerep;
-
-  # Required to fix version 0.91.0.0.
-  wx = dontHaddock (appendConfigureFlag super.wx "--ghc-option=-XFlexibleContexts");
-
-  # Inexplicable haddock failure
-  # https://github.com/gregwebs/aeson-applicative/issues/2
-  aeson-applicative = dontHaddock super.aeson-applicative;
-
-  # GHC 7.10.1 is affected by https://github.com/srijs/hwsl2/issues/1.
-  hwsl2 = dontCheck super.hwsl2;
-
-  # https://github.com/haskell/haddock/issues/427
-  haddock = dontCheck self.haddock_2_16_1;
-
-  # haddock-api >= 2.17 is GHC 8.0 only
-  haddock-api = self.haddock-api_2_16_1;
-  haddock-library = self.haddock-library_1_2_1;
-
-  # The tests in vty-ui do not build, but vty-ui itself builds.
-  vty-ui = enableCabalFlag super.vty-ui "no-tests";
-
-  # https://github.com/fpco/stackage/issues/1112
-  vector-algorithms = addBuildDepends (dontCheck super.vector-algorithms) [ self.mtl self.mwc-random ];
-
-  # vector with ghc < 8.0 needs semigroups
-  vector = addBuildDepend super.vector self.semigroups;
-
-  # too strict dependency on directory
-  tasty-ant-xml = doJailbreak super.tasty-ant-xml;
-
-  # https://github.com/thoughtpolice/hs-ed25519/issues/13
-  ed25519 = dontCheck super.ed25519;
-
-  # Breaks a dependency cycle between QuickCheck and semigroups
-  hashable = dontCheck super.hashable;
-  unordered-containers = dontCheck super.unordered-containers;
-
-  # GHC versions prior to 8.x require additional build inputs.
-  aeson = disableCabalFlag (addBuildDepend super.aeson self.semigroups) "old-locale";
-  ansi-wl-pprint = addBuildDepend super.ansi-wl-pprint self.semigroups;
-  attoparsec = addBuildDepends super.attoparsec (with self; [semigroups fail]);
-  bytes = addBuildDepend super.bytes self.doctest;
-  case-insensitive = addBuildDepend super.case-insensitive self.semigroups;
-  cmdargs = addBuildDepend super.cmdargs self.semigroups;
-  contravariant = addBuildDepend super.contravariant self.semigroups;
-  dependent-map = addBuildDepend super.dependent-map self.semigroups;
-  distributive = addBuildDepend (dontCheck super.distributive) self.semigroups;
-  Glob = addBuildDepends super.Glob (with self; [semigroups]);
-  hoauth2 = overrideCabal super.hoauth2 (drv: { testDepends = (drv.testDepends or []) ++ [ self.wai self.warp ]; });
-  hslogger = addBuildDepend super.hslogger self.HUnit;
-  intervals = addBuildDepends super.intervals (with self; [doctest QuickCheck]);
-  lens = addBuildDepend super.lens self.generic-deriving;
-  mono-traversable = addBuildDepend super.mono-traversable self.semigroups;
-  natural-transformation = addBuildDepend super.natural-transformation self.semigroups;
-  optparse-applicative = addBuildDepends super.optparse-applicative [self.semigroups self.fail];
-  parser-combinators = addBuildDepend super.parser-combinators self.semigroups;
-  QuickCheck = addBuildDepend super.QuickCheck self.semigroups;
-  reflection = addBuildDepend super.reflection self.semigroups;
-  semigroups = addBuildDepends (dontCheck super.semigroups) (with self; [hashable tagged text unordered-containers]);
-  tar = addBuildDepend super.tar self.semigroups;
-  texmath = addBuildDepend super.texmath self.network-uri;
-  yesod-auth-oauth2 = overrideCabal super.yesod-auth-oauth2 (drv: { testDepends = (drv.testDepends or []) ++ [ self.load-env self.yesod ]; });
-
-  # cereal must have `fail` in pre-ghc-8.0.x versions and tests require
-  # bytestring>=0.10.8.1.
-  cereal = dontCheck (addBuildDepend super.cereal self.fail);
-
-  # The test suite requires Cabal 1.24.x or later to compile.
-  comonad = dontCheck super.comonad;
-  semigroupoids = dontCheck super.semigroupoids;
-
-  # Newer versions require base >=4.9 && <5.
-  colour = self.colour_2_3_3;
-
-  # https://github.com/atzedijkstra/chr/issues/1
-  chr-pretty = doJailbreak super.chr-pretty;
-  chr-parse = doJailbreak super.chr-parse;
-
-  # The autogenerated Nix expressions don't take into
-  # account `if impl(ghc >= x.y)`, which is a common method to depend
-  # on `semigroups` or `fail` when building with GHC < 8.0.
-  system-filepath = addBuildDepend super.system-filepath self.semigroups;
-  haskell-src-exts = addBuildDepend super.haskell-src-exts self.semigroups;
-  free = addBuildDepend super.free self.fail;
-
-  # Newer versions don't build without base-4.9
-  resourcet = self.resourcet_1_1_11;
-  conduit = self.conduit_1_2_13_1;
-
-}
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.0.x.nix
deleted file mode 100644
index 43f769ff6fd5..000000000000
--- a/pkgs/development/haskell-modules/configuration-ghc-8.0.x.nix
+++ /dev/null
@@ -1,91 +0,0 @@
-{ pkgs, haskellLib }:
-
-with haskellLib;
-
-self: super: {
-
-  # Suitable LLVM version.
-  llvmPackages = pkgs.llvmPackages_37;
-
-  # Disable GHC 8.0.x core libraries.
-  array = null;
-  base = null;
-  binary = null;
-  bytestring = null;
-  Cabal = null;
-  containers = null;
-  deepseq = null;
-  directory = null;
-  filepath = null;
-  ghc-boot = null;
-  ghc-boot-th = null;
-  ghc-compact = null;
-  ghc-prim = null;
-  ghci = null;
-  haskeline = null;
-  hoopl = null;
-  hpc = null;
-  integer-gmp = null;
-  pretty = null;
-  process = null;
-  rts = null;
-  template-haskell = null;
-  terminfo = null;
-  time = null;
-  transformers = null;
-  unix = null;
-  xhtml = null;
-
-  # These are now core libraries in GHC 8.4.x.
-  mtl = self.mtl_2_2_2;
-  parsec = self.parsec_3_1_13_0;
-  stm = self.stm_2_5_0_0;
-  text = self.text_1_2_3_1;
-
-  # https://github.com/bmillwood/applicative-quoters/issues/6
-  applicative-quoters = appendPatch super.applicative-quoters (pkgs.fetchpatch {
-    url = "https://patch-diff.githubusercontent.com/raw/bmillwood/applicative-quoters/pull/7.patch";
-    sha256 = "026vv2k3ks73jngwifszv8l59clg88pcdr4mz0wr0gamivkfa1zy";
-  });
-
-  # Requires ghc 8.2
-  ghc-proofs = dontDistribute super.ghc-proofs;
-
-  # https://github.com/thoughtbot/yesod-auth-oauth2/pull/77
-  yesod-auth-oauth2 = doJailbreak super.yesod-auth-oauth2;
-
-  # https://github.com/nominolo/ghc-syb/issues/20
-  ghc-syb-utils = dontCheck super.ghc-syb-utils;
-
-  # Newer versions require ghc>=8.2
-  apply-refact = super.apply-refact_0_3_0_1;
-
-  # This builds needs the latest Cabal version.
-  cabal2nix = super.cabal2nix.overrideScope (self: super: { Cabal = self.Cabal_2_0_1_1; });
-
-  # Add appropriate Cabal library to build this code.
-  stack = addSetupDepend super.stack self.Cabal_2_0_1_1;
-
-  # inline-c > 0.5.6.0 requires template-haskell >= 2.12
-  inline-c = super.inline-c_0_5_6_1;
-  inline-c-cpp = super.inline-c-cpp_0_1_0_0;
-
-  # test dep hedgehog pulls in concurrent-output, which does not build
-  # due to processing version mismatch
-  either = dontCheck super.either;
-
-  # test dep tasty has a version mismatch
-  indents = dontCheck super.indents;
-
-  # Newer versions require GHC 8.2.
-  haddock-library = self.haddock-library_1_4_3;
-  haddock-api = self.haddock-api_2_17_4;
-  haddock = self.haddock_2_17_5;
-
-  # GHC 8.0 doesn't have semigroups included by default
-  ListLike = addBuildDepend super.ListLike self.semigroups;
-
-  # Add missing build depedency for this compiler.
-  base-compat-batteries = addBuildDepend super.base-compat-batteries self.bifunctors;
-
-}
diff --git a/pkgs/development/haskell-modules/configuration-halvm-2.4.0.nix b/pkgs/development/haskell-modules/configuration-halvm-2.4.0.nix
deleted file mode 100644
index be90794f58d9..000000000000
--- a/pkgs/development/haskell-modules/configuration-halvm-2.4.0.nix
+++ /dev/null
@@ -1,59 +0,0 @@
-{ pkgs, haskellLib }:
-
-with haskellLib;
-
-self: super: {
-
-  # Suitable LLVM version.
-  llvmPackages = pkgs.llvmPackages_35;
-
-  # Disable GHC 8.0.x core libraries.
-  array = null;
-  base = null;
-  binary = null;
-  bytestring = null;
-  Cabal = null;
-  containers = null;
-  deepseq = null;
-  directory = null;
-  filepath = null;
-  ghc-boot = null;
-  ghc-boot-th = null;
-  ghc-prim = null;
-  ghci = null;
-  haskeline = null;
-  hoopl = null;
-  hpc = null;
-  integer-gmp = null;
-  pretty = null;
-  process = null;
-  rts = null;
-  template-haskell = null;
-  terminfo = null;
-  time = null;
-  transformers = null;
-  unix = null;
-  xhtml = null;
-
-  # cabal-install can use the native Cabal library.
-  cabal-install = super.cabal-install.override { Cabal = null; };
-
-  # jailbreak-cabal can use the native Cabal library.
-  jailbreak-cabal = super.jailbreak-cabal.override { Cabal = null; };
-
-  # https://github.com/bmillwood/applicative-quoters/issues/6
-  applicative-quoters = appendPatch super.applicative-quoters (pkgs.fetchpatch {
-    url = "https://patch-diff.githubusercontent.com/raw/bmillwood/applicative-quoters/pull/7.patch";
-    sha256 = "026vv2k3ks73jngwifszv8l59clg88pcdr4mz0wr0gamivkfa1zy";
-  });
-
-  # https://github.com/christian-marie/xxhash/issues/3
-  xxhash = doJailbreak super.xxhash;
-
-  # https://github.com/Deewiant/glob/issues/8
-  Glob = doJailbreak super.Glob;
-
-  # http://hub.darcs.net/dolio/vector-algorithms/issue/9#comment-20170112T145715
-  vector-algorithms = dontCheck super.vector-algorithms;
-
-}
diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix
index e568ea9eb650..f4145c85199b 100644
--- a/pkgs/development/libraries/grpc/default.nix
+++ b/pkgs/development/libraries/grpc/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     rm -vf BUILD
   '';
 
-  NIX_CFLAGS_COMPILE = "-Wno-error=unknown-warning-option";
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=unknown-warning-option";
 
   enableParallelBuilds = true;
 
diff --git a/pkgs/development/libraries/kerberos/krb5.nix b/pkgs/development/libraries/kerberos/krb5.nix
index 4e3ba399cc3f..afb928aff6e9 100644
--- a/pkgs/development/libraries/kerberos/krb5.nix
+++ b/pkgs/development/libraries/kerberos/krb5.nix
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
     # Provides the mig command used by the build scripts
     ++ optional stdenv.isDarwin bootstrap_cmds;
   buildInputs = [ openssl ]
-    ++ optionals (stdenv.hostPlatform.isLinux) [ keyutils ]
+    ++ optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "bionic") [ keyutils ]
     ++ optionals (!libOnly) [ openldap libedit ];
 
   preConfigure = "cd ./src";
diff --git a/pkgs/development/libraries/libmtp/default.nix b/pkgs/development/libraries/libmtp/default.nix
index 1d8dd7e20f14..e750c2c6c70e 100644
--- a/pkgs/development/libraries/libmtp/default.nix
+++ b/pkgs/development/libraries/libmtp/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, libusb1, libiconv }:
 
 stdenv.mkDerivation rec {
-  name = "libmtp-1.1.15";
+  name = "libmtp-1.1.16";
 
   src = fetchurl {
     url = "mirror://sourceforge/libmtp/${name}.tar.gz";
-    sha256 = "089h79nkz7wcr3lbqi7025l8p75hbp0aigxk3wdk2zkm8q5r0h6h";
+    sha256 = "185vh9bds6dcy00ycggg69g4v7m3api40zv8vrcfb3fk3vfzjs2v";
   };
 
   outputs = [ "bin" "dev" "out" ];
diff --git a/pkgs/development/libraries/openjpeg/2.x.nix b/pkgs/development/libraries/openjpeg/2.x.nix
index d18c971dc112..77d9e5829a1a 100644
--- a/pkgs/development/libraries/openjpeg/2.x.nix
+++ b/pkgs/development/libraries/openjpeg/2.x.nix
@@ -5,4 +5,12 @@ callPackage ./generic.nix (args // rec {
   branch = "2.3";
   revision = "v${version}";
   sha256 = "08plxrnfl33sn2vh5nwbsngyv6b1sfpplvx881crm1v1ai10m2lz";
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2018-7648.patch";
+      url = "https://github.com/uclouvain/openjpeg/commit/cc3824767bde397fedb8a1ae4786a222ba860c8d.patch";
+      sha256 = "1j5nxmlgyfkxldk2f1ij6h850xw45q3b5brxqa04dxsfsv8cdj5j";
+    })
+  ];
 })
diff --git a/pkgs/development/libraries/v8/plv8_6_x.nix b/pkgs/development/libraries/v8/plv8_6_x.nix
new file mode 100644
index 000000000000..8d2276def705
--- /dev/null
+++ b/pkgs/development/libraries/v8/plv8_6_x.nix
@@ -0,0 +1,187 @@
+# NOTE: this expression is NOT exported from the top-level of all-packages.nix,
+# it is exclusively used by the 'plv8' PostgreSQL extension, which requires a
+# very exact version.
+
+{ stdenv, lib, fetchgit, fetchFromGitHub, gn, ninja, python, glib, pkgconfig
+, doCheck ? false
+, snapshot ? true
+}:
+
+let
+  arch = if stdenv.isAarch32
+         then if stdenv.is64bit
+              then"arm64"
+              else "arm"
+         else if stdenv.is64bit
+              then"x64"
+              else "ia32";
+  git_url = "https://chromium.googlesource.com";
+
+  # This data is from the DEPS file in the root of a V8 checkout
+  deps = {
+    "base/trace_event/common" = fetchgit {
+      url    = "${git_url}/chromium/src/base/trace_event/common.git";
+      rev    = "0e9a47d74970bee1bbfc063c47215406f8918699";
+      sha256 = "07rbzrlscp8adh4z86yl5jxdnvgkc3xs950xldpk318wf9i3bh6c";
+    };
+    "build" = fetchgit {
+      url    = "${git_url}/chromium/src/build.git";
+      rev    = "9338ce52d0b9bcef34c38285fbd5023b62739fac";
+      sha256 = "1s2sa8dy3waidsirjylc82ggb18l1108bczjc8z0v4ywyj4k0cvh";
+    };
+    "buildtools" = fetchgit {
+      url    = "${git_url}/chromium/buildtools.git";
+      rev    = "505de88083136eefd056e5ee4ca0f01fe9b33de8";
+      sha256 = "0vj216nhb803bggsl0hnyagj8njrm96pn8sim6xcnqb7nhz1vabw";
+    };
+    "test/benchmarks/data" = fetchgit {
+      url    = "${git_url}/v8/deps/third_party/benchmarks.git";
+      rev    = "05d7188267b4560491ff9155c5ee13e207ecd65f";
+      sha256 = "0ad2ay14bn67d61ks4dmzadfnhkj9bw28r4yjdjjyzck7qbnzchl";
+    };
+    "test/mozilla/data" = fetchgit {
+      url    = "${git_url}/v8/deps/third_party/mozilla-tests.git";
+      rev    = "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be";
+      sha256 = "0rfdan76yfawqxbwwb35aa57b723j3z9fx5a2w16nls02yk2kqyn";
+    };
+    "test/test262/data" = fetchgit {
+      url    = "${git_url}/external/github.com/tc39/test262.git";
+      rev    = "5d4c667b271a9b39d0de73aef5ffe6879c6f8811";
+      sha256 = "0q9iwb2nkybf9np95wgf5m372aw2lhx9wlsw41a2a80kbkvb2kqg";
+    };
+    "test/test262/harness" = fetchgit {
+      url    = "${git_url}/external/github.com/test262-utils/test262-harness-py.git";
+      rev    = "0f2acdd882c84cff43b9d60df7574a1901e2cdcd";
+      sha256 = "00brj5avp43yamc92kinba2mg3a2x1rcd7wnm7z093l73idprvkp";
+    };
+    "test/wasm-js" = fetchgit {
+      url    = "${git_url}/external/github.com/WebAssembly/spec.git";
+      rev    = "a7e226a92e660a3d5413cfea4269824f513259d2";
+      sha256 = "0z3aybj3ykajwh2bv5fwd6pwqjjsq8dnwrqc2wncb6r9xcjwbgxp";
+    };
+    "testing/gtest" = fetchgit {
+      url    = "${git_url}/external/github.com/google/googletest.git";
+      rev    = "6f8a66431cb592dad629028a50b3dd418a408c87";
+      sha256 = "0bdba2lr6pg15bla9600zg0r0vm4lnrx0wqz84p376wfdxra24vw";
+    };
+    "third_party/icu" = fetchgit {
+      url    = "${git_url}/chromium/deps/icu.git";
+      rev    = "741688ebf328da9adc52505248bf4e2ef868722c";
+      sha256 = "02ifm18qjlrkn5nm2rxkf9yz9bdlyq7c65jfjndv63vi1drqh1r9";
+    };
+    "third_party/instrumented_libraries" = fetchgit {
+      url    = "${git_url}/chromium/src/third_party/instrumented_libraries.git";
+      rev    = "28417458ac4dc79f68915079d0f283f682504cc0";
+      sha256 = "1qf5c2946n37p843yriv7xawi6ss6samabghq43s49cgd4wq8dc3";
+    };
+    "third_party/jinja2" = fetchgit {
+      url    = "${git_url}/chromium/src/third_party/jinja2.git";
+      rev    = "d34383206fa42d52faa10bb9931d6d538f3a57e0";
+      sha256 = "0d9hyw0bvp3p0dbwy833cm9vdqxcam0qbm9jc561ynphddxlkmgd";
+    };
+    "third_party/markupsafe" = fetchgit {
+      url    = "${git_url}/chromium/src/third_party/markupsafe.git";
+      rev    = "8f45f5cfa0009d2a70589bcda0349b8cb2b72783";
+      sha256 = "168ppjmicfdh4i1l0l25s86mdbrz9fgxmiq1rx33x79mph41scfz";
+    };
+    "tools/clang" = fetchgit {
+      url    = "${git_url}/chromium/src/tools/clang.git";
+      rev    = "8688d267571de76a56746324dcc249bf4232b85a";
+      sha256 = "0krq4zz1vnwp064bm517gwr2napy18wyccdh8w5s4qgkjwwxd63s";
+    };
+    "tools/gyp" = fetchgit {
+      url    = "${git_url}/external/gyp.git";
+      rev    = "d61a9397e668fa9843c4aa7da9e79460fe590bfb";
+      sha256 = "1z081h72mjy285jb1kj5xd0pb4p12n9blvsimsavyn3ldmswv0r0";
+    };
+    "tools/luci-go" = fetchgit {
+      url    = "${git_url}/chromium/src/tools/luci-go.git";
+      rev    = "45a8a51fda92e123619a69e7644d9c64a320b0c1";
+      sha256 = "0r7736gqk7r0i7ig0b5ib10d9q8a8xzsmc0f0fbkm9k78v847vpj";
+    };
+    "tools/swarming_client" = fetchgit {
+      url    = "${git_url}/infra/luci/client-py.git";
+      rev    = "4bd9152f8a975d57c972c071dfb4ddf668e02200";
+      sha256 = "03zk91gzvqv01g1vbl8d7h8al7vs4ymrrdc8ipg9wpq52yh65smh";
+    };
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  name = "v8-${version}";
+  version = "6.4.388.40";
+
+  inherit doCheck;
+
+  src = fetchFromGitHub {
+    owner = "v8";
+    repo = "v8";
+    rev = version;
+    sha256 = "1lq239cgqyidrynz8g3wbdv70ymzv6s0ppad8s219gb3jnizm16a";
+  };
+
+  postUnpack = ''
+    ${lib.concatStringsSep "\n" (
+      lib.mapAttrsToList (n: v: ''
+        mkdir -p $sourceRoot/${n}
+        cp -r ${v}/* $sourceRoot/${n}
+      '') deps)}
+  '';
+
+  prePatch = ''
+    # use our gn, not the bundled one
+    sed -i -e 's#gn_path = .*#gn_path = "${gn}/bin/gn"#' tools/mb/mb.py
+
+    # disable tests
+    if [ "$doCheck" = "" ]; then sed -i -e '/"test:gn_all",/d' BUILD.gn; fi
+
+    # disable sysroot usage
+    chmod u+w build/config build/config/sysroot.gni
+    sed -i build/config/sysroot.gni \
+        -e '/use_sysroot =/ { s#\(use_sysroot =\).*#\1 false#; :a  n; /current_cpu/ { s/^/#/; ba };  }'
+
+    # patch shebangs (/usr/bin/env)
+    patchShebangs tools/dev/v8gen.py
+  '';
+
+  configurePhase = ''
+    tools/dev/v8gen.py -vv ${arch}.release -- \
+        is_component_build=true               \
+        ${if snapshot then "v8_use_external_startup_data=false" else "v8_use_snapshot=false"} \
+        is_clang=false                        \
+        linux_use_bundled_binutils=false      \
+        treat_warnings_as_errors=false        \
+        use_custom_libcxx=false               \
+        use_custom_libcxx_for_host=false
+  '';
+
+  nativeBuildInputs = [ gn ninja pkgconfig ];
+  buildInputs = [ python glib ];
+
+  buildPhase = ''
+    ninja -C out.gn/${arch}.release/
+  '';
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    install -vD out.gn/${arch}.release/d8 "$out/bin/d8"
+    install -vD out.gn/${arch}.release/mksnapshot "$out/bin/mksnapshot"
+    mkdir -p "$out/lib"
+    for f in libicui18n.so libicuuc.so libv8_libbase.so libv8_libplatform.so libv8.so; do
+        install -vD out.gn/${arch}.release/$f "$out/lib/$f"
+    done
+    install -vD out.gn/${arch}.release/icudtl.dat "$out/lib/icudtl.dat"
+    mkdir -p "$out/include"
+    cp -vr include/*.h "$out/include"
+    cp -vr include/libplatform "$out/include"
+  '';
+
+  meta = with lib; {
+    description = "Google's open source JavaScript engine";
+    maintainers = with maintainers; [ cstrahan proglodyte ];
+    platforms = platforms.linux;
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/libraries/xapian/default.nix b/pkgs/development/libraries/xapian/default.nix
index 7b92c1c66cd7..2d7289ca6647 100644
--- a/pkgs/development/libraries/xapian/default.nix
+++ b/pkgs/development/libraries/xapian/default.nix
@@ -36,5 +36,5 @@ let
 in {
   # xapian-ruby needs 1.2.22 as of 2017-05-06
   xapian_1_2_22 = generic "1.2.22" "0zsji22n0s7cdnbgj0kpil05a6bgm5cfv0mvx12d8ydg7z58g6r6";
-  xapian_1_4 = generic "1.4.8" "0528841hn5lddaa317ax3i3d01zf1izpzh4njiz6s84mxpn06q6s";
+  xapian_1_4 = generic "1.4.9" "1k7m7m9jld96k16ansfw2w3c354pvd8ibhnrb6dw012g06fw7sfd";
 }
diff --git a/pkgs/development/python-modules/sslib/default.nix b/pkgs/development/python-modules/sslib/default.nix
new file mode 100644
index 000000000000..3e5be211d42b
--- /dev/null
+++ b/pkgs/development/python-modules/sslib/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchPypi, buildPythonPackage, isPy3k }:
+
+buildPythonPackage rec {
+  pname = "sslib";
+  version = "0.2.0";
+  disabled = !isPy3k;
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0b5zrjkvx4klmv57pzhcmvbkdlyn745mn02k7hp811hvjrhbz417";
+  };
+
+  # No tests available
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/jqueiroz/python-sslib;
+    description = "A Python3 library for sharing secrets";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jqueiroz ];
+  };
+}
diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix
index bd3458b98c8b..d9ceb20e9412 100644
--- a/pkgs/misc/vim-plugins/generated.nix
+++ b/pkgs/misc/vim-plugins/generated.nix
@@ -53,12 +53,12 @@
   };
 
   ale = buildVimPluginFrom2Nix {
-    name = "ale-2018-10-29";
+    name = "ale-2018-10-31";
     src = fetchFromGitHub {
       owner = "w0rp";
       repo = "ale";
-      rev = "cae40e1c347064bd3ab5eb4c04e9e357d3d82105";
-      sha256 = "0f7qsp0gpafk7fimcbivx2cm53hpjz6hr6lzdg8wnxcm0gdw7827";
+      rev = "4b841b55869e3ec5b02806f9b2fe962ffdca2750";
+      sha256 = "0wa8phv4b6n1akaii8qy9c0lr17vm4bqgz5chjx28zs73jfxsf2i";
     };
   };
 
@@ -93,12 +93,12 @@
   };
 
   awesome-vim-colorschemes = buildVimPluginFrom2Nix {
-    name = "awesome-vim-colorschemes-2018-01-20";
+    name = "awesome-vim-colorschemes-2018-10-30";
     src = fetchFromGitHub {
       owner = "rafi";
       repo = "awesome-vim-colorschemes";
-      rev = "8d2b6657bdbe4f7253e320c741bc4c1fc2f2f41d";
-      sha256 = "1wfm6rsmyqldxwcz0ic4rq7kf00fgsx00rg42cl9yya35nqiri2z";
+      rev = "21d1c93da95d58bead99f3226f9447f5b035afe1";
+      sha256 = "1niwwyxgq7k7mbi05lnpz12lbmn9mam9x4qvzxcbvxsqqp2zzsj8";
     };
   };
 
@@ -718,6 +718,17 @@
     };
   };
 
+  jedi-vim = buildVimPluginFrom2Nix {
+    name = "jedi-vim-2018-10-14";
+    src = fetchFromGitHub {
+      owner = "davidhalter";
+      repo = "jedi-vim";
+      rev = "b6dfc5fd49c26d4dbe9f54c814956567a7a9b3a8";
+      sha256 = "11wvynjl1m23vdp4wvirhmm7vnpji5affbyhwz67yjkvh6c42xqa";
+      fetchSubmodules = true;
+    };
+  };
+
   Jenkinsfile-vim-syntax = buildVimPluginFrom2Nix {
     name = "Jenkinsfile-vim-syntax-2018-09-25";
     src = fetchFromGitHub {
@@ -899,12 +910,12 @@
   };
 
   neco-vim = buildVimPluginFrom2Nix {
-    name = "neco-vim-2017-10-01";
+    name = "neco-vim-2018-10-30";
     src = fetchFromGitHub {
       owner = "Shougo";
       repo = "neco-vim";
-      rev = "f5397c5e800d65a58c56d8f1b1b92686b05f4ca9";
-      sha256 = "0yb7ja6qgrazszk4i01cwjj00j9vd43zs2r11b08iy8n10jnzr73";
+      rev = "4c0203b44f8daa7e2f72e2514488d637e8a766a4";
+      sha256 = "03v3h2ks6y9pl960lnvzxlfhnn6l2pcn6d6012znw2wqpralrjq2";
     };
   };
 
@@ -949,12 +960,12 @@
   };
 
   neomake = buildVimPluginFrom2Nix {
-    name = "neomake-2018-10-28";
+    name = "neomake-2018-10-29";
     src = fetchFromGitHub {
       owner = "benekastah";
       repo = "neomake";
-      rev = "35f4c002d55d5f722a08eb9acf126f7717072812";
-      sha256 = "0ad5dqyjpwn78nadg90jd03n0mkllm0r4jxq72h77dwxsd1prgl9";
+      rev = "c15d51ea9f622b8bce469a18833a6ac64f6a1193";
+      sha256 = "1l15y0di6k4v0vrwpd86lp2n5ljfjnzncgpxwmbhqb2xznr7caq7";
     };
   };
 
@@ -1009,12 +1020,12 @@
   };
 
   nerdtree = buildVimPluginFrom2Nix {
-    name = "nerdtree-2018-10-25";
+    name = "nerdtree-2018-10-31";
     src = fetchFromGitHub {
       owner = "scrooloose";
       repo = "nerdtree";
-      rev = "91e0f2253fbecefa7e14f095950341584877ef19";
-      sha256 = "1lkmxplrv211drzmwi93v1fmicdjm146vl471s3h21y77k0hd2f5";
+      rev = "8d005db94f8d1a214d172aeb1008d016c3d201e2";
+      sha256 = "0f8dljl45ph668kwjf0py0891i3aqfdijplarxnblbkp2zn5ij7g";
     };
   };
 
@@ -1479,12 +1490,12 @@
   };
 
   tsuquyomi = buildVimPluginFrom2Nix {
-    name = "tsuquyomi-2018-08-03";
+    name = "tsuquyomi-2018-10-31";
     src = fetchFromGitHub {
       owner = "Quramy";
       repo = "tsuquyomi";
-      rev = "05e6515f6d21545959ac4eb570c917e1d225b1f1";
-      sha256 = "0hbd2d8zb86c8ncrrm4zyj92j523xay2lwk2k9arwacn8fj42hir";
+      rev = "bdd034d06ed47176ec1ee0bd3dae5bc0aeb053e3";
+      sha256 = "119dxmkarbh0b0k4l59mxr19shks4mv96j3mbz02q0kdq18bgrdq";
     };
   };
 
@@ -1539,12 +1550,12 @@
   };
 
   vim = buildVimPluginFrom2Nix {
-    name = "vim-2018-10-27";
+    name = "vim-2018-10-30";
     src = fetchFromGitHub {
       owner = "dracula";
       repo = "vim";
-      rev = "854886980635eb70e119d2bd3bb94a0ce46fc71d";
-      sha256 = "1ff88clly227cj83ng6bwc8jn3zp20614agg94izqhsxr5bpdp5z";
+      rev = "66755a9cb9bdea62720812a1165132de6ff62468";
+      sha256 = "0zca3spgnf00rxa0h5x79ydycz41b0xli7bgwpnbxannzxqswhiy";
     };
   };
 
@@ -1749,12 +1760,12 @@
   };
 
   vim-airline = buildVimPluginFrom2Nix {
-    name = "vim-airline-2018-10-22";
+    name = "vim-airline-2018-11-01";
     src = fetchFromGitHub {
       owner = "vim-airline";
       repo = "vim-airline";
-      rev = "08e9aa5386eecfd6a6cbde1eff240619cd81beed";
-      sha256 = "0g9rlr6067sqyp0l4yacnr14phx1wn2jvjcq2x2zwkc0b28hxyrs";
+      rev = "6516b1b4dccef543d489177431050fe8a5c5c99c";
+      sha256 = "0x4vdxz31vqyd3qy8vr4gcdc649nz72axris5fxj8ln5zphlr6ll";
     };
   };
 
@@ -1969,12 +1980,12 @@
   };
 
   vim-dispatch = buildVimPluginFrom2Nix {
-    name = "vim-dispatch-2018-10-02";
+    name = "vim-dispatch-2018-10-31";
     src = fetchFromGitHub {
       owner = "tpope";
       repo = "vim-dispatch";
-      rev = "ab7470d4b03bae9880bf2b5cef60fc0fb51b1101";
-      sha256 = "01slb3lcbdba0a4xky6i5xflh1cjm0aq6g8yyfzrgn4w8pq50h9p";
+      rev = "d4b8940fd1cd77fc6d300f003b18745a584295b2";
+      sha256 = "06g0xc55z9jpa5rl8c5af5apb8b2agahsxxzayl2vn763v9p1n6b";
     };
   };
 
@@ -2199,12 +2210,12 @@
   };
 
   vim-grepper = buildVimPluginFrom2Nix {
-    name = "vim-grepper-2018-10-29";
+    name = "vim-grepper-2018-10-30";
     src = fetchFromGitHub {
       owner = "mhinz";
       repo = "vim-grepper";
-      rev = "54cb4c55bd8d80fc046f62b8f6486db2de424399";
-      sha256 = "1bzzyh2yav9f54gn17ny8gpi5h70yvjqdyg9lg0b1rglvirjpb1r";
+      rev = "a55a14b97dc8ac848eeb95e71d095b75197ba665";
+      sha256 = "08p5dp43z9bxllr5fvl3hgnyqyxlvpbfczw1ydncmzvrqqccrx08";
     };
   };
 
@@ -2630,12 +2641,12 @@
   };
 
   vim-operator-surround = buildVimPluginFrom2Nix {
-    name = "vim-operator-surround-2017-12-22";
+    name = "vim-operator-surround-2018-11-01";
     src = fetchFromGitHub {
       owner = "rhysd";
       repo = "vim-operator-surround";
-      rev = "001c0da077b5b38a723151b19760d220e02363db";
-      sha256 = "0c6w6id57faw6sjf5wvw9qp2a4i7xj65q0c4hjs0spgzycv2wpkh";
+      rev = "80337a40a829cfc77b065a71d8a609e2ad7d2c8b";
+      sha256 = "0f9shg81bl39hz67ahbi6k6gbhky7gzp8by16fhiz75hbjgp9lq2";
     };
   };
 
@@ -2830,12 +2841,12 @@
   };
 
   vim-rhubarb = buildVimPluginFrom2Nix {
-    name = "vim-rhubarb-2018-09-20";
+    name = "vim-rhubarb-2018-10-31";
     src = fetchFromGitHub {
       owner = "tpope";
       repo = "vim-rhubarb";
-      rev = "3a9ddb8ffa46b9fa49f3d9372bbb5d64bdc5fd23";
-      sha256 = "1swybc30vyf309w1a34jf94xja1kikvrr3xpixfban50s6aiyips";
+      rev = "42072cc349c46db79c0a4411d399a2fe31cfda7e";
+      sha256 = "020fshfrwbycs4saci58k625330i2ndfh6lqnxz5h0pp2m5y6jp8";
     };
   };
 
@@ -2910,12 +2921,12 @@
   };
 
   vim-signify = buildVimPluginFrom2Nix {
-    name = "vim-signify-2018-10-01";
+    name = "vim-signify-2018-10-31";
     src = fetchFromGitHub {
       owner = "mhinz";
       repo = "vim-signify";
-      rev = "ce2dd937bf3a394ef2fbeda8ab56d2b4437be3c3";
-      sha256 = "08ah81bn0cmqphi2lw2y7pjdg8sw2wjwc3p3j6pj0gyqx2bsf408";
+      rev = "4e7faba8d32d56d80090dedc5328849a7128b73a";
+      sha256 = "0wm1kgklvd4b52lrqb9l7n511p8kaw8y9707962l4nrp8cbrbs31";
     };
   };
 
@@ -2980,22 +2991,22 @@
   };
 
   vim-speeddating = buildVimPluginFrom2Nix {
-    name = "vim-speeddating-2017-05-24";
+    name = "vim-speeddating-2018-10-31";
     src = fetchFromGitHub {
       owner = "tpope";
       repo = "vim-speeddating";
-      rev = "a418667791f03694065948342f2d6c5cca8d0f32";
-      sha256 = "1wm33izawazh0dy70zjk6rkg30yrlldba5r1gypnr4barps702gw";
+      rev = "799cd3473bc64adcb6b556bf349f549570666b62";
+      sha256 = "0vyla4lslf1hycx1mvgydhlar2f6bwnwbcp39s1f0m65fqs25rhz";
     };
   };
 
   vim-startify = buildVimPluginFrom2Nix {
-    name = "vim-startify-2018-10-02";
+    name = "vim-startify-2018-10-31";
     src = fetchFromGitHub {
       owner = "mhinz";
       repo = "vim-startify";
-      rev = "556bf1d507dfaddfba4b5795716ea20f8ba902ac";
-      sha256 = "1jjj7iij08455rlc705m3pnbjg87r2l29jclzkiy7nsvjjh3dfwx";
+      rev = "356562270684d8d1647daf0faaf76ac90740990c";
+      sha256 = "0qc9ifq4blixda0kyc0zhmqi6cqz44xnk9x17p0p9qqidf1s1l1r";
     };
   };
 
@@ -3290,12 +3301,12 @@
   };
 
   vimtex = buildVimPluginFrom2Nix {
-    name = "vimtex-2018-10-29";
+    name = "vimtex-2018-11-01";
     src = fetchFromGitHub {
       owner = "lervag";
       repo = "vimtex";
-      rev = "8a32372e4fc3c628d36b8215c6d30bd05eeade28";
-      sha256 = "1h1fp0jnv4wj96mam9dgnr5y1i4a4bdi4law3y1qh937bx7nk2vd";
+      rev = "2aae07e67034f4806d45500a967bf5775ab22baf";
+      sha256 = "1ng1ps5f2vh7xs5lfkid7zwvcjglynw53xvd301zpjbgln2gv3fz";
     };
   };
 
diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix
index 6b8bf42c795f..8ed7a9446711 100644
--- a/pkgs/misc/vim-plugins/overrides.nix
+++ b/pkgs/misc/vim-plugins/overrides.nix
@@ -334,4 +334,13 @@ with generated;
     };
   });
 
+  jedi-vim = jedi-vim.overrideAttrs(old: {
+    # checking for python3 support in vim would be neat, too, but nobody else seems to care
+    buildInputs = [ python3Packages.jedi ];
+    meta = {
+      description = "code-completion for python using python-jedi";
+      license = stdenv.lib.licenses.mit;
+    };
+  });
+
 }
diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names
index bccb97b72d27..33049c834a26 100644
--- a/pkgs/misc/vim-plugins/vim-plugin-names
+++ b/pkgs/misc/vim-plugins/vim-plugin-names
@@ -37,14 +37,15 @@ ctjhoa/spacevim
 ctrlpvim/ctrlp.vim
 dag/vim2hs
 dannyob/quickfixstatus
+davidhalter/jedi-vim
 derekelkins/agda-vim
 derekwyatt/vim-scala
 dhruvasagar/vim-table-mode
 digitaltoad/vim-jade
 dleonard0/pony-vim-syntax
 dracula/vim
-dylanaraps/wal.vim
 drmingdrmer/xptemplate
+dylanaraps/wal.vim
 eagletmt/ghcmod-vim
 eagletmt/neco-ghc
 easymotion/vim-easymotion
diff --git a/pkgs/os-specific/linux/ati-drivers/default.nix b/pkgs/os-specific/linux/ati-drivers/default.nix
index d5d42faa913e..cda7e03cd066 100644
--- a/pkgs/os-specific/linux/ati-drivers/default.nix
+++ b/pkgs/os-specific/linux/ati-drivers/default.nix
@@ -61,8 +61,8 @@ stdenv.mkDerivation rec {
   src = fetchurl {
     url =
     "https://www2.ati.com/drivers/linux/radeon-crimson-15.12-15.302-151217a-297685e.zip";
-    sha256 = "0n0ynqmjkjp5dl5q07as7ps3rlyyn63hq4mlwgd7c7v82ky2skvh";
-    curlOpts = "--referer http://support.amd.com/en-us/download/desktop?os=Linux+x86_64";
+    sha256 = "704f2dfc14681f76dae3b4120c87b1ded33cf43d5a1d800b6de5ca292bb61e58";
+    curlOpts = "--referer https://www.amd.com/en/support";
   };
 
   hardeningDisable = [ "pic" "format" ];
diff --git a/pkgs/os-specific/linux/kernel/linux-beagleboard.nix b/pkgs/os-specific/linux/kernel/linux-beagleboard.nix
deleted file mode 100644
index e98104f11ca9..000000000000
--- a/pkgs/os-specific/linux/kernel/linux-beagleboard.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ubootTools, dtc, ... } @ args:
-
-let
-  modDirVersion = "4.14.12";
-  tag = "r23";
-in
-stdenv.lib.overrideDerivation (buildLinux (args // rec {
-  version = "${modDirVersion}-ti-${tag}";
-  inherit modDirVersion;
-
-  src = fetchFromGitHub {
-    owner = "beagleboard";
-    repo = "linux";
-    rev = "${version}";
-    sha256 = "07hdv2h12gsgafxsqqr7b0fir10rv9k66riklpjba2cg6x0p2nr4";
-  };
-
-  kernelPatches = args.kernelPatches;
-
-  features = {
-    efiBootStub = false;
-  } // (args.features or {});
-
-  extraMeta.hydraPlatforms = [ "armv7l-linux" ];
-} // (args.argsOverride or {}))) (oldAttrs: {
-
-  # This kernel will run mkuboot.sh.
-  postPatch = ''
-    patchShebangs scripts/
-  '';
-
-  nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ dtc ubootTools ];
-
-})
diff --git a/pkgs/os-specific/linux/kernel/linux-samus-4.12.nix b/pkgs/os-specific/linux/kernel/linux-samus-4.12.nix
deleted file mode 100644
index 0a936c6c053b..000000000000
--- a/pkgs/os-specific/linux/kernel/linux-samus-4.12.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ncurses, ... } @ args:
-
-buildLinux (args // rec {
-  version = "4.12.2";
-  extraMeta.branch = "4.12-2";
-
-  src =
-    let upstream = fetchFromGitHub {
-      owner = "raphael";
-      repo = "linux-samus";
-      rev = "v${extraMeta.branch}";
-      sha256 = "1dr74i79p8r13522w2ppi8gnjd9bhngc9d2hsn91ji6f5a8fbxx9";
-    }; in "${upstream}/build/linux";
-
-  extraMeta.platforms = [ "x86_64-linux" ];
-} // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix
index 44598588db9d..97e5b3aa70ad 100644
--- a/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -19,10 +19,10 @@ rec {
   stable = if stdenv.hostPlatform.system == "x86_64-linux" then stable_410 else stable_390;
 
   stable_410 = generic {
-    version = "410.66";
-    sha256_64bit = "05xjzvj0fgmkpz36dbd7hy2vzl6xxiflzx7kml3k7ad9gy2svdlg";
-    settingsSha256 = "1nsxz1byshgjs3c03lyx6ya36dp0f2vg2l0d9pkh1i6cpzkp53kz";
-    persistencedSha256 = "0m4wdpb8w4y323d8py105p9hizwmf2ai8frkl7h77sn3ski17zw6";
+    version = "410.73";
+    sha256_64bit = "07pzq8rvbsx3v8rgz98amyw0k1mn5mkygpd1q5gfn6r0h7vrrg5y";
+    settingsSha256 = "19xc10b0c074wb9fv9n04dvmi8hrwl6srvvyrjfyj92gch49x6hw";
+    persistencedSha256 = "0vhr7pysv4vk7v96yima0i9zsvvgxaxihjzxlfifpsdki57n2jz7";
   };
 
   # Last one supporting x86
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 2a17a0a2875f..1d45109ac852 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, intltool, gperf, libcap, kmod
+{ stdenv, lib, fetchFromGitHub, fetchpatch, fetchurl, pkgconfig, intltool, gperf, libcap, kmod
 , xz, pam, acl, libuuid, m4, utillinux, libffi
 , glib, kbd, libxslt, coreutils, libgcrypt, libgpgerror, libidn2, libapparmor
 , audit, lz4, bzip2, libmicrohttpd, pcre2
@@ -18,7 +18,7 @@ let
   pythonLxmlEnv = buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]);
 
 in stdenv.mkDerivation rec {
-  version = "239.20181031";
+  version = "239";
   name = "systemd-${version}";
 
   # When updating, use https://github.com/systemd/systemd-stable tree, not the development one!
@@ -26,10 +26,26 @@ in stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "NixOS";
     repo = "systemd";
-    rev = "nixos-v${version}";
-    sha256 = "1rzl0iqrpa4ajvama5k3cb3yc7893c55kzcxkl3cyavpdzsw5505";
+    rev = "31859ddd35fc3fa82a583744caa836d356c31d7f";
+    sha256 = "1xci0491j95vdjgs397n618zii3sgwnvanirkblqqw6bcvcjvir1";
   };
 
+  prePatch = let
+      # Upstream's maintenance branches are still too intrusive:
+      # https://github.com/systemd/systemd-stable/tree/v239-stable
+      patches-deb = fetchurl {
+        # When the URL disappears, it typically means that Debian has new patches
+        # (probably security) and updating to new tarball will apply them as well.
+        name = "systemd-debian-patches.tar.xz";
+        url = mirror://debian/pool/main/s/systemd/systemd_239-11~bpo9+1.debian.tar.xz;
+        sha256 = "136f6p4jbi4z94mf4g099dfcacwka8jwhza0wxxw2q5l5q3xiysh";
+      };
+      # Note that we skip debian-specific patches, i.e. ./debian/patches/debian/*
+    in ''
+      tar xf ${patches-deb}
+      patches="$patches $(cat debian/patches/series | grep -v '^debian/' | sed 's|^|debian/patches/|')"
+    '';
+
   outputs = [ "out" "lib" "man" "dev" ];
 
   nativeBuildInputs =
@@ -91,7 +107,6 @@ in stdenv.mkDerivation rec {
     "-Dsulogin-path=${utillinux}/bin/sulogin"
     "-Dmount-path=${utillinux}/bin/mount"
     "-Dumount-path=${utillinux}/bin/umount"
-    "-Ddns-over-tls=false"
   ];
 
   preConfigure = ''
diff --git a/pkgs/servers/search/solr/default.nix b/pkgs/servers/search/solr/default.nix
index 0326784b2ac8..04e85212f3cd 100644
--- a/pkgs/servers/search/solr/default.nix
+++ b/pkgs/servers/search/solr/default.nix
@@ -1,20 +1,27 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, jre, makeWrapper }:
 
 stdenv.mkDerivation rec {
   name = "solr-${version}";
-  version = "4.10.3";
+  version = "7.5.0";
 
   src = fetchurl {
     url = "mirror://apache/lucene/solr/${version}/solr-${version}.tgz";
-    sha256 = "1dp269jka4q62qhv47j91wsrsnbxfn23lsx6qcycbijrlyh28w5c";
+    sha256 = "1g6f58j2pzb73phj4hfri9mj7vmql72by7w3xrbq1pbnqgzxmhpa";
   };
 
-  phases = [ "unpackPhase" "installPhase" ];
+  nativeBuildInputs = [ makeWrapper ];
 
   installPhase = ''
-    mkdir -p $out/lib
-    cp dist/${name}.war $out/lib/solr.war
-    cp -r example/lib/ext $out/lib/ext
+    mkdir -p $out $out/bin
+
+    cp -r bin/solr bin/post $out/bin/
+    cp -r contrib $out/
+    cp -r dist $out/
+    cp -r example $out/
+    cp -r server $out/
+
+    wrapProgram $out/bin/solr --set JAVA_HOME "${jre}"
+    wrapProgram $out/bin/post --set JAVA_HOME "${jre}"
   '';
 
   meta = with stdenv.lib; {
@@ -22,7 +29,7 @@ stdenv.mkDerivation rec {
     description = "Open source enterprise search platform from the Apache Lucene project";
     license = licenses.asl20;
     platforms = platforms.all;
-    maintainers = [ maintainers.rickynils maintainers.domenkozar ];
+    maintainers = [ maintainers.rickynils maintainers.domenkozar maintainers.aanderse ];
   };
 
 }
diff --git a/pkgs/servers/sql/postgresql/pg_hll/default.nix b/pkgs/servers/sql/postgresql/pg_hll/default.nix
index 6c453f6a40c3..f91a8b1bf252 100644
--- a/pkgs/servers/sql/postgresql/pg_hll/default.nix
+++ b/pkgs/servers/sql/postgresql/pg_hll/default.nix
@@ -2,15 +2,15 @@
 
 stdenv.mkDerivation rec {
   name = "pg_hll-${version}";
-  version = "2.10.2-${builtins.substring 0 7 src.rev}";
+  version = "2.12";
 
   buildInputs = [ postgresql ];
 
   src = fetchFromGitHub {
     owner  = "citusdata";
     repo   = "postgresql-hll";
-    rev    = "9af41684d479a3097bab87d04936702c9e6baf5c";
-    sha256 = "044x9v9kjhxb0idqb9f5i7c3yygxxsqliswl4kspqy9f9qcblckl";
+    rev    = "refs/tags/v${version}";
+    sha256 = "1jdc9gjqc3dkjxv855q1p594j0awhrrymrcqnl5vw5vx2ny3bpgn";
   };
 
   installPhase = ''
diff --git a/pkgs/servers/sql/postgresql/pg_repack/default.nix b/pkgs/servers/sql/postgresql/pg_repack/default.nix
index a50605bd0409..14f71b1e2b3b 100644
--- a/pkgs/servers/sql/postgresql/pg_repack/default.nix
+++ b/pkgs/servers/sql/postgresql/pg_repack/default.nix
@@ -1,35 +1,35 @@
 { stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
 
 stdenv.mkDerivation rec {
-    name = "pg_repack-${version}";
-    version = "1.4.4";
+  name = "pg_repack-${version}";
+  version = "1.4.4";
 
-    buildInputs = [ postgresql openssl zlib readline ];
+  buildInputs = [ postgresql openssl zlib readline ];
 
-    src = fetchFromGitHub {
-      owner  = "reorg";
-      repo   = "pg_repack";
-      rev    = "refs/tags/ver_${version}";
-      sha256 = "0ynsmsxfkcp82ccpz2nrgg8wiil8yxqigvw6425lx8v80h5lszbw";
-    };
+  src = fetchFromGitHub {
+    owner  = "reorg";
+    repo   = "pg_repack";
+    rev    = "refs/tags/ver_${version}";
+    sha256 = "0ynsmsxfkcp82ccpz2nrgg8wiil8yxqigvw6425lx8v80h5lszbw";
+  };
 
-    installPhase = ''
-      install -D bin/pg_repack -t $out/bin/
-      install -D lib/pg_repack.so -t $out/lib/
-      install -D lib/{pg_repack--${version}.sql,pg_repack.control} -t $out/share/extension
-    '';
+  installPhase = ''
+    install -D bin/pg_repack -t $out/bin/
+    install -D lib/pg_repack.so -t $out/lib/
+    install -D lib/{pg_repack--${version}.sql,pg_repack.control} -t $out/share/extension
+  '';
 
-    meta = with stdenv.lib; {
-      description = "Reorganize tables in PostgreSQL databases with minimal locks";
-      longDescription = ''
-        pg_repack is a PostgreSQL extension which lets you remove bloat from tables and indexes, and optionally restore
-        the physical order of clustered indexes. Unlike CLUSTER and VACUUM FULL it works online, without holding an
-        exclusive lock on the processed tables during processing. pg_repack is efficient to boot,
-        with performance comparable to using CLUSTER directly.
-      '';
-      license = licenses.bsd3;
-      maintainers = with maintainers; [ danbst ];
-      inherit (postgresql.meta) platforms;
-      inherit (src.meta) homepage;
-    };
+  meta = with stdenv.lib; {
+    description = "Reorganize tables in PostgreSQL databases with minimal locks";
+    longDescription = ''
+      pg_repack is a PostgreSQL extension which lets you remove bloat from tables and indexes, and optionally restore
+      the physical order of clustered indexes. Unlike CLUSTER and VACUUM FULL it works online, without holding an
+      exclusive lock on the processed tables during processing. pg_repack is efficient to boot,
+      with performance comparable to using CLUSTER directly.
+    '';
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ danbst ];
+    inherit (postgresql.meta) platforms;
+    inherit (src.meta) homepage;
+  };
 }
diff --git a/pkgs/servers/sql/postgresql/plv8/default.nix b/pkgs/servers/sql/postgresql/plv8/default.nix
index 009f65b9d81c..dae3b2fd1af1 100644
--- a/pkgs/servers/sql/postgresql/plv8/default.nix
+++ b/pkgs/servers/sql/postgresql/plv8/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   name = "plv8-${version}";
-  version = "2.1.0";
+  version = "2.3.8";
 
   nativeBuildInputs = [ perl ];
   buildInputs = [ v8 postgresql ];
@@ -11,16 +11,20 @@ stdenv.mkDerivation rec {
     owner = "plv8";
     repo = "plv8";
     rev = "v${version}";
-    sha256 = "1sfpxz0zcbinn6822j12lkwgrw9kfacrs83ic968rm489rl9w241";
+    sha256 = "0hrmn1zzzdf52zwldg6axv57p0f3b279l9s8lbpijcv60fqrzx16";
   };
 
+  makeFlags = [ "--makefile=Makefile.shared" ];
+
   preConfigure = ''
-    substituteInPlace Makefile --replace '-lv8_libplatform' '-lv8_libplatform -lv8_libbase'
+    patchShebangs ./generate_upgrade.sh
   '';
 
+  buildPhase = "make -f Makefile.shared all";
+
   installPhase = ''
     mkdir -p $out/bin
-    install -D plv8.so                                         -t $out/lib
+    install -D plv8*.so                                        -t $out/lib
     install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/extension
   '';
 
diff --git a/pkgs/servers/sql/postgresql/timescaledb/default.nix b/pkgs/servers/sql/postgresql/timescaledb/default.nix
index fab515035ce6..3c53054ba7de 100644
--- a/pkgs/servers/sql/postgresql/timescaledb/default.nix
+++ b/pkgs/servers/sql/postgresql/timescaledb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, postgresql }:
+{ stdenv, fetchFromGitHub, cmake, postgresql, openssl }:
 
 # # To enable on NixOS:
 # config.services.postgresql = {
@@ -8,16 +8,16 @@
 
 stdenv.mkDerivation rec {
   name = "timescaledb-${version}";
-  version = "0.11.0";
+  version = "1.0.0";
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = [ postgresql ];
+  buildInputs = [ postgresql openssl ];
 
   src = fetchFromGitHub {
     owner  = "timescale";
     repo   = "timescaledb";
     rev    = "refs/tags/${version}";
-    sha256 = "06xysf45r0c2sjfl6vgdbrm7pn7nxx2n0k29bm88q0ipyyp9fr0v";
+    sha256 = "1359jc0dw8q3f0iipqfadzs8lvri9qa5w59ziz00x1d09ppw2q40";
   };
 
   # Fix the install phase which tries to install into the pgsql extension dir,
@@ -46,6 +46,6 @@ stdenv.mkDerivation rec {
     homepage    = https://www.timescale.com/;
     maintainers = with maintainers; [ volth ];
     platforms   = platforms.linux;
-    license     = licenses.postgresql;
+    license     = licenses.asl20;
   };
 }
diff --git a/pkgs/servers/sql/postgresql/topn/default.nix b/pkgs/servers/sql/postgresql/topn/default.nix
index 6886c80cf50d..dae30aadabd0 100644
--- a/pkgs/servers/sql/postgresql/topn/default.nix
+++ b/pkgs/servers/sql/postgresql/topn/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   name = "pg_topn-${version}";
-  version = "2.0.2";
+  version = "2.2.0";
 
   nativeBuildInputs = [ protobufc ];
   buildInputs = [ postgresql ];
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     owner  = "citusdata";
     repo   = "postgresql-topn";
     rev    = "refs/tags/v${version}";
-    sha256 = "00hc3hgnqv9xaalizbcvprb7s55sydj2qgk3rhgrdlwg2g025h62";
+    sha256 = "1i5fn517mdvzfhlcj7fh4z0iniynanshcn7kzhsq19sgci0g31fr";
   };
 
   installPhase = ''
diff --git a/pkgs/servers/sql/postgresql/tsearch_extras/default.nix b/pkgs/servers/sql/postgresql/tsearch_extras/default.nix
index 5140ae1a228f..b43a9c51be0c 100644
--- a/pkgs/servers/sql/postgresql/tsearch_extras/default.nix
+++ b/pkgs/servers/sql/postgresql/tsearch_extras/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "tsearch-extras-${version}";
-  version = "0.3";
+  version = "0.4";
 
   src = fetchFromGitHub {
-    owner = "zulip";
-    repo = "tsearch_extras";
-    rev = version;
-    sha256 = "0i3i99lw80jwd4xflgdqabxmn1dnm1gm7dzf1mqv2drllxcy3yix";
+    owner  = "zulip";
+    repo   = "tsearch_extras";
+    rev    = "84e78f00931c4ef261d98197d6b5d94fc141f742"; # no release tag?
+    sha256 = "18j0saqblg3jhrz38splk173xjwdf32c67ymm18m8n5y94h8d2ba";
   };
 
   nativenativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/shells/zsh/zsh-git-prompt/default.nix b/pkgs/shells/zsh/zsh-git-prompt/default.nix
index 7318da83d176..761ad071da95 100644
--- a/pkgs/shells/zsh/zsh-git-prompt/default.nix
+++ b/pkgs/shells/zsh/zsh-git-prompt/default.nix
@@ -29,10 +29,10 @@
 , python
 , git
 , lib
-, ghcVersion ? "ghc802"
+, haskellPackages
 }:
 
-haskell.packages.${ghcVersion}.callPackage
+haskellPackages.callPackage
   ({ mkDerivation, base, HUnit, parsec, process, QuickCheck, stdenv }:
    mkDerivation rec {
      pname = "zsh-git-prompt";
diff --git a/pkgs/tools/misc/jdupes/default.nix b/pkgs/tools/misc/jdupes/default.nix
index 991066690ee4..0df351bdd560 100644
--- a/pkgs/tools/misc/jdupes/default.nix
+++ b/pkgs/tools/misc/jdupes/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "jdupes-${version}";
-  version = "1.10.4";
+  version = "1.11";
 
   src = fetchFromGitHub {
     owner = "jbruchon";
     repo  = "jdupes";
     rev   = "v${version}";
-    sha256 = "03a2jxv634xy5qwjrk784k3y3pd8f94pndf5m84yg2y7i8dvppnk";
+    sha256 = "124n9vgnqqhnwgnms7dqmndp25xrcjaykxrzbi4v4as98kxxi3j1";
     # Unicode file names lead to different checksums on HFS+ vs. other
     # filesystems because of unicode normalisation. The testdir
     # directories have such files and will be removed.
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index d647840fc18d..9709ad871041 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11699,7 +11699,9 @@ with pkgs;
   pgroonga = callPackage ../servers/sql/postgresql/pgroonga {};
 
   plv8 = callPackage ../servers/sql/postgresql/plv8 {
-    v8 = v8_6_x;
+    v8 = callPackage ../development/libraries/v8/plv8_6_x.nix {
+      inherit (python2Packages) python;
+    };
   };
 
   phonon = callPackage ../development/libraries/phonon {};
@@ -14212,14 +14214,6 @@ with pkgs;
 
   klibcShrunk = lowPrio (callPackage ../os-specific/linux/klibc/shrunk.nix { });
 
-  linux_beagleboard = callPackage ../os-specific/linux/kernel/linux-beagleboard.nix {
-    kernelPatches =
-      [ kernelPatches.bridge_stp_helper
-        kernelPatches.cpu-cgroup-v2."4.11"
-        kernelPatches.modinst_arg_list_too_long
-      ];
-  };
-
   linux_mptcp = linux_mptcp_94;
   linux_mptcp_94 = callPackage ../os-specific/linux/kernel/linux-mptcp.nix {
     kernelPatches =
@@ -14331,17 +14325,6 @@ with pkgs;
     ];
   };
 
-  linux_samus_4_12 = callPackage ../os-specific/linux/kernel/linux-samus-4.12.nix {
-    kernelPatches =
-      [ kernelPatches.bridge_stp_helper
-        kernelPatches.p9_fixes
-        # See pkgs/os-specific/linux/kernel/cpu-cgroup-v2-patches/README.md
-        # when adding a new linux version
-        kernelPatches.cpu-cgroup-v2."4.11"
-        kernelPatches.modinst_arg_list_too_long
-      ];
-  };
-
   linux_hardkernel_4_14 = callPackage ../os-specific/linux/kernel/linux-hardkernel-4.14.nix {
     kernelPatches = [
       kernelPatches.bridge_stp_helper
@@ -14510,7 +14493,6 @@ with pkgs;
   linux_latest = linuxPackages_latest.kernel;
 
   # Build the kernel modules for the some of the kernels.
-  linuxPackages_beagleboard = linuxPackagesFor pkgs.linux_beagleboard;
   linuxPackages_mptcp = linuxPackagesFor pkgs.linux_mptcp;
   linuxPackages_rpi = linuxPackagesFor pkgs.linux_rpi;
   linuxPackages_4_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_4);
@@ -14570,11 +14552,6 @@ with pkgs;
 
   linuxPackages_latest_xen_dom0_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; }));
 
-  # Samus kernels
-  linuxPackages_samus_4_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_samus_4_12);
-  linuxPackages_samus_latest = linuxPackages_samus_4_12;
-  linux_samus_latest = linuxPackages_samus_latest.kernel;
-
   # Hardkernel (Odroid) kernels.
   linuxPackages_hardkernel_4_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_hardkernel_4_14);
   linuxPackages_hardkernel_latest = linuxPackages_hardkernel_4_14;
@@ -17249,6 +17226,8 @@ with pkgs;
 
   slack-cli = callPackage ../tools/networking/slack-cli { };
 
+  slack-term = callPackage ../applications/networking/instant-messengers/slack-term { };
+
   singularity = callPackage ../applications/virtualization/singularity { };
 
   spectmorph = callPackage ../applications/audio/spectmorph { };
@@ -18765,6 +18744,10 @@ with pkgs;
   rstudio = libsForQt5.callPackage ../applications/editors/rstudio {
     boost = boost166;
   };
+  rstudio-preview = libsForQt5.callPackage ../applications/editors/rstudio/preview.nix {
+    boost = boost166;
+    llvmPackages = llvmPackages_7;
+  };
 
   rsync = callPackage ../applications/networking/sync/rsync {
     enableACLs = !(stdenv.isDarwin || stdenv.isSunOS || stdenv.isFreeBSD);
@@ -21373,13 +21356,14 @@ with pkgs;
   boogie = dotnetPackages.Boogie;
 
   inherit (callPackage ./coq-packages.nix {
-    inherit (ocaml-ng) ocamlPackages_4_02
-                       ocamlPackages_4_05
-    ;
+    inherit (ocaml-ng) ocamlPackages_4_05;
   }) mkCoqPackages
-    coq_8_5 coq_8_6 coq_8_7 coq_8_8
-    coqPackages_8_5 coqPackages_8_6 coqPackages_8_7 coqPackages_8_8
-    coqPackages coq
+    coqPackages_8_5  coq_8_5
+    coqPackages_8_6  coq_8_6
+    coqPackages_8_7  coq_8_7
+    coqPackages_8_8  coq_8_8
+    coqPackages_8_9  coq_8_9
+    coqPackages      coq
   ;
 
   coq2html = callPackage ../applications/science/logic/coq2html {
diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix
index a4f44b6fc6f7..3ba90f3b5943 100644
--- a/pkgs/top-level/coq-packages.nix
+++ b/pkgs/top-level/coq-packages.nix
@@ -1,8 +1,4 @@
-{ lib, callPackage, newScope, recurseIntoAttrs
-, gnumake3
-, ocamlPackages_4_02
-, ocamlPackages_4_05
-}:
+{ lib, callPackage, newScope, recurseIntoAttrs, ocamlPackages_4_05 }:
 
 let
   mkCoqPackages' = self: coq:
@@ -70,11 +66,15 @@ in rec {
   coq_8_8 = callPackage ../applications/science/logic/coq {
     version = "8.8.2";
   };
+  coq_8_9 = callPackage ../applications/science/logic/coq {
+    version = "8.9+beta1";
+  };
 
   coqPackages_8_5 = mkCoqPackages coq_8_5;
   coqPackages_8_6 = mkCoqPackages coq_8_6;
   coqPackages_8_7 = mkCoqPackages coq_8_7;
   coqPackages_8_8 = mkCoqPackages coq_8_8;
+  coqPackages_8_9 = mkCoqPackages coq_8_9;
   coqPackages = coqPackages_8_8;
   coq = coqPackages.coq;
 
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index dea3ba954253..13250ea8814b 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -8,8 +8,6 @@ let
     "ghc7103Binary"
     "ghc821Binary"
     "ghcjs"
-    "ghcjs710"
-    "ghcjs80"
     "ghcjs82"
     "ghcjs84"
     "integer-simple"
@@ -47,28 +45,12 @@ in {
     ghc7103Binary = callPackage ../development/compilers/ghc/7.10.3-binary.nix { };
     ghc821Binary = callPackage ../development/compilers/ghc/8.2.1-binary.nix { };
 
-    ghc7103 = callPackage ../development/compilers/ghc/7.10.3.nix {
-      bootPkgs = packages.ghc7103Binary;
-      buildLlvmPackages = buildPackages.llvmPackages_35;
-      llvmPackages = pkgs.llvmPackages_35;
-    };
-    ghc802 = callPackage ../development/compilers/ghc/8.0.2.nix {
-      bootPkgs = packages.ghc7103Binary;
-      inherit (buildPackages.python27Packages) sphinx;
-      buildLlvmPackages = buildPackages.llvmPackages_37;
-      llvmPackages = pkgs.llvmPackages_37;
-    };
     ghc822 = callPackage ../development/compilers/ghc/8.2.2.nix {
       bootPkgs = packages.ghc821Binary;
       inherit (buildPackages.python3Packages) sphinx;
       buildLlvmPackages = buildPackages.llvmPackages_39;
       llvmPackages = pkgs.llvmPackages_39;
     };
-    ghc843 = callPackage ../development/compilers/ghc/8.4.3.nix {
-      bootPkgs = packages.ghc821Binary;
-      buildLlvmPackages = buildPackages.llvmPackages_5;
-      llvmPackages = pkgs.llvmPackages_5;
-    };
     ghc844 = callPackage ../development/compilers/ghc/8.4.4.nix {
       bootPkgs = packages.ghc821Binary;
       buildLlvmPackages = buildPackages.llvmPackages_5;
@@ -85,18 +67,6 @@ in {
       llvmPackages = pkgs.llvmPackages_5;
     };
     ghcjs = compiler.ghcjs84;
-    # Use `import` because `callPackage inside`.
-    ghcjs710 = import ../development/compilers/ghcjs/7.10 {
-      bootPkgs = packages.ghc7103;
-      inherit (pkgs) cabal-install;
-      inherit (buildPackages) fetchgit fetchFromGitHub;
-    };
-    # `import` on purpose; see above.
-    ghcjs80 = import ../development/compilers/ghcjs/8.0 {
-      bootPkgs = packages.ghc802;
-      inherit (pkgs) cabal-install;
-      inherit (buildPackages) fetchgit fetchFromGitHub;
-    };
     ghcjs82 = callPackage ../development/compilers/ghcjs-ng {
       bootPkgs = packages.ghc822;
       ghcjsSrcJson = ../development/compilers/ghcjs-ng/8.2/git.json;
@@ -126,22 +96,12 @@ in {
   # Always get compilers from `buildPackages`
   packages = let bh = buildPackages.haskell; in {
 
-    ghc7103 = callPackage ../development/haskell-modules {
-      buildHaskellPackages = bh.packages.ghc7103;
-      ghc = bh.compiler.ghc7103;
-      compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { };
-    };
     ghc7103Binary = callPackage ../development/haskell-modules {
       buildHaskellPackages = bh.packages.ghc7103Binary;
       ghc = bh.compiler.ghc7103Binary;
       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { };
       packageSetConfig = bootstrapPackageSet;
     };
-    ghc802 = callPackage ../development/haskell-modules {
-      buildHaskellPackages = bh.packages.ghc802;
-      ghc = bh.compiler.ghc802;
-      compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.0.x.nix { };
-    };
     ghc821Binary = callPackage ../development/haskell-modules {
       buildHaskellPackages = bh.packages.ghc821Binary;
       ghc = bh.compiler.ghc821Binary;
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index cc608eacb1a2..41631a7dba28 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -662,6 +662,8 @@ in {
 
   spglib = callPackage ../development/python-modules/spglib { };
 
+  sslib = callPackage ../development/python-modules/sslib { };
+
   statistics = callPackage ../development/python-modules/statistics { };
 
   sumo = callPackage ../development/python-modules/sumo { };
diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix
index 6cf0cb57be4f..058182392e9b 100644
--- a/pkgs/top-level/release-cross.nix
+++ b/pkgs/top-level/release-cross.nix
@@ -30,7 +30,7 @@ let
     buildPackages.gcc = nativePlatforms;
     coreutils = nativePlatforms;
     haskell.packages.ghcHEAD.hello = nativePlatforms;
-    haskell.packages.ghc822.hello = nativePlatforms;
+    haskell.packages.ghc844.hello = nativePlatforms;
   };
 
   linuxCommon = lib.recursiveUpdate gnuCommon {