diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv
index 0f3db834fc2..f5998f010d8 100644
--- a/maintainers/scripts/luarocks-packages.csv
+++ b/maintainers/scripts/luarocks-packages.csv
@@ -1,7 +1,6 @@
ansicolors,
argparse,
basexx,
-cqueues
dkjson
fifo
inspect
diff --git a/nixos/doc/manual/configuration/wireless.xml b/nixos/doc/manual/configuration/wireless.xml
index f7e99ff0e35..dda2193dd93 100644
--- a/nixos/doc/manual/configuration/wireless.xml
+++ b/nixos/doc/manual/configuration/wireless.xml
@@ -36,8 +36,25 @@
- If you are using WPA2 the wpa_passphrase tool might be
- useful to generate the wpa_supplicant.conf.
+ If you are using WPA2 you can generate pskRaw key using
+ wpa_passphrase:
+
+$ wpa_passphrase ESSID PSK
+network={
+ ssid="echelon"
+ #psk="abcdefgh"
+ psk=dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435
+}
+
+
+ = {
+ echelon = {
+ pskRaw = "dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435";
+ };
+}
+
+ or you can use it to directly generate the
+ wpa_supplicant.conf:
# wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf
After you have edited the wpa_supplicant.conf, you need to
diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml
index 8e94f946c5e..f4f8d470f80 100644
--- a/nixos/doc/manual/installation/installing.xml
+++ b/nixos/doc/manual/installation/installing.xml
@@ -377,6 +377,10 @@
option can be set to true to automatically add them to
the grub menu.
+
+ If you need to configure networking for your machine the configuration
+ options are described in .
+
Another critical option is , specifying the
file systems that need to be mounted by NixOS. However, you typically
diff --git a/nixos/doc/manual/release-notes/rl-1903.xml b/nixos/doc/manual/release-notes/rl-1903.xml
index 267bd9d0470..bccd6bce4ed 100644
--- a/nixos/doc/manual/release-notes/rl-1903.xml
+++ b/nixos/doc/manual/release-notes/rl-1903.xml
@@ -677,6 +677,9 @@
This may break some older applications that still rely on those symbols.
An upgrade guide can be found here.
+
+ The nginx package now relies on OpenSSL 1.1 and supports TLS 1.3 by default. You can set the protocols used by the nginx service using .
+
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 2ddc38d6c24..5b95fc8ecc3 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -189,6 +189,7 @@
./services/backup/duplicati.nix
./services/backup/crashplan.nix
./services/backup/crashplan-small-business.nix
+ ./services/backup/duplicity.nix
./services/backup/mysql-backup.nix
./services/backup/postgresql-backup.nix
./services/backup/restic.nix
diff --git a/nixos/modules/services/backup/duplicity.nix b/nixos/modules/services/backup/duplicity.nix
new file mode 100644
index 00000000000..a8d56424862
--- /dev/null
+++ b/nixos/modules/services/backup/duplicity.nix
@@ -0,0 +1,141 @@
+{ config, lib, pkgs, ...}:
+
+with lib;
+
+let
+ cfg = config.services.duplicity;
+
+ stateDirectory = "/var/lib/duplicity";
+
+ localTarget = if hasPrefix "file://" cfg.targetUrl
+ then removePrefix "file://" cfg.targetUrl else null;
+
+in {
+ options.services.duplicity = {
+ enable = mkEnableOption "backups with duplicity";
+
+ root = mkOption {
+ type = types.path;
+ default = "/";
+ description = ''
+ Root directory to backup.
+ '';
+ };
+
+ include = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ example = [ "/home" ];
+ description = ''
+ List of paths to include into the backups. See the FILE SELECTION
+ section in duplicity
+ 1 for details on the syntax.
+ '';
+ };
+
+ exclude = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ List of paths to exclude from backups. See the FILE SELECTION section in
+ duplicity
+ 1 for details on the syntax.
+ '';
+ };
+
+ targetUrl = mkOption {
+ type = types.str;
+ example = "s3://host:port/prefix";
+ description = ''
+ Target url to backup to. See the URL FORMAT section in
+ duplicity
+ 1 for supported urls.
+ '';
+ };
+
+ secretFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ Path of a file containing secrets (gpg passphrase, access key...) in
+ the format of EnvironmentFile as described by
+ systemd.exec
+ 5. For example:
+
+ PASSPHRASE=...
+ AWS_ACCESS_KEY_ID=...
+ AWS_SECRET_ACCESS_KEY=...
+
+ '';
+ };
+
+ frequency = mkOption {
+ type = types.nullOr types.str;
+ default = "daily";
+ description = ''
+ Run duplicity with the given frequency (see
+ systemd.time
+ 7 for the format).
+ If null, do not run automatically.
+ '';
+ };
+
+ extraFlags = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ example = [ "--full-if-older-than" "1M" ];
+ description = ''
+ Extra command-line flags passed to duplicity. See
+ duplicity
+ 1.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd = {
+ services.duplicity = {
+ description = "backup files with duplicity";
+
+ environment.HOME = stateDirectory;
+
+ serviceConfig = {
+ ExecStart = ''
+ ${pkgs.duplicity}/bin/duplicity ${escapeShellArgs (
+ [
+ cfg.root
+ cfg.targetUrl
+ "--archive-dir" stateDirectory
+ ]
+ ++ concatMap (p: [ "--include" p ]) cfg.include
+ ++ concatMap (p: [ "--exclude" p ]) cfg.exclude
+ ++ cfg.extraFlags)}
+ '';
+ PrivateTmp = true;
+ ProtectSystem = "strict";
+ ProtectHome = "read-only";
+ StateDirectory = baseNameOf stateDirectory;
+ } // optionalAttrs (localTarget != null) {
+ ReadWritePaths = localTarget;
+ } // optionalAttrs (cfg.secretFile != null) {
+ EnvironmentFile = cfg.secretFile;
+ };
+ } // optionalAttrs (cfg.frequency != null) {
+ startAt = cfg.frequency;
+ };
+
+ tmpfiles.rules = optional (localTarget != null) "d ${localTarget} 0700 root root -";
+ };
+
+ assertions = singleton {
+ # Duplicity will fail if the last file selection option is an include. It
+ # is not always possible to detect but this simple case can be caught.
+ assertion = cfg.include != [] -> cfg.exclude != [] || cfg.extraFlags != [];
+ message = ''
+ Duplicity will fail if you only specify included paths ("Because the
+ default is to include all files, the expression is redundant. Exiting
+ because this probably isn't what you meant.")
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix
index 98e9c8953c8..c38138d7c97 100644
--- a/nixos/modules/services/misc/redmine.nix
+++ b/nixos/modules/services/misc/redmine.nix
@@ -234,10 +234,33 @@ in
environment.systemPackages = [ cfg.package ];
+ # create symlinks for the basic directory layout the redmine package expects
+ systemd.tmpfiles.rules = [
+ "d '${cfg.stateDir}' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.stateDir}/cache' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.stateDir}/config' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.stateDir}/files' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.stateDir}/log' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.stateDir}/plugins' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.stateDir}/public' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.stateDir}/public/plugin_assets' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.stateDir}/public/themes' 0750 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.stateDir}/tmp' 0750 ${cfg.user} ${cfg.group} - -"
+
+ "d /run/redmine - - - - -"
+ "d /run/redmine/public - - - - -"
+ "L+ /run/redmine/config - - - - ${cfg.stateDir}/config"
+ "L+ /run/redmine/files - - - - ${cfg.stateDir}/files"
+ "L+ /run/redmine/log - - - - ${cfg.stateDir}/log"
+ "L+ /run/redmine/plugins - - - - ${cfg.stateDir}/plugins"
+ "L+ /run/redmine/public/plugin_assets - - - - ${cfg.stateDir}/public/plugin_assets"
+ "L+ /run/redmine/public/themes - - - - ${cfg.stateDir}/public/themes"
+ "L+ /run/redmine/tmp - - - - ${cfg.stateDir}/tmp"
+ ];
+
systemd.services.redmine = {
after = [ "network.target" (if cfg.database.type == "mysql2" then "mysql.service" else "postgresql.service") ];
wantedBy = [ "multi-user.target" ];
- environment.HOME = "${cfg.package}/share/redmine";
environment.RAILS_ENV = "production";
environment.RAILS_CACHE = "${cfg.stateDir}/cache";
environment.REDMINE_LANG = "en";
@@ -252,28 +275,16 @@ in
subversion
];
preStart = ''
- # ensure cache directory exists for db:migrate command
- mkdir -p "${cfg.stateDir}/cache"
-
- # create the basic directory layout the redmine package expects
- mkdir -p /run/redmine/public
-
- for i in config files log plugins tmp; do
- mkdir -p "${cfg.stateDir}/$i"
- ln -fs "${cfg.stateDir}/$i" /run/redmine/
- done
-
- for i in plugin_assets themes; do
- mkdir -p "${cfg.stateDir}/public/$i"
- ln -fs "${cfg.stateDir}/public/$i" /run/redmine/public/
- done
-
+ rm -rf "${cfg.stateDir}/plugins/"*
+ rm -rf "${cfg.stateDir}/public/themes/"*
# start with a fresh config directory
# the config directory is copied instead of linked as some mutable data is stored in there
- rm -rf "${cfg.stateDir}/config/"*
+ find "${cfg.stateDir}/config" ! -name "secret_token.rb" -type f -exec rm -f {} +
cp -r ${cfg.package}/share/redmine/config.dist/* "${cfg.stateDir}/config/"
+ chmod -R u+w "${cfg.stateDir}/config"
+
# link in the application configuration
ln -fs ${configurationYml} "${cfg.stateDir}/config/configuration.yml"
@@ -282,7 +293,6 @@ in
# link in all user specified themes
- rm -rf "${cfg.stateDir}/public/themes/"*
for theme in ${concatStringsSep " " (mapAttrsToList unpackTheme cfg.themes)}; do
ln -fs $theme/* "${cfg.stateDir}/public/themes"
done
@@ -292,16 +302,11 @@ in
# link in all user specified plugins
- rm -rf "${cfg.stateDir}/plugins/"*
for plugin in ${concatStringsSep " " (mapAttrsToList unpackPlugin cfg.plugins)}; do
ln -fs $plugin/* "${cfg.stateDir}/plugins/''${plugin##*-redmine-plugin-}"
done
- # ensure correct permissions for most files
- chmod -R ug+rwX,o-rwx+x "${cfg.stateDir}/"
-
-
# handle database.passwordFile & permissions
DBPASS=$(head -n1 ${cfg.database.passwordFile})
cp -f ${databaseYml} "${cfg.stateDir}/config/database.yml"
@@ -315,25 +320,13 @@ in
chmod 440 "${cfg.stateDir}/config/initializers/secret_token.rb"
fi
-
- # ensure everything is owned by ${cfg.user}
- chown -R ${cfg.user}:${cfg.group} "${cfg.stateDir}"
-
-
# execute redmine required commands prior to starting the application
- # NOTE: su required in case using mysql socket authentication
- /run/wrappers/bin/su -s ${pkgs.bash}/bin/bash -m -l redmine -c '${bundle} exec rake db:migrate'
- /run/wrappers/bin/su -s ${pkgs.bash}/bin/bash -m -l redmine -c '${bundle} exec rake redmine:plugins:migrate'
- /run/wrappers/bin/su -s ${pkgs.bash}/bin/bash -m -l redmine -c '${bundle} exec rake redmine:load_default_data'
-
-
- # log files don't exist until after first command has been executed
- # correct ownership of files generated by calling exec rake ...
- chown -R ${cfg.user}:${cfg.group} "${cfg.stateDir}/log"
+ ${bundle} exec rake db:migrate
+ ${bundle} exec rake redmine:plugins:migrate
+ ${bundle} exec rake redmine:load_default_data
'';
serviceConfig = {
- PermissionsStartOnly = true; # preStart must be run as root
Type = "simple";
User = cfg.user;
Group = cfg.group;
@@ -348,7 +341,6 @@ in
{ name = "redmine";
group = cfg.group;
home = cfg.stateDir;
- createHome = true;
uid = config.ids.uids.redmine;
});
diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix
index 332dc541345..9974cbd89d1 100644
--- a/nixos/modules/services/networking/mosquitto.nix
+++ b/nixos/modules/services/networking/mosquitto.nix
@@ -17,7 +17,6 @@ let
'';
mosquittoConf = pkgs.writeText "mosquitto.conf" ''
- pid_file /run/mosquitto/pid
acl_file ${aclFile}
persistence true
allow_anonymous ${boolToString cfg.allowAnonymous}
@@ -196,15 +195,15 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
- Type = "forking";
+ Type = "notify";
+ NotifyAccess = "main";
User = "mosquitto";
Group = "mosquitto";
RuntimeDirectory = "mosquitto";
WorkingDirectory = cfg.dataDir;
Restart = "on-failure";
- ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf} -d";
+ ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
- PIDFile = "/run/mosquitto/pid";
};
preStart = ''
rm -f ${cfg.dataDir}/passwd
@@ -214,7 +213,7 @@ in
if c.hashedPassword != null then
"echo '${n}:${c.hashedPassword}' >> ${cfg.dataDir}/passwd"
else optionalString (c.password != null)
- "${pkgs.mosquitto}/bin/mosquitto_passwd -b ${cfg.dataDir}/passwd ${n} ${c.password}"
+ "${pkgs.mosquitto}/bin/mosquitto_passwd -b ${cfg.dataDir}/passwd ${n} '${c.password}'"
) cfg.users);
};
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index f688bec1426..8474926d179 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -491,8 +491,8 @@ in
sslProtocols = mkOption {
type = types.str;
- default = "TLSv1.2";
- example = "TLSv1 TLSv1.1 TLSv1.2";
+ default = "TLSv1.2 TLSv1.3";
+ example = "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3";
description = "Allowed TLS protocol versions.";
};
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index d84ab3ced6f..c4d5b6a9cde 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -61,7 +61,9 @@ let
'';
description = ''
Extra lines to append to the Monitor section
- verbatim.
+ verbatim. Available options are documented in the MONITOR section in
+ xorg.conf
+ 5.
'';
};
};
@@ -633,7 +635,7 @@ in
environment.pathsToLink = [ "/share/X11" ];
- xdg = {
+ xdg = {
autostart.enable = true;
menus.enable = true;
mime.enable = true;
diff --git a/pkgs/applications/altcoins/clightning.nix b/pkgs/applications/altcoins/clightning.nix
index 38b49fcb1c3..5f81dc76ecf 100644
--- a/pkgs/applications/altcoins/clightning.nix
+++ b/pkgs/applications/altcoins/clightning.nix
@@ -1,37 +1,37 @@
{ stdenv, python3, pkgconfig, which, libtool, autoconf, automake,
- autogen, sqlite, gmp, zlib, fetchzip }:
+ autogen, sqlite, gmp, zlib, fetchurl, unzip, fetchpatch }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "clightning-${version}";
- version = "0.6.3";
+ version = "0.7.0";
- src = fetchzip {
- #
- # NOTE 0.6.3 release zip was bugged, this zip is a fix provided by the team
- # https://github.com/ElementsProject/lightning/issues/2254#issuecomment-453791475
- #
- # replace url with:
- # https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip
- # for future relases
- #
- url = "https://github.com/ElementsProject/lightning/files/2752675/clightning-v0.6.3.zip";
- sha256 = "0k5pwimwn69pcakiq4a7qnjyf4i8w1jlacwrjazm1sfivr6nfiv6";
+ src = fetchurl {
+ url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
+ sha256 = "448022c2433cbf19bbd0f726344b0500c0c21ee5cc2291edf6b622f094cb3a15";
};
enableParallelBuilding = true;
- nativeBuildInputs = [ autoconf autogen automake libtool pkgconfig which ];
+ nativeBuildInputs = [ autoconf autogen automake libtool pkgconfig which unzip ];
buildInputs = [ sqlite gmp zlib python3 ];
makeFlags = [ "prefix=$(out) VERSION=v${version}" ];
+ patches = [
+ # remove after 0.7.0
+ (fetchpatch {
+ name = "fix-0.7.0-build.patch";
+ url = "https://github.com/ElementsProject/lightning/commit/ffc03d2bc84dc42f745959fbb6c8007cf0a6f701.patch";
+ sha256 = "1m5fiz3m8k3nk09nldii8ij94bg6fqllqgdbiwj3sy12vihs8c4v";
+ })
+ ];
+
configurePhase = ''
./configure --prefix=$out --disable-developer --disable-valgrind
'';
postPatch = ''
- echo "" > tools/refresh-submodules.sh
patchShebangs tools/generate-wire.py
'';
diff --git a/pkgs/applications/altcoins/wownero.nix b/pkgs/applications/altcoins/wownero.nix
index fdf2c739ac6..6de12b09934 100644
--- a/pkgs/applications/altcoins/wownero.nix
+++ b/pkgs/applications/altcoins/wownero.nix
@@ -11,12 +11,12 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "wownero-${version}";
- version = "0.5.0.0";
+ version = "0.5.0.2";
src = fetchFromGitHub {
owner = "wownero";
repo = "wownero";
rev = "v${version}";
- sha256 = "1dy9ycabva2z0896al1k2avl9xppkxvm1p2jwmg509ahjl98k3sy";
+ sha256 = "120cfkl2q8qgl3ajxfkkri9bxlnvmr1mhb1wvcigch1lqyflff1w";
};
nativeBuildInputs = [ cmake pkgconfig git ];
diff --git a/pkgs/applications/audio/bs1770gain/default.nix b/pkgs/applications/audio/bs1770gain/default.nix
index 44296d3c8b9..adda9235364 100644
--- a/pkgs/applications/audio/bs1770gain/default.nix
+++ b/pkgs/applications/audio/bs1770gain/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "bs1770gain-${version}";
- version = "0.5.1";
+ version = "0.5.2";
src = fetchurl {
url = "mirror://sourceforge/bs1770gain/${name}.tar.gz";
- sha256 = "0r4fbajgfmnwgl63hcm56f1j8m5f135q6j5jkzdvrrhpcj39yx06";
+ sha256 = "1p6yz5q7czyf9ard65sp4kawdlkg40cfscr3b24znymmhs3p7rbk";
};
buildInputs = [ ffmpeg sox ];
diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix
index 6c68c705b02..ed471f04d0c 100644
--- a/pkgs/applications/editors/android-studio/default.nix
+++ b/pkgs/applications/editors/android-studio/default.nix
@@ -8,9 +8,9 @@ let
inherit (gnome2) GConf gnome_vfs;
};
stableVersion = {
- version = "3.3.1.0"; # "Android Studio 3.3.1"
- build = "182.5264788";
- sha256Hash = "0fghqkc8pkb7waxclm0qq4nlnsvmv9d3fcj5nnvgbfkjyw032q42";
+ version = "3.3.2.0"; # "Android Studio 3.3.2"
+ build = "182.5314842";
+ sha256Hash = "0smh3d3v8n0isxg7fkls20622gp52f58i2b6wa4a0g8wnvmd6mw2";
};
betaVersion = {
version = "3.4.0.14"; # "Android Studio 3.4 Beta 5"
diff --git a/pkgs/applications/editors/emacs/default.nix b/pkgs/applications/editors/emacs/default.nix
index 6f56ba6cf49..2f7a4233656 100644
--- a/pkgs/applications/editors/emacs/default.nix
+++ b/pkgs/applications/editors/emacs/default.nix
@@ -10,6 +10,7 @@
, withXwidgets ? false, webkitgtk ? null, wrapGAppsHook ? null, glib-networking ? null
, withCsrc ? true
, srcRepo ? false, autoconf ? null, automake ? null, texinfo ? null
+, siteStart ? ./site-start.el
}:
assert (libXft != null) -> libpng != null; # probably a bug
@@ -100,7 +101,7 @@ stdenv.mkDerivation rec {
postInstall = ''
mkdir -p $out/share/emacs/site-lisp
- cp ${./site-start.el} $out/share/emacs/site-lisp/site-start.el
+ cp ${siteStart} $out/share/emacs/site-lisp/site-start.el
$out/bin/emacs --batch -f batch-byte-compile $out/share/emacs/site-lisp/site-start.el
rm -rf $out/var
diff --git a/pkgs/applications/editors/featherpad/default.nix b/pkgs/applications/editors/featherpad/default.nix
index b1e26910f1f..89e10ea25fa 100644
--- a/pkgs/applications/editors/featherpad/default.nix
+++ b/pkgs/applications/editors/featherpad/default.nix
@@ -3,13 +3,13 @@
with qt5;
stdenv.mkDerivation rec {
- version = "0.9.2";
+ version = "0.9.4";
name = "featherpad-${version}";
src = fetchFromGitHub {
owner = "tsujan";
repo = "FeatherPad";
rev = "V${version}";
- sha256 = "1kpv8x3m4hiz7q9k7qadgbrys5nyzm7v5mhjyk22hawnp98m9x4q";
+ sha256 = "18zna6rx2qyiplr44wrkvr4avk9yy2l1s23fy3d7ql9f1fq12z3w";
};
nativeBuildInputs = [ qmake pkgconfig qttools ];
buildInputs = [ qtbase qtsvg qtx11extras ];
diff --git a/pkgs/applications/misc/cherrytree/default.nix b/pkgs/applications/misc/cherrytree/default.nix
index 78059191c2c..0578393dfca 100644
--- a/pkgs/applications/misc/cherrytree/default.nix
+++ b/pkgs/applications/misc/cherrytree/default.nix
@@ -4,11 +4,11 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "cherrytree-${version}";
- version = "0.38.7";
+ version = "0.38.8";
src = fetchurl {
url = "https://www.giuspen.com/software/${name}.tar.xz";
- sha256 = "1ls7vz993hj5gd99imlrzahxznfg6fa4n77ikkj79va4csw9b892";
+ sha256 = "1ns87xl2sgrf3nha4xkhp0xcxlycqszlp6xdrn95lg6vzm0fa8dg";
};
buildInputs = with pythonPackages;
diff --git a/pkgs/applications/misc/filet/default.nix b/pkgs/applications/misc/filet/default.nix
new file mode 100644
index 00000000000..1e41cf4dd56
--- /dev/null
+++ b/pkgs/applications/misc/filet/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+ pname = "filet";
+ version = "0.1.0";
+
+ src = fetchFromGitHub {
+ owner = "buffet";
+ repo = "filet";
+ rev = version;
+ sha256 = "0f73c4ipc13c7f4xzi3z103kvxpsw9chdfbvk0ahc60clkxy21k3";
+ };
+
+ makeFlags = [ "PREFIX=$(out)" ];
+
+ meta = with stdenv.lib; {
+ description = "A fucking fucking fast file fucker (afffff)";
+ homepage = https://github.com/buffet/filet;
+ license = licenses.mpl20;
+ platforms = platforms.all;
+ maintainers = with maintainers; [ buffet ];
+ };
+}
diff --git a/pkgs/applications/misc/hyper/default.nix b/pkgs/applications/misc/hyper/default.nix
index 04c3e0320f6..2fd7e2f94af 100644
--- a/pkgs/applications/misc/hyper/default.nix
+++ b/pkgs/applications/misc/hyper/default.nix
@@ -11,11 +11,11 @@ let
];
in
stdenv.mkDerivation rec {
- version = "2.1.1";
+ version = "2.1.2";
name = "hyper-${version}";
src = fetchurl {
url = "https://github.com/zeit/hyper/releases/download/${version}/hyper_${version}_amd64.deb";
- sha256 = "1vr4j2vb2wpn8qzgq30l8kfck2an03jwchwywyx4zsl2vz3qp70x";
+ sha256 = "1n4qlbk7q9zkhhg72mdks95g15xgyrc6ixf882ghvrqghd4zxplm";
};
buildInputs = [ dpkg ];
unpackPhase = ''
diff --git a/pkgs/applications/misc/udiskie/default.nix b/pkgs/applications/misc/udiskie/default.nix
index 1eb65098fd5..459104aba63 100644
--- a/pkgs/applications/misc/udiskie/default.nix
+++ b/pkgs/applications/misc/udiskie/default.nix
@@ -1,14 +1,11 @@
{ stdenv, fetchFromGitHub, asciidoc-full, gettext
, gobject-introspection, gtk3, hicolor-icon-theme, libappindicator-gtk3, libnotify, librsvg
, udisks2, wrapGAppsHook
-, buildPythonApplication
-, docopt
-, pygobject3
-, pyyaml
+, python3Packages
}:
-buildPythonApplication rec {
- name = "udiskie-${version}";
+python3Packages.buildPythonApplication rec {
+ pname = "udiskie";
version = "1.7.7";
src = fetchFromGitHub {
@@ -18,16 +15,27 @@ buildPythonApplication rec {
sha256 = "1j17z26vy44il2s9zgchvhq280vq8ag64ddi35f35b444wz2azlb";
};
- buildInputs = [
+ nativeBuildInputs = [
+ gettext
asciidoc-full # For building man page.
- hicolor-icon-theme
+ gobject-introspection
wrapGAppsHook
- librsvg # required for loading svg icons (udiskie uses svg icons)
];
- propagatedBuildInputs = [
- gettext gobject-introspection gtk3 libnotify docopt
- pygobject3 pyyaml udisks2 libappindicator-gtk3
+ buildInputs = [
+ hicolor-icon-theme
+ librsvg # required for loading svg icons (udiskie uses svg icons)
+ gobject-introspection
+ libnotify
+ gtk3
+ udisks2
+ libappindicator-gtk3
+ ];
+
+ propagatedBuildInputs = with python3Packages; [
+ docopt
+ pygobject3
+ pyyaml
];
postBuild = "make -C doc";
@@ -37,8 +45,14 @@ buildPythonApplication rec {
cp -v doc/udiskie.8 $out/share/man/man8/
'';
- # tests require dbusmock
- doCheck = false;
+ checkInputs = with python3Packages; [
+ nose
+ keyutils
+ ];
+
+ checkPhase = ''
+ nosetests
+ '';
meta = with stdenv.lib; {
description = "Removable disk automounter for udisks";
diff --git a/pkgs/applications/networking/cluster/cni/plugins.nix b/pkgs/applications/networking/cluster/cni/plugins.nix
index 27e0a038310..6d50c598de7 100644
--- a/pkgs/applications/networking/cluster/cni/plugins.nix
+++ b/pkgs/applications/networking/cluster/cni/plugins.nix
@@ -13,10 +13,9 @@ stdenv.mkDerivation rec {
buildInputs = [ removeReferencesTo go ];
- GOCACHE = "off";
-
buildPhase = ''
patchShebangs build.sh
+ export "GOCACHE=$TMPDIR/go-cache"
./build.sh
'';
diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix
index a9d8faf62b5..45c8dcf9800 100644
--- a/pkgs/applications/networking/cluster/terraform/default.nix
+++ b/pkgs/applications/networking/cluster/terraform/default.nix
@@ -97,8 +97,8 @@ in rec {
terraform_0_11-full = terraform_0_11.full;
terraform_0_12 = pluggable (generic {
- version = "0.12.0-alpha4";
- sha256 = "16cwqxxb19m91d7rx7awri1awz7d8cfnrv0rbql9rbg5qjyqxcp9";
+ version = "0.12.0-beta1";
+ sha256 = "0djakf2agbhpfqis4x0lf2i8s1ahvrdyfkcgr6lzp0nsks652rcm";
patches = [ ./provider-path.patch ];
passthru = { inherit plugins; };
});
diff --git a/pkgs/applications/networking/instant-messengers/spectral/default.nix b/pkgs/applications/networking/instant-messengers/spectral/default.nix
index 5dd8bf5f69a..aff3cf82dc9 100644
--- a/pkgs/applications/networking/instant-messengers/spectral/default.nix
+++ b/pkgs/applications/networking/instant-messengers/spectral/default.nix
@@ -1,26 +1,42 @@
{ stdenv, fetchgit
-, pkgconfig
+, pkgconfig, makeWrapper
, qmake, qtbase, qtquickcontrols2, qtmultimedia
, libpulseaudio
# Not mentioned but seems needed
, qtgraphicaleffects
-# Unsure but needed by similar
-, qtdeclarative, qtsvg
+, qtdeclarative
}:
-stdenv.mkDerivation rec {
- name = "spectral-${version}";
- version = "2018-09-24";
+let
+ # Following "borrowed" from yubikey-manager-qt
+ qmlPath = qmlLib: "${qmlLib}/${qtbase.qtQmlPrefix}";
+
+ inherit (stdenv) lib;
+
+ qml2ImportPath = lib.concatMapStringsSep ":" qmlPath [
+ qtbase.bin qtdeclarative.bin qtquickcontrols2.bin qtgraphicaleffects qtmultimedia
+ ];
+
+in stdenv.mkDerivation rec {
+ pname = "spectral";
+ version = "2019-03-03";
src = fetchgit {
url = "https://gitlab.com/b0/spectral.git";
- rev = "c9d1d6887722860a52b597a0f74d0ce39c8622e1";
- sha256 = "1ym8jlqls4lcq5rd81vxw1dni79fc6ph00ip8nsydl6i16fngl4c";
+ rev = "0473f25d38a064ee4e18203ec16eeae84fea4866";
+ sha256 = "1n09ginw6g0p42xj3zgxm52dvyyvj5psllv70vx21i50lvkbh9rw";
fetchSubmodules = true;
};
- nativeBuildInputs = [ pkgconfig qmake ];
- buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative qtsvg ]
+ qmakeFlags = [ "CONFIG+=qtquickcompiler" "BUNDLE_FONT=true" ];
+
+ postInstall = ''
+ wrapProgram $out/bin/spectral \
+ --set QML2_IMPORT_PATH "${qml2ImportPath}"
+ '';
+
+ nativeBuildInputs = [ pkgconfig qmake makeWrapper ];
+ buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ]
++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio;
meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/ipget/default.nix b/pkgs/applications/networking/ipget/default.nix
index 23c9d7df812..45835248d0d 100644
--- a/pkgs/applications/networking/ipget/default.nix
+++ b/pkgs/applications/networking/ipget/default.nix
@@ -2,25 +2,25 @@
buildGoPackage rec {
name = "ipget-${version}";
- version = "0.2.5";
+ version = "0.3.2";
rev = "v${version}";
goPackagePath = "github.com/ipfs/ipget";
-
+
extraSrcPaths = [
(fetchgx {
inherit name src;
- sha256 = "1d4w8zl5mcppn3d4bl7qdkiqlf8gi3z2a62nygx17bqpa3da8cf3";
+ sha256 = "07l9hpkhk5phr95zp1l5wd3ii38bw91hy4dlw2rsfbzcsc8bq4s8";
})
];
-
+
goDeps = ../../../tools/package-management/gx/deps.nix;
src = fetchFromGitHub {
owner = "ipfs";
repo = "ipget";
inherit rev;
- sha256 = "0a8yxqhl469ipiznrgkp3yi1xz3xzcbpx60wabqppq8hccrdiybk";
+ sha256 = "1ljf5ddvc1p5swmgn4m1ivfj74fykk56myk2r9c4grdjzksf4a15";
};
meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix
index 2d008492050..d4e624e6ad5 100644
--- a/pkgs/applications/networking/mumble/default.nix
+++ b/pkgs/applications/networking/mumble/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, pkgconfig
+{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, makeWrapper, pkgconfig
, qt4, qmake4Hook, qt5, avahi, boost, libopus, libsndfile, protobuf, speex, libcap
, alsaLib, python
, jackSupport ? false, libjack2 ? null
@@ -154,5 +154,12 @@ in {
murmur = server stableSource;
murmur_git = (server gitSource).overrideAttrs (old: {
meta = old.meta // { broken = iceSupport; };
+
+ nativeBuildInputs = old.nativeBuildInputs or [] ++ [ makeWrapper ];
+
+ installPhase = old.installPhase or "" + ''
+ wrapProgram $out/bin/murmurd --suffix QT_PLUGIN_PATH : \
+ ${getBin qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}
+ '';
});
}
diff --git a/pkgs/applications/radio/fldigi/default.nix b/pkgs/applications/radio/fldigi/default.nix
index ad5b120b788..3d5ca845503 100644
--- a/pkgs/applications/radio/fldigi/default.nix
+++ b/pkgs/applications/radio/fldigi/default.nix
@@ -2,12 +2,12 @@
libsamplerate, libpulseaudio, libXinerama, gettext, pkgconfig, alsaLib }:
stdenv.mkDerivation rec {
- version = "4.1.00";
+ version = "4.1.01";
pname = "fldigi";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
- sha256 = "1hm2n4p3pdd029kizgzwf3zzgsy1m6z83z7rr2kyjhrq2vp5gf0s";
+ sha256 = "1pznq18rv8q7qflpnnk6wvbwfqvhvyx1a77jlp3kzjh19pjaqldy";
};
buildInputs = [ libXinerama gettext hamlib fltk13 libjpeg libpng portaudio
diff --git a/pkgs/applications/science/biology/igv/default.nix b/pkgs/applications/science/biology/igv/default.nix
index 19ba508d758..95dc2b612e2 100644
--- a/pkgs/applications/science/biology/igv/default.nix
+++ b/pkgs/applications/science/biology/igv/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "igv-${version}";
- version = "2.4.17";
+ version = "2.4.19";
src = fetchurl {
url = "https://data.broadinstitute.org/igv/projects/downloads/2.4/IGV_${version}.zip";
- sha256 = "02zl0r1yhyllh000cad6pjk0ic0xm6l05jzkglsf8wdz17nh15nr";
+ sha256 = "048dgrhxcb854d24kyjkqz12bw04bsv49i5jawb75yzkswwfkb0z";
};
buildInputs = [ unzip jre ];
diff --git a/pkgs/applications/science/biology/star/default.nix b/pkgs/applications/science/biology/star/default.nix
index 4d1d60469f0..eb62a8c331f 100644
--- a/pkgs/applications/science/biology/star/default.nix
+++ b/pkgs/applications/science/biology/star/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "star-${version}";
- version = "2.7.0a";
+ version = "2.7.0c";
src = fetchFromGitHub {
repo = "STAR";
owner = "alexdobin";
rev = version;
- sha256 = "1yx28gra6gqdx1ps5y8mpdinsn8r0dhsc2m3gcvjfrk71i9yhd6l";
+ sha256 = "0r5jcckr45f71jwhz8xazi1w6kfhszq3y6r7f6zl9963ms1q1gfv";
};
sourceRoot = "source/source";
diff --git a/pkgs/applications/science/electronics/gtkwave/default.nix b/pkgs/applications/science/electronics/gtkwave/default.nix
index e2ac4c4b44c..7d9d7a662f2 100644
--- a/pkgs/applications/science/electronics/gtkwave/default.nix
+++ b/pkgs/applications/science/electronics/gtkwave/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "gtkwave-${version}";
- version = "3.3.98";
+ version = "3.3.99";
src = fetchurl {
url = "mirror://sourceforge/gtkwave/${name}.tar.gz";
- sha256 = "1xi2b9yck8fagnjhnhhwrhz5rfvrs2h2m6m64m210m5xnfzbp9pg";
+ sha256 = "0lc4y2vizrbxldjk5yw2i4y7pyprjdjqx3iafzjfnin694zp2630";
};
nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/science/math/form/default.nix b/pkgs/applications/science/math/form/default.nix
index 88f2367e334..23ab2184266 100644
--- a/pkgs/applications/science/math/form/default.nix
+++ b/pkgs/applications/science/math/form/default.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, gmp, zlib }:
stdenv.mkDerivation rec {
- version = "4.2.0";
+ version = "4.2.1";
name = "form-${version}";
# This tarball is released by author, it is not downloaded from tag, so can't use fetchFromGitHub
src = fetchurl {
- url = "https://github.com/vermaseren/form/releases/download/v4.2.0/form-4.2.0.tar.gz";
- sha256 = "19528aphn4hvm151lyyhd7wz0bp2s3rla8jv6s7d8jwfp5ljzysm";
+ url = "https://github.com/vermaseren/form/releases/download/v4.2.1/form-4.2.1.tar.gz";
+ sha256 = "0a0smc10gm85vxd85942n5azy88w5qs5avbqrw0lw0yb9injswpj";
};
buildInputs = [ gmp zlib ];
diff --git a/pkgs/applications/science/math/sage/patches/ignore-pip-deprecation.patch b/pkgs/applications/science/math/sage/patches/ignore-pip-deprecation.patch
new file mode 100644
index 00000000000..95b377dc955
--- /dev/null
+++ b/pkgs/applications/science/math/sage/patches/ignore-pip-deprecation.patch
@@ -0,0 +1,22 @@
+diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
+index 689e5a23b9..4e16fe3a8d 100644
+--- a/src/sage/misc/package.py
++++ b/src/sage/misc/package.py
+@@ -142,9 +142,14 @@ def pip_installed_packages():
+ sage: d['beautifulsoup'] # optional - beautifulsoup
+ u'...'
+ """
+- proc = subprocess.Popen(["pip", "list", "--no-index", "--format", "json"], stdout=subprocess.PIPE)
+- stdout = proc.communicate()[0].decode()
+- return {package['name'].lower():package['version'] for package in json.loads(stdout)}
++ with open(os.devnull, 'w') as devnull:
++ proc = subprocess.Popen(
++ ["pip", "list", "--no-index", "--format", "json"],
++ stdout=subprocess.PIPE,
++ stderr=devnull,
++ )
++ stdout = proc.communicate()[0].decode()
++ return {package['name'].lower():package['version'] for package in json.loads(stdout)}
+
+ def list_packages(*pkg_types, **opts):
+ r"""
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index 7302b5e337d..83459021687 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -112,6 +112,9 @@ stdenv.mkDerivation rec {
url = "https://git.sagemath.org/sage.git/patch?id=a05b6b038e1571ab15464e98f76d1927c0c3fd12";
sha256 = "05yq97pq84xi60wb1p9skrad5h5x770gq98ll4frr7hvvmlwsf58";
})
+
+ # https://trac.sagemath.org/ticket/27405
+ ./patches/ignore-pip-deprecation.patch
];
patches = nixPatches ++ packageUpgradePatches;
diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix
index 814eef9560e..d7f9cb9ee32 100644
--- a/pkgs/applications/science/math/sage/sagelib.nix
+++ b/pkgs/applications/science/math/sage/sagelib.nix
@@ -65,11 +65,13 @@ buildPythonPackage rec {
perl
jupyter_core
pkg-config
+ pip # needed to query installed packages
];
buildInputs = [
gd
readline
+ iml
];
propagatedBuildInputs = [
diff --git a/pkgs/applications/science/misc/simgrid/default.nix b/pkgs/applications/science/misc/simgrid/default.nix
index 258073e4080..0b663b2fb63 100644
--- a/pkgs/applications/science/misc/simgrid/default.nix
+++ b/pkgs/applications/science/misc/simgrid/default.nix
@@ -104,7 +104,7 @@ stdenv.mkDerivation rec {
scheduling on distributed computing platforms ranging from simple
network of workstations to Computational Grids.
'';
- homepage = http://simgrid.gforge.inria.fr/;
+ homepage = https://simgrid.org/;
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ mickours ];
platforms = ["x86_64-linux"];
diff --git a/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix b/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix
index fb85bb7da46..211685c8edb 100644
--- a/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "git-secrets-${version}";
- version = "1.2.1";
+ version = "1.3.0";
src = fetchFromGitHub {
owner = "awslabs";
repo = "git-secrets";
rev = "${version}";
- sha256 = "14jsm4ks3k5d9iq3jr23829izw040pqpmv7dz8fhmvx6qz8fybzg";
+ sha256 = "10lnxg0q855zi3d6804ivlrn6dc817kilzdh05mmz8a0ccvm2qc7";
};
nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix b/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix
index 895e1e13bec..b9423ccb328 100644
--- a/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix
+++ b/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
buildInputs = [ ruby bundler go ];
+ GOCACHE="$TMPDIR/go-cache";
+
patches = [ ./remove-hardcoded-locations.patch ];
installPhase = ''
diff --git a/pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix b/pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix
index ad3b11f3b2c..c49bbe9ccef 100644
--- a/pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix
+++ b/pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ git go ];
- makeFlags = [ "PREFIX=$(out)" "VERSION=${version}" ];
+ makeFlags = [ "PREFIX=$(out)" "VERSION=${version}" "GOCACHE=$(TMPDIR)/go-cache" ];
meta = with stdenv.lib; {
homepage = http://www.gitlab.com/;
diff --git a/pkgs/applications/version-management/gogs/default.nix b/pkgs/applications/version-management/gogs/default.nix
index 56e41136896..0b63a8f2198 100644
--- a/pkgs/applications/version-management/gogs/default.nix
+++ b/pkgs/applications/version-management/gogs/default.nix
@@ -7,13 +7,13 @@ with stdenv.lib;
buildGoPackage rec {
name = "gogs-${version}";
- version = "0.11.66";
+ version = "0.11.86";
src = fetchFromGitHub {
owner = "gogs";
repo = "gogs";
rev = "v${version}";
- sha256 = "1b9ilk4xlsllsj5pzmxwsz4a1zvgd06a8mi9ni9hbvmfl3w8xf28";
+ sha256 = "0l8mwy0cyy3cdxqinf8ydb35kf7c8pj09xrhpr7rr7lldnvczabw";
};
patches = [ ./static-root-path.patch ];
diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix
index e7c8a302c27..d4ba9568fed 100644
--- a/pkgs/applications/virtualization/docker/default.nix
+++ b/pkgs/applications/virtualization/docker/default.nix
@@ -100,6 +100,7 @@ rec {
export AUTO_GOPATH=1
export DOCKER_GITCOMMIT="${rev}"
export VERSION="${version}"
+ export GOCACHE="$TMPDIR/go-cache"
./hack/make.sh dynbinary
cd -
'') + ''
diff --git a/pkgs/applications/virtualization/rkt/default.nix b/pkgs/applications/virtualization/rkt/default.nix
index 777dc6fe930..42aad06d0c0 100644
--- a/pkgs/applications/virtualization/rkt/default.nix
+++ b/pkgs/applications/virtualization/rkt/default.nix
@@ -48,6 +48,7 @@ in stdenv.mkDerivation rec {
preBuild = ''
export BUILDDIR
+ export GOCACHE="$TMPDIR/go-cache"
'';
installPhase = ''
diff --git a/pkgs/applications/virtualization/x11docker/default.nix b/pkgs/applications/virtualization/x11docker/default.nix
index 8e248061cd5..94682893d51 100644
--- a/pkgs/applications/virtualization/x11docker/default.nix
+++ b/pkgs/applications/virtualization/x11docker/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchFromGitHub, makeWrapper, nx-libs, xorg }:
stdenv.mkDerivation rec {
name = "x11docker-${version}";
- version = "5.4.1";
+ version = "5.4.4";
src = fetchFromGitHub {
owner = "mviereck";
repo = "x11docker";
rev = "v${version}";
- sha256 = "0fcdr8i3crf4cina41h030q2jf5zvafll97iff129dl3sb27jnvi";
+ sha256 = "1p45dyd1zfjxlawsy190q71hwl083f90ryaslslhxsadsi9m64dq";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ nx-libs xorg.xhost xorg.xinit ];
diff --git a/pkgs/applications/window-managers/sway/beta.nix b/pkgs/applications/window-managers/sway/beta.nix
index a887016782e..83c8e9328ca 100644
--- a/pkgs/applications/window-managers/sway/beta.nix
+++ b/pkgs/applications/window-managers/sway/beta.nix
@@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "sway";
- version = "1.0-rc4";
+ version = "1.0-rc5";
src = fetchFromGitHub {
owner = "swaywm";
repo = "sway";
rev = version;
- sha256 = "1f0mvf48dvsivdd850r1gd2h90cbn62qflwiff6x2addn868bvxa";
+ sha256 = "1jkacibmxy9rpq5mxnq7bkwcy0c592zk4vf20j5qbbljp9h7c87i";
};
postPatch = ''
diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix
index e161daffbd3..dfdd5b60851 100644
--- a/pkgs/build-support/emacs/wrapper.nix
+++ b/pkgs/build-support/emacs/wrapper.nix
@@ -121,21 +121,25 @@ stdenv.mkDerivation {
siteStart="$out/share/emacs/site-lisp/site-start.el"
siteStartByteCompiled="$siteStart"c
+ subdirs="$out/share/emacs/site-lisp/subdirs.el"
+ subdirsByteCompiled="$subdirs"c
- # A dependency may have brought the original siteStart, delete it and
- # create our own
+ # A dependency may have brought the original siteStart or subdirs, delete
+ # it and create our own
# Begin the new site-start.el by loading the original, which sets some
# NixOS-specific paths. Paths are searched in the reverse of the order
# they are specified in, so user and system profile paths are searched last.
- rm -f $siteStart $siteStartByteCompiled
+ rm -f $siteStart $siteStartByteCompiled $subdirs $subdirsByteCompiled
cat >"$siteStart" < misc/cgo/testplugin/test.bash
+ '' + optionalString stdenv.isDarwin ''
+ substituteInPlace src/race.bash --replace \
+ "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
+ sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
+ sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
+ sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
+
+ sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
+ sed -i '/TestCredentialNoSetGroups/areturn' src/os/exec/exec_posix_test.go
+ sed -i '/TestRead0/areturn' src/os/os_test.go
+ sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
+
+ sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
+ sed -i '/TestBuildDashIInstallsDependencies/areturn' src/cmd/go/go_test.go
+
+ sed -i '/TestDisasmExtld/areturn' src/cmd/objdump/objdump_test.go
+
+ sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
+
+ # TestCurrent fails because Current is not implemented on Darwin
+ sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go
+ sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go
+
+ touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
+ '';
+
+ patches = [
+ ./remove-tools-1.11.patch
+ ./remove-test-pie.patch
+ ./creds-test.patch
+ ./go-1.9-skip-flaky-19608.patch
+ ./go-1.9-skip-flaky-20072.patch
+ ./skip-external-network-tests.patch
+ ./skip-nohup-tests.patch
+ # breaks under load: https://github.com/golang/go/issues/25628
+ ./skip-test-extra-files-on-386.patch
+ ];
+
+ postPatch = ''
+ find . -name '*.orig' -exec rm {} ';'
+ '' + optionalString stdenv.isDarwin ''
+ echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
+ substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
+ '';
+
+ GOOS = stdenv.targetPlatform.parsed.kernel.name;
+ GOARCH = goarch stdenv.targetPlatform;
+ # GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
+ # Go will nevertheless build a for host system that we will copy over in
+ # the install phase.
+ GOHOSTOS = stdenv.buildPlatform.parsed.kernel.name;
+ GOHOSTARCH = goarch stdenv.buildPlatform;
+
+ # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those
+ # to be different from CC/CXX
+ CC_FOR_TARGET = if (stdenv.hostPlatform != stdenv.targetPlatform) then
+ "${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc"
+ else if (stdenv.buildPlatform != stdenv.targetPlatform) then
+ "${stdenv.cc.targetPrefix}cc"
+ else
+ null;
+ CXX_FOR_TARGET = if (stdenv.hostPlatform != stdenv.targetPlatform) then
+ "${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}c++"
+ else if (stdenv.buildPlatform != stdenv.targetPlatform) then
+ "${stdenv.cc.targetPrefix}c++"
+ else
+ null;
+
+ GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
+ GO386 = 387; # from Arch: don't assume sse2 on i686
+ CGO_ENABLED = 1;
+ # Hopefully avoids test timeouts on Hydra
+ GO_TEST_TIMEOUT_SCALE = 3;
+
+ # Indicate that we are running on build infrastructure
+ # Some tests assume things like home directories and users exists
+ GO_BUILDER_NAME = "nix";
+
+ GOROOT_BOOTSTRAP="${goBootstrap}/share/go";
+
+ postConfigure = ''
+ export GOCACHE=$TMPDIR/go-cache
+ # this is compiled into the binary
+ export GOROOT_FINAL=$out/share/go
+
+ export PATH=$(pwd)/bin:$PATH
+
+ # Independent from host/target, CC should produce code for the building system.
+ export CC=${buildPackages.stdenv.cc}/bin/cc
+ ulimit -a
+ '';
+
+ postBuild = ''
+ (cd src && ./make.bash)
+ '';
+
+ doCheck = stdenv.hostPlatform == stdenv.targetPlatform;
+
+ checkPhase = ''
+ runHook preCheck
+ (cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild)
+ runHook postCheck
+ '';
+
+ preInstall = ''
+ rm -r pkg/{bootstrap,obj}
+ # Contains the wrong perl shebang when cross compiling,
+ # since it is not used for anything we can deleted as well.
+ rm src/regexp/syntax/make_perl_groups.pl
+ '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then ''
+ mv bin/*_*/* bin
+ rmdir bin/*_*
+ ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
+ rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH}
+ ''}
+ '' else if (stdenv.hostPlatform != stdenv.targetPlatform) then ''
+ rm -rf bin/*_*
+ ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
+ rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH}
+ ''}
+ '' else "");
+
+ installPhase = ''
+ runHook preInstall
+ mkdir -p $GOROOT_FINAL
+ cp -a bin pkg src lib misc api doc $GOROOT_FINAL
+ ln -s $GOROOT_FINAL/bin $out/bin
+ runHook postInstall
+ '';
+
+ setupHook = ./setup-hook.sh;
+
+ disallowedReferences = [ goBootstrap ];
+
+ meta = with stdenv.lib; {
+ branch = "1.12";
+ homepage = http://golang.org/;
+ description = "The Go Programming language";
+ license = licenses.bsd3;
+ maintainers = with maintainers; [ cstrahan orivej velovix mic92 ];
+ platforms = platforms.linux ++ platforms.darwin;
+ };
+}
diff --git a/pkgs/development/compilers/llvm/8/bintools.nix b/pkgs/development/compilers/llvm/8/bintools.nix
new file mode 100644
index 00000000000..72a2a733193
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/bintools.nix
@@ -0,0 +1,19 @@
+{ runCommand, stdenv, llvm, lld, version }:
+
+let
+ prefix =
+ if stdenv.hostPlatform != stdenv.targetPlatform
+ then "${stdenv.targetPlatform.config}-"
+ else "";
+in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
+ mkdir -p $out/bin
+ for prog in ${lld}/bin/*; do
+ ln -s $prog $out/bin/${prefix}$(basename $prog)
+ done
+ for prog in ${llvm}/bin/*; do
+ ln -s $prog $out/bin/${prefix}$(echo $(basename $prog) | sed -e "s|llvm-||")
+ ln -sf $prog $out/bin/${prefix}$(basename $prog)
+ done
+ rm -f $out/bin/${prefix}cat
+ ln -s ${lld}/bin/lld $out/bin/${prefix}ld
+''
diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix
new file mode 100644
index 00000000000..ad630094261
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/clang/default.nix
@@ -0,0 +1,112 @@
+{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python
+, fixDarwinDylibNames
+, enableManpages ? false
+, enablePolly ? false # TODO: get this info from llvm (passthru?)
+}:
+
+let
+ self = stdenv.mkDerivation ({
+ name = "clang-${version}";
+
+ unpackPhase = ''
+ unpackFile ${fetch "cfe" "0z5si83w0i3l445c7624204mxsv82naps96icnv7v20s6njbsbsi"}
+ mv cfe-${version}* clang
+ sourceRoot=$PWD/clang
+ unpackFile ${clang-tools-extra_src}
+ mv clang-tools-extra-* $sourceRoot/tools/extra
+ '';
+
+ nativeBuildInputs = [ cmake python ]
+ ++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
+
+ buildInputs = [ libxml2 llvm ]
+ ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+ cmakeFlags = [
+ "-DCMAKE_CXX_FLAGS=-std=c++11"
+ ] ++ stdenv.lib.optionals enableManpages [
+ "-DCLANG_INCLUDE_DOCS=ON"
+ "-DLLVM_ENABLE_SPHINX=ON"
+ "-DSPHINX_OUTPUT_MAN=ON"
+ "-DSPHINX_OUTPUT_HTML=OFF"
+ "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+ ] ++ stdenv.lib.optionals enablePolly [
+ "-DWITH_POLLY=ON"
+ "-DLINK_POLLY_INTO_TOOLS=ON"
+ ];
+
+ patches = [ ./purity.patch ];
+
+ postPatch = ''
+ sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+ -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+ lib/Driver/ToolChains/*.cpp
+
+ # Patch for standalone doc building
+ sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
+ '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+ sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+ '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+ substituteInPlace tools/extra/clangd/CMakeLists.txt \
+ --replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE
+ '';
+
+ outputs = [ "out" "lib" "python" ];
+
+ # Clang expects to find LLVMgold in its own prefix
+ postInstall = ''
+ if [ -e ${llvm}/lib/LLVMgold.so ]; then
+ ln -sv ${llvm}/lib/LLVMgold.so $out/lib
+ fi
+
+ ln -sv $out/bin/clang $out/bin/cpp
+
+ # Move libclang to 'lib' output
+ moveToOutput "lib/libclang.*" "$lib"
+ substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
+ --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang."
+
+ mkdir -p $python/bin $python/share/clang/
+ mv $out/bin/{git-clang-format,scan-view} $python/bin
+ if [ -e $out/bin/set-xcode-analyzer ]; then
+ mv $out/bin/set-xcode-analyzer $python/bin
+ fi
+ mv $out/share/clang/*.py $python/share/clang
+ rm $out/bin/c-index-test
+ '';
+
+ enableParallelBuilding = true;
+
+ passthru = {
+ isClang = true;
+ inherit llvm;
+ } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
+ gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+ };
+
+ meta = {
+ description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
+ homepage = http://llvm.org/;
+ license = stdenv.lib.licenses.ncsa;
+ platforms = stdenv.lib.platforms.all;
+ };
+ } // stdenv.lib.optionalAttrs enableManpages {
+ name = "clang-manpages-${version}";
+
+ buildPhase = ''
+ make docs-clang-man
+ '';
+
+ installPhase = ''
+ mkdir -p $out/share/man/man1
+ # Manually install clang manpage
+ cp docs/man/*.1 $out/share/man/man1/
+ '';
+
+ outputs = [ "out" ];
+
+ doCheck = false;
+
+ meta.description = "man page for Clang ${version}";
+ });
+in self
diff --git a/pkgs/development/compilers/llvm/8/clang/purity.patch b/pkgs/development/compilers/llvm/8/clang/purity.patch
new file mode 100644
index 00000000000..b30d0d0b5d5
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/clang/purity.patch
@@ -0,0 +1,30 @@
+From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
+From: Will Dietz
+Date: Thu, 18 May 2017 11:56:12 -0500
+Subject: [PATCH] "purity" patch for 5.0
+
+---
+ lib/Driver/ToolChains/Gnu.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index fe3c0191bb..c6a482bece 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+ if (!Args.hasArg(options::OPT_static)) {
+ if (Args.hasArg(options::OPT_rdynamic))
+ CmdArgs.push_back("-export-dynamic");
+-
+- if (!Args.hasArg(options::OPT_shared)) {
+- const std::string Loader =
+- D.DyldPrefix + ToolChain.getDynamicLinker(Args);
+- CmdArgs.push_back("-dynamic-linker");
+- CmdArgs.push_back(Args.MakeArgString(Loader));
+- }
+ }
+
+ CmdArgs.push_back("-o");
+--
+2.11.0
+
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch b/pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch
new file mode 100644
index 00000000000..f9323ed95c0
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch
@@ -0,0 +1,74 @@
+commit f00c7bccf7955b7dfbb4859fd9019e9eb3349f2d
+Author: Tobias Mayer
+Date: Wed Feb 13 12:44:17 2019 +0100
+
+ Provide clock_gettime for xray on macos < 10.12
+
+diff --git a/lib/xray/xray_basic_logging.cc b/lib/xray/xray_basic_logging.cc
+index a46c151af..38aea6932 100644
+--- a/lib/xray/xray_basic_logging.cc
++++ b/lib/xray/xray_basic_logging.cc
+@@ -36,6 +36,29 @@
+ #include "xray_tsc.h"
+ #include "xray_utils.h"
+
++#if __MACH__
++#include
++#include
++enum clockid_t {
++ CLOCK_MONOTONIC = REALTIME_CLOCK,
++ CLOCK_REALTIME = REALTIME_CLOCK
++};
++
++int clock_gettime(clockid_t clock_id, struct timespec *ts) {
++ if (ts != NULL) {
++ clock_serv_t cclock;
++ mach_timespec_t mts;
++ host_get_clock_service(mach_host_self(), clock_id, &cclock);
++ clock_get_time(cclock, &mts);
++ mach_port_deallocate(mach_task_self(), cclock);
++ ts->tv_sec = mts.tv_sec;
++ ts->tv_nsec = mts.tv_nsec;
++ return 0;
++ }
++ return -1;
++}
++#endif
++
+ namespace __xray {
+
+ SpinMutex LogMutex;
+diff --git a/lib/xray/xray_fdr_logging.cc b/lib/xray/xray_fdr_logging.cc
+index 4b308b27f..1d044c8fd 100644
+--- a/lib/xray/xray_fdr_logging.cc
++++ b/lib/xray/xray_fdr_logging.cc
+@@ -38,6 +38,29 @@
+ #include "xray_tsc.h"
+ #include "xray_utils.h"
+
++#if __MACH__
++#include
++#include
++enum clockid_t {
++ CLOCK_MONOTONIC = REALTIME_CLOCK,
++ CLOCK_REALTIME = REALTIME_CLOCK
++};
++
++int clock_gettime(clockid_t clock_id, struct timespec *ts) {
++ if (ts != NULL) {
++ clock_serv_t cclock;
++ mach_timespec_t mts;
++ host_get_clock_service(mach_host_self(), clock_id, &cclock);
++ clock_get_time(cclock, &mts);
++ mach_port_deallocate(mach_task_self(), cclock);
++ ts->tv_sec = mts.tv_sec;
++ ts->tv_nsec = mts.tv_nsec;
++ return 0;
++ }
++ return -1;
++}
++#endif
++
+ namespace __xray {
+
+ atomic_sint32_t LoggingStatus = {XRayLogInitStatus::XRAY_LOG_UNINITIALIZED};
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt-codesign.patch b/pkgs/development/compilers/llvm/8/compiler-rt-codesign.patch
new file mode 100644
index 00000000000..3cc12b94b20
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/compiler-rt-codesign.patch
@@ -0,0 +1,33 @@
+From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
+From: Will Dietz
+Date: Tue, 19 Sep 2017 13:13:06 -0500
+Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
+ needs it
+
+---
+ cmake/Modules/AddCompilerRT.cmake | 8 ------
+ test/asan/CMakeLists.txt | 52 ---------------------------------------
+ test/tsan/CMakeLists.txt | 47 -----------------------------------
+ 3 files changed, 107 deletions(-)
+
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index bc5fb9ff7..b64eb4246 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
+ set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
+ set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
+ endif()
+- if(APPLE)
+- # Ad-hoc sign the dylibs
+- add_custom_command(TARGET ${libname}
+- POST_BUILD
+- COMMAND codesign --sign - $
+- WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+- )
+- endif()
+ endif()
+ install(TARGETS ${libname}
+ ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+2.14.1
+
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix
new file mode 100644
index 00000000000..4e7df060e50
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix
@@ -0,0 +1,61 @@
+{ stdenv, version, fetch, cmake, python, llvm, libcxxabi }:
+stdenv.mkDerivation rec {
+ name = "compiler-rt-${version}";
+ inherit version;
+ src = fetch "compiler-rt" "1rxa1rcn7r3yfn9cj0sx5gd90kslbd13q080rdyqb6jr9a9i1avb";
+
+ nativeBuildInputs = [ cmake python llvm ];
+ buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+ cmakeFlags = [
+ "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+ "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+ "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+ ] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
+ "-DCMAKE_C_FLAGS=-nodefaultlibs"
+ "-DCMAKE_CXX_COMPILER_WORKS=ON"
+ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+ "-DCOMPILER_RT_BUILD_XRAY=OFF"
+ "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+ "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+ "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+ "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+ ];
+
+ outputs = [ "out" "dev" ];
+
+ patches = [
+ ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+ ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
+ ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
+ ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch;
+
+ # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
+ # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
+ # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
+ # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
+ # a flag and turn the flag off during the stdenv build.
+ postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
+ substituteInPlace cmake/config-ix.cmake \
+ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+ '' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+ substituteInPlace lib/builtins/int_util.c \
+ --replace "#include " ""
+ substituteInPlace lib/builtins/clear_cache.c \
+ --replace "#include " ""
+ substituteInPlace lib/builtins/cpu_model.c \
+ --replace "#include " ""
+ '';
+
+ # Hack around weird upsream RPATH bug
+ postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
+ ln -s "$out/lib"/*/* "$out/lib"
+ '' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+ ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
+ ln -s $out/lib/*/cclang_rt.crtend-*.o $out/lib/crtend.o
+ ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
+ ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
+ '';
+
+ enableParallelBuilding = true;
+}
diff --git a/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch b/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch
new file mode 100644
index 00000000000..032b04708d1
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch
@@ -0,0 +1,595 @@
+Get crtbegin and crtend without compiler GCC! PR is at https://reviews.llvm.org/D28791
+
+Index: compiler-rt/CMakeLists.txt
+===================================================================
+--- compiler-rt/CMakeLists.txt
++++ compiler-rt/CMakeLists.txt
+@@ -29,6 +29,8 @@
+
+ option(COMPILER_RT_BUILD_BUILTINS "Build builtins" ON)
+ mark_as_advanced(COMPILER_RT_BUILD_BUILTINS)
++option(COMPILER_RT_BUILD_CRT "Build crtbegin.o/crtend.o" ON)
++mark_as_advanced(COMPILER_RT_BUILD_CRT)
+ option(COMPILER_RT_BUILD_SANITIZERS "Build sanitizers" ON)
+ mark_as_advanced(COMPILER_RT_BUILD_SANITIZERS)
+ option(COMPILER_RT_BUILD_XRAY "Build xray" ON)
+Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
+===================================================================
+--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
++++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
+@@ -132,7 +132,7 @@
+ # Adds static or shared runtime for a list of architectures and operating
+ # systems and puts it in the proper directory in the build and install trees.
+ # add_compiler_rt_runtime(
+-# {STATIC|SHARED}
++# {OBJECT|STATIC|SHARED}
+ # ARCHS
+ # OS
+ # SOURCES
+@@ -144,8 +144,8 @@
+ # PARENT_TARGET
+ # ADDITIONAL_HEADERS )
+ function(add_compiler_rt_runtime name type)
+- if(NOT type MATCHES "^(STATIC|SHARED)$")
+- message(FATAL_ERROR "type argument must be STATIC or SHARED")
++ if(NOT type MATCHES "^(OBJECT|STATIC|SHARED)$")
++ message(FATAL_ERROR "type argument must be OBJECT, STATIC or SHARED")
+ return()
+ endif()
+ cmake_parse_arguments(LIB
+@@ -204,7 +204,10 @@
+ message(FATAL_ERROR "Architecture ${arch} can't be targeted")
+ return()
+ endif()
+- if(type STREQUAL "STATIC")
++ if(type STREQUAL "OBJECT")
++ set(libname "${name}-${arch}")
++ set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX})
++ elseif(type STREQUAL "STATIC")
+ set(libname "${name}-${arch}")
+ set_output_name(output_name_${libname} ${name} ${arch})
+ else()
+@@ -270,12 +273,34 @@
+ set(COMPONENT_OPTION COMPONENT ${libname})
+ endif()
+
+- add_library(${libname} ${type} ${sources_${libname}})
+- set_target_compile_flags(${libname} ${extra_cflags_${libname}})
+- set_target_link_flags(${libname} ${extra_link_flags_${libname}})
+- set_property(TARGET ${libname} APPEND PROPERTY
+- COMPILE_DEFINITIONS ${LIB_DEFS})
+- set_target_output_directories(${libname} ${output_dir_${libname}})
++ if(type STREQUAL "OBJECT")
++ string(TOUPPER ${CMAKE_BUILD_TYPE} config)
++ get_property(cflags SOURCE ${sources_${libname}} PROPERTY COMPILE_FLAGS)
++ separate_arguments(cflags)
++ add_custom_command(
++ OUTPUT ${output_dir_${libname}}/${libname}.o
++ COMMAND ${CMAKE_C_COMPILER} ${sources_${libname}} ${cflags} ${extra_cflags_${libname}} -c -o ${output_dir_${libname}}/${libname}.o
++ DEPENDS ${sources_${libname}}
++ COMMENT "Building C object ${libname}.o")
++ add_custom_target(${libname} DEPENDS ${output_dir_${libname}}/${libname}.o)
++ install(FILES ${output_dir_${libname}}/${libname}.o
++ DESTINATION ${install_dir_${libname}}
++ ${COMPONENT_OPTION})
++ else()
++ add_library(${libname} ${type} ${sources_${libname}})
++ set_target_compile_flags(${libname} ${extra_cflags_${libname}})
++ set_target_link_flags(${libname} ${extra_link_flags_${libname}})
++ set_property(TARGET ${libname} APPEND PROPERTY
++ COMPILE_DEFINITIONS ${LIB_DEFS})
++ set_target_output_directories(${libname} ${output_dir_${libname}})
++ install(TARGETS ${libname}
++ ARCHIVE DESTINATION ${install_dir_${libname}}
++ ${COMPONENT_OPTION}
++ LIBRARY DESTINATION ${install_dir_${libname}}
++ ${COMPONENT_OPTION}
++ RUNTIME DESTINATION ${install_dir_${libname}}
++ ${COMPONENT_OPTION})
++ endif()
+ set_target_properties(${libname} PROPERTIES
+ OUTPUT_NAME ${output_name_${libname}})
+ set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Runtime")
+@@ -299,13 +324,6 @@
+ )
+ endif()
+ endif()
+- install(TARGETS ${libname}
+- ARCHIVE DESTINATION ${install_dir_${libname}}
+- ${COMPONENT_OPTION}
+- LIBRARY DESTINATION ${install_dir_${libname}}
+- ${COMPONENT_OPTION}
+- RUNTIME DESTINATION ${install_dir_${libname}}
+- ${COMPONENT_OPTION})
+
+ # We only want to generate per-library install targets if you aren't using
+ # an IDE because the extra targets get cluttered in IDEs.
+Index: compiler-rt/cmake/config-ix.cmake
+===================================================================
+--- compiler-rt/cmake/config-ix.cmake
++++ compiler-rt/cmake/config-ix.cmake
+@@ -227,6 +227,7 @@
+ ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X})
+ set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
+ ${MIPS32} ${MIPS64} ${PPC64} ${S390X})
++set(ALL_CRT_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64})
+ set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
+ set(ALL_FUZZER_SUPPORTED_ARCH ${X86_64} ${ARM64})
+
+@@ -474,6 +475,7 @@
+ SANITIZER_COMMON_SUPPORTED_ARCH)
+
+ else()
++ filter_available_targets(CRT_SUPPORTED_ARCH ${ALL_CRT_SUPPORTED_ARCH})
+ # Architectures supported by compiler-rt libraries.
+ filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
+ ${ALL_SANITIZER_COMMON_SUPPORTED_ARCH})
+@@ -563,6 +565,12 @@
+
+ # TODO: Add builtins support.
+
++if (CRT_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux")
++ set(COMPILER_RT_HAS_CRT TRUE)
++else()
++ set(COMPILER_RT_HAS_CRT FALSE)
++endif()
++
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND DFSAN_SUPPORTED_ARCH AND
+ OS_NAME MATCHES "Linux")
+ set(COMPILER_RT_HAS_DFSAN TRUE)
+Index: compiler-rt/lib/CMakeLists.txt
+===================================================================
+--- compiler-rt/lib/CMakeLists.txt
++++ compiler-rt/lib/CMakeLists.txt
+@@ -17,6 +17,10 @@
+ add_subdirectory(builtins)
+ endif()
+
++if(COMPILER_RT_BUILD_CRT)
++ add_subdirectory(crt)
++endif()
++
+ function(compiler_rt_build_runtime runtime)
+ string(TOUPPER ${runtime} runtime_uppercase)
+ if(COMPILER_RT_HAS_${runtime_uppercase})
+Index: compiler-rt/lib/crt/CMakeLists.txt
+===================================================================
+--- /dev/null
++++ compiler-rt/lib/crt/CMakeLists.txt
+@@ -0,0 +1,101 @@
++add_compiler_rt_component(crt)
++
++function(check_cxx_section_exists section output)
++ cmake_parse_arguments(ARG "" "" "SOURCE;FLAGS" ${ARGN})
++ if(NOT ARG_SOURCE)
++ set(ARG_SOURCE "int main() { return 0; }\n")
++ endif()
++
++ string(RANDOM TARGET_NAME)
++ set(TARGET_NAME "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cmTC_${TARGET_NAME}.dir")
++ file(MAKE_DIRECTORY ${TARGET_NAME})
++
++ file(WRITE "${TARGET_NAME}/CheckSectionExists.c" "${ARG_SOURCE}\n")
++
++ string(REGEX MATCHALL "<[A-Za-z0-9_]*>" substitutions
++ ${CMAKE_C_COMPILE_OBJECT})
++
++ set(try_compile_flags "${ARG_FLAGS}")
++ if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET)
++ list(APPEND try_compile_flags "-target ${CMAKE_C_COMPILER_TARGET}")
++ endif()
++
++ string(REPLACE ";" " " extra_flags "${try_compile_flags}")
++
++ set(test_compile_command "${CMAKE_C_COMPILE_OBJECT}")
++ foreach(substitution ${substitutions})
++ if(substitution STREQUAL "")
++ string(REPLACE ""
++ "${CMAKE_C_COMPILER}" test_compile_command ${test_compile_command})
++ elseif(substitution STREQUAL "