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 "") ++ string(REPLACE "" "${TARGET_NAME}/CheckSectionExists.o" ++ test_compile_command ${test_compile_command}) ++ elseif(substitution STREQUAL "") ++ string(REPLACE "" "${TARGET_NAME}/CheckSectionExists.c" ++ test_compile_command ${test_compile_command}) ++ elseif(substitution STREQUAL "") ++ string(REPLACE "" "${CMAKE_C_FLAGS} ${extra_flags}" ++ test_compile_command ${test_compile_command}) ++ else() ++ string(REPLACE "${substitution}" "" test_compile_command ++ ${test_compile_command}) ++ endif() ++ endforeach() ++ ++ string(REPLACE " " ";" test_compile_command "${test_compile_command}") ++ ++ execute_process( ++ COMMAND ${test_compile_command} ++ RESULT_VARIABLE TEST_RESULT ++ OUTPUT_VARIABLE TEST_OUTPUT ++ ERROR_VARIABLE TEST_ERROR ++ ) ++ ++ execute_process( ++ COMMAND ${CMAKE_OBJDUMP} -h "${TARGET_NAME}/CheckSectionExists.o" ++ RESULT_VARIABLE CHECK_RESULT ++ OUTPUT_VARIABLE CHECK_OUTPUT ++ ERROR_VARIABLE CHECK_ERROR ++ ) ++ string(FIND ${CHECK_OUTPUT} ${section} SECTION_FOUND) ++ ++ if(NOT SECTION_FOUND EQUAL -1) ++ set(${output} TRUE PARENT_SCOPE) ++ else() ++ set(${output} FALSE PARENT_SCOPE) ++ endif() ++ ++ file(REMOVE_RECURSE ${TARGET_NAME}) ++endfunction() ++ ++check_cxx_section_exists(".init_array" COMPILER_RT_HAS_INITFINI_ARRAY ++ SOURCE "__attribute__((constructor)) void f() {}\nint main() { return 0; }\n") ++ ++append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS) ++ ++foreach(arch ${CRT_SUPPORTED_ARCH}) ++ add_compiler_rt_runtime(clang_rt.crtbegin ++ OBJECT ++ ARCHS ${arch} ++ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c ++ CFLAGS ${CRT_CFLAGS} ++ PARENT_TARGET crt) ++ add_compiler_rt_runtime(clang_rt.crtbegin_shared ++ OBJECT ++ ARCHS ${arch} ++ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c ++ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC ++ PARENT_TARGET crt) ++ add_compiler_rt_runtime(clang_rt.crtend ++ OBJECT ++ ARCHS ${arch} ++ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c ++ CFLAGS ${CRT_CFLAGS} ++ PARENT_TARGET crt) ++ add_compiler_rt_runtime(clang_rt.crtend_shared ++ OBJECT ++ ARCHS ${arch} ++ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c ++ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC ++ PARENT_TARGET crt) ++endforeach() +Index: compiler-rt/lib/crt/crtbegin.c +=================================================================== +--- /dev/null ++++ compiler-rt/lib/crt/crtbegin.c +@@ -0,0 +1,110 @@ ++/* ===-- crtbegin.c - Start of constructors and destructors ----------------=== ++ * ++ * The LLVM Compiler Infrastructure ++ * ++ * This file is dual licensed under the MIT and the University of Illinois Open ++ * Source Licenses. See LICENSE.TXT for details. ++ * ++ * ===----------------------------------------------------------------------=== ++ */ ++ ++#include ++ ++__attribute__((visibility("hidden"))) ++#ifdef CRT_SHARED ++void *__dso_handle = &__dso_handle; ++#else ++void *__dso_handle = (void *)0; ++#endif ++ ++static long __EH_FRAME_LIST__[] __attribute__(( ++ section(".eh_frame"), aligned(sizeof(void *)), visibility("hidden"))) = {}; ++ ++extern void __register_frame_info(const void *, void *) __attribute__((weak)); ++extern void *__deregister_frame_info(const void *) __attribute__((weak)); ++ ++#ifndef CRT_HAS_INITFINI_ARRAY ++typedef void (*fp)(void); ++ ++static fp __CTOR_LIST__[] ++ __attribute__((section(".ctors"), aligned(sizeof(fp)), visibility("hidden"), ++ used)) = {(fp)-1}; ++extern fp __CTOR_LIST_END__[] __attribute__((visibility("hidden"))); ++#endif ++ ++#ifdef CRT_SHARED ++extern void __cxa_finalize(void *) __attribute__((weak)); ++#endif ++ ++static void __attribute__((used)) __do_init() { ++ static _Bool __initialized; ++ if (__builtin_expect(__initialized, 0)) ++ return; ++ __initialized = 1; ++ ++ static struct { void *p[8]; } __object; ++ if (__register_frame_info) ++ __register_frame_info(__EH_FRAME_LIST__, &__object); ++ ++#ifndef CRT_HAS_INITFINI_ARRAY ++ const size_t n = __CTOR_LIST_END__ - __CTOR_LIST__ - 1; ++ for (size_t i = n; i >= 1; i--) __CTOR_LIST__[i](); ++#endif ++} ++ ++#ifdef CRT_HAS_INITFINI_ARRAY ++__attribute__((section(".init_array"), ++ used)) static void (*__init)(void) = __do_init; ++#else // CRT_HAS_INITFINI_ARRAY ++#if defined(__i386__) || defined(__x86_64__) ++asm(".pushsection .init,\"ax\",@progbits\n\t" ++ "call " __USER_LABEL_PREFIX__ "__do_init\n\t" ++ ".popsection"); ++#elif defined(__arm__) ++asm(".pushsection .init,\"ax\",%progbits\n\t" ++ "bl " __USER_LABEL_PREFIX__ "__do_init\n\t" ++ ".popsection"); ++#endif // CRT_HAS_INITFINI_ARRAY ++#endif ++ ++#ifndef CRT_HAS_INITFINI_ARRAY ++static fp __DTOR_LIST__[] ++ __attribute__((section(".dtors"), aligned(sizeof(fp)), visibility("hidden"), ++ used)) = {(fp)-1}; ++extern fp __DTOR_LIST_END__[] __attribute__((visibility("hidden"))); ++#endif ++ ++static void __attribute__((used)) __do_fini() { ++ static _Bool __finalized; ++ if (__builtin_expect(__finalized, 0)) ++ return; ++ __finalized = 1; ++ ++#ifdef CRT_SHARED ++ if (__cxa_finalize) ++ __cxa_finalize(__dso_handle); ++#endif ++ ++#ifndef CRT_HAS_INITFINI_ARRAY ++ if (__deregister_frame_info) ++ __deregister_frame_info(__EH_FRAME_LIST__); ++ ++ const size_t n = __DTOR_LIST_END__ - __DTOR_LIST__ - 1; ++ for (size_t i = 1; i < n; i++) __DTOR_LIST__[i](); ++#endif ++} ++ ++#ifdef CRT_HAS_INITFINI_ARRAY ++__attribute__((section(".fini_array"), ++ used)) static void (*__fini)(void) = __do_fini; ++#else // CRT_HAS_INITFINI_ARRAY ++#if defined(__i386__) || defined(__x86_64__) ++asm(".pushsection .fini,\"ax\",@progbits\n\t" ++ "call " __USER_LABEL_PREFIX__ "__do_fini\n\t" ++ ".popsection"); ++#elif defined(__arm__) ++asm(".pushsection .fini,\"ax\",%progbits\n\t" ++ "bl " __USER_LABEL_PREFIX__ "__do_fini\n\t" ++ ".popsection"); ++#endif ++#endif // CRT_HAS_INIT_FINI_ARRAY +Index: compiler-rt/lib/crt/crtend.c +=================================================================== +--- /dev/null ++++ compiler-rt/lib/crt/crtend.c +@@ -0,0 +1,23 @@ ++/* ===-- crtend.c - End of constructors and destructors --------------------=== ++ * ++ * The LLVM Compiler Infrastructure ++ * ++ * This file is dual licensed under the MIT and the University of Illinois Open ++ * Source Licenses. See LICENSE.TXT for details. ++ * ++ * ===----------------------------------------------------------------------=== ++ */ ++ ++#include ++ ++// Put 4-byte zero which is the length field in FDE at the end as a terminator. ++const int32_t __EH_FRAME_LIST_END__[] ++ __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)), used)) = {0}; ++ ++#ifndef CRT_HAS_INITFINI_ARRAY ++typedef void (*fp)(void); ++fp __CTOR_LIST_END__[] ++ __attribute__((section(".ctors"), visibility("hidden"), used)) = {0}; ++fp __DTOR_LIST_END__[] ++ __attribute__((section(".dtors"), visibility("hidden"), used)) = {0}; ++#endif +Index: compiler-rt/test/CMakeLists.txt +=================================================================== +--- compiler-rt/test/CMakeLists.txt ++++ compiler-rt/test/CMakeLists.txt +@@ -73,6 +73,9 @@ + if(COMPILER_RT_BUILD_XRAY) + compiler_rt_test_runtime(xray) + endif() ++ if(COMPILER_RT_HAS_CRT) ++ add_subdirectory(crt) ++ endif() + # ShadowCallStack does not yet provide a runtime with compiler-rt, the tests + # include their own minimal runtime + add_subdirectory(shadowcallstack) +Index: compiler-rt/test/crt/CMakeLists.txt +=================================================================== +--- /dev/null ++++ compiler-rt/test/crt/CMakeLists.txt +@@ -0,0 +1,31 @@ ++set(CRT_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) ++ ++set(CRT_TESTSUITES) ++ ++set(CRT_TEST_DEPS "") ++ ++if(NOT COMPILER_RT_STANDALONE_BUILD AND COMPILER_RT_BUILD_CRT AND ++ COMPILER_RT_HAS_CRT) ++ list(APPEND CRT_TEST_DEPS crt) ++endif() ++ ++set(CRT_TEST_ARCH ${CRT_SUPPORTED_ARCH}) ++if (COMPILER_RT_BUILD_CRT AND COMPILER_RT_HAS_CRT) ++ foreach(arch ${CRT_TEST_ARCH}) ++ set(CRT_TEST_TARGET_ARCH ${arch}) ++ string(TOLOWER "-${arch}-${OS_NAME}" CRT_TEST_CONFIG_SUFFIX) ++ get_test_cc_for_arch(${arch} CRT_TEST_TARGET_CC CRT_TEST_TARGET_CFLAGS) ++ string(TOUPPER ${arch} ARCH_UPPER_CASE) ++ set(CONFIG_NAME ${ARCH_UPPER_CASE}${OS_NAME}Config) ++ ++ configure_lit_site_cfg( ++ ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in ++ ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg) ++ list(APPEND CRT_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}) ++ endforeach() ++endif() ++ ++add_lit_testsuite(check-crt "Running the CRT tests" ++ ${CRT_TESTSUITES} ++ DEPENDS ${CRT_TEST_DEPS}) ++set_target_properties(check-crt PROPERTIES FOLDER "Compiler-RT Misc") +Index: compiler-rt/test/crt/dso_handle.cpp +=================================================================== +--- /dev/null ++++ compiler-rt/test/crt/dso_handle.cpp +@@ -0,0 +1,33 @@ ++// RUN: %clangxx -g -DCRT_SHARED -c %s -fPIC -o %tshared.o ++// RUN: %clangxx -g -c %s -fPIC -o %t.o ++// RUN: %clangxx -g -shared -o %t.so -nostdlib %crti %shared_crtbegin %tshared.o %libstdcxx -lc -lm -lgcc_s %shared_crtend %crtn ++// RUN: %clangxx -g -o %t -nostdlib %crt1 %crti %crtbegin %t.o %libstdcxx -lc -lm %libgcc %t.so %crtend %crtn ++// RUN: %run %t 2>&1 | FileCheck %s ++ ++#include ++ ++// CHECK: 1 ++// CHECK-NEXT: ~A() ++ ++#ifdef CRT_SHARED ++bool G; ++void C() { ++ printf("%d\n", G); ++} ++ ++struct A { ++ A() { G = true; } ++ ~A() { ++ printf("~A()\n"); ++ } ++}; ++ ++A a; ++#else ++void C(); ++ ++int main() { ++ C(); ++ return 0; ++} ++#endif +Index: compiler-rt/test/crt/lit.cfg +=================================================================== +--- /dev/null ++++ compiler-rt/test/crt/lit.cfg +@@ -0,0 +1,80 @@ ++# -*- Python -*- ++ ++import os ++import subprocess ++ ++# Setup config name. ++config.name = 'CRT' + config.name_suffix ++ ++# Setup source root. ++config.test_source_root = os.path.dirname(__file__) ++ ++ ++def get_library_path(file): ++ cmd = subprocess.Popen([config.clang.strip(), ++ config.target_cflags.strip(), ++ '-print-file-name=%s' % file], ++ stdout=subprocess.PIPE, ++ env=config.environment) ++ if not cmd.stdout: ++ lit_config.fatal("Couldn't find the library path for '%s'" % file) ++ dir = cmd.stdout.read().strip() ++ if sys.platform in ['win32'] and execute_external: ++ # Don't pass dosish path separator to msys bash.exe. ++ dir = dir.replace('\\', '/') ++ # Ensure the result is an ascii string, across Python2.5+ - Python3. ++ return str(dir.decode('ascii')) ++ ++ ++def get_libgcc_file_name(): ++ cmd = subprocess.Popen([config.clang.strip(), ++ config.target_cflags.strip(), ++ '-print-libgcc-file-name'], ++ stdout=subprocess.PIPE, ++ env=config.environment) ++ if not cmd.stdout: ++ lit_config.fatal("Couldn't find the library path for '%s'" % file) ++ dir = cmd.stdout.read().strip() ++ if sys.platform in ['win32'] and execute_external: ++ # Don't pass dosish path separator to msys bash.exe. ++ dir = dir.replace('\\', '/') ++ # Ensure the result is an ascii string, across Python2.5+ - Python3. ++ return str(dir.decode('ascii')) ++ ++ ++def build_invocation(compile_flags): ++ return ' ' + ' '.join([config.clang] + compile_flags) + ' ' ++ ++ ++# Setup substitutions. ++config.substitutions.append( ++ ('%clang ', build_invocation([config.target_cflags]))) ++config.substitutions.append( ++ ('%clangxx ', ++ build_invocation(config.cxx_mode_flags + [config.target_cflags]))) ++ ++base_lib = os.path.join( ++ config.compiler_rt_libdir, "clang_rt.%%s-%s.o" % config.target_arch) ++config.substitutions.append(('%crtbegin', base_lib % "crtbegin")) ++config.substitutions.append(('%shared_crtbegin', base_lib % "crtbegin_shared")) ++config.substitutions.append(('%crtend', base_lib % "crtend")) ++config.substitutions.append(('%shared_crtend', base_lib % "crtend_shared")) ++ ++config.substitutions.append( ++ ('%crt1', get_library_path('crt1.o'))) ++config.substitutions.append( ++ ('%crti', get_library_path('crti.o'))) ++config.substitutions.append( ++ ('%crtn', get_library_path('crtn.o'))) ++ ++config.substitutions.append( ++ ('%libgcc', get_libgcc_file_name())) ++ ++config.substitutions.append( ++ ('%libstdcxx', '-l' + config.sanitizer_cxx_lib.lstrip('lib'))) ++ ++# Default test suffixes. ++config.suffixes = ['.c', '.cc', '.cpp'] ++ ++if config.host_os not in ['Linux']: ++ config.unsupported = True +Index: compiler-rt/test/crt/lit.site.cfg.in +=================================================================== +--- /dev/null ++++ compiler-rt/test/crt/lit.site.cfg.in +@@ -0,0 +1,14 @@ ++@LIT_SITE_CFG_IN_HEADER@ ++ ++# Tool-specific config options. ++config.name_suffix = "@CRT_TEST_CONFIG_SUFFIX@" ++config.crt_lit_source_dir = "@CRT_LIT_SOURCE_DIR@" ++config.target_cflags = "@CRT_TEST_TARGET_CFLAGS@" ++config.target_arch = "@CRT_TEST_TARGET_ARCH@" ++config.sanitizer_cxx_lib = "@SANITIZER_TEST_CXX_LIBNAME@" ++ ++# Load common config for all compiler-rt lit tests ++lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured") ++ ++# Load tool-specific config that would do the real work. ++lit_config.load_config(config, "@CRT_LIT_SOURCE_DIR@/lit.cfg") diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix new file mode 100644 index 00000000000..f70585632e8 --- /dev/null +++ b/pkgs/development/compilers/llvm/8/default.nix @@ -0,0 +1,149 @@ +{ lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook +, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, buildLlvmTools # tools, but from the previous stage, for cross +, targetLlvmLibraries # libraries, but from the next stage, for cross +}: + +let + release_version = "8.0.0"; + version = release_version + "rc2"; # differentiating these is important for rc's + + fetch = name: sha256: fetchurl { + url = "https://prereleases.llvm.org/${release_version}/rc2/${name}-${version}.src.tar.xz"; + inherit sha256; + }; + + clang-tools-extra_src = fetch "clang-tools-extra" "1ypzbk7lf9dzkqh4p37dlr1bggjdrixr5gwb71jk9gh98grr2m5g"; + + tools = stdenv.lib.makeExtensible (tools: let + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + mkExtraBuildCommands = cc: '' + rsrc="$out/resource-root" + mkdir "$rsrc" + ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" + ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" + echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc) '' + echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags + ''; + in { + + llvm = callPackage ./llvm.nix { }; + llvm-polly = callPackage ./llvm.nix { enablePolly = true; }; + + clang-unwrapped = callPackage ./clang { + inherit clang-tools-extra_src; + }; + clang-polly-unwrapped = callPackage ./clang { + inherit clang-tools-extra_src; + llvm = tools.llvm-polly; + enablePolly = true; + }; + + llvm-manpages = lowPrio (tools.llvm.override { + enableManpages = true; + python = pkgs.python; # don't use python-boot + }); + + clang-manpages = lowPrio (tools.clang-unwrapped.override { + enableManpages = true; + python = pkgs.python; # don't use python-boot + }); + + libclang = tools.clang-unwrapped.lib; + + clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang; + + libstdcxxClang = wrapCCWith rec { + cc = tools.clang-unwrapped; + extraPackages = [ + libstdcxxHook + targetLlvmLibraries.compiler-rt + ]; + extraBuildCommands = mkExtraBuildCommands cc; + }; + + libcxxClang = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = targetLlvmLibraries.libcxx; + extraPackages = [ + targetLlvmLibraries.libcxx + targetLlvmLibraries.libcxxabi + targetLlvmLibraries.compiler-rt + ]; + extraBuildCommands = mkExtraBuildCommands cc; + }; + + lld = callPackage ./lld.nix {}; + + lldb = callPackage ./lldb.nix {}; + + bintools = callPackage ./bintools.nix {}; + + lldClang = wrapCCWith rec { + cc = tools.clang-unwrapped; + bintools = wrapBintoolsWith { + inherit (tools) bintools; + }; + extraPackages = [ + # targetLlvmLibraries.libcxx + # targetLlvmLibraries.libcxxabi + targetLlvmLibraries.compiler-rt + ]; + extraBuildCommands = '' + echo "-target ${stdenv.targetPlatform.config} -rtlib=compiler-rt" >> $out/nix-support/cc-cflags + '' + mkExtraBuildCommands cc; + }; + + lldClangNoLibc = wrapCCWith rec { + cc = tools.clang-unwrapped; + bintools = wrapBintoolsWith { + inherit (tools) bintools; + libc = null; + }; + extraPackages = [ + # targetLlvmLibraries.libcxx + # targetLlvmLibraries.libcxxabi + targetLlvmLibraries.compiler-rt + ]; + extraBuildCommands = '' + echo "-target ${stdenv.targetPlatform.config} -rtlib=compiler-rt" >> $out/nix-support/cc-cflags + '' + mkExtraBuildCommands cc; + }; + + lldClangNoCompilerRt = wrapCCWith rec { + cc = tools.clang-unwrapped; + bintools = wrapBintoolsWith { + inherit (tools) bintools; + libc = null; + }; + extraPackages = [ ]; + extraBuildCommands = '' + echo "-nostartfiles -target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags + ''; + }; + + }); + + libraries = stdenv.lib.makeExtensible (libraries: let + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + in { + + compiler-rt = callPackage ./compiler-rt.nix { + stdenv = if stdenv.hostPlatform.useLLVM or false + then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt + else stdenv; + }; + + stdenv = overrideCC stdenv buildLlvmTools.clang; + + libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang; + + libcxx = callPackage ./libc++ {}; + + libcxxabi = callPackage ./libc++abi.nix {}; + + openmp = callPackage ./openmp.nix {}; + }); + +in { inherit tools libraries; } // libraries // tools diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libc++/default.nix new file mode 100644 index 00000000000..52a1dc53d35 --- /dev/null +++ b/pkgs/development/compilers/llvm/8/libc++/default.nix @@ -0,0 +1,50 @@ +{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version }: + +stdenv.mkDerivation rec { + name = "libc++-${version}"; + + src = fetch "libcxx" "1c8idvlqm4ik62q0llsndk9449yrgkj8hv5lz411hnbqjs09q9qq"; + + postUnpack = '' + unpackFile ${libcxxabi.src} + export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include" + ''; + + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch; + + prePatch = '' + substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++" + ''; + + preConfigure = '' + # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package + cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR") + '' + lib.optionalString stdenv.hostPlatform.isMusl '' + patchShebangs utils/cat_files.py + ''; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python; + + buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + + cmakeFlags = [ + "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" + "-DLIBCXX_LIBCPPABI_VERSION=2" + "-DLIBCXX_CXX_ABI=libcxxabi" + ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1"; + + enableParallelBuilding = true; + + linkCxxAbi = stdenv.isLinux; + + setupHooks = [ + ../../../../../build-support/setup-hooks/role.bash + ./setup-hook.sh + ]; + + meta = { + homepage = http://libcxx.llvm.org/; + description = "A new implementation of the C++ standard library, targeting C++11"; + license = with stdenv.lib.licenses; [ ncsa mit ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/pkgs/development/compilers/llvm/8/libc++/setup-hook.sh b/pkgs/development/compilers/llvm/8/libc++/setup-hook.sh new file mode 100644 index 00000000000..6611259165a --- /dev/null +++ b/pkgs/development/compilers/llvm/8/libc++/setup-hook.sh @@ -0,0 +1,6 @@ +# See pkgs/build-support/setup-hooks/role.bash +getHostRole + +linkCxxAbi="@linkCxxAbi@" +export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" +export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" diff --git a/pkgs/development/compilers/llvm/8/libc++abi.nix b/pkgs/development/compilers/llvm/8/libc++abi.nix new file mode 100644 index 00000000000..9c3bfe5e1ff --- /dev/null +++ b/pkgs/development/compilers/llvm/8/libc++abi.nix @@ -0,0 +1,50 @@ +{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version }: + +stdenv.mkDerivation { + name = "libc++abi-${version}"; + + src = fetch "libcxxabi" "0hdg7xw8vazw85i675qld7i6wqx502srny84cp0w6wi6pk44xiqr"; + + nativeBuildInputs = [ cmake ]; + buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind; + + postUnpack = '' + unpackFile ${libcxx.src} + unpackFile ${llvm.src} + export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)" + '' + stdenv.lib.optionalString stdenv.isDarwin '' + export TRIPLE=x86_64-apple-darwin + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch} + ''; + + installPhase = if stdenv.isDarwin + then '' + for file in lib/*.dylib; do + # this should be done in CMake, but having trouble figuring out + # the magic combination of necessary CMake variables + # if you fancy a try, take a look at + # http://www.cmake.org/Wiki/CMake_RPATH_handling + install_name_tool -id $out/$file $file + done + make install + install -d 755 $out/include + install -m 644 ../include/*.h $out/include + '' + else '' + install -d -m 755 $out/include $out/lib + install -m 644 lib/libc++abi.a $out/lib + install -m 644 lib/libc++abi.so.1.0 $out/lib + install -m 644 ../include/cxxabi.h $out/include + ln -s libc++abi.so.1.0 $out/lib/libc++abi.so + ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1 + ''; + + meta = { + homepage = http://libcxxabi.llvm.org/; + description = "A new implementation of low level support for a standard C++ library"; + license = with stdenv.lib.licenses; [ ncsa mit ]; + maintainers = with stdenv.lib.maintainers; [ vlstill ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/pkgs/development/compilers/llvm/8/lld.nix b/pkgs/development/compilers/llvm/8/lld.nix new file mode 100644 index 00000000000..ba7f888f4dd --- /dev/null +++ b/pkgs/development/compilers/llvm/8/lld.nix @@ -0,0 +1,32 @@ +{ stdenv +, fetch +, cmake +, libxml2 +, llvm +, version +}: + +stdenv.mkDerivation { + name = "lld-${version}"; + + src = fetch "lld" "14nganpwr5y111zhwws95p6ikp8kfiybfdr2yfz5cmhb3zkcgk4h"; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ llvm libxml2 ]; + + outputs = [ "out" "dev" ]; + + enableParallelBuilding = true; + + postInstall = '' + moveToOutput include "$dev" + moveToOutput lib "$dev" + ''; + + meta = { + description = "The LLVM Linker"; + homepage = http://lld.llvm.org/; + license = stdenv.lib.licenses.ncsa; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/development/compilers/llvm/8/lldb.nix b/pkgs/development/compilers/llvm/8/lldb.nix new file mode 100644 index 00000000000..ead507ea2ca --- /dev/null +++ b/pkgs/development/compilers/llvm/8/lldb.nix @@ -0,0 +1,56 @@ +{ stdenv +, fetch +, cmake +, zlib +, ncurses +, swig +, which +, libedit +, libxml2 +, llvm +, clang-unwrapped +, python +, version +, darwin +}: + +stdenv.mkDerivation { + name = "lldb-${version}"; + + src = fetch "lldb" "0r364w49m0l0808wm06g777qd14gwxnz0z267dbnwqkw6zc361lc"; + + postPatch = '' + # Fix up various paths that assume llvm and clang are installed in the same place + sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \ + cmake/modules/LLDBStandalone.cmake + sed -i 's,".*tools/clang/include","${clang-unwrapped}/include",' \ + cmake/modules/LLDBStandalone.cmake + sed -i 's,"$.LLVM_LIBRARY_DIR.",${llvm}/lib ${clang-unwrapped}/lib,' \ + cmake/modules/LLDBStandalone.cmake + ''; + + nativeBuildInputs = [ cmake python which swig ]; + buildInputs = [ ncurses zlib libedit libxml2 llvm ] + ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ]; + + CXXFLAGS = "-fno-rtti"; + hardeningDisable = [ "format" ]; + + cmakeFlags = [ + "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic + ]; + + enableParallelBuilding = true; + + postInstall = '' + mkdir -p $out/share/man/man1 + cp ../docs/lldb.1 $out/share/man/man1/ + ''; + + meta = with stdenv.lib; { + description = "A next-generation high-performance debugger"; + homepage = http://llvm.org/; + license = licenses.ncsa; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/compilers/llvm/8/llvm-outputs.patch b/pkgs/development/compilers/llvm/8/llvm-outputs.patch new file mode 100644 index 00000000000..40096fa3497 --- /dev/null +++ b/pkgs/development/compilers/llvm/8/llvm-outputs.patch @@ -0,0 +1,26 @@ +diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp +index 94d426b..37f7794 100644 +--- a/tools/llvm-config/llvm-config.cpp ++++ b/tools/llvm-config/llvm-config.cpp +@@ -333,6 +333,21 @@ int main(int argc, char **argv) { + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } + ++ /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared ++ if (!IsInDevelopmentTree) { ++ bool WantShared = true; ++ for (int i = 1; i < argc; ++i) { ++ StringRef Arg = argv[i]; ++ if (Arg == "--link-shared") ++ WantShared = true; ++ else if (Arg == "--link-static") ++ WantShared = false; // the last one wins ++ } ++ ++ if (WantShared) ++ ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX; ++ } ++ + /// We only use `shared library` mode in cases where the static library form + /// of the components provided are not available; note however that this is + /// skipped if we're run from within the build dir. However, once installed, diff --git a/pkgs/development/compilers/llvm/8/llvm.nix b/pkgs/development/compilers/llvm/8/llvm.nix new file mode 100644 index 00000000000..273e33893fe --- /dev/null +++ b/pkgs/development/compilers/llvm/8/llvm.nix @@ -0,0 +1,172 @@ +{ stdenv +, fetch +, fetchpatch +, cmake +, python +, libffi +, libbfd +, libpfm +, libxml2 +, ncurses +, version +, release_version +, zlib +, buildPackages +, debugVersion ? false +, enableManpages ? false +, enableSharedLibraries ? true +, enablePFM ? !stdenv.isDarwin +, enablePolly ? false +}: + +let + inherit (stdenv.lib) optional optionals optionalString; + + src = fetch "llvm" "1h9zqgf968si0nzdmsa9rz634zrmz6mprvz2ifw6ky0h7va5rcvq"; + polly_src = fetch "polly" "1wwnn0cxnrmiqb6kg577myz6kb8sm18jwc020lf0b1k5as7aw2kq"; + + # Used when creating a version-suffixed symlink of libLLVM.dylib + shortVersion = with stdenv.lib; + concatStringsSep "." (take 1 (splitString "." release_version)); + +in stdenv.mkDerivation (rec { + name = "llvm-${version}"; + + unpackPhase = '' + unpackFile ${src} + mv llvm-${version}* llvm + sourceRoot=$PWD/llvm + '' + optionalString enablePolly '' + unpackFile ${polly_src} + mv polly-* $sourceRoot/tools/polly + ''; + + outputs = [ "out" "python" ] + ++ optional enableSharedLibraries "lib"; + + nativeBuildInputs = [ cmake python ] + ++ optionals enableManpages [ python.pkgs.sphinx python.pkgs.recommonmark ]; + + buildInputs = [ libxml2 libffi ] + ++ optional enablePFM libpfm; # exegesis + + propagatedBuildInputs = [ ncurses zlib ]; + + postPatch = optionalString stdenv.isDarwin '' + substituteInPlace cmake/modules/AddLLVM.cmake \ + --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ + --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' "" + '' + # Patch llvm-config to return correct library path based on --link-{shared,static}. + + optionalString (enableSharedLibraries) '' + substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib + patch -p1 < ./llvm-outputs.patch + '' + '' + # FileSystem permissions tests fail with various special bits + substituteInPlace unittests/Support/CMakeLists.txt \ + --replace "Path.cpp" "" + rm unittests/Support/Path.cpp + '' + optionalString stdenv.hostPlatform.isMusl '' + patch -p1 -i ${../TLI-musl.patch} + substituteInPlace unittests/Support/CMakeLists.txt \ + --replace "add_subdirectory(DynamicLibrary)" "" + rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp + '' + '' + patchShebangs test/BugPoint/compile-custom.ll.py + ''; + + # hacky fix: created binaries need to be run before installation + preBuild = '' + mkdir -p $out/ + ln -sv $PWD/lib $out + ''; + + cmakeFlags = with stdenv; [ + "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" + "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc + "-DLLVM_BUILD_TESTS=ON" + "-DLLVM_ENABLE_FFI=ON" + "-DLLVM_ENABLE_RTTI=ON" + "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" + "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" + "-DLLVM_ENABLE_DUMP=ON" + ] ++ optionals enableSharedLibraries [ + "-DLLVM_LINK_LLVM_DYLIB=ON" + ] ++ optionals enableManpages [ + "-DLLVM_BUILD_DOCS=ON" + "-DLLVM_ENABLE_SPHINX=ON" + "-DSPHINX_OUTPUT_MAN=ON" + "-DSPHINX_OUTPUT_HTML=OFF" + "-DSPHINX_WARNINGS_AS_ERRORS=OFF" + ] ++ optionals (!isDarwin) [ + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" + ] ++ optionals (isDarwin) [ + "-DLLVM_ENABLE_LIBCXX=ON" + "-DCAN_TARGET_i386=false" + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "-DCMAKE_CROSSCOMPILING=True" + "-DLLVM_TABLEGEN=${buildPackages.llvm_7}/bin/llvm-tblgen" + ]; + + postBuild = '' + rm -fR $out + ''; + + preCheck = '' + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib + ''; + + postInstall = '' + mkdir -p $python/share + mv $out/share/opt-viewer $python/share/opt-viewer + '' + + optionalString enableSharedLibraries '' + moveToOutput "lib/libLLVM-*" "$lib" + moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib" + substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ + --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-" + '' + + optionalString (stdenv.isDarwin && enableSharedLibraries) '' + substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ + --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib + ''; + + doCheck = stdenv.isLinux && (!stdenv.isx86_32); + + checkTarget = "check-all"; + + enableParallelBuilding = true; + + passthru.src = src; + + meta = { + description = "Collection of modular and reusable compiler and toolchain technologies"; + homepage = http://llvm.org/; + license = stdenv.lib.licenses.ncsa; + maintainers = with stdenv.lib.maintainers; [ lovek323 raskin dtzWill ]; + platforms = stdenv.lib.platforms.all; + }; +} // stdenv.lib.optionalAttrs enableManpages { + name = "llvm-manpages-${version}"; + + buildPhase = '' + make docs-llvm-man + ''; + + propagatedBuildInputs = []; + + installPhase = '' + make -C docs install + ''; + + postPatch = null; + postInstall = null; + + outputs = [ "out" ]; + + doCheck = false; + + meta.description = "man pages for LLVM ${version}"; +}) diff --git a/pkgs/development/compilers/llvm/8/openmp.nix b/pkgs/development/compilers/llvm/8/openmp.nix new file mode 100644 index 00000000000..1a628cf6dd4 --- /dev/null +++ b/pkgs/development/compilers/llvm/8/openmp.nix @@ -0,0 +1,25 @@ +{ stdenv +, fetch +, cmake +, llvm +, perl +, version +}: + +stdenv.mkDerivation { + name = "openmp-${version}"; + + src = fetch "openmp" "1xxxclzizcrfh0k870n4n3hh0khw14sv5i7s2kbdwl099k8b96cv"; + + nativeBuildInputs = [ cmake perl ]; + buildInputs = [ llvm ]; + + enableParallelBuilding = true; + + meta = { + description = "Components required to build an executable OpenMP program"; + homepage = http://openmp.llvm.org/; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/development/compilers/llvm/8/sanitizers-nongnu.patch b/pkgs/development/compilers/llvm/8/sanitizers-nongnu.patch new file mode 100644 index 00000000000..1f2ac97818e --- /dev/null +++ b/pkgs/development/compilers/llvm/8/sanitizers-nongnu.patch @@ -0,0 +1,412 @@ +From f7a253f8f85d0f49df6b73996737a3e84ac64236 Mon Sep 17 00:00:00 2001 +From: Will Dietz +Date: Mon, 24 Sep 2018 11:17:25 -0500 +Subject: [PATCH] Ported to 7.0, taken from gentoo-musl project. + +------ +Ported to compiler-rt-sanitizers-5.0.0. Taken from + +https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch +Signed-off-by: Jory A. Pratt + +Taken from gentoo-musl project, with a few additional minor fixes. +--- + lib/asan/asan_linux.cc | 4 +- + lib/interception/interception_linux.cc | 2 +- + lib/interception/interception_linux.h | 2 +- + lib/msan/msan_linux.cc | 2 +- + lib/sanitizer_common/sanitizer_allocator.cc | 2 +- + .../sanitizer_common_interceptors_ioctl.inc | 4 +- + .../sanitizer_common_syscalls.inc | 2 +- + lib/sanitizer_common/sanitizer_linux.cc | 8 +++- + .../sanitizer_linux_libcdep.cc | 10 ++--- + lib/sanitizer_common/sanitizer_platform.h | 6 +++ + .../sanitizer_platform_interceptors.h | 4 +- + .../sanitizer_platform_limits_posix.cc | 37 +++++++++++-------- + lib/tsan/rtl/tsan_platform_linux.cc | 2 +- + 13 files changed, 51 insertions(+), 34 deletions(-) + +diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc +index 625f32d40..73cf77aca 100644 +--- a/lib/asan/asan_linux.cc ++++ b/lib/asan/asan_linux.cc +@@ -46,7 +46,7 @@ + #include + #endif + +-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS ++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU + #include + extern "C" void* _DYNAMIC; + #elif SANITIZER_NETBSD +@@ -139,7 +139,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) { + UNIMPLEMENTED(); + } + +-#if SANITIZER_ANDROID ++#if SANITIZER_ANDROID || SANITIZER_NONGNU + // FIXME: should we do anything for Android? + void AsanCheckDynamicRTPrereqs() {} + void AsanCheckIncompatibleRT() {} +diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc +index 26bfcd8f6..529b234f7 100644 +--- a/lib/interception/interception_linux.cc ++++ b/lib/interception/interception_linux.cc +@@ -43,7 +43,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr, + } + + // Android and Solaris do not have dlvsym +-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD ++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU + void *GetFuncAddrVer(const char *func_name, const char *ver) { + return dlvsym(RTLD_NEXT, func_name, ver); + } +diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h +index 942c25609..24a4d5080 100644 +--- a/lib/interception/interception_linux.h ++++ b/lib/interception/interception_linux.h +@@ -36,7 +36,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver); + (::__interception::uptr) & WRAP(func)) + + // Android, Solaris and OpenBSD do not have dlvsym +-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD ++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU + #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \ + (::__interception::real_##func = (func##_f)( \ + unsigned long)::__interception::GetFuncAddrVer(#func, symver)) +diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc +index 385a650c4..6e30a8ce9 100644 +--- a/lib/msan/msan_linux.cc ++++ b/lib/msan/msan_linux.cc +@@ -13,7 +13,7 @@ + //===----------------------------------------------------------------------===// + + #include "sanitizer_common/sanitizer_platform.h" +-#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD ++#if SANITIZER_FREEBSD || (SANITIZER_LINUX && !SANITIZER_NONGNU) || SANITIZER_NETBSD + + #include "msan.h" + #include "msan_report.h" +diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc +index 6bfd5e5ee..048f6154f 100644 +--- a/lib/sanitizer_common/sanitizer_allocator.cc ++++ b/lib/sanitizer_common/sanitizer_allocator.cc +@@ -27,7 +27,7 @@ const char *SecondaryAllocatorName = "LargeMmapAllocator"; + + // ThreadSanitizer for Go uses libc malloc/free. + #if SANITIZER_GO || defined(SANITIZER_USE_MALLOC) +-# if SANITIZER_LINUX && !SANITIZER_ANDROID ++# if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + extern "C" void *__libc_malloc(uptr size); + # if !SANITIZER_GO + extern "C" void *__libc_memalign(uptr alignment, uptr size); +diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +index 2d633c173..b6eb23116 100644 +--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -104,7 +104,7 @@ static void ioctl_table_fill() { + _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz); + #endif + +-#if SANITIZER_LINUX ++#if SANITIZER_LINUX && !SANITIZER_NONGNU + // Conflicting request ids. + // _(CDROMAUDIOBUFSIZ, NONE, 0); + // _(SNDCTL_TMR_CONTINUE, NONE, 0); +@@ -365,7 +365,7 @@ static void ioctl_table_fill() { + _(VT_WAITACTIVE, NONE, 0); + #endif + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE + _(CYGETDEFTHRESH, WRITE, sizeof(int)); + _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); +diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc +index 469c8eb7e..24f87867d 100644 +--- a/lib/sanitizer_common/sanitizer_common_syscalls.inc ++++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc +@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) { + } + } + +-#if !SANITIZER_ANDROID ++#if !SANITIZER_ANDROID && !SANITIZER_NONGNU + PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim, + void *old_rlim) { + if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz); +diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc +index 96d6c1eff..9e2b7fb9d 100644 +--- a/lib/sanitizer_common/sanitizer_linux.cc ++++ b/lib/sanitizer_common/sanitizer_linux.cc +@@ -541,13 +541,13 @@ const char *GetEnv(const char *name) { + #endif + } + +-#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD ++#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_NONGNU + extern "C" { + SANITIZER_WEAK_ATTRIBUTE extern void *__libc_stack_end; + } + #endif + +-#if !SANITIZER_GO && !SANITIZER_FREEBSD && !SANITIZER_NETBSD && \ ++#if (!SANITIZER_GO || SANITIZER_NONGNU) && !SANITIZER_FREEBSD && !SANITIZER_NETBSD && \ + !SANITIZER_OPENBSD + static void ReadNullSepFileToArray(const char *path, char ***arr, + int arr_size) { +@@ -590,6 +590,10 @@ static void GetArgsAndEnv(char ***argv, char ***envp) { + #elif SANITIZER_NETBSD + *argv = __ps_strings->ps_argvstr; + *envp = __ps_strings->ps_envstr; ++#elif SANITIZER_NONGNU ++ static const int kMaxArgv = 2000, kMaxEnvp = 2000; ++ ReadNullSepFileToArray("/proc/self/cmdline", argv, kMaxArgv); ++ ReadNullSepFileToArray("/proc/self/environ", envp, kMaxEnvp); + #else // SANITIZER_FREEBSD + #if !SANITIZER_GO + if (&__libc_stack_end) { +diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc +index 4962ff832..438f94dbe 100644 +--- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc ++++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc +@@ -179,7 +179,7 @@ __attribute__((unused)) static bool GetLibcVersion(int *major, int *minor, + } + + #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && \ +- !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS ++ !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS && !SANITIZER_NONGNU + static uptr g_tls_size; + + #ifdef __i386__ +@@ -261,7 +261,7 @@ void InitTlsSize() { } + #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) || \ + defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) || \ + defined(__arm__)) && \ +- SANITIZER_LINUX && !SANITIZER_ANDROID ++ SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + // sizeof(struct pthread) from glibc. + static atomic_uintptr_t thread_descriptor_size; + +@@ -426,7 +426,7 @@ int GetSizeFromHdr(struct dl_phdr_info *info, size_t size, void *data) { + + #if !SANITIZER_GO + static void GetTls(uptr *addr, uptr *size) { +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + # if defined(__x86_64__) || defined(__i386__) || defined(__s390__) + *addr = ThreadSelf(); + *size = GetTlsSize(); +@@ -470,7 +470,7 @@ static void GetTls(uptr *addr, uptr *size) { + #elif SANITIZER_OPENBSD + *addr = 0; + *size = 0; +-#elif SANITIZER_ANDROID ++#elif SANITIZER_ANDROID || SANITIZER_NONGNU + *addr = 0; + *size = 0; + #elif SANITIZER_SOLARIS +@@ -486,7 +486,7 @@ static void GetTls(uptr *addr, uptr *size) { + #if !SANITIZER_GO + uptr GetTlsSize() { + #if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NETBSD || \ +- SANITIZER_OPENBSD || SANITIZER_SOLARIS ++ SANITIZER_OPENBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU + uptr addr, size; + GetTls(&addr, &size); + return size; +diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h +index d81e25580..e10680ac8 100644 +--- a/lib/sanitizer_common/sanitizer_platform.h ++++ b/lib/sanitizer_common/sanitizer_platform.h +@@ -208,6 +208,12 @@ + # define SANITIZER_SOLARIS32 0 + #endif + ++#if defined(__linux__) && !defined(__GLIBC__) ++# define SANITIZER_NONGNU 1 ++#else ++# define SANITIZER_NONGNU 0 ++#endif ++ + #if defined(__myriad2__) + # define SANITIZER_MYRIAD2 1 + #else +diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h +index f95539a73..6c53b3415 100644 +--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h ++++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h +@@ -39,7 +39,7 @@ + # include "sanitizer_platform_limits_solaris.h" + #endif + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + # define SI_LINUX_NOT_ANDROID 1 + #else + # define SI_LINUX_NOT_ANDROID 0 +@@ -322,7 +322,7 @@ + #define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID) + #define SANITIZER_INTERCEPT_SHMCTL \ + (SI_NETBSD || SI_OPENBSD || SI_SOLARIS || \ +- ((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && \ ++ ((SI_FREEBSD || SI_LINUX_NOT_ANDROID || SANITIZER_NONGNU) && \ + SANITIZER_WORDSIZE == 64)) // NOLINT + #define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID + #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +index 54da635d7..2f6ff69c3 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -14,6 +14,9 @@ + + #include "sanitizer_platform.h" + ++// Workaround musl <--> linux conflicting definition of 'struct sysinfo' ++#define _LINUX_SYSINFO_H ++ + #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC + // Tests in this file assume that off_t-dependent data structures match the + // libc ABI. For example, struct dirent here is what readdir() function (as +@@ -138,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t; + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + #include +-#include ++# if !SANITIZER_NONGNU ++# include ++# endif + #include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include + #if HAVE_RPC_XDR_H + # include + #elif HAVE_TIRPC_RPC_XDR_H +@@ -251,7 +256,7 @@ namespace __sanitizer { + unsigned struct_itimerspec_sz = sizeof(struct itimerspec); + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + // Use pre-computed size of struct ustat to avoid which + // has been removed from glibc 2.28. + #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ +@@ -322,7 +327,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr)); + unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + #endif + +-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID ++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU + int glob_nomatch = GLOB_NOMATCH; + int glob_altdirfunc = GLOB_ALTDIRFUNC; + #endif +@@ -416,7 +421,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + unsigned struct_termios_sz = sizeof(struct termios); + unsigned struct_winsize_sz = sizeof(struct winsize); + +-#if SANITIZER_LINUX ++#if SANITIZER_LINUX && !SANITIZER_NONGNU + unsigned struct_arpreq_sz = sizeof(struct arpreq); + unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf); + unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession); +@@ -466,7 +471,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + unsigned struct_vt_mode_sz = sizeof(struct vt_mode); + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); + unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); + #if EV_VERSION > (0x010000) +@@ -834,7 +839,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE; + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; + unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; + unsigned IOCTL_CYGETMON = CYGETMON; +@@ -989,7 +994,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr); + CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum); + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + +-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID ++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU + CHECK_TYPE_SIZE(glob_t); + CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc); + CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv); +@@ -1023,6 +1028,7 @@ CHECK_TYPE_SIZE(iovec); + CHECK_SIZE_AND_OFFSET(iovec, iov_base); + CHECK_SIZE_AND_OFFSET(iovec, iov_len); + ++#if !SANITIZER_NONGNU + CHECK_TYPE_SIZE(msghdr); + CHECK_SIZE_AND_OFFSET(msghdr, msg_name); + CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen); +@@ -1036,6 +1042,7 @@ CHECK_TYPE_SIZE(cmsghdr); + CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len); + CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level); + CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type); ++#endif + + #ifndef __GLIBC_PREREQ + #define __GLIBC_PREREQ(x, y) 0 +@@ -1145,7 +1152,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno); + + CHECK_TYPE_SIZE(ether_addr); + +-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID ++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU + CHECK_TYPE_SIZE(ipc_perm); + # if SANITIZER_FREEBSD + CHECK_SIZE_AND_OFFSET(ipc_perm, key); +@@ -1206,7 +1213,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr); + CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data); + #endif + +-#if SANITIZER_LINUX ++#if SANITIZER_LINUX && !SANITIZER_NONGNU + COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo)); + #endif + +@@ -1256,7 +1263,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE); + COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE); + #endif + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE)); + CHECK_SIZE_AND_OFFSET(FILE, _flags); + CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr); +@@ -1275,7 +1282,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain); + CHECK_SIZE_AND_OFFSET(FILE, _fileno); + #endif + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk)); + CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit); + CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev); +diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc +index de989b780..51a97b554 100644 +--- a/lib/tsan/rtl/tsan_platform_linux.cc ++++ b/lib/tsan/rtl/tsan_platform_linux.cc +@@ -294,7 +294,7 @@ void InitializePlatform() { + // This is required to properly "close" the fds, because we do not see internal + // closes within glibc. The code is a pure hack. + int ExtractResolvFDs(void *state, int *fds, int nfd) { +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + int cnt = 0; + struct __res_state *statp = (struct __res_state*)state; + for (int i = 0; i < MAXNS && cnt < nfd; i++) { +-- +2.19.0 + diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix index fbb4db72bd4..767eafc456c 100644 --- a/pkgs/development/compilers/ponyc/default.nix +++ b/pkgs/development/compilers/ponyc/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation ( rec { name = "ponyc-${version}"; - version = "0.26.0"; + version = "0.27.0"; src = fetchFromGitHub { owner = "ponylang"; repo = "ponyc"; rev = version; - sha256 = "1k1ysqk7j8kpysndps2ic9hprvp0z0d32d6jvqlapjrfccghy7dh"; + sha256 = "11vdfvv9xirfi92y7zza9pqimfx33w74vw7rg5n7l60qqc8y2cla"; }; buildInputs = [ llvm makeWrapper which ]; @@ -25,25 +25,15 @@ stdenv.mkDerivation ( rec { substituteInPlace packages/process/_test.pony \ --replace '=/bin' "${coreutils}/bin" - - # Fix llvm-ar check for darwin - substituteInPlace Makefile \ - --replace "llvm-ar-3.8" "llvm-ar" - # Remove impure system refs substituteInPlace src/libponyc/pkg/package.c \ - --replace "/usr/local/lib" "" - substituteInPlace src/libponyc/pkg/package.c \ + --replace "/usr/local/lib" "" \ --replace "/opt/local/lib" "" for file in `grep -irl '/usr/local/opt/libressl/lib' ./*`; do substituteInPlace $file --replace '/usr/local/opt/libressl/lib' "${stdenv.lib.getLib libressl}/lib" done - # Fix ponypath issue - substituteInPlace Makefile \ - --replace "PONYPATH=." "PONYPATH=.:\$(PONYPATH)" - export LLVM_CONFIG=${llvm}/bin/llvm-config '' + stdenv.lib.optionalString ((!stdenv.isDarwin) && (!cc.isClang) && lto) '' export LTO_PLUGIN=`find ${cc.cc}/ -name liblto_plugin.so` @@ -73,9 +63,7 @@ stdenv.mkDerivation ( rec { wrapProgram $out/bin/ponyc \ --prefix PATH ":" "${stdenv.cc}/bin" \ --set-default CC "$CC" \ - --prefix PONYPATH : "$out/lib" \ - --prefix PONYPATH : "${stdenv.lib.getLib pcre2}/lib" \ - --prefix PONYPATH : "${stdenv.lib.getLib libressl}/lib" + --prefix PONYPATH : "${stdenv.lib.makeLibraryPath [ pcre2 libressl (placeholder "out") ]}" ''; # Stripping breaks linking for ponyc diff --git a/pkgs/development/compilers/ponyc/pony-stable.nix b/pkgs/development/compilers/ponyc/pony-stable.nix index 6dfb099242d..821a9b8125c 100644 --- a/pkgs/development/compilers/ponyc/pony-stable.nix +++ b/pkgs/development/compilers/ponyc/pony-stable.nix @@ -2,20 +2,18 @@ stdenv.mkDerivation rec { name = "pony-stable-${version}"; - version = "0.1.6"; + version = "0.2.0"; src = fetchFromGitHub { owner = "ponylang"; repo = "pony-stable"; rev = version; - sha256 = "02lqba75psnxcxj2y8lm1fy1hmwa088nvxjghhpnlkqbwz7wa2sw"; + sha256 = "0zzcq0vsl6kcrsxwqzd3s9mq7aq5sg8si5c83rxyi9n6a06gnbh7"; }; buildInputs = [ ponyc ]; - installPhase = '' - make prefix=$out install - ''; + installFlags = [ "prefix=${placeholder "out"}" "install" ]; meta = { description = "A simple dependency manager for the Pony language."; diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix index bd4b10ddec0..2f3674fdbea 100644 --- a/pkgs/development/compilers/solc/default.nix +++ b/pkgs/development/compilers/solc/default.nix @@ -3,11 +3,12 @@ }: assert z3Support -> z3 != null; +assert z3Support -> stdenv.lib.versionAtLeast z3.version "4.6.0"; let - version = "0.5.3"; - rev = "10d17f245839f208ec5085309022a32cd2502f55"; - sha256 = "1jq41pd3nj534cricy1nq6wgk4wlwg239387n785aswpwd705jbb"; + version = "0.5.4"; + rev = "9549d8fff7343908228c3e8bedc309d1b83fc204"; + sha256 = "1r6wklp3ab2s1lrm70zv6p7blv9917ph1arjsb250j7b7bpjg5pq"; jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz; jsoncpp = fetchzip { url = jsoncppURL; diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index e27348b9455..316efcd0d59 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1075,6 +1075,9 @@ self: super: { cborg = doJailbreak super.cborg; serialise = doJailbreak (dontCheck super.serialise); + # https://github.com/haskell-hvr/netrc/pull/2#issuecomment-469526558 + netrc = doJailbreak super.netrc; + # https://github.com/phadej/tree-diff/issues/19 tree-diff = doJailbreak super.tree-diff; diff --git a/pkgs/development/interpreters/jruby/default.nix b/pkgs/development/interpreters/jruby/default.nix index cfefa8c95dc..79e7410c008 100644 --- a/pkgs/development/interpreters/jruby/default.nix +++ b/pkgs/development/interpreters/jruby/default.nix @@ -6,11 +6,11 @@ rubyVersion = callPackage ../ruby/ruby-version.nix {} "2" "3" "3" ""; jruby = stdenv.mkDerivation rec { name = "jruby-${version}"; - version = "9.2.5.0"; + version = "9.2.6.0"; src = fetchurl { url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz"; - sha256 = "0jgkpp90x4v3izl58r53lg5ndf9pm6q6qgwqvxhkb9zcha00ibgl"; + sha256 = "0g8fkv946icw82h7pmg5aqh5mrgiiz9izjcjx9ism2x92w7gz8bh"; }; buildInputs = [ makeWrapper ]; diff --git a/pkgs/development/interpreters/renpy/default.nix b/pkgs/development/interpreters/renpy/default.nix index 947f0580903..1b40c71e2ea 100644 --- a/pkgs/development/interpreters/renpy/default.nix +++ b/pkgs/development/interpreters/renpy/default.nix @@ -7,7 +7,7 @@ with pythonPackages; stdenv.mkDerivation rec { name = "renpy-${version}"; - version = "7.1.3"; + version = "7.2.0"; meta = with stdenv.lib; { description = "Ren'Py Visual Novel Engine"; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://www.renpy.org/dl/${version}/renpy-${version}-source.tar.bz2"; - sha256 = "0z6s1vzjb5jh0i79pv5kgynfrzqj1a1f3afrpmp2aaqbrljkidbn"; + sha256 = "1pnzxmh37zzldvlyklk2wgc8xbh3hm3wwmbl70zdphybjrxvc7i5"; }; patches = [ diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix index fae76c70612..3d0077833ef 100644 --- a/pkgs/development/interpreters/ruby/patchsets.nix +++ b/pkgs/development/interpreters/ruby/patchsets.nix @@ -16,6 +16,9 @@ rec { "${patchSet}/patches/ruby/2.5/head/railsexpress/02-improve-gc-stats.patch" "${patchSet}/patches/ruby/2.5/head/railsexpress/03-more-detailed-stacktrace.patch" ]; - "2.6.1" = ops useRailsExpress [ # no Rails Express patchset yet (2019-01-30) + "2.6.1" = ops useRailsExpress [ + "${patchSet}/patches/ruby/2.6/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch" + "${patchSet}/patches/ruby/2.6/head/railsexpress/02-improve-gc-stats.patch" + "${patchSet}/patches/ruby/2.6/head/railsexpress/03-more-detailed-stacktrace.patch" ]; } diff --git a/pkgs/development/interpreters/ruby/rvm-patchsets.nix b/pkgs/development/interpreters/ruby/rvm-patchsets.nix index 1598cbc56e1..d6cc2057602 100644 --- a/pkgs/development/interpreters/ruby/rvm-patchsets.nix +++ b/pkgs/development/interpreters/ruby/rvm-patchsets.nix @@ -3,6 +3,6 @@ fetchFromGitHub { owner = "skaes"; repo = "rvm-patchsets"; - rev = "ba5a3c6f972e1b957b4b3fe28b5730ef0e27bff3"; - sha256 = "0sjmhhb8hshxa58x062j44w0xdck8ykgpsg33wjr0wv9npwpkwrz"; + rev = "bdb42b13dd8653afc64676c0feb350e0c1880119"; + sha256 = "09fpx66cshyvrrmp3251d2pmqv0frjw940r421smsmpkny0dx613"; } diff --git a/pkgs/development/libraries/SDL2_image/default.nix b/pkgs/development/libraries/SDL2_image/default.nix index 5ab4a0dc6c7..a2ef54cc136 100644 --- a/pkgs/development/libraries/SDL2_image/default.nix +++ b/pkgs/development/libraries/SDL2_image/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, SDL2, libpng, libjpeg, libtiff, libungif, libXpm, zlib, Foundation }: +{ stdenv, fetchurl, SDL2, libpng, libjpeg, libtiff, libungif, libwebp, libXpm, zlib, Foundation }: stdenv.mkDerivation rec { name = "SDL2_image-${version}"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1b6f7002bm007y3zpyxb5r6ag0lml51jyvx1pwpj9sq24jfc8kp7"; }; - buildInputs = [ SDL2 libpng libjpeg libtiff libungif libXpm zlib ] + buildInputs = [ SDL2 libpng libjpeg libtiff libungif libwebp libXpm zlib ] ++ stdenv.lib.optional stdenv.isDarwin Foundation; diff --git a/pkgs/development/libraries/boringssl/default.nix b/pkgs/development/libraries/boringssl/default.nix index 9d65fb554ff..1fa503ad955 100644 --- a/pkgs/development/libraries/boringssl/default.nix +++ b/pkgs/development/libraries/boringssl/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; NIX_CFLAGS_COMPILE = "-Wno-error"; + GOCACHE="$TMPDIR/go-cache"; + installPhase = '' mkdir -p $out/bin $out/include $out/lib diff --git a/pkgs/development/libraries/ffms/default.nix b/pkgs/development/libraries/ffms/default.nix index 6b95d0f1692..8a5a9705cb2 100644 --- a/pkgs/development/libraries/ffms/default.nix +++ b/pkgs/development/libraries/ffms/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "ffms-${version}"; - version = "2.22"; + version = "2.23"; src = fetchFromGitHub { owner = "FFMS"; repo = "ffms2"; rev = version; - sha256 = "1ywcx1f3q533qfrbck5qhik3l617qhm062l8zixv02gnla7w6rkm"; + sha256 = "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"; }; NIX_CFLAGS_COMPILE = "-fPIC"; diff --git a/pkgs/development/libraries/gecode/default.nix b/pkgs/development/libraries/gecode/default.nix index 2d5556b3502..22e159d821a 100644 --- a/pkgs/development/libraries/gecode/default.nix +++ b/pkgs/development/libraries/gecode/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "gecode-${version}"; - version = "6.1.0"; + version = "6.1.1"; src = fetchFromGitHub { owner = "Gecode"; repo = "gecode"; rev = "release-${version}"; - sha256 = "1ijjy8ppx7djnkrkawsd00rmlf24qh1z13aap0h1azailw1pbrg4"; + sha256 = "07jyx17qsfx3wmd2zlcs0rxax8h3cs2g9aapxkdjdcsmfxsldqb7"; }; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch b/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch index 629ea102971..feb46021f8c 100644 --- a/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch +++ b/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch @@ -1,52 +1,69 @@ +diff --git a/data/meson.build b/data/meson.build +index f826864..8b8a25e 100644 --- a/data/meson.build +++ b/data/meson.build -@@ -7,7 +7,7 @@ +@@ -7,7 +7,7 @@ if get_option('enable-backend') conf.set('demo_agent', '') endif -- conf_dir = join_paths(get_option('sysconfdir'), 'geoclue') +- conf_dir = join_paths(sysconfdir, 'geoclue') + conf_dir = join_paths(sysconfdir_install, 'geoclue') configure_file(output: 'geoclue.conf', input: 'geoclue.conf.in', configuration: conf, -@@ -26,7 +26,7 @@ +@@ -26,7 +26,7 @@ if get_option('enable-backend') # DBus Service policy file dbus_service_dir = get_option('dbus-sys-dir') - if dbus_service_dir == '' -- dbus_service_dir = join_paths(get_option('sysconfdir'), 'dbus-1', 'system.d') + if dbus_service_dir == '' +- dbus_service_dir = join_paths(sysconfdir, 'dbus-1', 'system.d') + dbus_service_dir = join_paths(sysconfdir_install, 'dbus-1', 'system.d') endif configure_file(output: 'org.freedesktop.GeoClue2.conf', input: 'org.freedesktop.GeoClue2.conf.in', +diff --git a/demo/meson.build b/demo/meson.build +index 99c094f..a29ca96 100644 --- a/demo/meson.build +++ b/demo/meson.build -@@ -56,8 +56,7 @@ +@@ -56,7 +56,7 @@ if get_option('demo-agent') install_dir: desktop_dir) # Also install in the autostart directory. -- autostart_dir = join_paths(get_option('prefix'), -- get_option('sysconfdir'), -+ autostart_dir = join_paths(sysconfdir_install, - 'xdg', 'autostart') +- autostart_dir = join_paths(sysconfdir, 'xdg', 'autostart') ++ autostart_dir = join_paths(sysconfdir_install, 'xdg', 'autostart') meson.add_install_script('install-file.py', desktop_file.full_path(), + autostart_dir) +diff --git a/meson.build b/meson.build +index d738ef6..c794a1d 100644 --- a/meson.build +++ b/meson.build -@@ -22,6 +22,11 @@ +@@ -12,7 +12,11 @@ gclue_api_version='2.0' datadir = join_paths(get_option('prefix'), get_option('datadir')) - conf.set_quoted('LOCALEDIR', datadir + '/locale') - conf.set_quoted('SYSCONFDIR', get_option('sysconfdir')) + includedir = join_paths(get_option('prefix'), get_option('includedir')) + libexecdir = join_paths(get_option('prefix'), get_option('libexecdir')) +-sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir')) +if get_option('sysconfdir_install') != '' + sysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install')) +else + sysconfdir_install = get_option('sysconfdir') +endif + localedir = join_paths(datadir, 'locale') - configure_file(output: 'config.h', configuration : conf) - configinc = include_directories('.') + header_dir = 'libgeoclue-' + gclue_api_version +@@ -29,7 +33,7 @@ conf.set_quoted('PACKAGE_URL', 'http://www.freedesktop.org/wiki/Software/GeoClue + conf.set_quoted('PACKAGE_BUGREPORT', 'http://bugs.freedesktop.org/enter_bug.cgi?product=GeoClue') + conf.set_quoted('TEST_SRCDIR', meson.source_root() + '/data/') + conf.set_quoted('LOCALEDIR', localedir) +-conf.set_quoted('SYSCONFDIR', sysconfdir) ++conf.set_quoted('SYSCONFDIR', get_option('sysconfdir')) + conf.set10('GCLUE_USE_3G_SOURCE', get_option('3g-source')) + conf.set10('GCLUE_USE_CDMA_SOURCE', get_option('cdma-source')) + conf.set10('GCLUE_USE_MODEM_GPS_SOURCE', get_option('modem-gps-source')) +diff --git a/meson_options.txt b/meson_options.txt +index 83bc60e..b726329 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -34,3 +34,6 @@ +@@ -34,3 +34,6 @@ option('systemd-system-unit-dir', option('dbus-srv-user', type: 'string', value: 'root', description: 'The user (existing) as which the service will run') diff --git a/pkgs/development/libraries/geoclue/default.nix b/pkgs/development/libraries/geoclue/default.nix index 5e83ba71c1b..5b8951cb3e0 100644 --- a/pkgs/development/libraries/geoclue/default.nix +++ b/pkgs/development/libraries/geoclue/default.nix @@ -6,15 +6,15 @@ with stdenv.lib; stdenv.mkDerivation rec { - name = "geoclue-${version}"; - version = "2.5.1"; + pname = "geoclue"; + version = "2.5.2"; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; - owner = "geoclue"; - repo = "geoclue"; + owner = pname; + repo = pname; rev = version; - sha256 = "0vww6irijw5ss7vawkdi5z5wdpcgw4iqljn5vs3vbd4y3d0lzrbs"; + sha256 = "1zk6n28q030a9v03whad928b9zwq16d30ch369qv2c0994axdr5p"; }; patches = [ diff --git a/pkgs/development/libraries/hpx/default.nix b/pkgs/development/libraries/hpx/default.nix index db7dab1b6a7..c0028666482 100644 --- a/pkgs/development/libraries/hpx/default.nix +++ b/pkgs/development/libraries/hpx/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "hpx-${version}"; - version = "1.2.0"; + version = "1.2.1"; src = fetchFromGitHub { owner = "STEllAR-GROUP"; repo = "hpx"; rev = "${version}"; - sha256 = "1rliv42glns60bpmmvmgrglgmii42p8bmji349r6mr68f48iv4dx"; + sha256 = "18dk9413qcgljdlw2jfkk21lwi4iwc57s41yqnc3jp8vdj96w32s"; }; buildInputs = [ boost hwloc gperftools ]; diff --git a/pkgs/development/libraries/libgeotiff/default.nix b/pkgs/development/libraries/libgeotiff/default.nix index 48a1490caec..ed2711557e7 100644 --- a/pkgs/development/libraries/libgeotiff/default.nix +++ b/pkgs/development/libraries/libgeotiff/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, libtiff, libjpeg, proj, zlib}: stdenv.mkDerivation rec { - version = "1.4.2"; + version = "1.4.3"; name = "libgeotiff-${version}"; src = fetchurl { url = "https://download.osgeo.org/geotiff/libgeotiff/${name}.tar.gz"; - sha256 = "0vjy3bwfhljjx66p9w999i4mdhsf7vjshx29yc3pn5livf5091xd"; + sha256 = "0rbjqixi4c8yz19larlzq6jda0px2gpmpp9c52cyhplbjsdhsldq"; }; configureFlags = [ diff --git a/pkgs/development/libraries/libpqxx/default.nix b/pkgs/development/libraries/libpqxx/default.nix index f88543744da..ff7b7a1af1f 100644 --- a/pkgs/development/libraries/libpqxx/default.nix +++ b/pkgs/development/libraries/libpqxx/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "libpqxx"; - version = "6.3.1"; + version = "6.3.3"; src = fetchFromGitHub { owner = "jtv"; repo = pname; rev = version; - sha256 = "15na6iq4mspfa5vgayqzs0wqkqq9nk23d05qwn6xc3gpna2kyqsv"; + sha256 = "1gfi4ghnhzlkdza2ifvg6b2rk5qn0swq7ykphwmwalb166vj2wlx"; }; nativeBuildInputs = [ gnused python2 ]; diff --git a/pkgs/development/libraries/libsecret/default.nix b/pkgs/development/libraries/libsecret/default.nix index a369778111f..d3b07dfb049 100644 --- a/pkgs/development/libraries/libsecret/default.nix +++ b/pkgs/development/libraries/libsecret/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { pname = "libsecret"; - version = "0.18.7"; + version = "0.18.8"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "11ylmcfx6ff7xd1gpi58i2nbma83lz2xg0g2dq23w6snqhgzwrhd"; + sha256 = "058x64689k55wxfkdp4svhnwvv8jmqm7z5mrynybl38f4sfqiyiv"; }; postPatch = '' diff --git a/pkgs/development/libraries/libusbmuxd/default.nix b/pkgs/development/libraries/libusbmuxd/default.nix index 08aeba1254e..4192e3c14d3 100644 --- a/pkgs/development/libraries/libusbmuxd/default.nix +++ b/pkgs/development/libraries/libusbmuxd/default.nix @@ -2,15 +2,15 @@ stdenv.mkDerivation rec { pname = "libusbmuxd"; - version = "2018-07-23"; + version = "2019-01-18"; name = "${pname}-${version}"; src = fetchFromGitHub { owner = "libimobiledevice"; repo = pname; - rev = "78df9be5fc8222ed53846cb553de9b5d24c85c6c"; - sha256 = "05hbn0mbmv5ln9hfsvnf7i1mnp6ncbyfnl5w331kg4fi12wjshc5"; + rev = "c75605d862cd1c312494f6c715246febc26b2e05"; + sha256 = "0467a045k4znmaz61i7a2s7yywj67q830ja6zn7z39k5pqcl2z4p"; }; nativeBuildInputs = [ autoreconfHook pkgconfig ]; diff --git a/pkgs/development/libraries/nsss/default.nix b/pkgs/development/libraries/nsss/default.nix index 6c4a23ccaf2..f503799e6b1 100644 --- a/pkgs/development/libraries/nsss/default.nix +++ b/pkgs/development/libraries/nsss/default.nix @@ -4,8 +4,8 @@ with skawarePackages; buildPackage { pname = "nsss"; - version = "0.0.1.0"; - sha256 = "0f285bvpvhk40cqjpkc1jb36il0fkzzzjmc89gbbq3awl3w4r1i0"; + version = "0.0.1.1"; + sha256 = "14y1vl7n8vd5fh9bwiwwxxslisli8pz3a2f1sfv12l0p8ngpgm57"; description = "An implementation of a subset of the pwd.h, group.h and shadow.h family of functions."; diff --git a/pkgs/development/libraries/pyotherside/default.nix b/pkgs/development/libraries/pyotherside/default.nix index 0c2d4fa2b28..94347a546fc 100644 --- a/pkgs/development/libraries/pyotherside/default.nix +++ b/pkgs/development/libraries/pyotherside/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "pyotherside"; - version = "1.5.3"; + version = "1.5.4"; src = fetchFromGitHub { owner = "thp"; repo = "pyotherside"; rev = version; - sha256 = "1xaw1aarj8gpgpm4z3lk8klbssadrsf3xdyzqx10zcwy16amka7k"; + sha256 = "1cmmsmzmis4a463p2fjlzbkpw8r53wfvq3mldyfgmi14dkxr3ln3"; }; nativeBuildInputs = [ qmake ]; diff --git a/pkgs/development/libraries/qt-5/5.11/default.nix b/pkgs/development/libraries/qt-5/5.11/default.nix index 257e9215246..32245929ce6 100644 --- a/pkgs/development/libraries/qt-5/5.11/default.nix +++ b/pkgs/development/libraries/qt-5/5.11/default.nix @@ -65,7 +65,11 @@ let qtwebengine = [ ./qtwebengine-no-build-skip.patch ] ++ optional stdenv.cc.isClang ./qtwebengine-clang-fix.patch ++ optional stdenv.isDarwin ./qtwebengine-darwin-sdk-10.10.patch; - qtwebkit = [ ./qtwebkit.patch ]; + qtwebkit = [ ./qtwebkit.patch ] + ++ optionals stdenv.isDarwin [ + ./qtwebkit-darwin-no-readline.patch + ./qtwebkit-darwin-no-qos-classes.patch + ]; }; mkDerivation = diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch b/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch new file mode 100644 index 00000000000..a7087f51762 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch @@ -0,0 +1,11 @@ +diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake +--- a/Source/cmake/OptionsQt.cmake ++++ b/Source/cmake/OptionsQt.cmake +@@ -683,7 +683,6 @@ if (WIN32 AND COMPILER_IS_GCC_OR_CLANG) + endif () + + if (APPLE) +- SET_AND_EXPOSE_TO_BUILD(HAVE_QOS_CLASSES 1) + endif () + + if (ENABLE_MATHML) diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch b/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch new file mode 100644 index 00000000000..26d189d8601 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch @@ -0,0 +1,45 @@ +diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt +--- a/Source/JavaScriptCore/shell/CMakeLists.txt ++++ b/Source/JavaScriptCore/shell/CMakeLists.txt +@@ -9,7 +9,6 @@ set(JSC_LIBRARIES + ) + + if (WTF_OS_MAC_OS_X) +- list(APPEND JSC_LIBRARIES edit) + endif () + + if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC") +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -563,7 +563,6 @@ + #if PLATFORM(IOS) + + #define HAVE_NETWORK_EXTENSION 1 +-#define HAVE_READLINE 1 + #if USE(APPLE_INTERNAL_SDK) + #define USE_CFNETWORK 1 + #endif +@@ -650,7 +649,6 @@ + #define HAVE_MADV_DONTNEED 1 + #define HAVE_MERGESORT 1 + #define HAVE_PTHREAD_SETNAME_NP 1 +-#define HAVE_READLINE 1 + #define HAVE_SYS_TIMEB_H 1 + + #if !PLATFORM(GTK) && !PLATFORM(QT) +diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake +--- a/Source/WTF/wtf/PlatformMac.cmake ++++ b/Source/WTF/wtf/PlatformMac.cmake +@@ -2,11 +2,9 @@ set(WTF_LIBRARY_TYPE SHARED) + + find_library(COCOA_LIBRARY Cocoa) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) +-find_library(READLINE_LIBRARY Readline) + list(APPEND WTF_LIBRARIES + ${COREFOUNDATION_LIBRARY} + ${COCOA_LIBRARY} +- ${READLINE_LIBRARY} + libicucore.dylib + ) + diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index e6af24cd8f6..c7773baad0c 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -61,7 +61,11 @@ let qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; qtwebengine = [ ./qtwebengine-no-build-skip.patch ]; - qtwebkit = [ ./qtwebkit.patch ]; + qtwebkit = [ ./qtwebkit.patch ] + ++ optionals stdenv.isDarwin [ + ./qtwebkit-darwin-no-readline.patch + ./qtwebkit-darwin-no-qos-classes.patch + ]; }; mkDerivation = diff --git a/pkgs/development/libraries/qt-5/5.12/qtwebkit-darwin-no-qos-classes.patch b/pkgs/development/libraries/qt-5/5.12/qtwebkit-darwin-no-qos-classes.patch new file mode 100644 index 00000000000..a7087f51762 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.12/qtwebkit-darwin-no-qos-classes.patch @@ -0,0 +1,11 @@ +diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake +--- a/Source/cmake/OptionsQt.cmake ++++ b/Source/cmake/OptionsQt.cmake +@@ -683,7 +683,6 @@ if (WIN32 AND COMPILER_IS_GCC_OR_CLANG) + endif () + + if (APPLE) +- SET_AND_EXPOSE_TO_BUILD(HAVE_QOS_CLASSES 1) + endif () + + if (ENABLE_MATHML) diff --git a/pkgs/development/libraries/qt-5/5.12/qtwebkit-darwin-no-readline.patch b/pkgs/development/libraries/qt-5/5.12/qtwebkit-darwin-no-readline.patch new file mode 100644 index 00000000000..26d189d8601 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.12/qtwebkit-darwin-no-readline.patch @@ -0,0 +1,45 @@ +diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt +--- a/Source/JavaScriptCore/shell/CMakeLists.txt ++++ b/Source/JavaScriptCore/shell/CMakeLists.txt +@@ -9,7 +9,6 @@ set(JSC_LIBRARIES + ) + + if (WTF_OS_MAC_OS_X) +- list(APPEND JSC_LIBRARIES edit) + endif () + + if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC") +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -563,7 +563,6 @@ + #if PLATFORM(IOS) + + #define HAVE_NETWORK_EXTENSION 1 +-#define HAVE_READLINE 1 + #if USE(APPLE_INTERNAL_SDK) + #define USE_CFNETWORK 1 + #endif +@@ -650,7 +649,6 @@ + #define HAVE_MADV_DONTNEED 1 + #define HAVE_MERGESORT 1 + #define HAVE_PTHREAD_SETNAME_NP 1 +-#define HAVE_READLINE 1 + #define HAVE_SYS_TIMEB_H 1 + + #if !PLATFORM(GTK) && !PLATFORM(QT) +diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake +--- a/Source/WTF/wtf/PlatformMac.cmake ++++ b/Source/WTF/wtf/PlatformMac.cmake +@@ -2,11 +2,9 @@ set(WTF_LIBRARY_TYPE SHARED) + + find_library(COCOA_LIBRARY Cocoa) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) +-find_library(READLINE_LIBRARY Readline) + list(APPEND WTF_LIBRARIES + ${COREFOUNDATION_LIBRARY} + ${COCOA_LIBRARY} +- ${READLINE_LIBRARY} + libicucore.dylib + ) + diff --git a/pkgs/development/libraries/qt-5/5.9/qtwebkit.patch b/pkgs/development/libraries/qt-5/5.9/qtwebkit.patch index c78cb58f564..718bda36194 100644 --- a/pkgs/development/libraries/qt-5/5.9/qtwebkit.patch +++ b/pkgs/development/libraries/qt-5/5.9/qtwebkit.patch @@ -1,16 +1,3 @@ -diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri -index 69e4cd1f3..3f729a75e 100644 ---- a/Source/WTF/WTF.pri -+++ b/Source/WTF/WTF.pri -@@ -12,7 +12,7 @@ mac { - # Mac OS does ship libicu but not the associated header files. - # Therefore WebKit provides adequate header files. - INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH -- LIBS += -licucore -+ LIBS += /usr/lib/libicucore.dylib - } else:!use?(wchar_unicode): { - win32 { - CONFIG(static, static|shared) { diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp index a923d49aa..46772a4bb 100644 --- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp diff --git a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix index 526fc2b8b2d..6b43f6ed25c 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix @@ -8,7 +8,7 @@ }: let - inherit (lib) optional optionals getLib; + inherit (lib) optional optionals getDev getLib; hyphen = stdenv.mkDerivation rec { name = "hyphen-2.8.8"; src = fetchurl { @@ -20,28 +20,30 @@ let ''; buildInputs = [ perl ]; }; + usingAnnulenWebkitFork = lib.versionAtLeast qtbase.version "5.11.0"; in qtModule { name = "qtwebkit"; qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ] ++ optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia - ++ optional (lib.versionAtLeast qtbase.version "5.11.0") qtwebchannel; + ++ optional usingAnnulenWebkitFork qtwebchannel; buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ] - ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ cf-private OpenGL ]) - ++ optionals (lib.versionAtLeast qtbase.version "5.11.0") [ hyphen ]; + ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ cf-private ICU OpenGL ]) + ++ optional usingAnnulenWebkitFork hyphen; nativeBuildInputs = [ bison2 flex gdb gperf perl pkgconfig python2 ruby - ] ++ optionals (lib.versionAtLeast qtbase.version "5.11.0") [ cmake ]; + ] ++ optional usingAnnulenWebkitFork cmake; - cmakeFlags = optionals (lib.versionAtLeast qtbase.version "5.11.0") [ "-DPORT=Qt" ]; - - __impureHostDeps = optionals (stdenv.isDarwin) [ - "/usr/lib/libicucore.dylib" - ]; + cmakeFlags = optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ] + ++ optionals stdenv.isDarwin [ + "-DQt5Multimedia_DIR=${getDev qtmultimedia}/lib/cmake/Qt5Multimedia" + "-DQt5MultimediaWidgets_DIR=${getDev qtmultimedia}/lib/cmake/Qt5MultimediaWidgets" + "-DMACOS_FORCE_SYSTEM_XML_LIBRARIES=OFF" + ]); # QtWebKit overrides qmake's default_pre and default_post features, # so its custom qmake files must be found first at the front of QMAKEPATH. - preConfigure = '' + preConfigure = stdenv.lib.optionalString (!usingAnnulenWebkitFork) '' QMAKEPATH="$PWD/Tools/qmake''${QMAKEPATH:+:}$QMAKEPATH" fixQtBuiltinPaths . '*.pr?' # Fix hydra's "Log limit exceeded" diff --git a/pkgs/development/libraries/science/math/ipopt/default.nix b/pkgs/development/libraries/science/math/ipopt/default.nix index 7e58a4c7c98..1ae46bad257 100644 --- a/pkgs/development/libraries/science/math/ipopt/default.nix +++ b/pkgs/development/libraries/science/math/ipopt/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "ipopt-${version}"; - version = "3.12.11"; + version = "3.12.12"; src = fetchurl { url = "https://www.coin-or.org/download/source/Ipopt/Ipopt-${version}.zip"; - sha256 = "1qihlwwqsqpbwpp6zqfa7nrmb55dndppzmdy98897aiknaa2650h"; + sha256 = "1kh680ilw1c304hdh9i267gqhp0xg58jy8dk4svjvjc86sp1i23q"; }; CXXDEFS = [ "-DHAVE_RAND" "-DHAVE_CSTRING" "-DHAVE_CSTDIO" ]; diff --git a/pkgs/development/libraries/skalibs/default.nix b/pkgs/development/libraries/skalibs/default.nix index 0667e1265b3..e56d677e8a4 100644 --- a/pkgs/development/libraries/skalibs/default.nix +++ b/pkgs/development/libraries/skalibs/default.nix @@ -4,8 +4,8 @@ with skawarePackages; buildPackage { pname = "skalibs"; - version = "2.7.0.0"; - sha256 = "0mnprdf4w4ami0db22rwd111m037cdmn2p8xa4i8cbwxcrv4sjcn"; + version = "2.8.0.0"; + sha256 = "06hyiq68jh32qwr2mydw3dbnm4zzpynnnmprd5g4iqavsycyvh53"; description = "A set of general-purpose C programming libraries"; diff --git a/pkgs/development/libraries/utmps/default.nix b/pkgs/development/libraries/utmps/default.nix index 881e58ae61e..81562659c0d 100644 --- a/pkgs/development/libraries/utmps/default.nix +++ b/pkgs/development/libraries/utmps/default.nix @@ -4,8 +4,8 @@ with skawarePackages; buildPackage { pname = "utmps"; - version = "0.0.2.0"; - sha256 = "0fzq3qm88sm5ibl9k9k6ns6jd7iw72vh9k10bsfl5dxd2yi6iqyr"; + version = "0.0.2.1"; + sha256 = "1q90mcn50irhhrzl3h9bvhsn7hac0zgg67b6hfhmc5yvh4c8wnr4"; description = "A secure utmpx and wtmp implementation"; diff --git a/pkgs/development/libraries/xdg-desktop-portal/default.nix b/pkgs/development/libraries/xdg-desktop-portal/default.nix index 0fdcb684b2d..3f02946c770 100644 --- a/pkgs/development/libraries/xdg-desktop-portal/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fontconfig, flatpak, gsettings-desktop-schemas, acl, dbus, fuse, wrapGAppsHook }: +{ stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fontconfig, flatpak, gsettings-desktop-schemas, acl, dbus, fuse, geoclue2, wrapGAppsHook }: stdenv.mkDerivation rec { pname = "xdg-desktop-portal"; @@ -22,13 +22,12 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ autoreconfHook pkgconfig libxml2 wrapGAppsHook ]; - buildInputs = [ glib pipewire fontconfig flatpak acl dbus fuse gsettings-desktop-schemas ]; + buildInputs = [ glib pipewire fontconfig flatpak acl dbus geoclue2 fuse gsettings-desktop-schemas ]; doCheck = true; # XXX: investigate! configureFlags = [ "--enable-installed-tests" - "--disable-geoclue" # Requires 2.5.2, not released yet ]; makeFlags = [ diff --git a/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-client.nix b/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-client.nix new file mode 100644 index 00000000000..10977c16f83 --- /dev/null +++ b/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-client.nix @@ -0,0 +1,41 @@ +args @ { fetchurl, ... }: +rec { + baseName = ''lfarm-client''; + version = ''lfarm-20150608-git''; + + description = ''Client component of lfarm, a library for distributing work across machines.''; + + deps = [ args."alexandria" args."bordeaux-threads" args."cl-store" args."flexi-streams" args."lfarm-common" args."lparallel" args."split-sequence" args."trivial-gray-streams" args."usocket" ]; + + src = fetchurl { + url = ''http://beta.quicklisp.org/archive/lfarm/2015-06-08/lfarm-20150608-git.tgz''; + sha256 = ''1rkjcfam4601yczs13pi2qgi5jql0c150dxja53hkcnqhkyqgl66''; + }; + + packageName = "lfarm-client"; + + asdFilesToKeep = ["lfarm-client.asd"]; + overrides = x: x; +} +/* (SYSTEM lfarm-client DESCRIPTION + Client component of lfarm, a library for distributing work across machines. + SHA256 1rkjcfam4601yczs13pi2qgi5jql0c150dxja53hkcnqhkyqgl66 URL + http://beta.quicklisp.org/archive/lfarm/2015-06-08/lfarm-20150608-git.tgz + MD5 4cc91df44a932b3175a1eabf73d6e42d NAME lfarm-client FILENAME + lfarm-client DEPS + ((NAME alexandria FILENAME alexandria) + (NAME bordeaux-threads FILENAME bordeaux-threads) + (NAME cl-store FILENAME cl-store) + (NAME flexi-streams FILENAME flexi-streams) + (NAME lfarm-common FILENAME lfarm-common) + (NAME lparallel FILENAME lparallel) + (NAME split-sequence FILENAME split-sequence) + (NAME trivial-gray-streams FILENAME trivial-gray-streams) + (NAME usocket FILENAME usocket)) + DEPENDENCIES + (alexandria bordeaux-threads cl-store flexi-streams lfarm-common lparallel + split-sequence trivial-gray-streams usocket) + VERSION lfarm-20150608-git SIBLINGS + (lfarm-admin lfarm-common lfarm-gss lfarm-launcher lfarm-server lfarm-ssl + lfarm-test) + PARASITES NIL) */ diff --git a/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-common.nix b/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-common.nix new file mode 100644 index 00000000000..4a5fe87982a --- /dev/null +++ b/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-common.nix @@ -0,0 +1,41 @@ +args @ { fetchurl, ... }: +rec { + baseName = ''lfarm-common''; + version = ''lfarm-20150608-git''; + + description = ''(private) Common components of lfarm, a library for distributing +work across machines.''; + + deps = [ args."alexandria" args."bordeaux-threads" args."cl-store" args."flexi-streams" args."split-sequence" args."trivial-gray-streams" args."usocket" ]; + + src = fetchurl { + url = ''http://beta.quicklisp.org/archive/lfarm/2015-06-08/lfarm-20150608-git.tgz''; + sha256 = ''1rkjcfam4601yczs13pi2qgi5jql0c150dxja53hkcnqhkyqgl66''; + }; + + packageName = "lfarm-common"; + + asdFilesToKeep = ["lfarm-common.asd"]; + overrides = x: x; +} +/* (SYSTEM lfarm-common DESCRIPTION + (private) Common components of lfarm, a library for distributing +work across machines. + SHA256 1rkjcfam4601yczs13pi2qgi5jql0c150dxja53hkcnqhkyqgl66 URL + http://beta.quicklisp.org/archive/lfarm/2015-06-08/lfarm-20150608-git.tgz + MD5 4cc91df44a932b3175a1eabf73d6e42d NAME lfarm-common FILENAME + lfarm-common DEPS + ((NAME alexandria FILENAME alexandria) + (NAME bordeaux-threads FILENAME bordeaux-threads) + (NAME cl-store FILENAME cl-store) + (NAME flexi-streams FILENAME flexi-streams) + (NAME split-sequence FILENAME split-sequence) + (NAME trivial-gray-streams FILENAME trivial-gray-streams) + (NAME usocket FILENAME usocket)) + DEPENDENCIES + (alexandria bordeaux-threads cl-store flexi-streams split-sequence + trivial-gray-streams usocket) + VERSION lfarm-20150608-git SIBLINGS + (lfarm-admin lfarm-client lfarm-gss lfarm-launcher lfarm-server lfarm-ssl + lfarm-test) + PARASITES NIL) */ diff --git a/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-server.nix b/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-server.nix new file mode 100644 index 00000000000..354d6c31507 --- /dev/null +++ b/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-server.nix @@ -0,0 +1,40 @@ +args @ { fetchurl, ... }: +rec { + baseName = ''lfarm-server''; + version = ''lfarm-20150608-git''; + + description = ''Server component of lfarm, a library for distributing work across machines.''; + + deps = [ args."alexandria" args."bordeaux-threads" args."cl-store" args."flexi-streams" args."lfarm-common" args."split-sequence" args."trivial-gray-streams" args."usocket" ]; + + src = fetchurl { + url = ''http://beta.quicklisp.org/archive/lfarm/2015-06-08/lfarm-20150608-git.tgz''; + sha256 = ''1rkjcfam4601yczs13pi2qgi5jql0c150dxja53hkcnqhkyqgl66''; + }; + + packageName = "lfarm-server"; + + asdFilesToKeep = ["lfarm-server.asd"]; + overrides = x: x; +} +/* (SYSTEM lfarm-server DESCRIPTION + Server component of lfarm, a library for distributing work across machines. + SHA256 1rkjcfam4601yczs13pi2qgi5jql0c150dxja53hkcnqhkyqgl66 URL + http://beta.quicklisp.org/archive/lfarm/2015-06-08/lfarm-20150608-git.tgz + MD5 4cc91df44a932b3175a1eabf73d6e42d NAME lfarm-server FILENAME + lfarm-server DEPS + ((NAME alexandria FILENAME alexandria) + (NAME bordeaux-threads FILENAME bordeaux-threads) + (NAME cl-store FILENAME cl-store) + (NAME flexi-streams FILENAME flexi-streams) + (NAME lfarm-common FILENAME lfarm-common) + (NAME split-sequence FILENAME split-sequence) + (NAME trivial-gray-streams FILENAME trivial-gray-streams) + (NAME usocket FILENAME usocket)) + DEPENDENCIES + (alexandria bordeaux-threads cl-store flexi-streams lfarm-common + split-sequence trivial-gray-streams usocket) + VERSION lfarm-20150608-git SIBLINGS + (lfarm-admin lfarm-client lfarm-common lfarm-gss lfarm-launcher lfarm-ssl + lfarm-test) + PARASITES NIL) */ diff --git a/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-ssl.nix b/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-ssl.nix new file mode 100644 index 00000000000..348c71fe966 --- /dev/null +++ b/pkgs/development/lisp-modules/quicklisp-to-nix-output/lfarm-ssl.nix @@ -0,0 +1,42 @@ +args @ { fetchurl, ... }: +rec { + baseName = ''lfarm-ssl''; + version = ''lfarm-20150608-git''; + + description = ''SSL support for lfarm''; + + deps = [ args."alexandria" args."babel" args."bordeaux-threads" args."cffi" args."cl_plus_ssl" args."cl-store" args."flexi-streams" args."lfarm-common" args."split-sequence" args."trivial-features" args."trivial-garbage" args."trivial-gray-streams" args."usocket" ]; + + src = fetchurl { + url = ''http://beta.quicklisp.org/archive/lfarm/2015-06-08/lfarm-20150608-git.tgz''; + sha256 = ''1rkjcfam4601yczs13pi2qgi5jql0c150dxja53hkcnqhkyqgl66''; + }; + + packageName = "lfarm-ssl"; + + asdFilesToKeep = ["lfarm-ssl.asd"]; + overrides = x: x; +} +/* (SYSTEM lfarm-ssl DESCRIPTION SSL support for lfarm SHA256 + 1rkjcfam4601yczs13pi2qgi5jql0c150dxja53hkcnqhkyqgl66 URL + http://beta.quicklisp.org/archive/lfarm/2015-06-08/lfarm-20150608-git.tgz + MD5 4cc91df44a932b3175a1eabf73d6e42d NAME lfarm-ssl FILENAME lfarm-ssl DEPS + ((NAME alexandria FILENAME alexandria) (NAME babel FILENAME babel) + (NAME bordeaux-threads FILENAME bordeaux-threads) + (NAME cffi FILENAME cffi) (NAME cl+ssl FILENAME cl_plus_ssl) + (NAME cl-store FILENAME cl-store) + (NAME flexi-streams FILENAME flexi-streams) + (NAME lfarm-common FILENAME lfarm-common) + (NAME split-sequence FILENAME split-sequence) + (NAME trivial-features FILENAME trivial-features) + (NAME trivial-garbage FILENAME trivial-garbage) + (NAME trivial-gray-streams FILENAME trivial-gray-streams) + (NAME usocket FILENAME usocket)) + DEPENDENCIES + (alexandria babel bordeaux-threads cffi cl+ssl cl-store flexi-streams + lfarm-common split-sequence trivial-features trivial-garbage + trivial-gray-streams usocket) + VERSION lfarm-20150608-git SIBLINGS + (lfarm-admin lfarm-client lfarm-common lfarm-gss lfarm-launcher + lfarm-server lfarm-test) + PARASITES NIL) */ diff --git a/pkgs/development/lisp-modules/quicklisp-to-nix-systems.txt b/pkgs/development/lisp-modules/quicklisp-to-nix-systems.txt index 0987d83ea64..5c56ddfa2a2 100644 --- a/pkgs/development/lisp-modules/quicklisp-to-nix-systems.txt +++ b/pkgs/development/lisp-modules/quicklisp-to-nix-systems.txt @@ -95,6 +95,9 @@ let-plus lev lisp-namespace local-time +lfarm-client +lfarm-server +lfarm-ssl lparallel lquery marshal diff --git a/pkgs/development/lisp-modules/quicklisp-to-nix.nix b/pkgs/development/lisp-modules/quicklisp-to-nix.nix index 4e8cb6ebe03..0de50a17ad6 100644 --- a/pkgs/development/lisp-modules/quicklisp-to-nix.nix +++ b/pkgs/development/lisp-modules/quicklisp-to-nix.nix @@ -20,6 +20,21 @@ let quicklisp-to-nix-packages = rec { })); + "lfarm-common" = buildLispPackage + ((f: x: (x // (f x))) + (qlOverrides."lfarm-common" or (x: {})) + (import ./quicklisp-to-nix-output/lfarm-common.nix { + inherit fetchurl; + "alexandria" = quicklisp-to-nix-packages."alexandria"; + "bordeaux-threads" = quicklisp-to-nix-packages."bordeaux-threads"; + "cl-store" = quicklisp-to-nix-packages."cl-store"; + "flexi-streams" = quicklisp-to-nix-packages."flexi-streams"; + "split-sequence" = quicklisp-to-nix-packages."split-sequence"; + "trivial-gray-streams" = quicklisp-to-nix-packages."trivial-gray-streams"; + "usocket" = quicklisp-to-nix-packages."usocket"; + })); + + "stefil" = buildLispPackage ((f: x: (x // (f x))) (qlOverrides."stefil" or (x: {})) @@ -1234,6 +1249,60 @@ let quicklisp-to-nix-packages = rec { })); + "lfarm-ssl" = buildLispPackage + ((f: x: (x // (f x))) + (qlOverrides."lfarm-ssl" or (x: {})) + (import ./quicklisp-to-nix-output/lfarm-ssl.nix { + inherit fetchurl; + "alexandria" = quicklisp-to-nix-packages."alexandria"; + "babel" = quicklisp-to-nix-packages."babel"; + "bordeaux-threads" = quicklisp-to-nix-packages."bordeaux-threads"; + "cffi" = quicklisp-to-nix-packages."cffi"; + "cl_plus_ssl" = quicklisp-to-nix-packages."cl_plus_ssl"; + "cl-store" = quicklisp-to-nix-packages."cl-store"; + "flexi-streams" = quicklisp-to-nix-packages."flexi-streams"; + "lfarm-common" = quicklisp-to-nix-packages."lfarm-common"; + "split-sequence" = quicklisp-to-nix-packages."split-sequence"; + "trivial-features" = quicklisp-to-nix-packages."trivial-features"; + "trivial-garbage" = quicklisp-to-nix-packages."trivial-garbage"; + "trivial-gray-streams" = quicklisp-to-nix-packages."trivial-gray-streams"; + "usocket" = quicklisp-to-nix-packages."usocket"; + })); + + + "lfarm-server" = buildLispPackage + ((f: x: (x // (f x))) + (qlOverrides."lfarm-server" or (x: {})) + (import ./quicklisp-to-nix-output/lfarm-server.nix { + inherit fetchurl; + "alexandria" = quicklisp-to-nix-packages."alexandria"; + "bordeaux-threads" = quicklisp-to-nix-packages."bordeaux-threads"; + "cl-store" = quicklisp-to-nix-packages."cl-store"; + "flexi-streams" = quicklisp-to-nix-packages."flexi-streams"; + "lfarm-common" = quicklisp-to-nix-packages."lfarm-common"; + "split-sequence" = quicklisp-to-nix-packages."split-sequence"; + "trivial-gray-streams" = quicklisp-to-nix-packages."trivial-gray-streams"; + "usocket" = quicklisp-to-nix-packages."usocket"; + })); + + + "lfarm-client" = buildLispPackage + ((f: x: (x // (f x))) + (qlOverrides."lfarm-client" or (x: {})) + (import ./quicklisp-to-nix-output/lfarm-client.nix { + inherit fetchurl; + "alexandria" = quicklisp-to-nix-packages."alexandria"; + "bordeaux-threads" = quicklisp-to-nix-packages."bordeaux-threads"; + "cl-store" = quicklisp-to-nix-packages."cl-store"; + "flexi-streams" = quicklisp-to-nix-packages."flexi-streams"; + "lfarm-common" = quicklisp-to-nix-packages."lfarm-common"; + "lparallel" = quicklisp-to-nix-packages."lparallel"; + "split-sequence" = quicklisp-to-nix-packages."split-sequence"; + "trivial-gray-streams" = quicklisp-to-nix-packages."trivial-gray-streams"; + "usocket" = quicklisp-to-nix-packages."usocket"; + })); + + "local-time" = buildLispPackage ((f: x: (x // (f x))) (qlOverrides."local-time" or (x: {})) diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 8a9618e1f1e..b36eb02e655 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -70,26 +70,6 @@ basexx = buildLuarocksPackage { }; }; }; -cqueues = buildLuarocksPackage { - pname = "cqueues"; - version = "20171014.52-0"; - - src = fetchurl { - url = https://luarocks.org/cqueues-20171014.52-0.src.rock; - sha256 = "0q3iy1ja20nq2sn2n6badzhjq5kni86pfc09n5g2c46q9ja3vfzx"; - }; - disabled = ( lua.luaversion != "5.2"); - propagatedBuildInputs = [lua ]; - buildType="make"; - - meta = { - homepage = "http://25thandclement.com/~william/projects/cqueues.html"; - description="Continuation Queues: Embeddable asynchronous networking, threading, and notification framework for Lua on Unix."; - license = { - fullName = "MIT/X11"; - }; - }; -}; dkjson = buildLuarocksPackage { pname = "dkjson"; version = "2.5-2"; diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index b78f7f9c007..fa8fdfc22d7 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -5,19 +5,6 @@ with super; ##########################################3 #### manual fixes for generated packages ##########################################3 - cqueues = super.cqueues.override({ - nativeBuildInputs = [ pkgs.gnum4 ]; - buildInputs = [ pkgs.openssl ]; - extraConfig = with pkgs; '' - variables={ - CRYPTO_INCDIR="${openssl.dev}/include"; - CRYPTO_LIBDIR="${openssl.out}/lib"; - OPENSSL_INCDIR="${openssl.dev}/include"; - OPENSSL_LIBDIR="${openssl.out}/lib"; - } - ''; - }); - lgi = super.lgi.overrideAttrs(oa: { nativeBuildInputs = [ pkgs.pkgconfig ]; buildInputs = with pkgs; oa.buildInputs ++ [ glib gobjectIntrospection]; diff --git a/pkgs/development/ocaml-modules/stdlib-shims/default.nix b/pkgs/development/ocaml-modules/stdlib-shims/default.nix new file mode 100644 index 00000000000..d76ec29e63a --- /dev/null +++ b/pkgs/development/ocaml-modules/stdlib-shims/default.nix @@ -0,0 +1,18 @@ +{ buildDunePackage, lib, fetchurl, ocaml }: + +buildDunePackage rec { + pname = "stdlib-shims"; + version = "0.1.0"; + src = fetchurl { + url = "https://github.com/ocaml/${pname}/releases/download/${version}/${pname}-${version}.tbz"; + sha256 = "1jv6yb47f66239m7hsz7zzw3i48mjpbvfgpszws48apqx63wjwsk"; + }; + minimumOCamlVersion = "4.02"; + doCheck = true; + meta = { + description = "Shims for forward-compatibility between versions of the OCaml standard library"; + homepage = "https://github.com/ocaml/stdlib-shims"; + inherit (ocaml.meta) license; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/development/python-modules/pex/default.nix b/pkgs/development/python-modules/pex/default.nix index 8bac0c1c537..f0ac35feefd 100644 --- a/pkgs/development/python-modules/pex/default.nix +++ b/pkgs/development/python-modules/pex/default.nix @@ -24,6 +24,7 @@ buildPythonPackage rec { homepage = "https://github.com/pantsbuild/pex"; license = licenses.asl20; maintainers = with maintainers; [ copumpkin ]; + broken = true; }; } diff --git a/pkgs/development/python-modules/pygame_sdl2/default.nix b/pkgs/development/python-modules/pygame_sdl2/default.nix index 916bf7f692d..18eced7e806 100644 --- a/pkgs/development/python-modules/pygame_sdl2/default.nix +++ b/pkgs/development/python-modules/pygame_sdl2/default.nix @@ -4,12 +4,12 @@ buildPythonPackage rec { pname = "pygame_sdl2"; version = "2.1.0"; - renpy_version = "6.99.14"; + renpy_version = "7.2.0"; name = "${pname}-${version}-${renpy_version}"; src = fetchurl { url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}-for-renpy-${renpy_version}.tar.gz"; - sha256 = "1zsnb2bivbwysgxmfg9iv12arhpf3gqkmqinhciz955hlqv016b9"; + sha256 = "1amgsb6mm8ssf7vdcs5dr8rlxrgyhh29m4i573z1cw61ynd7vgcw"; }; # force rebuild of headers needed for install @@ -17,17 +17,13 @@ buildPythonPackage rec { rm -rf gen gen3 ''; - patches = [ - # fix for recent sdl2 - (fetchpatch { - url = "https://github.com/apoleon/pygame_sdl2/commit/ced6051f4a4559a725804cc58c079e1efea0a573.patch"; - sha256 = "08rqjzvdlmmdf8kyd8ws5lzjy1mrwnds4fdy38inkyw7saydcxyr"; - }) + nativeBuildInputs = [ + SDL2.dev cython ]; buildInputs = [ SDL2 SDL2_image SDL2_ttf SDL2_mixer - cython libjpeg libpng + libjpeg libpng ]; diff --git a/pkgs/development/python-modules/pymediainfo/default.nix b/pkgs/development/python-modules/pymediainfo/default.nix index a7908171d69..61acce347ef 100644 --- a/pkgs/development/python-modules/pymediainfo/default.nix +++ b/pkgs/development/python-modules/pymediainfo/default.nix @@ -14,19 +14,12 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pymediainfo/__init__.py \ - --replace 'CDLL(library_file)' \ - 'CDLL("${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}")' \ - --replace 'CDLL("libmediainfo.0.dylib")' \ - 'CDLL("${libmediainfo}/lib/libmediainfo.0${stdenv.hostPlatform.extensions.sharedLibrary}")' \ - --replace 'CDLL("libmediainfo.dylib")' \ - 'CDLL("${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}")' \ - --replace 'CDLL("libmediainfo.so.0")' \ - 'CDLL("${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}.0")' - - # Fix test, remove after version 2.3.0 - substituteInPlace tests/test_pymediainfo.py \ - --replace 'codec, "AVC"' 'format, "AVC"' \ - --replace 'codec, "AAC LC"' 'format, "AAC"' + --replace "libmediainfo.0.dylib" \ + "${libmediainfo}/lib/libmediainfo.0${stdenv.hostPlatform.extensions.sharedLibrary}" \ + --replace "libmediainfo.dylib" \ + "${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}" \ + --replace "libmediainfo.so.0" \ + "${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}.0" ''; nativeBuildInputs = [ setuptools_scm ]; diff --git a/pkgs/development/python-modules/pyside/default.nix b/pkgs/development/python-modules/pyside/default.nix index 1d61854cb67..37ffd8e76e3 100644 --- a/pkgs/development/python-modules/pyside/default.nix +++ b/pkgs/development/python-modules/pyside/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, cmake, buildPythonPackage, pysideGeneratorrunner, pysideShiboken, qt4 }: +{ lib, fetchurl, cmake, buildPythonPackage, pysideGeneratorrunner, pysideShiboken, qt4, mesa }: # This derivation provides a Python module and should therefore be called via `python-packages.nix`. buildPythonPackage rec { @@ -15,12 +15,13 @@ buildPythonPackage rec { nativeBuildInputs = [ cmake pysideGeneratorrunner pysideShiboken qt4 ]; + buildInputs = [ mesa ]; + makeFlags = "QT_PLUGIN_PATH=" + pysideShiboken + "/lib/generatorrunner"; meta = { description = "LGPL-licensed Python bindings for the Qt cross-platform application and UI framework"; license = lib.licenses.lgpl21; homepage = http://www.pyside.org; - broken = true; }; } diff --git a/pkgs/development/python-modules/qscintilla/default.nix b/pkgs/development/python-modules/qscintilla/default.nix index c4ea8ff2e73..91c2009744f 100644 --- a/pkgs/development/python-modules/qscintilla/default.nix +++ b/pkgs/development/python-modules/qscintilla/default.nix @@ -17,7 +17,9 @@ disabledIf (isPy3k || isPyPy) src = pkgs.qscintilla.src; - buildInputs = [ pkgs.xorg.lndir pyqt4.qt pyqt4 ]; + nativeBuildInputs = [ pkgs.xorg.lndir ]; + + buildInputs = [ pyqt4.qt pyqt4 ]; preConfigure = '' mkdir -p $out diff --git a/pkgs/development/python-modules/rawkit/default.nix b/pkgs/development/python-modules/rawkit/default.nix index e8be12b2669..6bee2bf1b0a 100644 --- a/pkgs/development/python-modules/rawkit/default.nix +++ b/pkgs/development/python-modules/rawkit/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, buildPythonPackage +{ stdenv, fetchPypi, buildPythonPackage, fetchpatch , libraw , pytest, mock }: @@ -11,6 +11,14 @@ buildPythonPackage rec { sha256 = "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"; }; + patches = [ + # Python 3.7 compatibility + (fetchpatch { + url = https://github.com/photoshell/rawkit/commit/663e90afa835d398aedd782c87b8cd0bff64bc9f.patch; + sha256 = "1cdw0x9bgk0b5jnpjnmd8jpbaryarr3cjqizq44366qh3l0jycxy"; + }) + ]; + buildInputs = [ libraw ]; checkInputs = [ pytest mock ]; diff --git a/pkgs/development/python-modules/resampy/default.nix b/pkgs/development/python-modules/resampy/default.nix index 4f9c4410765..e9e51756d9f 100644 --- a/pkgs/development/python-modules/resampy/default.nix +++ b/pkgs/development/python-modules/resampy/default.nix @@ -1,11 +1,12 @@ { stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pytest , pytestcov , numpy , scipy , cython +, numba , six }: @@ -13,16 +14,20 @@ buildPythonPackage rec { pname = "resampy"; version = "0.2.1"; - src = fetchPypi { - inherit pname version; - sha256 = "7f6912ca2b746eb9bcdc05c52fcef088f0b7ba1ca6ee0b2d0a359d18fc57f8f8"; + # No tests in PyPi Archive + src = fetchFromGitHub { + owner = "bmcfee"; + repo = pname; + rev = version; + sha256 = "0a2bxj042y62dimm2i4vglbhpwbybam07mcl67cb6pmfsw9fbqhj"; }; checkInputs = [ pytest pytestcov ]; - propagatedBuildInputs = [ numpy scipy cython six ]; + propagatedBuildInputs = [ numpy scipy cython numba six ]; - # No tests included - doCheck = false; + checkPhase = '' + pytest tests + ''; meta = with stdenv.lib; { homepage = https://github.com/bmcfee/resampy; diff --git a/pkgs/development/python-modules/rpy2/default.nix b/pkgs/development/python-modules/rpy2/default.nix index 7ff5b0343ea..1b4ab4d40db 100644 --- a/pkgs/development/python-modules/rpy2/default.nix +++ b/pkgs/development/python-modules/rpy2/default.nix @@ -58,6 +58,10 @@ buildPythonPackage rec { tidyr ]) ++ extraRPackages ++ rWrapper.recommendedPackages; + nativeBuildInputs = [ + R # needed at setup time to detect R_HOME (alternatively set R_HOME explicitly) + ]; + patches = [ # R_LIBS_SITE is used by the nix r package to point to the installed R libraries. # This patch sets R_LIBS_SITE when rpy2 is imported. diff --git a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix b/pkgs/development/python-modules/tensorflow-tensorboard/default.nix index b196fc8edce..7840e6de009 100644 --- a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix +++ b/pkgs/development/python-modules/tensorflow-tensorboard/default.nix @@ -26,12 +26,16 @@ buildPythonPackage rec { sha256 = "19ixs811ndx8qh72dif0ywjss3rv7pf1khsgg6rvfjb9nw8wgjc2"; } else { python = "py2"; - sha256 = "1mkyb5gn952i4s7fmc9ay4yh74ysrqbiqna6dl1qmahjpbaavbf5"; + sha256 = "0qpv6jsf6jjvdl95qvarn006kfj5a99mq925d73xg4af50ssvkrf"; })); - propagatedBuildInputs = [ numpy werkzeug protobuf - markdown - grpcio absl-py ]; # ++ lib.optional (!isPy3k) futures; + propagatedBuildInputs = [ + numpy + werkzeug + protobuf + markdown + grpcio absl-py + ] ++ lib.optional (!isPy3k) futures; meta = with stdenv.lib; { description = "TensorFlow's Visualization Toolkit"; diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index e1c25d9eca7..03f1e66bf50 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -55,7 +55,8 @@ in buildPythonPackage rec { in fetchurl dls.${key}; propagatedBuildInputs = [ protobuf numpy termcolor grpcio six astor absl-py gast tensorflow-estimator tensorflow-tensorboard keras-applications keras-preprocessing ] - ++ lib.optional (!isPy3k) mock; + ++ lib.optional (!isPy3k) mock + ++ lib.optionals (pythonOlder "3.4") [ backports_weakref ]; # Upstream has a pip hack that results in bin/tensorboard being in both tensorflow # and the propageted input tensorflow-tensorboard which causes environment collisions. diff --git a/pkgs/development/tools/buildah/default.nix b/pkgs/development/tools/buildah/default.nix index 8d2b1d17b2d..c4e8c446e83 100644 --- a/pkgs/development/tools/buildah/default.nix +++ b/pkgs/development/tools/buildah/default.nix @@ -3,13 +3,13 @@ , go-md2man }: let - version = "1.4"; + version = "1.7.1"; src = fetchFromGitHub { rev = "v${version}"; owner = "containers"; repo = "buildah"; - sha256 = "0b9pfi22qcqyp0im8vp02ibrwd49ghgi64d5l98z01cj52n2j2dz"; + sha256 = "083s0bcajks2qnxq6cn9lax5aiyvicf60rf3ifgqksl9skr748qb"; }; goPackagePath = "github.com/containers/buildah"; diff --git a/pkgs/development/tools/cachix/cachix-api.nix b/pkgs/development/tools/cachix/cachix-api.nix new file mode 100644 index 00000000000..de8184308b2 --- /dev/null +++ b/pkgs/development/tools/cachix/cachix-api.nix @@ -0,0 +1,33 @@ +{ mkDerivation, aeson, base, base16-bytestring, bytestring, conduit +, cookie, cryptonite, deepseq, exceptions, hspec, hspec-discover +, http-api-data, http-media, lens, memory, protolude, resourcet +, servant, servant-auth, servant-auth-server, servant-auth-swagger +, servant-client, servant-swagger, servant-swagger-ui-core, stdenv +, string-conv, swagger2, text, transformers +}: +mkDerivation { + pname = "cachix-api"; + version = "0.2.0"; + sha256 = "73f27484d3748fe02ce834549dd3a04c92110390f7d9adb4c391bad2ececbef2"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson base base16-bytestring bytestring conduit cookie cryptonite + deepseq exceptions http-api-data http-media lens memory resourcet + servant servant-auth servant-auth-server servant-auth-swagger + servant-client servant-swagger string-conv swagger2 text + transformers + ]; + executableHaskellDepends = [ aeson base ]; + testHaskellDepends = [ + aeson base base16-bytestring bytestring conduit cookie cryptonite + hspec http-api-data http-media lens memory protolude servant + servant-auth servant-auth-server servant-auth-swagger + servant-swagger servant-swagger-ui-core string-conv swagger2 text + transformers + ]; + testToolDepends = [ hspec-discover ]; + homepage = "https://github.com/cachix/cachix#readme"; + description = "Servant HTTP API specification for https://cachix.org"; + license = stdenv.lib.licenses.asl20; +} diff --git a/pkgs/development/tools/cachix/cachix.nix b/pkgs/development/tools/cachix/cachix.nix new file mode 100644 index 00000000000..0f5a354ec94 --- /dev/null +++ b/pkgs/development/tools/cachix/cachix.nix @@ -0,0 +1,39 @@ +{ mkDerivation, async, base, base16-bytestring, base64-bytestring +, bytestring, cachix-api, conduit, conduit-extra, cookie +, cryptonite, data-default, dhall, directory, ed25519, filepath +, fsnotify, here, hspec, hspec-discover, http-client +, http-client-tls, http-conduit, http-types, lzma-conduit +, megaparsec, memory, mmorph, netrc, optparse-applicative, process +, protolude, retry, safe-exceptions, servant, servant-auth +, servant-auth-client, servant-client, servant-client-core +, servant-conduit, stdenv, temporary, text, unix, uri-bytestring +, versions +}: +mkDerivation { + pname = "cachix"; + version = "0.2.0"; + sha256 = "16ba70af7f2ba4bc147ba84c34c9884bee589237a1d935f932c5e0b68157665a"; + revision = "1"; + editedCabalFile = "103ypqp0kclc1814q2ci5fi2jpfbxwmjqfsnkvwf3c1vr8cqplmh"; + isLibrary = true; + isExecutable = true; + enableSeparateDataOutput = true; + libraryHaskellDepends = [ + async base base16-bytestring base64-bytestring bytestring + cachix-api conduit conduit-extra cookie cryptonite data-default + dhall directory ed25519 filepath fsnotify here http-client + http-client-tls http-conduit http-types lzma-conduit megaparsec + memory mmorph netrc optparse-applicative process protolude retry + safe-exceptions servant servant-auth servant-auth-client + servant-client servant-client-core servant-conduit text unix + uri-bytestring versions + ]; + executableHaskellDepends = [ base cachix-api ]; + executableToolDepends = [ hspec-discover ]; + testHaskellDepends = [ + base cachix-api directory here hspec protolude temporary + ]; + homepage = "https://github.com/cachix/cachix#readme"; + description = "Command line client for Nix binary cache hosting https://cachix.org"; + license = stdenv.lib.licenses.asl20; +} diff --git a/pkgs/development/tools/cachix/default.nix b/pkgs/development/tools/cachix/default.nix new file mode 100644 index 00000000000..94527c8a4b5 --- /dev/null +++ b/pkgs/development/tools/cachix/default.nix @@ -0,0 +1,8 @@ +{ haskellPackages, haskell }: + +(haskellPackages.override { + overrides = self: super: { + cachix = haskell.lib.justStaticExecutables (super.callPackage ./cachix.nix {}); + cachix-api = super.callPackage ./cachix-api.nix {}; + }; +}).cachix diff --git a/pkgs/development/tools/ocaml/ocamlbuild/default.nix b/pkgs/development/tools/ocaml/ocamlbuild/default.nix index 3f42e71e778..ec9ff6f4ba9 100644 --- a/pkgs/development/tools/ocaml/ocamlbuild/default.nix +++ b/pkgs/development/tools/ocaml/ocamlbuild/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, ocaml, findlib }: let - version = "0.12.0"; + version = "0.14.0"; in stdenv.mkDerivation { name = "ocamlbuild-${version}"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { owner = "ocaml"; repo = "ocamlbuild"; rev = version; - sha256 = "1shyim50ms0816fphc4mk0kldcx3pnba2i6m10q0cbm18m9d7chq"; + sha256 = "1hb5mcdz4wv7sh1pj7dq9q4fgz5h3zg7frpiya6s8zd3ypwzq0kh"; }; createFindlibDestdir = true; diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index 110403af2ac..6824653a6fb 100644 --- a/pkgs/games/minetest/default.nix +++ b/pkgs/games/minetest/default.nix @@ -72,11 +72,9 @@ let }; v5 = { - version = "git-5.0.0-dev-2019-01-08"; - rev = "95d4ff6d1b62945decc85003a99588bb0539c45b"; - sha256 = "1qn42d2lfgwadb26mix6c7j457zsl8cqqjfwhaa8y34hii1q44bw"; - dataRev = "a2c9523bce5bcefdc930ff6f14d6d94f57473be9"; - dataSha256 = "1p26zvnmq99cqlrby4294mp2fmp8iqdcjld0ph39x41ifc50lfdf"; + version = "5.0.0"; + sha256 = "1b8n8nzlvmld1hl3zgs1xg4jbc1nsf1m2bn7fi794vdr06s6n911"; + dataSha256 = "186i1pna2f3fwa2001y8mw5131h0sndhfdxzfqq2gnr1m83sjm0w"; }; in { diff --git a/pkgs/games/steam/steam.nix b/pkgs/games/steam/steam.nix index 95493498f5e..3e29ceb5b01 100644 --- a/pkgs/games/steam/steam.nix +++ b/pkgs/games/steam/steam.nix @@ -2,14 +2,14 @@ let traceLog = "/tmp/steam-trace-dependencies.log"; - version = "1.0.0.56"; + version = "1.0.0.59"; in stdenv.mkDerivation rec { name = "steam-original-${version}"; src = fetchurl { url = "http://repo.steampowered.com/steam/pool/steam/s/steam/steam_${version}.tar.gz"; - sha256 = "01jgp909biqf4rr56kb08jkl7g5xql6r2g4ch6lc71njgcsbn5fs"; + sha256 = "17yrziy2bmzcppp5v3ycdjll250k4idak4rjakmw8gvr96whs255"; }; makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ]; diff --git a/pkgs/games/trigger/default.nix b/pkgs/games/trigger/default.nix index ae16510fdc5..0050ef19cea 100644 --- a/pkgs/games/trigger/default.nix +++ b/pkgs/games/trigger/default.nix @@ -2,11 +2,11 @@ , SDL2, freealut, SDL2_image, openal, physfs, zlib, libGLU_combined, glew }: stdenv.mkDerivation rec { - name = "trigger-rally-0.6.5"; + name = "trigger-rally-0.6.6"; src = fetchurl { url = "mirror://sourceforge/trigger-rally/${name}.tar.gz"; - sha256 = "095s4sx0s1ijlarkh84rvzlv4nxh9llrsal1lb3m3pf0v228gnzj"; + sha256 = "08qa2f2s8zyn42ff6jb1gsi64d916020ixkzvl16kbb88rabqra8"; }; buildInputs = [ SDL2 freealut SDL2_image openal physfs zlib libGLU_combined glew ]; diff --git a/pkgs/misc/vim-plugins/update.py b/pkgs/misc/vim-plugins/update.py index d3412822fdf..8a8e20da8d7 100755 --- a/pkgs/misc/vim-plugins/update.py +++ b/pkgs/misc/vim-plugins/update.py @@ -111,16 +111,20 @@ class Plugin: return copy -GET_PLUGINS = """(with import {}; +GET_PLUGINS = f"""(with import {{}}; let + inherit (vimUtils.override {{inherit vim;}}) buildVimPluginFrom2Nix; + generated = callPackage {ROOT}/generated.nix {{ + inherit buildVimPluginFrom2Nix; + }}; hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value; getChecksum = name: value: - if hasChecksum value then { + if hasChecksum value then {{ submodules = value.src.fetchSubmodules or false; sha256 = value.src.outputHash; rev = value.src.rev; - } else null; - checksums = lib.mapAttrs getChecksum vimPlugins; + }} else null; + checksums = lib.mapAttrs getChecksum generated; in lib.filterAttrs (n: v: v != null) checksums)""" diff --git a/pkgs/misc/vscode-extensions/wakatime/default.nix b/pkgs/misc/vscode-extensions/wakatime/default.nix index 77284e4dfa8..df69cb7065b 100644 --- a/pkgs/misc/vscode-extensions/wakatime/default.nix +++ b/pkgs/misc/vscode-extensions/wakatime/default.nix @@ -1,4 +1,5 @@ -{ stdenv, wakatime, vscode-utils }: +{ stdenv +, wakatime, vscode-utils }: let inherit (vscode-utils) buildVscodeMarketplaceExtension; @@ -12,9 +13,8 @@ in }; postPatch = '' - mkdir -p out/wakatime-master - - cp -rt out/wakatime-master --no-preserve=all ${wakatime}/lib/python*/site-packages/wakatime + mkdir -p dist/wakatime-master + cp -rt dist/wakatime-master --no-preserve=all ${wakatime}/lib/python*/site-packages/wakatime ''; meta = with stdenv.lib; { diff --git a/pkgs/os-specific/linux/forkstat/default.nix b/pkgs/os-specific/linux/forkstat/default.nix index bde2cbbafa6..5d304d8ac03 100644 --- a/pkgs/os-specific/linux/forkstat/default.nix +++ b/pkgs/os-specific/linux/forkstat/default.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation rec { name = "forkstat-${version}"; - version = "0.02.03"; + version = "0.02.09"; src = fetchurl { - url = "http://kernel.ubuntu.com/~cking/tarballs/forkstat/forkstat-${version}.tar.gz"; - sha256 = "1dl95ijs9bs9s9i629bi88qmvxjl25ym742gc063bysbp8drban1"; + url = "http://kernel.ubuntu.com/~cking/tarballs/forkstat/forkstat-${version}.tar.xz"; + sha256 = "1h5ha9w6rawh9kx39swjxs029202qxi0j9w38y7ilwq5pj447bxw"; }; installFlags = [ "DESTDIR=$(out)" ]; postInstall = '' diff --git a/pkgs/os-specific/linux/kernel/linux-5.0.nix b/pkgs/os-specific/linux/kernel/linux-5.0.nix new file mode 100644 index 00000000000..70ad2ab0072 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-5.0.nix @@ -0,0 +1,18 @@ +{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: + +with stdenv.lib; + +buildLinux (args // rec { + version = "5.0"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg; + + # branchVersion needs to be x.y + extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version))); + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "0hrf3b1mk1sf8vbl9knccblghmg05d5ypmc2f9d9y5crchd18ys3"; + }; +} // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/s6-linux-utils/default.nix b/pkgs/os-specific/linux/s6-linux-utils/default.nix index 0d208a6eb55..bd6b84ea73c 100644 --- a/pkgs/os-specific/linux/s6-linux-utils/default.nix +++ b/pkgs/os-specific/linux/s6-linux-utils/default.nix @@ -4,8 +4,8 @@ with skawarePackages; buildPackage { pname = "s6-linux-utils"; - version = "2.5.0.0"; - sha256 = "04q2z71dkzahd2ppga2zikclz2qk014c23gm7rigqxjc8rs1amvq"; + version = "2.5.0.1"; + sha256 = "0bpcaah3rbz4i013bkarr7wxmfvisjyxg0z78xg5zfbgajpgjxx1"; description = "A set of minimalistic Linux-specific system utilities"; platforms = stdenv.lib.platforms.linux; diff --git a/pkgs/os-specific/linux/smemstat/default.nix b/pkgs/os-specific/linux/smemstat/default.nix index c4d699c395e..6abbd2d1ec5 100644 --- a/pkgs/os-specific/linux/smemstat/default.nix +++ b/pkgs/os-specific/linux/smemstat/default.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation rec { name = "smemstat-${version}"; - version = "0.02.00"; + version = "0.02.03"; src = fetchurl { - url = "http://kernel.ubuntu.com/~cking/tarballs/smemstat/smemstat-${version}.tar.gz"; - sha256 = "16in8bzsrrcz7mc5qvyvjkxgpzz4bnq8zvkb7vsv6qfgyd3xr1dp"; + url = "http://kernel.ubuntu.com/~cking/tarballs/smemstat/smemstat-${version}.tar.xz"; + sha256 = "04q06wb37n4g1dlsjl8j2bwzd7qis4wanm0f4xg8y29br6skljx1"; }; buildInputs = [ ncurses ]; installFlags = [ "DESTDIR=$(out)" ]; diff --git a/pkgs/os-specific/linux/sysvinit/default.nix b/pkgs/os-specific/linux/sysvinit/default.nix index 0927934b0ba..8549e7ccd54 100644 --- a/pkgs/os-specific/linux/sysvinit/default.nix +++ b/pkgs/os-specific/linux/sysvinit/default.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, withoutInitTools ? false }: -let version = "2.93"; in +let version = "2.94"; in stdenv.mkDerivation { name = (if withoutInitTools then "sysvtools" else "sysvinit") + "-" + version; src = fetchurl { url = "mirror://savannah/sysvinit/sysvinit-${version}.tar.xz"; - sha256 = "1zx84vrzv615na661dd6mg4wh999m0jp25lsa241961x4c74cba7"; + sha256 = "05wshfgrijp3pi9rpfsa0yx4w3bf5v6hlwjqw79nlhz53xjca2by"; }; prePatch = '' diff --git a/pkgs/os-specific/linux/wireless-tools/default.nix b/pkgs/os-specific/linux/wireless-tools/default.nix index f883bf0d226..687bb7647cf 100644 --- a/pkgs/os-specific/linux/wireless-tools/default.nix +++ b/pkgs/os-specific/linux/wireless-tools/default.nix @@ -1,17 +1,21 @@ {stdenv, fetchurl}: stdenv.mkDerivation rec { - name = "wireless-tools-${version}"; - version = "30.pre2"; + pname = "wireless-tools"; + version = "30.pre9"; src = fetchurl { url = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.${version}.tar.gz"; - sha256 = "01lgf592nk8fnk7l5afqvar4szkngwpgcv4xh58qsg9wkkjlhnls"; + sha256 = "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"; }; - preBuild = " - makeFlagsArray=(PREFIX=$out CC=$CC LDCONFIG=: AR=$AR RANLIB=$RANLIB) - "; + makeFlags = [ + "PREFIX=${placeholder "out"}" + "CC:=$(CC)" + "AR:=$(AR)" + "RANLIB:=$(RANLIB)" + "LDCONFIG=:" + ]; meta = { platforms = stdenv.lib.platforms.linux; diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix index 5f8358a45d6..b34a44715a5 100644 --- a/pkgs/servers/amqp/rabbitmq-server/default.nix +++ b/pkgs/servers/amqp/rabbitmq-server/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "rabbitmq-server-${version}"; - version = "3.7.11"; + version = "3.7.12"; src = fetchurl { url = "https://github.com/rabbitmq/rabbitmq-server/releases/download/v${version}/${name}.tar.xz"; - sha256 = "04m9ikm7ywx63y68lf3rxds97nr9czdzg82c1m1f823m89kmpgi0"; + sha256 = "14w7czxqdxgmsqxrvphzpyha1nq3yfhka4vy8wyzwixindgj493q"; }; buildInputs = diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix index 550a8fa13cc..0183d745990 100644 --- a/pkgs/servers/dns/bind/default.nix +++ b/pkgs/servers/dns/bind/default.nix @@ -8,14 +8,14 @@ assert enableSeccomp -> libseccomp != null; assert enablePython -> python3 != null; -let version = "9.12.3-P1"; in +let version = "9.12.3-P4"; in stdenv.mkDerivation rec { name = "bind-${version}"; src = fetchurl { url = "https://ftp.isc.org/isc/bind9/${version}/${name}.tar.gz"; - sha256 = "0wzdbn6ig851354cjdys5q3gvqcvl2gmmih1gzr8ldl7sy4r7dvc"; + sha256 = "01pj47z5582rd538dmbzf1msw4jc8j4zr0zx4ciy88r6qr9l80fi"; }; outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ]; diff --git a/pkgs/servers/monitoring/cadvisor/default.nix b/pkgs/servers/monitoring/cadvisor/default.nix index ff0c926de59..58ef9fa32b9 100644 --- a/pkgs/servers/monitoring/cadvisor/default.nix +++ b/pkgs/servers/monitoring/cadvisor/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ go ]; + GOCACHE="$TMPDIR/go-cache"; + buildPhase = '' mkdir -p Godeps/_workspace/src/github.com/google/ ln -s $(pwd) Godeps/_workspace/src/github.com/google/cadvisor diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix index a8203ce1b16..75a0498dd3f 100644 --- a/pkgs/servers/mqtt/mosquitto/default.nix +++ b/pkgs/servers/mqtt/mosquitto/default.nix @@ -1,23 +1,29 @@ -{ stdenv, fetchFromGitHub, fetchpatch, cmake, docbook_xsl, libxslt -, openssl, libuuid, libwebsockets, c-ares, libuv }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, docbook_xsl, libxslt +, openssl, libuuid, libwebsockets, c-ares, libuv +, systemd ? null }: -stdenv.mkDerivation rec { +let + withSystemd = stdenv.isLinux; + +in stdenv.mkDerivation rec { name = "mosquitto-${version}"; - version = "1.5.5"; + version = "1.5.8"; src = fetchFromGitHub { owner = "eclipse"; repo = "mosquitto"; rev = "v${version}"; - sha256 = "1sfwmvrglfy5gqfk004kvbjldqr36dqz6xmppbgfhr47j5zs66xc"; + sha256 = "1rf8g6fq7g1mhwsajsgvvlynasybgc51v0qg5j6ynsxfh8yi7s6r"; }; postPatch = '' - substituteInPlace man/manpage.xsl \ - --replace /usr/share/xml/docbook/stylesheet/ ${docbook_xsl}/share/xml/ + for f in html manpage ; do + substituteInPlace man/$f.xsl \ + --replace http://docbook.sourceforge.net/release/xsl/current ${docbook_xsl}/share/xml/docbook-xsl + done for f in {lib,lib/cpp,src}/CMakeLists.txt ; do - substituteInPlace $f --replace /sbin/ldconfig ldconfig + substituteInPlace $f --replace /sbin/ldconfig true done # the manpages are not generated when using cmake @@ -26,7 +32,9 @@ stdenv.mkDerivation rec { popd ''; - buildInputs = [ openssl libuuid libwebsockets c-ares libuv ]; + buildInputs = [ + openssl libuuid libwebsockets c-ares libuv + ] ++ lib.optional withSystemd systemd; nativeBuildInputs = [ cmake docbook_xsl libxslt ]; @@ -35,7 +43,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DWITH_THREADING=ON" "-DWITH_WEBSOCKETS=ON" - ]; + ] ++ lib.optional withSystemd "-DWITH_SYSTEMD=ON"; meta = with stdenv.lib; { description = "An open source MQTT v3.1/3.1.1 broker"; diff --git a/pkgs/servers/search/groonga/default.nix b/pkgs/servers/search/groonga/default.nix index b86077a53f5..3e76cd163c8 100644 --- a/pkgs/servers/search/groonga/default.nix +++ b/pkgs/servers/search/groonga/default.nix @@ -7,11 +7,11 @@ stdenv.mkDerivation rec { name = "groonga-${version}"; - version = "8.1.0"; + version = "8.1.1"; src = fetchurl { url = "https://packages.groonga.org/source/groonga/${name}.tar.gz"; - sha256 = "1qwrzw0rvzkkmpgbk0rd5slj6h7jj53f0g685f5gwhg2dpxk52br"; + sha256 = "0laijnx05xc90jjmza4kq2h8pxn3lgsmn2fgn3zl66fy4fxm1fy4"; }; buildInputs = with stdenv.lib; diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 64aa3ae1ada..d51b4eeb427 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -1612,16 +1612,16 @@ lib.makeScope newScope (self: with self; { meta.platforms = stdenv.lib.platforms.unix; }) {}; - xdm = callPackage ({ stdenv, pkgconfig, fetchurl, libX11, libXau, libXaw, libXdmcp, libXext, libXft, libXinerama, libXmu, libXpm, libXt }: stdenv.mkDerivation { - name = "xdm-1.1.11"; + xdm = callPackage ({ stdenv, pkgconfig, fetchurl, libX11, libXau, libXaw, libXdmcp, libXext, libXft, libXinerama, libXmu, libXpm, xorgproto, libXrender, libXt }: stdenv.mkDerivation { + name = "xdm-1.1.12"; builder = ./builder.sh; src = fetchurl { - url = mirror://xorg/individual/app/xdm-1.1.11.tar.bz2; - sha256 = "0iqw11977lpr9nk1is4fca84d531vck0mq7jldwl44m0vrnl5nnl"; + url = mirror://xorg/individual/app/xdm-1.1.12.tar.bz2; + sha256 = "1x17hdymf6rd8jmh4n1sd4g5a8ayr5w94nwjw84qs2fs5pvq7lhd"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ libX11 libXau libXaw libXdmcp libXext libXft libXinerama libXmu libXpm libXt ]; + buildInputs = [ libX11 libXau libXaw libXdmcp libXext libXft libXinerama libXmu libXpm xorgproto libXrender libXt ]; meta.platforms = stdenv.lib.platforms.unix; }) {}; @@ -2432,11 +2432,11 @@ lib.makeScope newScope (self: with self; { }) {}; xinit = callPackage ({ stdenv, pkgconfig, fetchurl, libX11, xorgproto }: stdenv.mkDerivation { - name = "xinit-1.4.0"; + name = "xinit-1.4.1"; builder = ./builder.sh; src = fetchurl { - url = mirror://xorg/individual/app/xinit-1.4.0.tar.bz2; - sha256 = "1vw2wlg74ig52naw0cha3pgzcwwk25l834j42cg8m5zmybp3a213"; + url = mirror://xorg/individual/app/xinit-1.4.1.tar.bz2; + sha256 = "1fdbakx59vyh474skjydj1bbglpby3y03nl7mxn0z9v8gdhqz6yy"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/servers/x11/xorg/tarballs.list b/pkgs/servers/x11/xorg/tarballs.list index 57c85e0bc2f..854063dd307 100644 --- a/pkgs/servers/x11/xorg/tarballs.list +++ b/pkgs/servers/x11/xorg/tarballs.list @@ -35,7 +35,7 @@ mirror://xorg/individual/app/xcmsdb-1.0.5.tar.bz2 mirror://xorg/individual/app/xcompmgr-1.1.7.tar.bz2 mirror://xorg/individual/app/xconsole-1.0.7.tar.bz2 mirror://xorg/individual/app/xcursorgen-1.0.7.tar.bz2 -mirror://xorg/individual/app/xdm-1.1.11.tar.bz2 +mirror://xorg/individual/app/xdm-1.1.12.tar.bz2 mirror://xorg/individual/app/xdpyinfo-1.3.2.tar.bz2 mirror://xorg/individual/app/xdriinfo-1.0.6.tar.bz2 mirror://xorg/individual/app/xev-1.2.3.tar.bz2 @@ -46,7 +46,7 @@ mirror://xorg/individual/app/xfsinfo-1.0.6.tar.bz2 mirror://xorg/individual/app/xgamma-1.0.6.tar.bz2 mirror://xorg/individual/app/xgc-1.0.5.tar.bz2 mirror://xorg/individual/app/xhost-1.0.8.tar.bz2 -mirror://xorg/individual/app/xinit-1.4.0.tar.bz2 +mirror://xorg/individual/app/xinit-1.4.1.tar.bz2 mirror://xorg/individual/app/xinput-1.6.2.tar.bz2 mirror://xorg/individual/app/xkbcomp-1.4.2.tar.bz2 mirror://xorg/individual/app/xkbevd-1.1.4.tar.bz2 diff --git a/pkgs/tools/archivers/unrar/default.nix b/pkgs/tools/archivers/unrar/default.nix index 15c0837154e..73c73c564fd 100644 --- a/pkgs/tools/archivers/unrar/default.nix +++ b/pkgs/tools/archivers/unrar/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "unrar-${version}"; - version = "5.5.8"; + version = "5.7.3"; src = fetchurl { url = "https://www.rarlab.com/rar/unrarsrc-${version}.tar.gz"; - sha256 = "1x7wnb6zgs09v2bf5xaqz14daba8k7zikadj1qabqi4r78sy8rlv"; + sha256 = "0i5442sh18v9s47k1j8q04m3ki98z012rw7ml7c5iwklhfvmds20"; }; postPatch = '' diff --git a/pkgs/tools/filesystems/smbnetfs/default.nix b/pkgs/tools/filesystems/smbnetfs/default.nix index 8a9af4ba13c..26cef4ac90f 100644 --- a/pkgs/tools/filesystems/smbnetfs/default.nix +++ b/pkgs/tools/filesystems/smbnetfs/default.nix @@ -11,6 +11,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig autoconf ]; buildInputs = [ fuse samba glib attr libsecret ]; + postPatch = '' + substituteInPlace src/function.c --replace "attr/xattr.h" "sys/xattr.h" + ''; + meta = with stdenv.lib; { description = "A FUSE FS for mounting Samba shares"; maintainers = with maintainers; [ raskin ]; diff --git a/pkgs/tools/misc/catimg/default.nix b/pkgs/tools/misc/catimg/default.nix new file mode 100644 index 00000000000..1d85fdfd292 --- /dev/null +++ b/pkgs/tools/misc/catimg/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, cmake } : + +with stdenv.lib; + +stdenv.mkDerivation rec { + pname = "catimg"; + version = "2.5.0"; + + src = fetchFromGitHub { + owner = "posva"; + repo = pname; + rev = version; + sha256 = "0n74iczzgxrcq3zpa7ndycb9rinm829yvf81c747q4ngv5q6pzcm"; + }; + + nativeBuildInputs = [ cmake ]; + + meta = { + license = licenses.mit; + homepage = "https://github.com/posva/catimg"; + description = "Insanely fast image printing in your terminal"; + maintainers = with maintainers; [ ryantm ]; + platforms = platforms.unix; + }; + +} diff --git a/pkgs/tools/misc/execline/default.nix b/pkgs/tools/misc/execline/default.nix index 770f4ae67f4..553a68abf0b 100644 --- a/pkgs/tools/misc/execline/default.nix +++ b/pkgs/tools/misc/execline/default.nix @@ -4,8 +4,8 @@ with skawarePackages; buildPackage { pname = "execline"; - version = "2.5.0.1"; - sha256 = "0j8hwdw8wn0rv8njdza8fbgmvyjg7hqp3qlbw00i7fwskr7d21wd"; + version = "2.5.1.0"; + sha256 = "0xr6yb50wm6amj1wc7jmxyv7hvlx2ypbnww1vc288j275625d9xi"; description = "A small scripting language, to be used in place of a shell in non-interactive scripts"; diff --git a/pkgs/tools/misc/lf/default.nix b/pkgs/tools/misc/lf/default.nix index 86826f79b9a..cd2b1b795f7 100644 --- a/pkgs/tools/misc/lf/default.nix +++ b/pkgs/tools/misc/lf/default.nix @@ -2,13 +2,13 @@ buildGoPackage rec { name = "lf-${version}"; - version = "10"; + version = "11"; src = fetchFromGitHub { owner = "gokcehan"; repo = "lf"; rev = "r${version}"; - sha256 = "14wddjm6g5smb0s549nd7l2r3fcdd6k5p2cqq94j02n2jhlv0k6h"; + sha256 = "13622sx6xmbm8gf38dn8y8mkfnlbpamg4hmzsy9jnzg4h8qbjm6b"; }; goPackagePath = "github.com/gokcehan/lf"; diff --git a/pkgs/tools/misc/s6-portable-utils/default.nix b/pkgs/tools/misc/s6-portable-utils/default.nix index ae4385a0048..97548cab8db 100644 --- a/pkgs/tools/misc/s6-portable-utils/default.nix +++ b/pkgs/tools/misc/s6-portable-utils/default.nix @@ -7,8 +7,8 @@ let in buildPackage { pname = pname; - version = "2.2.1.2"; - sha256 = "0if77z07rfygd1yk9d2abxkdbx3dg52vcjhb20isb8kvqxhkg8ih"; + version = "2.2.1.3"; + sha256 = "1ibjns1slyg1p7jl9irzlrjz8b01f506iw87g3s7db5arhf17vv2"; description = "A set of tiny general Unix utilities optimized for simplicity and small size"; diff --git a/pkgs/tools/misc/scfbuild/default.nix b/pkgs/tools/misc/scfbuild/default.nix index a310135727d..1b7afdfbe9d 100644 --- a/pkgs/tools/misc/scfbuild/default.nix +++ b/pkgs/tools/misc/scfbuild/default.nix @@ -7,8 +7,8 @@ buildPythonApplication rec { src = fetchFromGitHub { owner = "eosrei"; repo = "scfbuild"; - rev = "c179c8d279b7cc0a9a3536a713ac880ac6010318"; - sha256 = "1bsi7k4kkj914pycp1g92050hjxscyvc9qflqb3cv5yz3c93cs46"; + rev = "9acc7fc5fedbf48683d8932dd5bd7583bf922bae"; + sha256 = "1zlqsxkpg7zvmhdjgbqwwc9qgac2b8amzq8c5kwyh5cv95zcp6qn"; }; phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; diff --git a/pkgs/tools/misc/toybox/default.nix b/pkgs/tools/misc/toybox/default.nix index 5a979be249e..98fa06bccfd 100644 --- a/pkgs/tools/misc/toybox/default.nix +++ b/pkgs/tools/misc/toybox/default.nix @@ -1,5 +1,5 @@ { - stdenv, lib, fetchFromGitHub, buildPackages, + stdenv, lib, fetchFromGitHub, which, enableStatic ? false, enableMinimal ? false, extraConfig ? "" @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optionals enableStatic [ stdenv.cc.libc stdenv.cc.libc.static ]; - postPatch = "patchShebangs scripts"; + postPatch = "patchShebangs ."; inherit extraConfig; passAsFile = [ "extraConfig" ]; @@ -43,12 +43,15 @@ stdenv.mkDerivation rec { make oldconfig ''; - makeFlags = [ "PREFIX=$(out)" ] ++ lib.optional enableStatic "LDFLAGS=--static"; + makeFlags = [ "PREFIX=$(out)/bin" ] ++ lib.optional enableStatic "LDFLAGS=--static"; + + installTargets = "install_flat"; # tests currently (as of 0.8.0) get stuck in an infinite loop... # ...this is fixed in latest git, so doCheck can likely be enabled for next release # see https://github.com/landley/toybox/commit/b928ec480cd73fd83511c0f5ca786d1b9f3167c3 #doCheck = true; + checkInputs = [ which ]; # used for tests with checkFlags = [ "DEBUG=true" ]; checkTarget = "tests"; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix index 7ae871afc78..1f5a6c4ea4c 100644 --- a/pkgs/tools/misc/trash-cli/default.nix +++ b/pkgs/tools/misc/trash-cli/default.nix @@ -28,8 +28,10 @@ python3Packages.buildPythonApplication rec { }) ]; - buildInputs = with python3Packages; [ nose mock ]; - + checkInputs = with python3Packages; [ + nose + mock + ]; checkPhase = "nosetests"; meta = with stdenv.lib; { diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix index 7ae42cbdf57..6efbec8a08f 100644 --- a/pkgs/tools/networking/haproxy/default.nix +++ b/pkgs/tools/networking/haproxy/default.nix @@ -9,12 +9,12 @@ assert usePcre -> pcre != null; stdenv.mkDerivation rec { pname = "haproxy"; - version = "1.9.1"; + version = "1.9.3"; name = "${pname}-${version}"; src = fetchurl { url = "https://www.haproxy.org/download/${stdenv.lib.versions.majorMinor version}/src/${name}.tar.gz"; - sha256 = "1qf8q49njx9n3b1g10zz3kcqmhji8lqcklh7723671z3l4pk2imd"; + sha256 = "1d0d0zdr3908wbmwqllq0l968iawykxyf6fd8vdf545pb0bc2b6j"; }; buildInputs = [ openssl zlib ] diff --git a/pkgs/tools/networking/s6-dns/default.nix b/pkgs/tools/networking/s6-dns/default.nix index f422dabaff6..af68440ede8 100644 --- a/pkgs/tools/networking/s6-dns/default.nix +++ b/pkgs/tools/networking/s6-dns/default.nix @@ -4,8 +4,8 @@ with skawarePackages; buildPackage { pname = "s6-dns"; - version = "2.3.0.1"; - sha256 = "16ymalc4yxbwc0kapwmissxlw2bdk4sx3b33zp1gwx3n6hkcgh8c"; + version = "2.3.0.2"; + sha256 = "1y9bhvx8bqsb2xq5lmlfnc1hw2b3jyqg11i9r4lj0n6vvaqwh1j8"; description = "A suite of DNS client programs and libraries for Unix systems"; diff --git a/pkgs/tools/networking/s6-networking/default.nix b/pkgs/tools/networking/s6-networking/default.nix index 3f0e83ad9ce..b42b3ff5b73 100644 --- a/pkgs/tools/networking/s6-networking/default.nix +++ b/pkgs/tools/networking/s6-networking/default.nix @@ -20,8 +20,8 @@ assert sslSupportEnabled -> sslLibs ? ${sslSupport}; buildPackage { pname = "s6-networking"; - version = "2.3.0.3"; - sha256 = "1kfjl7da6wkmyq1mvq9irkbzk2wbi0axjfbcw5cym5y11mqswsjs"; + version = "2.3.0.4"; + sha256 = "00kqp0mcp8c7f0z5s4399rd1haxasxkqgd6ds0j0607hvi56mqqa"; description = "A suite of small networking utilities for Unix systems"; diff --git a/pkgs/tools/package-management/nixops/azure-mgmt-compute/default.nix b/pkgs/tools/package-management/nixops/azure-mgmt-compute/default.nix new file mode 100644 index 00000000000..462c9e615a1 --- /dev/null +++ b/pkgs/tools/package-management/nixops/azure-mgmt-compute/default.nix @@ -0,0 +1,37 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, python +, azure-mgmt-common +}: + +buildPythonPackage rec { + version = "0.20.1"; + pname = "azure-mgmt-compute"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "97298fc7f133f1d50a974ed6299151eda494a574b0f7fdf8192a388015c2215a"; + }; + + preConfigure = '' + # Patch to make this package work on requests >= 2.11.x + # CAN BE REMOVED ON NEXT PACKAGE UPDATE + sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/compute/computemanagement.py + ''; + + postInstall = '' + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py + ''; + + propagatedBuildInputs = [ azure-mgmt-common ]; + + meta = with pkgs.lib; { + description = "Microsoft Azure SDK for Python"; + homepage = "https://azure.microsoft.com/en-us/develop/python/"; + license = licenses.asl20; + maintainers = with maintainers; [ olcai ]; + }; +} diff --git a/pkgs/tools/package-management/nixops/azure-mgmt-network/default.nix b/pkgs/tools/package-management/nixops/azure-mgmt-network/default.nix new file mode 100644 index 00000000000..fd47f8895fd --- /dev/null +++ b/pkgs/tools/package-management/nixops/azure-mgmt-network/default.nix @@ -0,0 +1,37 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, azure-mgmt-common +, python +}: + +buildPythonPackage rec { + version = "0.20.1"; + pname = "azure-mgmt-network"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "10vj22h6nxpw0qpvib5x2g6qs5j8z31142icvh4qk8k40fcrs9hx"; + }; + + preConfigure = '' + # Patch to make this package work on requests >= 2.11.x + # CAN BE REMOVED ON NEXT PACKAGE UPDATE + sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/network/networkresourceprovider.py + ''; + + postInstall = '' + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py + ''; + + propagatedBuildInputs = [ azure-mgmt-common ]; + + meta = with pkgs.lib; { + description = "Microsoft Azure SDK for Python"; + homepage = "https://azure.microsoft.com/en-us/develop/python/"; + license = licenses.asl20; + maintainers = with maintainers; [ olcai ]; + }; +} diff --git a/pkgs/tools/package-management/nixops/azure-mgmt-nspkg/default.nix b/pkgs/tools/package-management/nixops/azure-mgmt-nspkg/default.nix new file mode 100644 index 00000000000..aa037b48b4f --- /dev/null +++ b/pkgs/tools/package-management/nixops/azure-mgmt-nspkg/default.nix @@ -0,0 +1,25 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, azure-nspkg +}: + +buildPythonPackage rec { + version = "1.0.0"; + pname = "azure-mgmt-nspkg"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "1rq92fj3kvnqkk18596dybw0kvhgscvc6cd8hp1dhy3wrkqnhwmq"; + }; + + propagatedBuildInputs = [ azure-nspkg ]; + + meta = with pkgs.lib; { + description = "Microsoft Azure SDK for Python"; + homepage = "https://azure.microsoft.com/en-us/develop/python/"; + license = licenses.asl20; + maintainers = with maintainers; [ olcai ]; + }; +} diff --git a/pkgs/tools/package-management/nixops/azure-mgmt-resource/default.nix b/pkgs/tools/package-management/nixops/azure-mgmt-resource/default.nix new file mode 100644 index 00000000000..b60e3aee340 --- /dev/null +++ b/pkgs/tools/package-management/nixops/azure-mgmt-resource/default.nix @@ -0,0 +1,38 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, python +, azure-mgmt-common +}: + + +buildPythonPackage rec { + version = "0.20.1"; + pname = "azure-mgmt-resource"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "0slh9qfm5nfacrdm3lid0sr8kwqzgxvrwf27laf9v38kylkfqvml"; + }; + + preConfigure = '' + # Patch to make this package work on requests >= 2.11.x + # CAN BE REMOVED ON NEXT PACKAGE UPDATE + sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/resource/resourcemanagement.py + ''; + + postInstall = '' + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py + ''; + + propagatedBuildInputs = [ azure-mgmt-common ]; + + meta = with pkgs.lib; { + description = "Microsoft Azure SDK for Python"; + homepage = "https://azure.microsoft.com/en-us/develop/python/"; + license = licenses.asl20; + maintainers = with maintainers; [ olcai ]; + }; +} diff --git a/pkgs/tools/package-management/nixops/azure-mgmt-storage/default.nix b/pkgs/tools/package-management/nixops/azure-mgmt-storage/default.nix new file mode 100644 index 00000000000..2e0523bb25c --- /dev/null +++ b/pkgs/tools/package-management/nixops/azure-mgmt-storage/default.nix @@ -0,0 +1,37 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, python +, azure-mgmt-common +}: + +buildPythonPackage rec { + version = "0.20.0"; + pname = "azure-mgmt-storage"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "16iw7hqhq97vlzfwixarfnirc60l5mz951p57brpcwyylphl3yim"; + }; + + preConfigure = '' + # Patch to make this package work on requests >= 2.11.x + # CAN BE REMOVED ON NEXT PACKAGE UPDATE + sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/storage/storagemanagement.py + ''; + + postInstall = '' + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py + ''; + + propagatedBuildInputs = [ azure-mgmt-common ]; + + meta = with pkgs.lib; { + description = "Microsoft Azure SDK for Python"; + homepage = "https://azure.microsoft.com/en-us/develop/python/"; + license = licenses.asl20; + maintainers = with maintainers; [ olcai ]; + }; +} diff --git a/pkgs/tools/package-management/nixops/default.nix b/pkgs/tools/package-management/nixops/default.nix index 56e0a31a97e..73e8c90d4e4 100644 --- a/pkgs/tools/package-management/nixops/default.nix +++ b/pkgs/tools/package-management/nixops/default.nix @@ -1,4 +1,4 @@ -{ callPackage, fetchurl }: +{ callPackage, newScope, pkgs, fetchurl }: callPackage ./generic.nix (rec { version = "1.6.1"; @@ -6,4 +6,19 @@ callPackage ./generic.nix (rec { url = "http://nixos.org/releases/nixops/nixops-${version}/nixops-${version}.tar.bz2"; sha256 = "0lfx5fhyg3z6725ydsk0ibg5qqzp5s0x9nbdww02k8s307axiah3"; }; +# nixops is incompatible with the most recent versions of listed +# azure-mgmt-* packages, therefore we are pinning them to +# package-private versions, so that they don't get trampled by +# updates. +# see +# https://github.com/NixOS/nixops/issues/1065 + python2Packages = pkgs.python2Packages.override { + overrides = (self: super: let callPackage = newScope self; in { + azure-mgmt-compute = callPackage ./azure-mgmt-compute { }; + azure-mgmt-network = callPackage ./azure-mgmt-network { }; + azure-mgmt-nspkg = callPackage ./azure-mgmt-nspkg { }; + azure-mgmt-resource = callPackage ./azure-mgmt-resource { }; + azure-mgmt-storage = callPackage ./azure-mgmt-storage { }; + }); + }; }) diff --git a/pkgs/tools/package-management/nixops/generic.nix b/pkgs/tools/package-management/nixops/generic.nix index 2ce7f9858a5..813ae64bef5 100644 --- a/pkgs/tools/package-management/nixops/generic.nix +++ b/pkgs/tools/package-management/nixops/generic.nix @@ -1,6 +1,7 @@ { lib, python2Packages, libxslt, docbook_xsl_ns, openssh, cacert # version args , src, version +, meta ? {} }: python2Packages.buildPythonApplication { @@ -55,5 +56,5 @@ python2Packages.buildPythonApplication { maintainers = with lib.maintainers; [ eelco rob domenkozar ]; platforms = lib.platforms.unix; license = lib.licenses.lgpl3; - }; + } // meta; } diff --git a/pkgs/tools/package-management/nixops/unstable.nix b/pkgs/tools/package-management/nixops/unstable.nix index dc71914f087..88d9d0c94be 100644 --- a/pkgs/tools/package-management/nixops/unstable.nix +++ b/pkgs/tools/package-management/nixops/unstable.nix @@ -10,4 +10,21 @@ callPackage ./generic.nix (rec { url = "https://hydra.nixos.org/build/88329589/download/2/nixops-${version}.tar.bz2"; sha256 = "1ppnhqmsbiijm6r77h86abv3fjny5iq35yvj207s520kjwzaj7kc"; }; + # # Marking unstable as broken, instead of using the pinned version, + # # like stable does You might be able to use the following code (as + # # in stable), to run unstable against the pinned packages + # python2Packages = pkgs.python2Packages.override { + # overrides = (self: super: let callPackage = newScope self; in { + # azure-mgmt-compute = callPackage ./azure-mgmt-compute { }; + # azure-mgmt-network = callPackage ./azure-mgmt-network { }; + # azure-mgmt-nspkg = callPackage ./azure-mgmt-nspkg { }; + # azure-mgmt-resource = callPackage ./azure-mgmt-resource { }; + # azure-mgmt-storage = callPackage ./azure-mgmt-storage { }; + # }); + # }; + # # otherwise + # # see https://github.com/NixOS/nixpkgs/pull/52550 + # # see https://github.com/NixOS/nixops/issues/1065 + # # see https://github.com/NixOS/nixpkgs/issues/52547 + meta.broken = true; }) diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix index 35b39196b33..92c757df22c 100644 --- a/pkgs/tools/security/vault/default.nix +++ b/pkgs/tools/security/vault/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ go gox removeReferencesTo ]; + GOCACHE="$TMPDIR/go-cache"; + preBuild = '' patchShebangs ./ substituteInPlace scripts/build.sh --replace 'git rev-parse HEAD' 'echo ${src.rev}' diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix index 8e9fb6da540..b83c32e94d0 100644 --- a/pkgs/tools/system/fio/default.nix +++ b/pkgs/tools/system/fio/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { name = "fio-${version}"; - version = "3.12"; + version = "3.13"; src = fetchFromGitHub { owner = "axboe"; repo = "fio"; rev = "fio-${version}"; - sha256 = "18awz03mdzdbja1n9nm6jyvv7ic2dabh6c7ip5vwpam8c6mj4yjq"; + sha256 = "0v5r97s3m67czq6ymqb5w3avf6mcnl2agzzwyd78g8gqvlyijlih"; }; buildInputs = [ python zlib ] diff --git a/pkgs/tools/system/s6-rc/default.nix b/pkgs/tools/system/s6-rc/default.nix index 2712186ec5d..4f6fdd16dca 100644 --- a/pkgs/tools/system/s6-rc/default.nix +++ b/pkgs/tools/system/s6-rc/default.nix @@ -4,8 +4,8 @@ with skawarePackages; buildPackage { pname = "s6-rc"; - version = "0.4.1.0"; - sha256 = "1xl37xi509pcm5chcvn8l7gb952sr5mkpxhpkbsxhsllj791bfa2"; + version = "0.5.0.0"; + sha256 = "0p97p49i8m44lfiffycgn7xi08yzxkrs5dyb03svdhd6clwh6zyb"; description = "A service manager for s6-based systems"; platforms = stdenv.lib.platforms.linux; diff --git a/pkgs/tools/system/s6/default.nix b/pkgs/tools/system/s6/default.nix index 4389755bc4c..ff233e6ad94 100644 --- a/pkgs/tools/system/s6/default.nix +++ b/pkgs/tools/system/s6/default.nix @@ -4,8 +4,8 @@ with skawarePackages; buildPackage { pname = "s6"; - version = "2.7.2.2"; - sha256 = "0psjmfidjdciswakw9agzzniqfmhrr21765m0q77kwxg7iisgpsq"; + version = "2.8.0.0"; + sha256 = "01milx5shixvniaxxmanfzz54vcymjfi86433w62rk5ypvc94ir8"; description = "skarnet.org's small & secure supervision software suite"; diff --git a/pkgs/tools/system/stress-ng/default.nix b/pkgs/tools/system/stress-ng/default.nix index 0c5a088daf9..8237a4928a0 100644 --- a/pkgs/tools/system/stress-ng/default.nix +++ b/pkgs/tools/system/stress-ng/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { name = "stress-ng-${version}"; - version = "0.09.49"; + version = "0.09.54"; src = fetchurl { url = "https://kernel.ubuntu.com/~cking/tarballs/stress-ng/${name}.tar.xz"; - sha256 = "1ll2i7vgnwpfhvq963m2aqwffkrmjggnscpmwn8qbdh0a82lmq2x"; + sha256 = "0qbgabrxm8aj4a6bgf55mi7rv9sqcgl3kkm7j3qhkqjfn9rqzslb"; }; # All platforms inputs then Linux-only ones diff --git a/pkgs/tools/typesetting/scdoc/default.nix b/pkgs/tools/typesetting/scdoc/default.nix index 43d880fdf9a..17c153cd9f0 100644 --- a/pkgs/tools/typesetting/scdoc/default.nix +++ b/pkgs/tools/typesetting/scdoc/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "scdoc-${version}"; - version = "1.9.3"; + version = "1.9.4"; src = fetchurl { url = "https://git.sr.ht/~sircmpwn/scdoc/archive/${version}.tar.gz"; - sha256 = "1av933421a7g2c984l77gh1fwrhyqblglxr3px5qbng2sh7i33f6"; + sha256 = "00zc3rzj97gscby31djlqyczvqpyhrl66i44czwzmmn7rc5j03m1"; }; postPatch = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 06cf1865547..29743de3bbd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5,7 +5,7 @@ * to merges. Please use the full-text search of your editor. ;) * Hint: ### starts category names. */ -{ lib, noSysDirs, config}: +{ lib, noSysDirs, config, overlays }: res: pkgs: super: with pkgs; @@ -61,7 +61,7 @@ in ### Helper functions. - inherit lib config; + inherit lib config overlays; inherit (lib) lowPrio hiPrio appendToName makeOverridable; @@ -2674,6 +2674,8 @@ in fileschanged = callPackage ../tools/misc/fileschanged { }; + filet = callPackage ../applications/misc/filet { }; + findutils = callPackage ../tools/misc/findutils { }; finger_bsd = callPackage ../tools/networking/bsd-finger { }; @@ -7140,7 +7142,11 @@ in inherit (darwin.apple_sdk.frameworks) Security Foundation; }; - go = go_1_11; + go_1_12 = callPackage ../development/compilers/go/1.12.nix { + inherit (darwin.apple_sdk.frameworks) Security Foundation; + }; + + go = go_1_12; go-repo-root = callPackage ../development/tools/go-repo-root { }; @@ -7398,7 +7404,15 @@ in stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' }); - llvmPackages_latest = llvmPackages_7; + llvmPackages_8 = callPackage ../development/compilers/llvm/8 ({ + inherit (stdenvAdapters) overrideCC; + buildLlvmTools = buildPackages.llvmPackages_8.tools; + targetLlvmLibraries = targetPackages.llvmPackages_8.libraries; + } // stdenv.lib.optionalAttrs (buildPackages.stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + }); + + llvmPackages_latest = llvmPackages_8; manticore = callPackage ../development/compilers/manticore { }; @@ -7503,7 +7517,7 @@ in }; ponyc = callPackage ../development/compilers/ponyc { - llvm = llvm_39; + llvm = llvm_7; }; pony-stable = callPackage ../development/compilers/ponyc/pony-stable.nix { }; @@ -9493,7 +9507,7 @@ in c-blosc = callPackage ../development/libraries/c-blosc { }; - cachix = (haskell.lib.justStaticExecutables haskellPackages.cachix).overrideAttrs (drv: { + cachix = (callPackage ../development/tools/cachix { }).overrideAttrs (drv: { meta = drv.meta // { hydraPlatforms = stdenv.lib.platforms.unix; }; @@ -13742,12 +13756,14 @@ in # We don't use `with` statement here on purpose! # See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334 modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ]; + openssl = openssl_1_1; }; nginxMainline = callPackage ../servers/http/nginx/mainline.nix { # We don't use `with` statement here on purpose! # See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334 modules = [ nginxModules.dav nginxModules.moreheaders ]; + openssl = openssl_1_1; }; nginxModules = callPackage ../servers/http/nginx/modules.nix { }; @@ -14664,6 +14680,13 @@ in ]; }; + linux_5_0 = callPackage ../os-specific/linux/kernel/linux-5.0.nix { + kernelPatches = + [ kernelPatches.bridge_stp_helper + kernelPatches.modinst_arg_list_too_long + ]; + }; + linux_testing = callPackage ../os-specific/linux/kernel/linux-testing.nix { kernelPatches = [ kernelPatches.bridge_stp_helper @@ -14845,7 +14868,7 @@ in linux = linuxPackages.kernel; # Update this when adding the newest kernel major version! - linuxPackages_latest = linuxPackages_4_20; + linuxPackages_latest = linuxPackages_5_0; linux_latest = linuxPackages_latest.kernel; # Build the kernel modules for the some of the kernels. @@ -14856,6 +14879,7 @@ in linuxPackages_4_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_14); linuxPackages_4_19 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_19); linuxPackages_4_20 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_20); + linuxPackages_5_0 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_0); # When adding to this list: # - Update linuxPackages_latest to the latest version # - Update the rev in ../os-specific/linux/kernel/linux-libre.nix to the latest one. @@ -16395,6 +16419,8 @@ in catfish = callPackage ../applications/search/catfish { }; + catimg = callPackage ../tools/misc/catimg { }; + cava = callPackage ../applications/audio/cava { }; cb2bib = libsForQt5.callPackage ../applications/office/cb2bib { }; @@ -17667,7 +17693,10 @@ in slack-term = callPackage ../applications/networking/instant-messengers/slack-term { }; - singularity = callPackage ../applications/virtualization/singularity { }; + singularity = callPackage ../applications/virtualization/singularity { + # XXX: the build is finding references to Go when compiled with go v1.12 + go = go_1_11; + }; spectmorph = callPackage ../applications/audio/spectmorph { }; @@ -19236,7 +19265,7 @@ in udevil = callPackage ../applications/misc/udevil {}; - udiskie = python3Packages.callPackage ../applications/misc/udiskie { }; + udiskie = callPackage ../applications/misc/udiskie { }; sakura = callPackage ../applications/misc/sakura { }; @@ -20838,7 +20867,7 @@ in minetestclient_4 minetestserver_4 minetestclient_5 minetestserver_5; - minetest = minetestclient_4; + minetest = minetestclient_5; mnemosyne = callPackage ../games/mnemosyne { python = python3; @@ -21291,7 +21320,7 @@ in clearlooks-phenix = callPackage ../misc/themes/clearlooks-phenix { }; deepin = recurseIntoAttrs (import ../desktops/deepin { - inherit pkgs libsForQt5; + inherit pkgs libsForQt5 go_1_11; inherit (lib) makeScope; }); @@ -21330,10 +21359,12 @@ in nohotcorner = callPackage ../desktops/gnome-3/extensions/nohotcorner { }; no-title-bar = callPackage ../desktops/gnome-3/extensions/no-title-bar { }; remove-dropdown-arrows = callPackage ../desktops/gnome-3/extensions/remove-dropdown-arrows { }; + sound-output-device-chooser = callPackage ../desktops/gnome-3/extensions/sound-output-device-chooser { }; system-monitor = callPackage ../desktops/gnome-3/extensions/system-monitor { }; taskwhisperer = callPackage ../desktops/gnome-3/extensions/taskwhisperer { }; timepp = callPackage ../desktops/gnome-3/extensions/timepp { }; topicons-plus = callPackage ../desktops/gnome-3/extensions/topicons-plus { }; + window-corner-preview = callPackage ../desktops/gnome-3/extensions/window-corner-preview { }; }; hsetroot = callPackage ../tools/X11/hsetroot { }; diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index ed0b919fd69..2899e91ceb6 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -167,6 +167,29 @@ with self; { }; }; + cqueues = buildLuaPackage rec { + name = "cqueues-${version}"; + version = "20171014"; + + src = fetchurl { + url = "https://www.25thandclement.com/~william/projects/releases/${name}.tgz"; + sha256 = "1dabhpn6r0hlln8vx9hxm34pfcm46qzgpb2apmziwg5z51fi4ksb"; + }; + + preConfigure = ''export prefix=$out''; + + nativeBuildInputs = [ gnum4 ]; + buildInputs = [ openssl ]; + + meta = with stdenv.lib; { + description = "A type of event loop for Lua"; + homepage = "https://www.25thandclement.com/~william/projects/cqueues.html"; + license = licenses.mit; + maintainers = with maintainers; [ vcunat ]; + platforms = platforms.unix; + }; + }; + http = buildLuaPackage rec { version = "0.2"; name = "http-${version}"; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 1541bb12ee1..76de3197b1d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -709,6 +709,8 @@ let ssl = callPackage ../development/ocaml-modules/ssl { }; + stdlib-shims = callPackage ../development/ocaml-modules/stdlib-shims { }; + stog = callPackage ../applications/misc/stog { }; stringext = callPackage ../development/ocaml-modules/stringext { }; diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 2aa07517fdf..835a2883845 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -91,7 +91,7 @@ let allPackages = self: super: let res = import ./all-packages.nix - { inherit lib noSysDirs config; } + { inherit lib noSysDirs config overlays; } res self super; in res;