diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 58834f4597e..247af50dd39 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -130,6 +130,12 @@ /nixos/tests/hardened.nix @joachifm /pkgs/os-specific/linux/kernel/hardened-config.nix @joachifm +# Network Time Daemons +/pkgs/tools/networking/chrony @thoughtpolice +/pkgs/tools/networking/ntp @thoughtpolice +/pkgs/tools/networking/openntpd @thoughtpolice +/nixos/modules/services/networking/ntp @thoughtpolice + # Dhall /pkgs/development/dhall-modules @Gabriel439 @Profpatsch /pkgs/development/interpreters/dhall @Gabriel439 @Profpatsch @@ -150,3 +156,8 @@ /pkgs/applications/editors/emacs-modes @adisbladis /pkgs/applications/editors/emacs @adisbladis /pkgs/top-level/emacs-packages.nix @adisbladis + +# Prometheus exporter modules and tests +/nixos/modules/services/monitoring/prometheus/exporters.nix @WilliButz +/nixos/modules/services/monitoring/prometheus/exporters.xml @WilliButz +/nixos/tests/prometheus-exporters.nix @WilliButz diff --git a/lib/attrsets.nix b/lib/attrsets.nix index d374d229f59..086c3d746fc 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -354,7 +354,7 @@ rec { => { a = ["x" "y"]; b = ["z"] } */ zipAttrsWith = f: sets: zipAttrsWithNames (concatMap attrNames sets) f sets; - /* Like `zipAttrsWith' with `(name: values: value)' as the function. + /* Like `zipAttrsWith' with `(name: values: values)' as the function. Example: zipAttrs [{a = "x";} {a = "y"; b = "z";}] diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fe6b51c0259..f28161573dd 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2602,6 +2602,15 @@ email = "t@larkery.com"; name = "Tom Hinton"; }; + hkjn = { + email = "me@hkjn.me"; + name = "Henrik Jonsson"; + github = "hkjn"; + keys = [{ + longkeyid = "rsa4096/0x03EFBF839A5FDC15"; + fingerprint = "D618 7A03 A40A 3D56 62F5 4B46 03EF BF83 9A5F DC15"; + }]; + }; hlolli = { email = "hlolli@gmail.com"; github = "hlolli"; diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml index 9cea2db610e..f1e1568c034 100644 --- a/nixos/doc/manual/installation/installing.xml +++ b/nixos/doc/manual/installation/installing.xml @@ -392,7 +392,11 @@ hardware-configuration.nix is included from configuration.nix and will be overwritten by future invocations of nixos-generate-config; thus, you - generally should not modify it.) + generally should not modify it.) Additionally, you may want to look at + Hardware + configuration for known-hardware at this point or after + installation. + diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5b7f391ed5a..fb8453f1d53 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -567,7 +567,6 @@ ./services/networking/bird.nix ./services/networking/bitlbee.nix ./services/networking/charybdis.nix - ./services/networking/chrony.nix ./services/networking/cjdns.nix ./services/networking/cntlm.nix ./services/networking/connman.nix @@ -650,14 +649,15 @@ ./services/networking/nntp-proxy.nix ./services/networking/nsd.nix ./services/networking/ntopng.nix - ./services/networking/ntpd.nix + ./services/networking/ntp/chrony.nix + ./services/networking/ntp/ntpd.nix + ./services/networking/ntp/openntpd.nix ./services/networking/nullidentdmod.nix ./services/networking/nylon.nix ./services/networking/ocserv.nix ./services/networking/ofono.nix ./services/networking/oidentd.nix ./services/networking/openfire.nix - ./services/networking/openntpd.nix ./services/networking/openvpn.nix ./services/networking/ostinato.nix ./services/networking/owamp.nix diff --git a/nixos/modules/programs/mtr.nix b/nixos/modules/programs/mtr.nix index 1fdec4c04f6..75b710c1584 100644 --- a/nixos/modules/programs/mtr.nix +++ b/nixos/modules/programs/mtr.nix @@ -4,6 +4,7 @@ with lib; let cfg = config.programs.mtr; + in { options = { programs.mtr = { @@ -15,13 +16,22 @@ in { setcap wrapper for it. ''; }; + + package = mkOption { + type = types.package; + default = pkgs.mtr; + description = '' + The package to use. + ''; + }; }; }; config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ mtr ]; + environment.systemPackages = with pkgs; [ cfg.package ]; + security.wrappers.mtr-packet = { - source = "${pkgs.mtr}/bin/mtr-packet"; + source = "${cfg.package}/bin/mtr-packet"; capabilities = "cap_net_raw+p"; }; }; diff --git a/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix index 11dd5cb48db..e917209f3d1 100644 --- a/nixos/modules/services/mail/mailman.nix +++ b/nixos/modules/services/mail/mailman.nix @@ -6,16 +6,35 @@ let cfg = config.services.mailman; - pythonEnv = pkgs.python3.withPackages (ps: [ps.mailman]); + mailmanPyEnv = pkgs.python3.withPackages (ps: with ps; [mailman mailman-hyperkitty]); mailmanExe = with pkgs; stdenv.mkDerivation { name = "mailman-" + python3Packages.mailman.version; + buildInputs = [makeWrapper]; unpackPhase = ":"; installPhase = '' mkdir -p $out/bin - sed >"$out/bin/mailman" <"${pythonEnv}/bin/mailman" \ - -e "2 iexport MAILMAN_CONFIG_FILE=/etc/mailman.cfg" - chmod +x $out/bin/mailman + makeWrapper ${mailmanPyEnv}/bin/mailman $out/bin/mailman \ + --set MAILMAN_CONFIG_FILE /etc/mailman.cfg + ''; + }; + + mailmanWeb = pkgs.python3Packages.mailman-web.override { + serverEMail = cfg.siteOwner; + archiverKey = cfg.hyperkittyApiKey; + allowedHosts = cfg.webHosts; + }; + + mailmanWebPyEnv = pkgs.python3.withPackages (x: with x; [mailman-web]); + + mailmanWebExe = with pkgs; stdenv.mkDerivation { + inherit (mailmanWeb) name; + buildInputs = [makeWrapper]; + unpackPhase = ":"; + installPhase = '' + mkdir -p $out/bin + makeWrapper ${mailmanWebPyEnv}/bin/django-admin $out/bin/mailman-web \ + --set DJANGO_SETTINGS_MODULE settings ''; }; @@ -28,11 +47,30 @@ let bin_dir: ${pkgs.python3Packages.mailman}/bin var_dir: /var/lib/mailman queue_dir: $var_dir/queue + template_dir: $var_dir/templates log_dir: $var_dir/log lock_dir: $var_dir/lock etc_dir: /etc ext_dir: $etc_dir/mailman.d pid_file: /run/mailman/master.pid + '' + optionalString (cfg.hyperkittyApiKey != null) '' + [archiver.hyperkitty] + class: mailman_hyperkitty.Archiver + enable: yes + configuration: ${pkgs.writeText "mailman-hyperkitty.cfg" mailmanHyperkittyCfg} + ''; + + mailmanHyperkittyCfg = '' + [general] + # This is your HyperKitty installation, preferably on the localhost. This + # address will be used by Mailman to forward incoming emails to HyperKitty + # for archiving. It does not need to be publicly available, in fact it's + # better if it is not. + base_url: ${cfg.hyperkittyBaseUrl} + + # Shared API key, must be the identical to the value in HyperKitty's + # settings. + api_key: ${cfg.hyperkittyApiKey} ''; in { @@ -51,7 +89,7 @@ in { siteOwner = mkOption { type = types.str; - default = "postmaster"; + default = "postmaster@example.org"; description = '' Certain messages that must be delivered to a human, but which can't be delivered to a list owner (e.g. a bounce from a list owner), will @@ -59,6 +97,48 @@ in { ''; }; + webRoot = mkOption { + type = types.path; + default = "${mailmanWeb}/${pkgs.python3.sitePackages}"; + defaultText = "pkgs.python3Packages.mailman-web"; + description = '' + The web root for the Hyperkity + Postorius apps provided by Mailman. + This variable can be set, of course, but it mainly exists so that site + admins can refer to it in their own hand-written httpd configuration files. + ''; + }; + + webHosts = mkOption { + type = types.listOf types.str; + default = []; + description = '' + The list of hostnames and/or IP addresses from which the Mailman Web + UI will accept requests. By default, "localhost" and "127.0.0.1" are + enabled. All additional names under which your web server accepts + requests for the UI must be listed here or incoming requests will be + rejected. + ''; + }; + + hyperkittyBaseUrl = mkOption { + type = types.str; + default = "http://localhost/hyperkitty/"; + description = '' + Where can Mailman connect to Hyperkitty's internal API, preferably on + localhost? + ''; + }; + + hyperkittyApiKey = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + The shared secret used to authenticate Mailman's internal + communication with Hyperkitty. Must be set to enable support for the + Hyperkitty archiver. Note that this secret is going to be visible to + all local users in the Nix store. + ''; + }; }; }; @@ -71,25 +151,22 @@ in { { assertion = cfg.enable -> config.services.postfix.enable; message = "Mailman requires Postfix"; } - { assertion = config.services.postfix.recipientDelimiter == "+"; - message = "Postfix's recipientDelimiter must be set to '+'."; - } ]; users.users.mailman = { description = "GNU Mailman"; isSystemUser = true; }; environment = { - systemPackages = [ mailmanExe ]; + systemPackages = [ mailmanExe mailmanWebExe pkgs.sassc ]; etc."mailman.cfg".text = mailmanCfg; }; services.postfix = { relayDomains = [ "hash:/var/lib/mailman/data/postfix_domains" ]; + recipientDelimiter = "+"; # bake recipient addresses in mail envelopes via VERP config = { transport_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" ]; local_recipient_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" ]; - # Mailman uses recipient delimiters, so we don't need special handling. - owner_request_special = "no"; + owner_request_special = "no"; # Mailman handles -owner addresses on its own }; }; @@ -109,6 +186,112 @@ in { }; }; + systemd.services.mailman-web = { + description = "Init Postorius DB"; + before = [ "httpd.service" ]; + requiredBy = [ "httpd.service" ]; + script = '' + ${mailmanWebExe}/bin/mailman-web migrate + rm -rf static + ${mailmanWebExe}/bin/mailman-web collectstatic + ${mailmanWebExe}/bin/mailman-web compress + ''; + serviceConfig = { + User = config.services.httpd.user; + Type = "oneshot"; + StateDirectory = "mailman-web"; + StateDirectoryMode = "0700"; + WorkingDirectory = "/var/lib/mailman-web"; + }; + }; + + systemd.services.mailman-daily = { + description = "Trigger daily Mailman events"; + startAt = "daily"; + serviceConfig = { + ExecStart = "${mailmanExe}/bin/mailman digests --send"; + User = "mailman"; + }; + }; + + systemd.services.hyperkitty = { + enable = cfg.hyperkittyApiKey != null; + description = "GNU Hyperkitty QCluster Process"; + after = [ "network.target" ]; + wantedBy = [ "mailman.service" "multi-user.target" ]; + serviceConfig = { + ExecStart = "${mailmanWebExe}/bin/mailman-web qcluster"; + User = config.services.httpd.user; + WorkingDirectory = "/var/lib/mailman-web"; + }; + }; + + systemd.services.hyperkitty-minutely = { + enable = cfg.hyperkittyApiKey != null; + description = "Trigger minutely Hyperkitty events"; + startAt = "minutely"; + serviceConfig = { + ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs minutely"; + User = config.services.httpd.user; + WorkingDirectory = "/var/lib/mailman-web"; + }; + }; + + systemd.services.hyperkitty-quarter-hourly = { + enable = cfg.hyperkittyApiKey != null; + description = "Trigger quarter-hourly Hyperkitty events"; + startAt = "*:00/15"; + serviceConfig = { + ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs quarter_hourly"; + User = config.services.httpd.user; + WorkingDirectory = "/var/lib/mailman-web"; + }; + }; + + systemd.services.hyperkitty-hourly = { + enable = cfg.hyperkittyApiKey != null; + description = "Trigger hourly Hyperkitty events"; + startAt = "hourly"; + serviceConfig = { + ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs hourly"; + User = config.services.httpd.user; + WorkingDirectory = "/var/lib/mailman-web"; + }; + }; + + systemd.services.hyperkitty-daily = { + enable = cfg.hyperkittyApiKey != null; + description = "Trigger daily Hyperkitty events"; + startAt = "daily"; + serviceConfig = { + ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs daily"; + User = config.services.httpd.user; + WorkingDirectory = "/var/lib/mailman-web"; + }; + }; + + systemd.services.hyperkitty-weekly = { + enable = cfg.hyperkittyApiKey != null; + description = "Trigger weekly Hyperkitty events"; + startAt = "weekly"; + serviceConfig = { + ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs weekly"; + User = config.services.httpd.user; + WorkingDirectory = "/var/lib/mailman-web"; + }; + }; + + systemd.services.hyperkitty-yearly = { + enable = cfg.hyperkittyApiKey != null; + description = "Trigger yearly Hyperkitty events"; + startAt = "yearly"; + serviceConfig = { + ExecStart = "${mailmanWebExe}/bin/mailman-web runjobs yearly"; + User = config.services.httpd.user; + WorkingDirectory = "/var/lib/mailman-web"; + }; + }; + }; } diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index b69310c34ff..84486aa98a4 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -34,6 +34,7 @@ let "node" "postfix" "postgres" + "rspamd" "snmp" "surfboard" "tor" @@ -193,6 +194,8 @@ in services.prometheus.exporters.minio.minioAddress = mkDefault "http://localhost:9000"; services.prometheus.exporters.minio.minioAccessKey = mkDefault config.services.minio.accessKey; services.prometheus.exporters.minio.minioAccessSecret = mkDefault config.services.minio.secretKey; + })] ++ [(mkIf config.services.rspamd.enable { + services.prometheus.exporters.rspamd.url = mkDefault "http://localhost:11334/stat"; })] ++ (mapAttrsToList (name: conf: mkExporterConf { inherit name; diff --git a/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix b/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix new file mode 100644 index 00000000000..1f02ae20724 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix @@ -0,0 +1,92 @@ +{ config, lib, pkgs, options }: + +with lib; + +let + cfg = config.services.prometheus.exporters.rspamd; + + prettyJSON = conf: + pkgs.runCommand "rspamd-exporter-config.yml" { } '' + echo '${builtins.toJSON conf}' | ${pkgs.buildPackages.jq}/bin/jq '.' > $out + ''; + + generateConfig = extraLabels: (map (path: { + name = "rspamd_${replaceStrings [ "." " " ] [ "_" "_" ] path}"; + path = "$.${path}"; + labels = extraLabels; + }) [ + "actions.'add header'" + "actions.'no action'" + "actions.'rewrite subject'" + "actions.'soft reject'" + "actions.greylist" + "actions.reject" + "bytes_allocated" + "chunks_allocated" + "chunks_freed" + "chunks_oversized" + "connections" + "control_connections" + "ham_count" + "learned" + "pools_allocated" + "pools_freed" + "read_only" + "scanned" + "shared_chunks_allocated" + "spam_count" + "total_learns" + ]) ++ [{ + name = "rspamd_statfiles"; + type = "object"; + path = "$.statfiles[*]"; + labels = recursiveUpdate { + symbol = "$.symbol"; + type = "$.type"; + } extraLabels; + values = { + revision = "$.revision"; + size = "$.size"; + total = "$.total"; + used = "$.used"; + languages = "$.languages"; + users = "$.users"; + }; + }]; +in +{ + port = 7980; + extraOpts = { + listenAddress = {}; # not used + + url = mkOption { + type = types.str; + description = '' + URL to the rspamd metrics endpoint. + Defaults to http://localhost:11334/stat when + is true. + ''; + }; + + extraLabels = mkOption { + type = types.attrsOf types.str; + default = { + host = config.networking.hostName; + }; + defaultText = "{ host = config.networking.hostName; }"; + example = literalExample '' + { + host = config.networking.hostName; + custom_label = "some_value"; + } + ''; + description = "Set of labels added to each metric."; + }; + }; + serviceOpts.serviceConfig.ExecStart = '' + ${pkgs.prometheus-json-exporter}/bin/prometheus-json-exporter \ + --port ${toString cfg.port} \ + ${cfg.url} ${prettyJSON (generateConfig cfg.extraLabels)} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; +} diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/ntp/chrony.nix similarity index 91% rename from nixos/modules/services/networking/chrony.nix rename to nixos/modules/services/networking/ntp/chrony.nix index 77f70257700..c74476c7a15 100644 --- a/nixos/modules/services/networking/chrony.nix +++ b/nixos/modules/services/networking/ntp/chrony.nix @@ -9,11 +9,11 @@ let keyFile = "${stateDir}/chrony.keys"; configFile = pkgs.writeText "chrony.conf" '' - ${concatMapStringsSep "\n" (server: "server " + server) cfg.servers} + ${concatMapStringsSep "\n" (server: "server " + server + " iburst") cfg.servers} ${optionalString (cfg.initstepslew.enabled && (cfg.servers != [])) - "initstepslew ${toString cfg.initstepslew.threshold} ${concatStringsSep " " cfg.initstepslew.servers}" + "initstepslew ${toString cfg.initstepslew.threshold} ${concatStringsSep " " cfg.servers}" } driftfile ${stateDir}/chrony.drift @@ -24,7 +24,7 @@ let ${cfg.extraConfig} ''; - chronyFlags = "-m -u chrony -f ${configFile} ${toString cfg.extraFlags}"; + chronyFlags = "-n -m -u chrony -f ${configFile} ${toString cfg.extraFlags}"; in { options = { @@ -48,7 +48,6 @@ in default = { enabled = true; threshold = 1000; # by default, same threshold as 'ntpd -g' (1000s) - servers = cfg.servers; }; description = '' Allow chronyd to make a rapid measurement of the system clock error at @@ -76,6 +75,8 @@ in }; config = mkIf cfg.enable { + meta.maintainers = with lib.maintainers; [ thoughtpolice ]; + environment.systemPackages = [ pkgs.chrony ]; users.groups = singleton @@ -115,7 +116,7 @@ in unitConfig.ConditionCapability = "CAP_SYS_TIME"; serviceConfig = - { Type = "forking"; + { Type = "simple"; ExecStart = "${pkgs.chrony}/bin/chronyd ${chronyFlags}"; ProtectHome = "yes"; diff --git a/nixos/modules/services/networking/ntpd.nix b/nixos/modules/services/networking/ntp/ntpd.nix similarity index 98% rename from nixos/modules/services/networking/ntpd.nix rename to nixos/modules/services/networking/ntp/ntpd.nix index 588d1c6edb0..1197c84f045 100644 --- a/nixos/modules/services/networking/ntpd.nix +++ b/nixos/modules/services/networking/ntp/ntpd.nix @@ -96,6 +96,7 @@ in ###### implementation config = mkIf config.services.ntp.enable { + meta.maintainers = with lib.maintainers; [ thoughtpolice ]; # Make tools such as ntpq available in the system path. environment.systemPackages = [ pkgs.ntp ]; diff --git a/nixos/modules/services/networking/openntpd.nix b/nixos/modules/services/networking/ntp/openntpd.nix similarity index 96% rename from nixos/modules/services/networking/openntpd.nix rename to nixos/modules/services/networking/ntp/openntpd.nix index f3920aa8064..471d15b1687 100644 --- a/nixos/modules/services/networking/openntpd.nix +++ b/nixos/modules/services/networking/ntp/openntpd.nix @@ -52,6 +52,7 @@ in ###### implementation config = mkIf cfg.enable { + meta.maintainers = with lib.maintainers; [ thoughtpolice ]; services.timesyncd.enable = mkForce false; # Add ntpctl to the environment for status checking diff --git a/nixos/modules/services/web-apps/restya-board.nix b/nixos/modules/services/web-apps/restya-board.nix index f220669c910..1e7882488ac 100644 --- a/nixos/modules/services/web-apps/restya-board.nix +++ b/nixos/modules/services/web-apps/restya-board.nix @@ -216,7 +216,6 @@ in index index.html index.php; gzip on; - gzip_disable "msie6"; gzip_comp_level 6; gzip_min_length 1100; diff --git a/nixos/modules/services/web-apps/zabbix.nix b/nixos/modules/services/web-apps/zabbix.nix index dac243b20e9..09538726b7c 100644 --- a/nixos/modules/services/web-apps/zabbix.nix +++ b/nixos/modules/services/web-apps/zabbix.nix @@ -179,7 +179,7 @@ in '' + optionalString (cfg.database.type == "oracle") '' extension=${pkgs.phpPackages.oci8}/lib/php/extensions/oci8.so ''; - phpEnv.ZABBIX_CONFIG = zabbixConfig; + phpEnv.ZABBIX_CONFIG = "${zabbixConfig}"; settings = { "listen.owner" = config.services.httpd.user; "listen.group" = config.services.httpd.group; @@ -197,7 +197,7 @@ in - SetHandler "proxy:unix:${fpm.listen}|fcgi://localhost/" + SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/" AllowOverride all diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index b94b338fd4a..e597f34700a 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -94,7 +94,6 @@ let ${optionalString (cfg.recommendedGzipSettings) '' gzip on; - gzip_disable "msie6"; gzip_proxied any; gzip_comp_level 5; gzip_types diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 02d83f82f33..9826b56b74d 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -297,6 +297,22 @@ let ''; }; + rspamd = { + exporterConfig = { + enable = true; + }; + metricProvider = { + services.rspamd.enable = true; + }; + exporterTest = '' + waitForUnit("rspamd.service"); + waitForUnit("prometheus-rspamd-exporter.service"); + waitForOpenPort(11334); + waitForOpenPort(7980); + waitUntilSucceeds("curl -sSf localhost:7980/metrics | grep -q 'rspamd_scanned{host=\"rspamd\"} 0'"); + ''; + }; + snmp = { exporterConfig = { enable = true; diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index b5381983240..2a9129cfebf 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -14,9 +14,9 @@ let }; betaVersion = stableVersion; latestVersion = { # canary & dev - version = "3.6.0.10"; # "Android Studio 3.6 Canary 10" - build = "192.5842447"; - sha256Hash = "0qyvqm0ihp6czx77skia87qnz87wrsp1a6la04dr4b0xln2c8m5b"; + version = "3.6.0.11"; # "Android Studio 3.6 Canary 11" + build = "192.5863777"; + sha256Hash = "1wz4vcdj4225vffsq0ji4zgg9qaqlfd21x7c6nczhqvydbyrjzg8"; }; in { # Attributes are named by their corresponding release channels diff --git a/pkgs/applications/kde/kdepim-addons.nix b/pkgs/applications/kde/kdepim-addons.nix index 75c1bf5be8b..0fe33ea017d 100644 --- a/pkgs/applications/kde/kdepim-addons.nix +++ b/pkgs/applications/kde/kdepim-addons.nix @@ -5,7 +5,7 @@ incidenceeditor, kcalcore, kcalutils, kconfig, kdbusaddons, kdeclarative, kdepim-apps-libs, kholidays, ki18n, kmime, ktexteditor, ktnef, libgravatar, libksieve, mailcommon, mailimporter, messagelib, poppler, prison, kpkpass, - kitinerary + kitinerary, kontactinterface }: mkDerivation { @@ -20,6 +20,6 @@ mkDerivation { incidenceeditor kcalcore kcalutils kconfig kdbusaddons kdeclarative kdepim-apps-libs kholidays ki18n kmime ktexteditor ktnef libgravatar libksieve mailcommon mailimporter messagelib poppler prison kpkpass - kitinerary + kitinerary kontactinterface ]; } diff --git a/pkgs/applications/misc/electrum/ltc.nix b/pkgs/applications/misc/electrum/ltc.nix index a5e4bd74a6e..0a28efbc28c 100644 --- a/pkgs/applications/misc/electrum/ltc.nix +++ b/pkgs/applications/misc/electrum/ltc.nix @@ -5,7 +5,7 @@ python3Packages.buildPythonApplication rec { pname = "electrum-ltc"; - version = "3.1.3.1"; + version = "3.3.8.1"; src = fetchurl { url = "https://electrum-ltc.org/download/Electrum-LTC-${version}.tar.gz"; diff --git a/pkgs/applications/misc/kdbplus/default.nix b/pkgs/applications/misc/kdbplus/default.nix index 2af091b0df3..4c4b461303f 100644 --- a/pkgs/applications/misc/kdbplus/default.nix +++ b/pkgs/applications/misc/kdbplus/default.nix @@ -1,24 +1,24 @@ -{ stdenv, requireFile, unzip, rlwrap, bash }: +{ stdenv, requireFile, unzip, rlwrap, bash, zlib }: assert (stdenv.hostPlatform.system == "i686-linux"); let libPath = stdenv.lib.makeLibraryPath - [ stdenv.cc.libc stdenv.cc.cc ]; + [ stdenv.cc.libc stdenv.cc.cc zlib ]; in stdenv.mkDerivation rec { pname = "kdbplus"; - version = "3.3"; + version = "3.6"; - src = requireFile { + src = requireFile rec { message = '' Nix can't download kdb+ for you automatically. Go to http://kx.com and download the free, 32-bit version for - Linux. Then run "nix-prefetch-url file://\$PWD/linux.zip" in - the directory where you saved it. Note you need version 3.3. + Linux. Then run "nix-prefetch-url file://\$PWD/${name}" in + the directory where you saved it. Note you need version ${version}. ''; - name = "linux.zip"; - sha256 = "5fd0837599e24f0f437a8314510888a86ab0787684120a8fcf592299800aa940"; + name = "linuxx86.zip"; + sha256 = "0w6znd9warcqx28vf648n0vgmxyyy9kvsfpsfw37d1kp5finap4p"; }; dontStrip = true; diff --git a/pkgs/applications/misc/lutris/chrootenv.nix b/pkgs/applications/misc/lutris/chrootenv.nix index ab40dfc8131..2334221f926 100644 --- a/pkgs/applications/misc/lutris/chrootenv.nix +++ b/pkgs/applications/misc/lutris/chrootenv.nix @@ -104,6 +104,9 @@ in buildFHSUserEnv { # WINE cups lcms2 mpg123 cairo unixODBC samba4 sane-backends openldap ocl-icd utillinux + + # Winetricks + fribidi ] ++ xorgDeps pkgs; extraInstallCommands = '' diff --git a/pkgs/applications/misc/lyx/default.nix b/pkgs/applications/misc/lyx/default.nix index 744d124f84d..f7964e4e5c6 100644 --- a/pkgs/applications/misc/lyx/default.nix +++ b/pkgs/applications/misc/lyx/default.nix @@ -1,8 +1,8 @@ -{ fetchurl, stdenv, pkgconfig, python, file, bc, fetchpatch +{ fetchurl, lib, mkDerivation, pkgconfig, python, file, bc, fetchpatch , qtbase, qtsvg, hunspell, makeWrapper #, mythes, boost }: -stdenv.mkDerivation rec { +mkDerivation rec { version = "2.3.0"; pname = "lyx"; @@ -30,10 +30,9 @@ stdenv.mkDerivation rec { doCheck = true; # python is run during runtime to do various tasks - postFixup = '' - wrapProgram "$out/bin/lyx" \ - --prefix PATH : '${python}/bin' - ''; + qtWrapperArgs = [ + " --prefix PATH : ${python}/bin" + ]; patches = [ (fetchpatch { @@ -42,7 +41,7 @@ stdenv.mkDerivation rec { }) ]; - meta = with stdenv.lib; { + meta = with lib; { description = "WYSIWYM frontend for LaTeX, DocBook"; homepage = http://www.lyx.org; license = licenses.gpl2Plus; diff --git a/pkgs/applications/misc/viking/default.nix b/pkgs/applications/misc/viking/default.nix index cda3b1a6f85..2d8a860e7e8 100644 --- a/pkgs/applications/misc/viking/default.nix +++ b/pkgs/applications/misc/viking/default.nix @@ -1,7 +1,7 @@ { fetchurl, stdenv, makeWrapper, pkgconfig, intltool, gettext, gtk2, expat, curl , gpsd, bc, file, gnome-doc-utils, libexif, libxml2, libxslt, scrollkeeper , docbook_xml_dtd_412, gexiv2, sqlite, gpsbabel, expect, hicolor-icon-theme -, geoclue2, liboauth }: +, geoclue2, liboauth, nettle }: stdenv.mkDerivation rec { pname = "viking"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ makeWrapper intltool gettext gtk2 expat curl gpsd bc file gnome-doc-utils libexif libxml2 libxslt scrollkeeper docbook_xml_dtd_412 gexiv2 sqlite hicolor-icon-theme - geoclue2 liboauth + geoclue2 liboauth nettle ]; configureFlags = [ "--disable-scrollkeeper --disable-mapnik" ]; diff --git a/pkgs/applications/misc/xchm/default.nix b/pkgs/applications/misc/xchm/default.nix index a7a6500fd22..6a5e62f54e1 100644 --- a/pkgs/applications/misc/xchm/default.nix +++ b/pkgs/applications/misc/xchm/default.nix @@ -1,22 +1,30 @@ -{stdenv, fetchurl, wxGTK, chmlib}: +{ stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, chmlib }: -stdenv.mkDerivation { - name = "xchm-1.23"; - src = fetchurl { - url = mirror://sourceforge/xchm/xchm-1.23.tar.gz; - sha256 = "0qn0fyxcrn30ndq2asx31k0qkx3grbm16fb1y580wd2gjmh5r3wg"; +stdenv.mkDerivation rec { + pname = "xchm"; + version = "1.30"; + + src = fetchFromGitHub { + owner = "rzvncj"; + repo = "xCHM"; + rev = version; + sha256 = "1sjvh06m8jbb28k6y3knas3nkh1dfvff4mlwjs33x12ilhddhr8v"; }; - buildInputs = [wxGTK chmlib]; - postConfigure = '' - export NIX_LDFLAGS="$NIX_LDFLAGS $(${wxGTK}/lib/wx/config/* --libs | sed -e s@-pthread@@)" - echo $NIX_LDFLAGS + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ wxGTK30 chmlib ]; + + configureFlags = [ "--with-wx-prefix=${wxGTK30}" ]; + + preConfigure = '' + export LDFLAGS="$LDFLAGS $(${wxGTK30}/bin/wx-config --libs | sed -e s@-pthread@@) -lwx_gtk2u_aui-3.0" ''; meta = with stdenv.lib; { description = "A viewer for Microsoft HTML Help files"; - homepage = http://xchm.sourceforge.net; + homepage = "https://github.com/rzvncj/xCHM"; license = licenses.gpl2; + maintainers = with maintainers; [ sikmir ]; platforms = platforms.linux; }; } diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index a0ea67133c6..b356f809f03 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -100,11 +100,11 @@ let flash = stdenv.mkDerivation rec { pname = "flashplayer-ppapi"; - version = "32.0.0.238"; + version = "32.0.0.255"; src = fetchzip { url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz"; - sha256 = "0jqx68lfqjpy6wbxdi0giclvh9mc9rha92hqdj1nx42v95k3gc65"; + sha256 = "1rqb54kqxq66vvqk5yrr3rsy3wcj9r9wnkngk27c7jayzm6bwgvv"; stripRoot = false; }; diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix index 772ca926cd7..fb3a6723817 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix @@ -74,7 +74,7 @@ let in stdenv.mkDerivation rec { pname = "flashplayer"; - version = "32.0.0.238"; + version = "32.0.0.255"; src = fetchurl { url = @@ -85,14 +85,14 @@ stdenv.mkDerivation rec { sha256 = if debug then if arch == "x86_64" then - "1f5i64nzkvxy20vi7kldaamwp6pi2zgmjiw061cgqrwf7hj45wkg" + "1hd5z8qmki36k2wdwgg3v4sj32g8590r5563gdrjrk7bmrqfjnji" else - "09jvxqp83hpk89ak8flq14s3s3nhy3ary91jc6k47v325axh1cl9" + "0y13bxdgkxaqsyab09skiqj8dfjw76n2lr7p525ba8lbfbc8xj52" else if arch == "x86_64" then - "05gvssjdz43pvgivdngrf8qr5b30p45hr2sr97cyl6b87581qw9s" + "0qkslkaiw3c9xk1rjcl4x9d0fi6i91k7g01mf0gq28wgzcyz4cw7" else - "06l7zhgh5rfxxw46b500zdgcqsk2h7kivng5b0b74s3vy7f0g270"; + "0qblmaa3nq1g7825yhvz98pvd1591q3q7bsrhv5bbhdbmb9c1qd5"; }; nativeBuildInputs = [ unzip ]; @@ -141,7 +141,7 @@ stdenv.mkDerivation rec { description = "Adobe Flash Player browser plugin"; homepage = http://www.adobe.com/products/flashplayer/; license = stdenv.lib.licenses.unfree; - maintainers = []; + maintainers = with stdenv.lib.maintainers; [ taku0 ]; platforms = [ "x86_64-linux" "i686-linux" ]; }; } diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix index c603dc6cf9f..527eb261006 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation { pname = "flashplayer-standalone"; - version = "32.0.0.238"; + version = "32.0.0.255"; src = fetchurl { url = @@ -60,9 +60,9 @@ stdenv.mkDerivation { "https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz"; sha256 = if debug then - "1vhfjpwsmg96irfvz81ldzn2m4qcjnql5psg4cifjay423yxabvy" + "1igc23mljmw1bw6fwx3rwpz7kxiy8n5znkng20w3yin2zh8qw8sy" else - "0am95xi2jasvxj5b2i12wzpvl3bvxli537k1i04698cg0na6x0y0"; + "0rfvgx1g0s8wswwpmfjx6p59yh1cxya3x3bczbissrq4rcb1v315"; }; nativeBuildInputs = [ unzip ]; diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix index c0cb85eb177..739315917d4 100644 --- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix @@ -89,7 +89,7 @@ let fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ]; # Upstream source - version = "8.5.4"; + version = "8.5.5"; lang = "en-US"; @@ -99,7 +99,7 @@ let "https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux64-${version}_${lang}.tar.xz" "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz" ]; - sha256 = "0nnzynk3nlnd847c8jjghs9anmr5a2hv7nk1qxigigxqa5vqy96z"; + sha256 = "00r5k9bbfpv3s6shxqypl13psr1zz51xiyz3vmm4flhr2qa4ycsz"; }; i686-linux = fetchurl { @@ -107,7 +107,7 @@ let "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz" "https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux32-${version}_${lang}.tar.xz" ]; - sha256 = "1b34skl3hwvpy0r4l5ykgnnwhbz7cvly2gi9ib4h7lijjfafiys1"; + sha256 = "1nxvw5kiggfr4n5an436ass84cvwjviaa894kfm72yf2ls149f29"; }; }; in diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index 020fdb2fb2c..26b858aa3b8 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -8,7 +8,7 @@ with lib; mkDerivation rec { pname = "telegram-desktop"; - version = "1.8.4"; + version = "1.8.8"; # Note: Due to our strong dependency on the Arch patches it's probably best # to also wait for the Arch update (especially if the patches don't apply). @@ -17,7 +17,7 @@ mkDerivation rec { owner = "telegramdesktop"; repo = "tdesktop"; rev = "v${version}"; - sha256 = "1q6y05kb6jjarb690qq28fqkv6kfkxdmfx0va1qi7aqxlhd5rvyl"; + sha256 = "1aj1pnzc6bz8jbdrfwdj2r54jhw9z7b5fd1095r007zmlnzs51lv"; fetchSubmodules = true; }; @@ -25,8 +25,8 @@ mkDerivation rec { archPatches = fetchsvn { url = "svn://svn.archlinux.org/community/telegram-desktop/trunk"; # svn log svn://svn.archlinux.org/community/telegram-desktop/trunk - rev = "498563"; - sha256 = "0g2y6impygqhfiqnyxc1ivxwl8j82q9qcnkqcjn6mwj3cisyxwnl"; + rev = "509240"; + sha256 = "1sf4mspbsqsnjzp9ys9l0asrx1bhj273d163i2bv1zhl4mmgpl3k"; }; privateHeadersPatch = fetchpatch { url = "https://github.com/telegramdesktop/tdesktop/commit/b9d3ba621eb8af638af46c6b3cfd7a8330bf0dd5.patch"; diff --git a/pkgs/applications/office/mendeley/default.nix b/pkgs/applications/office/mendeley/default.nix index 655a10d3a94..a7b0afe0754 100644 --- a/pkgs/applications/office/mendeley/default.nix +++ b/pkgs/applications/office/mendeley/default.nix @@ -130,7 +130,7 @@ stdenv.mkDerivation { ''; dontStrip = true; - dontPatchElf = true; + dontPatchELF = true; updateScript = import ./update.nix { inherit writeScript runtimeShell; }; diff --git a/pkgs/applications/video/qarte/default.nix b/pkgs/applications/video/qarte/default.nix index f0c3776a433..cd6416032da 100644 --- a/pkgs/applications/video/qarte/default.nix +++ b/pkgs/applications/video/qarte/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchbzr, python3, rtmpdump, makeWrapper }: +{ mkDerivation, lib, fetchbzr, python3, rtmpdump }: let - pythonEnv = python3.withPackages (ps: with ps; [ pyqt5 sip ]); -in stdenv.mkDerivation { + pythonEnv = python3.withPackages (ps: with ps; [ pyqt5_with_qtmultimedia ]); +in mkDerivation { name = "qarte-4.6.0"; src = fetchbzr { url = http://bazaar.launchpad.net/~vincent-vandevyvre/qarte/qarte-4; @@ -10,28 +10,33 @@ in stdenv.mkDerivation { sha256 = "0v4zpj8w67ydvnmanxbl8pwvn0cfv70c0mlw36a1r4n0rvgxffcn"; }; - buildInputs = [ makeWrapper pythonEnv ]; + buildInputs = [ pythonEnv ]; installPhase = '' + runHook preInstall mkdir -p $out/bin mv qarte $out/bin/ substituteInPlace $out/bin/qarte \ --replace '/usr/share' "$out/share" - wrapProgram $out/bin/qarte \ - --prefix PATH : "${rtmpdump}/bin" mkdir -p $out/share/man/man1/ mv qarte.1 $out/share/man/man1/ mkdir -p $out/share/qarte mv * $out/share/qarte/ + runHook postInstall + ''; + + postFixup = '' + wrapQtApp $out/bin/qarte \ + --prefix PATH : ${rtmpdump}/bin ''; meta = { homepage = https://launchpad.net/qarte; description = "A recorder for Arte TV Guide and Arte Concert"; - license = stdenv.lib.licenses.gpl3; - maintainers = with stdenv.lib.maintainers; [ vbgl ]; - platforms = stdenv.lib.platforms.linux; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ vbgl ]; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/applications/virtualization/crun/default.nix b/pkgs/applications/virtualization/crun/default.nix new file mode 100644 index 00000000000..7dddc3b533b --- /dev/null +++ b/pkgs/applications/virtualization/crun/default.nix @@ -0,0 +1,31 @@ +{ stdenv, lib, fetchFromGitHub, autoreconfHook, go-md2man, pkgconfig +, libcap, libseccomp, python3, systemd, yajl }: + +stdenv.mkDerivation rec { + pname = "crun"; + version = "0.8"; + + src = fetchFromGitHub { + owner = "containers"; + repo = pname; + rev = version; + sha256 = "1anvlgw373031w0pp0b28l10yrnyhbj192n60bbbjahw487dk2fi"; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ autoreconfHook go-md2man pkgconfig python3 ]; + + buildInputs = [ libcap libseccomp systemd yajl ]; + + enableParallelBuilding = true; + + # the tests require additional permissions + doCheck = false; + + meta = with lib; { + description = "A fast and lightweight fully featured OCI runtime and C library for running containers"; + license = licenses.gpl3; + platforms = platforms.linux; + inherit (src.meta) homepage; + }; +} diff --git a/pkgs/development/compilers/go/1.11.nix b/pkgs/development/compilers/go/1.11.nix deleted file mode 100644 index 32847a2671c..00000000000 --- a/pkgs/development/compilers/go/1.11.nix +++ /dev/null @@ -1,232 +0,0 @@ -{ stdenv, fetchurl, tzdata, iana-etc, runCommand -, perl, which, pkgconfig, patch, procps, pcre, cacert, Security, Foundation -, mailcap, runtimeShell -, buildPackages, pkgsTargetTarget -}: - -let - - inherit (stdenv.lib) optionals optionalString; - - goBootstrap = runCommand "go-bootstrap" {} '' - mkdir $out - cp -rf ${buildPackages.go_bootstrap}/* $out/ - chmod -R u+w $out - find $out -name "*.c" -delete - cp -rf $out/bin/* $out/share/go/bin/ - ''; - - goarch = platform: { - i686 = "386"; - x86_64 = "amd64"; - aarch64 = "arm64"; - arm = "arm"; - armv5tel = "arm"; - armv6l = "arm"; - armv7l = "arm"; - }.${platform.parsed.cpu.name} or (throw "Unsupported system"); - -in - -stdenv.mkDerivation rec { - pname = "go"; - version = "1.11.13"; - - src = fetchurl { - url = "https://dl.google.com/go/go${version}.src.tar.gz"; - sha256 = "0xj0pbviikdf8g0sfz5hwxf7hwz8b8g5akqnrvyclhgnsdghjcjh"; - }; - - # perl is used for testing go vet - nativeBuildInputs = [ perl which pkgconfig patch procps ]; - buildInputs = [ cacert pcre ] - ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] - ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; - - - propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ]; - - hardeningDisable = [ "all" ]; - - prePatch = '' - patchShebangs ./ # replace /bin/bash - - # This source produces shell script at run time, - # and thus it is not corrected by patchShebangs. - substituteInPlace misc/cgo/testcarchive/carchive_test.go \ - --replace '#!/usr/bin/env bash' '#!${runtimeShell}' - - # Patch the mimetype database location which is missing on NixOS. - substituteInPlace src/mime/type_unix.go \ - --replace '/etc/mime.types' '${mailcap}/etc/mime.types' - - # Disabling the 'os/http/net' tests (they want files not available in - # chroot builds) - rm src/net/{listen,parse}_test.go - rm src/syscall/exec_linux_test.go - - # !!! substituteInPlace does not seems to be effective. - # The os test wants to read files in an existing path. Just don't let it be /usr/bin. - sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go - sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go - # Disable the unix socket test - sed -i '/TestShutdownUnix/areturn' src/net/net_test.go - # Disable the hostname test - sed -i '/TestHostname/areturn' src/os/os_test.go - # ParseInLocation fails the test - sed -i '/TestParseInSydney/areturn' src/time/format_test.go - # Remove the api check as it never worked - sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go - # Remove the coverage test as we have removed this utility - sed -i '/TestCoverageWithCgo/areturn' src/cmd/go/go_test.go - # Remove the timezone naming test - sed -i '/TestLoadFixed/areturn' src/time/time_test.go - # Remove disable setgid test - sed -i '/TestRespectSetgidDir/areturn' src/cmd/go/internal/work/build_test.go - # Remove cert tests that conflict with NixOS's cert resolution - sed -i '/TestEnvVars/areturn' src/crypto/x509/root_unix_test.go - # TestWritevError hangs sometimes - sed -i '/TestWritevError/areturn' src/net/writev_test.go - # TestVariousDeadlines fails sometimes - sed -i '/TestVariousDeadlines/areturn' src/net/timeout_test.go - - sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go - sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go - - # Disable cgo lookup tests not works, they depend on resolver - rm src/net/cgo_unix_test.go - - '' + optionalString stdenv.isLinux '' - sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go - '' + optionalString stdenv.isAarch32 '' - echo '#!${runtimeShell}' > 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 - - touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd - ''; - - patches = [ - ./remove-tools-1.11.patch - ./ssl-cert-file-1.12.1.patch - ./remove-test-pie.patch - ./creds-test.patch - ./go-1.9-skip-flaky-19608.patch - ./go-1.9-skip-flaky-20072.patch - ./remove-fhs-test-references.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 - ]; - - 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.buildPlatform != stdenv.targetPlatform) then - "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}cc" - else - null; - CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then - "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.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 && !stdenv.isDarwin; - - checkPhase = '' - runHook preCheck - (cd src && ./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.11"; - homepage = http://golang.org/; - description = "The Go Programming language"; - license = licenses.bsd3; - maintainers = with maintainers; [ cstrahan orivej velovix mic92 rvolosatovs ]; - platforms = platforms.linux ++ platforms.darwin; - }; -} diff --git a/pkgs/development/interpreters/love/0.8.nix b/pkgs/development/interpreters/love/0.8.nix index 5fbb34bf213..792fe299e4d 100644 --- a/pkgs/development/interpreters/love/0.8.nix +++ b/pkgs/development/interpreters/love/0.8.nix @@ -5,9 +5,11 @@ }: stdenv.mkDerivation rec { - name = "love-0.8.0"; + pname = "love"; + version = "0.8.0"; + src = fetchurl { - url = "https://bitbucket.org/rude/love/downloads/${name}-linux-src.tar.gz"; + url = "https://bitbucket.org/rude/love/downloads/${pname}-${version}-linux-src.tar.gz"; sha256 = "1k4fcsa8zzi04ja179bmj24hvqcbm3icfvrvrzyz2gw9qwfclrwi"; }; @@ -36,13 +38,14 @@ stdenv.mkDerivation rec { } || true ''; - NIX_CFLAGS_COMPILE = '' - -I${SDL.dev}/include/SDL - -I${freetype.dev}include/freetype2 - ''; + NIX_CFLAGS_COMPILE = [ + "-I${SDL.dev}/include/SDL" + "-I${freetype.dev}include/freetype2" + "-DGL_GLEXT_PROTOTYPES" # https://community.khronos.org/t/glgenbuffers-was-not-declared-in-this-scope/59283/2 + ]; meta = { - homepage = http://love2d.org; + homepage = "http://love2d.org"; description = "A Lua-based 2D game engine/scripting language"; license = stdenv.lib.licenses.zlib; diff --git a/pkgs/development/libraries/audio/rtaudio/default.nix b/pkgs/development/libraries/audio/rtaudio/default.nix index e9238ac2b87..f26f2b07e71 100644 --- a/pkgs/development/libraries/audio/rtaudio/default.nix +++ b/pkgs/development/libraries/audio/rtaudio/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoconf, automake, libtool, libjack2, alsaLib, rtmidi }: +{ stdenv, fetchFromGitHub, autoconf, automake, libtool, libjack2, alsaLib, pulseaudio, rtmidi }: stdenv.mkDerivation rec { version = "5.1.0"; @@ -13,18 +13,18 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - buildInputs = [ autoconf automake libtool libjack2 alsaLib rtmidi ]; + buildInputs = [ autoconf automake libtool libjack2 alsaLib pulseaudio rtmidi ]; preConfigure = '' ./autogen.sh --no-configure ./configure ''; - meta = { + meta = with stdenv.lib; { description = "A set of C++ classes that provide a cross platform API for realtime audio input/output"; homepage = http://www.music.mcgill.ca/~gary/rtaudio/; - license = stdenv.lib.licenses.mit; - maintainers = [ stdenv.lib.maintainers.magnetophon ]; - platforms = with stdenv.lib.platforms; linux ++ darwin; + license = licenses.mit; + maintainers = [ maintainers.magnetophon ]; + platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/getdns/default.nix b/pkgs/development/libraries/getdns/default.nix index 3a6c4ee1dbd..721245ceb6d 100644 --- a/pkgs/development/libraries/getdns/default.nix +++ b/pkgs/development/libraries/getdns/default.nix @@ -3,11 +3,12 @@ stdenv.mkDerivation rec { pname = "getdns"; - version = "1.5.1"; + version = "1.5.2"; + versionRewrite = builtins.splitVersion version; src = fetchurl { - url = "https://getdnsapi.net/releases/${pname}-1-5-1/${pname}-${version}.tar.gz"; - sha256 = "5686e61100599c309ce03535f9899a5a3d94a82cc08d10718e2cd73ad3dc28af"; + url = "https://getdnsapi.net/releases/${pname}-${builtins.concatStringsSep "-" versionRewrite}/${pname}-${version}.tar.gz"; + sha256 = "1h4l0sbkpiahpx2pd5lby10yi22mdxgx5xf1y80r77pa46iac9hq"; }; nativeBuildInputs = [ libtool m4 autoreconfHook automake file ]; diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index 7e64636d96d..adb495689e3 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, meson, ninja, pkgconfig, gst-plugins-base, bzip2, libva, wayland , libdrm, udev, xorg, libGLU_combined, gstreamer, gst-plugins-bad, nasm -, libvpx, python +, libvpx, python, fetchpatch }: stdenv.mkDerivation rec { @@ -12,6 +12,15 @@ stdenv.mkDerivation rec { sha256 = "07qpynamiz0lniqajcaijh3n7ixs4lfk9a5mfk50sng0dricwzsf"; }; + patches = [ + # See: https://mail.gnome.org/archives/distributor-list/2019-September/msg00000.html + # Note that the patch has now been actually accepted upstream. + (fetchpatch { + url = "https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/commit/a90daabb84f983d2fa05ff3159f7ad59aa648b55.patch"; + sha256 = "0p2qygq6b5h6nxjdfnlzbsyih43hjq5c94ag8sbyyb8pmnids9rb"; + }) + ]; + outputs = [ "out" "dev" ]; nativeBuildInputs = [ meson ninja pkgconfig bzip2 ]; @@ -28,8 +37,6 @@ stdenv.mkDerivation rec { ''; mesonFlags = [ - # Enables all features, so that we know when new dependencies are necessary. - "-Dauto_features=enabled" "-Dexamples=disabled" # requires many dependencies and probably not useful for our users ]; diff --git a/pkgs/development/libraries/qt-5/5.11/default.nix b/pkgs/development/libraries/qt-5/5.11/default.nix index 7f0937db30f..296db2eab2d 100644 --- a/pkgs/development/libraries/qt-5/5.11/default.nix +++ b/pkgs/development/libraries/qt-5/5.11/default.nix @@ -16,7 +16,7 @@ top-level attribute to `top-level/all-packages.nix`. { newScope, - stdenv, fetchurl, fetchFromGitHub, makeSetupHook, makeWrapper, + stdenv, fetchurl, fetchFromGitHub, fetchpatch, makeSetupHook, makeWrapper, bison, cups ? null, harfbuzz, libGL, perl, gstreamer, gst-plugins-base, gtk3, dconf, llvmPackages_5, @@ -55,7 +55,15 @@ let ./qtbase-fixguicmake.patch ]; qtdeclarative = [ ./qtdeclarative.patch ]; - qtscript = [ ./qtscript.patch ]; + qtscript = [ + ./qtscript.patch + # needed due to changes in gcc 8.3, see https://bugreports.qt.io/browse/QTBUG-74196 + # fixed in qtscript 5.12.2 + (fetchpatch { + url = "https://github.com/qt/qtscript/commit/97ec1d1882a83c23c91f0f7daea48e05858d8c32.diff"; + sha256 = "0khrapq13xzvxckzc9l7gqyjwibyd98vyqy6gmyhvsbm2kq8n6wi"; + }) + ]; qtserialport = [ ./qtserialport.patch ]; qttools = [ ./qttools.patch ]; qtwebengine = [ diff --git a/pkgs/development/libraries/qt-5/5.9/default.nix b/pkgs/development/libraries/qt-5/5.9/default.nix index b27c5d3eb58..a872f212ff7 100644 --- a/pkgs/development/libraries/qt-5/5.9/default.nix +++ b/pkgs/development/libraries/qt-5/5.9/default.nix @@ -42,7 +42,15 @@ let ./qtbase-openssl_1_1.patch ]; qtdeclarative = [ ./qtdeclarative.patch ]; - qtscript = [ ./qtscript.patch ]; + qtscript = [ + ./qtscript.patch + # needed due to changes in gcc 8.3, see https://bugreports.qt.io/browse/QTBUG-74196 + # fixed in qtscript 5.12.2 + (fetchpatch { + url = "https://github.com/qt/qtscript/commit/97ec1d1882a83c23c91f0f7daea48e05858d8c32.diff"; + sha256 = "0khrapq13xzvxckzc9l7gqyjwibyd98vyqy6gmyhvsbm2kq8n6wi"; + }) + ]; qtserialport = [ ./qtserialport.patch ]; qttools = [ ./qttools.patch ]; qtwebengine = [ ./qtwebengine-no-build-skip.patch ] diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index e367d8242de..fa2a0f4f594 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -73,6 +73,11 @@ stdenv.mkDerivation rec { chmod u+w -R . ''; + postPatch = stdenv.lib.optionalString stdenv.isAarch64 '' + substituteInPlace build/toolchain/linux/BUILD.gn \ + --replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""' + ''; + gnFlags = [ "use_custom_libcxx=false" "is_clang=${if stdenv.cc.isClang then "true" else "false"}" @@ -104,6 +109,17 @@ stdenv.mkDerivation rec { install -D d8 $out/bin/d8 install -D obj/libv8_monolith.a $out/lib/libv8.a cp -r ../../include $out + + mkdir -p $out/lib/pkgconfig + cat > $out/lib/pkgconfig/v8.pc << EOF + Name: v8 + Description: V8 JavaScript Engine + Version: ${version} + Libs: -L$out/lib -lv8 -pthread + Cflags: -I$out/include + Libs: -L$out/lib -lpulse + Cflags: -I$out/include + EOF ''; meta = with lib; { diff --git a/pkgs/development/libraries/wt/default.nix b/pkgs/development/libraries/wt/default.nix index 958257ffe76..319b0effc57 100644 --- a/pkgs/development/libraries/wt/default.nix +++ b/pkgs/development/libraries/wt/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, cmake, boost, pkgconfig, doxygen, qt48Full, libharu , pango, fcgi, firebird, mysql, postgresql, graphicsmagick, glew, openssl -, pcre +, pcre, harfbuzz }: let @@ -31,6 +31,7 @@ let "-DWT_CPP_11_MODE=-std=c++11" "-DGM_PREFIX=${graphicsmagick}" "-DMYSQL_PREFIX=${mysql.connector-c}" + "-DHARFBUZZ_INCLUDE_DIR=${harfbuzz.dev}/include" "--no-warn-unused-cli" ]; @@ -44,12 +45,12 @@ let }; in { wt3 = generic { - version = "3.4.0"; - sha256 = "0y0b2h9jf5cg1gdh48dj32pj5nsvipab1cgygncxf98c46ikhysg"; + version = "3.4.1"; + sha256 = "1bsx7hmy6g2x9p3vl5xw9lv1xk891pnvs93a87s15g257gznkjmj"; }; wt4 = generic { - version = "4.1.0"; - sha256 = "1a9nl5gs8m8pssf2l3z6kbl2rc9fw5ad7lfslw5yr3gzi0zqn05x"; + version = "4.1.1"; + sha256 = "1f1imx5kbpqlysrqx5h75hf2f8pkq972rz42x0pl6cxbnsyzngid"; }; } diff --git a/pkgs/development/libraries/zeroc-ice/3.6.nix b/pkgs/development/libraries/zeroc-ice/3.6.nix index 13797f927c1..dd983a34f88 100644 --- a/pkgs/development/libraries/zeroc-ice/3.6.nix +++ b/pkgs/development/libraries/zeroc-ice/3.6.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, mcpp, bzip2, expat, openssl, db5 +{ stdenv, lib, fetchFromGitHub, fetchpatch, mcpp, bzip2, expat, openssl, db5 , darwin, libiconv, Security , cpp11 ? false }: @@ -26,6 +26,16 @@ stdenv.mkDerivation rec { --replace xcrun "" ''; + patches = [ + # Fixes compilation issues with GCC 8 using one of the patches + # provided in https://github.com/zeroc-ice/ice/issues/82 + ( fetchpatch { + url = "https://github.com/zeroc-ice/ice/commit/a6a4981616b669432ff7b588179d6e93694d9e3f.patch"; + sha256 = "17j5r7gsa3izrm7zln4mrp7l16h532gvmpas0kzglybicbiz7d56"; + stripLen = 1; + }) + ]; + preBuild = '' makeFlagsArray+=( "prefix=$out" diff --git a/pkgs/development/misc/rappel/default.nix b/pkgs/development/misc/rappel/default.nix index 02c31fd4d69..761d2ea98ba 100644 --- a/pkgs/development/misc/rappel/default.nix +++ b/pkgs/development/misc/rappel/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "rappel"; - version = "unstable-2019-07-08"; + version = "unstable-2019-09-09"; src = fetchFromGitHub { owner = "yrp604"; repo = "rappel"; - rev = "95a776f850cf6a7c21923a2100b605408ef038de"; - sha256 = "0fmd15xa6hswh3x48av4g1sf6rncbiinbj7gbw1ffvqsbcfnsgcr"; + rev = "31a06762d34880ff2ed7176ca71bd8a6b91b10d5"; + sha256 = "0wj3hypqfrjra8mwmn32hs5qs6ic81cq3gn1v0b2fba6vkqcsqfy"; }; buildInputs = [ libedit ]; diff --git a/pkgs/development/python-modules/alembic/default.nix b/pkgs/development/python-modules/alembic/default.nix index 88fd18431d6..ddc3779749b 100644 --- a/pkgs/development/python-modules/alembic/default.nix +++ b/pkgs/development/python-modules/alembic/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi -, pytest, pytestcov, mock, coverage +, pytest, pytestcov, mock, coverage, setuptools , Mako, sqlalchemy, python-editor, dateutil }: @@ -13,7 +13,7 @@ buildPythonPackage rec { }; buildInputs = [ pytest pytestcov mock coverage ]; - propagatedBuildInputs = [ Mako sqlalchemy python-editor dateutil ]; + propagatedBuildInputs = [ Mako sqlalchemy python-editor dateutil setuptools ]; meta = with stdenv.lib; { homepage = https://bitbucket.org/zzzeek/alembic; diff --git a/pkgs/development/python-modules/django-haystack/default.nix b/pkgs/development/python-modules/django-haystack/default.nix index 905ce92e517..381624e5719 100644 --- a/pkgs/development/python-modules/django-haystack/default.nix +++ b/pkgs/development/python-modules/django-haystack/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi -, setuptools_scm, django, dateutil, whoosh, pysolr +, setuptools, setuptools_scm, django, dateutil, whoosh, pysolr , coverage, mock, nose, geopy, requests }: buildPythonPackage rec { @@ -12,7 +12,7 @@ buildPythonPackage rec { }; checkInputs = [ pysolr whoosh dateutil geopy coverage nose mock coverage requests ]; - propagatedBuildInputs = [ django ]; + propagatedBuildInputs = [ django setuptools ]; nativeBuildInputs = [ setuptools_scm ]; postPatch = '' diff --git a/pkgs/development/python-modules/plyplus/default.nix b/pkgs/development/python-modules/plyplus/default.nix index 2b18d114f3f..41327c6fc48 100644 --- a/pkgs/development/python-modules/plyplus/default.nix +++ b/pkgs/development/python-modules/plyplus/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ ply ]; - disabled = isPy3k; + doCheck = !isPy3k; meta = { homepage = https://github.com/erezsh/plyplus; diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index 5791299bdc1..f3578459b9d 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -6,6 +6,7 @@ , qtdeclarative , qtwebchannel , withConnectivity ? false, qtconnectivity +, withMultimedia ? false, qtmultimedia , withWebKit ? false, qtwebkit , withWebSockets ? false, qtwebsockets }: @@ -50,6 +51,7 @@ in buildPythonPackage rec { qtwebchannel ] ++ lib.optional withConnectivity qtconnectivity + ++ lib.optional withMultimedia qtmultimedia ++ lib.optional withWebKit qtwebkit ++ lib.optional withWebSockets qtwebsockets ; @@ -121,6 +123,7 @@ in buildPythonPackage rec { ] ++ lib.optional withWebSockets "PyQt5.QtWebSockets" ++ lib.optional withWebKit "PyQt5.QtWebKit" + ++ lib.optional withMultimedia "PyQt5.QtMultimedia" ++ lib.optional withConnectivity "PyQt5.QtConnectivity" ; imports = lib.concatMapStrings (module: "import ${module};") modules; diff --git a/pkgs/development/python-modules/tvnamer/default.nix b/pkgs/development/python-modules/tvnamer/default.nix index bc2f8807eaa..b0df4008992 100644 --- a/pkgs/development/python-modules/tvnamer/default.nix +++ b/pkgs/development/python-modules/tvnamer/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { sha256 = "75e38454757c77060ad3782bd071682d6d316de86f9aec1c2042d236f93aec7b"; }; - buildInputs = [ pytest ]; + checkInputs = [ pytest ]; propagatedBuildInputs = [ tvdb_api ]; # a ton of tests fail with: IOError: tvnamer/main.py could not be found in . or .. diff --git a/pkgs/development/tools/ammonite/default.nix b/pkgs/development/tools/ammonite/default.nix index 8b44203a7d2..ff630242c93 100644 --- a/pkgs/development/tools/ammonite/default.nix +++ b/pkgs/development/tools/ammonite/default.nix @@ -5,12 +5,12 @@ with stdenv.lib; stdenv.mkDerivation rec { pname = "ammonite"; - version = "1.6.9"; + version = "1.7.1"; scalaVersion = "2.12"; src = fetchurl { url = "https://github.com/lihaoyi/Ammonite/releases/download/${version}/${scalaVersion}-${version}"; - sha256 = "1fi5j0kcndq00x72d8bkx6qiy9nh2i6c6m29gzfqql52qgbq1fd0"; + sha256 = "0isg9flnzc2ldbx6q0lg0xyg9lnvqkd8qhgfln8p1hbzdq0n6jd0"; }; propagatedBuildInputs = [ jre ] ; diff --git a/pkgs/development/tools/buildah/default.nix b/pkgs/development/tools/buildah/default.nix index 3e6d6604885..9885dce04b2 100644 --- a/pkgs/development/tools/buildah/default.nix +++ b/pkgs/development/tools/buildah/default.nix @@ -2,37 +2,27 @@ , gpgme, libgpgerror, lvm2, btrfs-progs, pkgconfig, ostree, libselinux, libseccomp }: -let - version = "1.10.1"; +buildGoPackage rec { + pname = "buildah"; + version = "1.11.0"; src = fetchFromGitHub { - rev = "v${version}"; owner = "containers"; repo = "buildah"; - sha256 = "0dki2v8j2jzbw49sdzcyjqbalbh70m0lgzrldgj6cc92mj896pxk"; + rev = "v${version}"; + sha256 = "114dmjqacz5hairl1s8qhndzr52lcvh99g565cq5ydscblnzpw1b"; }; - goPackagePath = "github.com/containers/buildah"; - -in buildGoPackage { - pname = "buildah"; - inherit version; - inherit src; - outputs = [ "bin" "man" "out" ]; - inherit goPackagePath; + goPackagePath = "github.com/containers/buildah"; excludedPackages = [ "tests" ]; - # Optimizations break compilation of libseccomp c bindings - hardeningDisable = [ "fortify" ]; - nativeBuildInputs = [ pkgconfig ]; buildInputs = [ gpgme libgpgerror lvm2 btrfs-progs ostree libselinux libseccomp ]; buildPhase = '' pushd go/src/${goPackagePath} - patchShebangs . make GIT_COMMIT="unknown" install -Dm755 buildah $bin/bin/buildah ''; @@ -41,10 +31,10 @@ in buildGoPackage { make -C docs install PREFIX="$man" ''; - meta = { + meta = with stdenv.lib; { description = "A tool which facilitates building OCI images"; - homepage = https://github.com/containers/buildah; - maintainers = with stdenv.lib.maintainers; [ Profpatsch vdemeester ]; - license = stdenv.lib.licenses.asl20; + homepage = "https://github.com/containers/buildah"; + license = licenses.asl20; + maintainers = with maintainers; [ Profpatsch vdemeester ]; }; } diff --git a/pkgs/development/tools/conftest/default.nix b/pkgs/development/tools/conftest/default.nix index 192938473e0..4c8792cc6aa 100644 --- a/pkgs/development/tools/conftest/default.nix +++ b/pkgs/development/tools/conftest/default.nix @@ -2,21 +2,27 @@ buildGoModule rec { pname = "conftest"; - version = "0.7.0"; + version = "0.12.0"; src = fetchFromGitHub { owner = "instrumenta"; repo = "conftest"; rev = "v${version}"; - sha256 = "0qq2kp9h91rirlhml5vyzmi7rd4v3pkqjk2bn7mvdn578jnwww24"; + sha256 = "0blrbbnvnnxyw0idhglqdz16i7g6g86a6kw2iw707bg0yfdl1ncq"; }; + patches = [ + # Version 0.12.0 does not build with go 1.13. See https://github.com/instrumenta/conftest/pull/85. + # TODO: Remove once https://github.com/instrumenta/conftest/pull/85 is merged and lands in a release. + ./go-1.13-deps.patch + ]; + buildFlagsArray = '' -ldflags= -X main.version=${version} ''; - modSha256 = "0c9phka7n2cfi8lf0a3prks2pjna5dgf5lj6az82iklnq4p7177y"; + modSha256 = "11999ywy73ng45gl1qypky8342jvishcp11bdxbigvqhwl2zbpav"; meta = with lib; { description = "Write tests against structured configuration data"; diff --git a/pkgs/development/tools/conftest/go-1.13-deps.patch b/pkgs/development/tools/conftest/go-1.13-deps.patch new file mode 100644 index 00000000000..d03d4ed742a --- /dev/null +++ b/pkgs/development/tools/conftest/go-1.13-deps.patch @@ -0,0 +1,99 @@ +diff --git a/go.mod b/go.mod +index a552a6b..a39703d 100644 +--- a/go.mod ++++ b/go.mod +@@ -1,6 +1,6 @@ + module github.com/instrumenta/conftest + +-go 1.12 ++go 1.13 + + require ( + cloud.google.com/go v0.39.0 // indirect +@@ -43,12 +43,16 @@ require ( + golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f // indirect + golang.org/x/oauth2 v0.0.0-20190523182746-aaccbc9213b0 // indirect + golang.org/x/sys v0.0.0-20190526052359-791d8a0f4d09 // indirect ++ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 // indirect + google.golang.org/appengine v1.6.0 // indirect + google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601 // indirect + ) + + replace ( ++ git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999 + github.com/containerd/containerd => github.com/containerd/containerd v1.2.6 + github.com/docker/docker => github.com/docker/docker v0.0.0-20190131205458-8a43b7bb99cd + github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422 ++ github.com/opencontainers/runc v1.0.1-0.20190307181833-2b18fe1d885e => github.com/opencontainers/runc v1.0.0-rc6.0.20190307181833-2b18fe1d885e ++ golang.org/x/crypto v0.0.0-20190129210102-0709b304e793 => golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 + ) +diff --git a/go.sum b/go.sum +index 2441c4e..212ac69 100644 +--- a/go.sum ++++ b/go.sum +@@ -10,7 +10,6 @@ dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl + dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= + dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= + dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= +-git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= + github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= + github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= + github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +@@ -43,6 +42,7 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU + github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= + github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0/go.mod h1:LzD22aAzDP8/dyiCKFp31He4m2GPjl0AFyzDtZzUu9M= + github.com/apache/thrift v0.0.0-20161221203622-b2a4d4ae21c7/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= ++github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= + github.com/apparentlymart/go-cidr v1.0.0 h1:lGDvXx8Lv9QHjrAVP7jyzleG4F9+FkRhJcEsDFxeb8w= + github.com/apparentlymart/go-cidr v1.0.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= + github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= +@@ -132,13 +132,8 @@ github.com/docker/cli v0.0.0-20190511004558-53fc257292ad/go.mod h1:JLrzqnKDaYBop + github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= + github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= + github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +-github.com/docker/docker v0.0.0-20180531152204-71cd53e4a197/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= + github.com/docker/docker v0.0.0-20190131205458-8a43b7bb99cd h1:h98Vus5/NAC3I4k243/B/KgCdpjCUK4lfxNEw2p/HAc= + github.com/docker/docker v0.0.0-20190131205458-8a43b7bb99cd/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +-github.com/docker/docker v1.14.0-0.20190131205458-8a43b7bb99cd h1:adRHD5aU4yFK0L4yZwjY3SyWapVmPdq1h19eJdgYUfs= +-github.com/docker/docker v1.14.0-0.20190131205458-8a43b7bb99cd/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +-github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c h1:rZ+3jNsgjvYgdZ0Nrd4Udrv8rneDbWBohAPuXsTsvGU= +-github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= + github.com/docker/docker-credential-helpers v0.6.0/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= + github.com/docker/docker-credential-helpers v0.6.1/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= + github.com/docker/docker-credential-helpers v0.6.2 h1:CrW9H1VMf3a4GrtyAi7IUJjkJVpwBBpX0+mvkvYJaus= +@@ -214,6 +209,7 @@ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPg + github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= + github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= + github.com/google/shlex v0.0.0-20150127133951-6f45313302b9/go.mod h1:RpwtwJQFrIEPstU94h88MWPXP2ektJZ8cZ0YntAmXiE= ++github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU= + github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= + github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= + github.com/googleapis/gax-go/v2 v2.0.4 h1:hU4mGcQI4DaAYW+IbTun+2qEZVFxK0ySjQLTbS0VQKc= +@@ -407,8 +403,8 @@ github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM + github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y= + github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= + github.com/opencontainers/runc v1.0.0-rc6/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +-github.com/opencontainers/runc v1.0.1-0.20190307181833-2b18fe1d885e h1:+uPGJuuDl61O9GKN/rLHkUCf597mpxmJI06RqMQX81A= +-github.com/opencontainers/runc v1.0.1-0.20190307181833-2b18fe1d885e/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= ++github.com/opencontainers/runc v1.0.0-rc6.0.20190307181833-2b18fe1d885e h1:9wcty7nGPPNkY8/VsiZkjmMB8x7SydrklJE+vCr4uDg= ++github.com/opencontainers/runc v1.0.0-rc6.0.20190307181833-2b18fe1d885e/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= + github.com/opencontainers/runtime-spec v0.0.0-20180909173843-eba862dc2470/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= + github.com/opentracing-contrib/go-stdlib v0.0.0-20171029140428-b1a47cfbdd75/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= + github.com/opentracing/opentracing-go v0.0.0-20171003133519-1361b9cd60be/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +@@ -587,7 +583,6 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf + golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= + golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= + golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +-golang.org/x/crypto v0.0.0-20190129210102-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= + golang.org/x/crypto v0.0.0-20190129210102-ccddf3741a0c/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= + golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= + golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +@@ -679,6 +674,8 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262 h1:qsl9y/CJx34tuA7QCPNp86J + golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= + golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373 h1:PPwnA7z1Pjf7XYaBP9GL1VAMZmcIWyFz7QCMSIIa3Bg= + golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= ++golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= ++golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= + google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= + google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= + google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= diff --git a/pkgs/development/web/insomnia/default.nix b/pkgs/development/web/insomnia/default.nix index 81417f6287b..675564b789b 100644 --- a/pkgs/development/web/insomnia/default.nix +++ b/pkgs/development/web/insomnia/default.nix @@ -18,11 +18,11 @@ let ]; in stdenv.mkDerivation rec { pname = "insomnia"; - version = "6.5.3"; + version = "6.6.2"; src = fetchurl { url = "https://github.com/getinsomnia/insomnia/releases/download/v${version}/insomnia_${version}_amd64.deb"; - sha256 = "0km7anw5xpcfr6j7pwqhv26pk7nxv1jywqlz0lpvgj6w85aafcm3"; + sha256 = "0hlny3lac7whdbpp0pcyaa30h6x9536jsg95gj9irw2qjsx74xa7"; }; nativeBuildInputs = [ diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix index ebfdc0e1373..c3caf9105d0 100644 --- a/pkgs/games/anki/default.nix +++ b/pkgs/games/anki/default.nix @@ -19,6 +19,7 @@ , glibcLocales , nose , jsonschema +, setuptools , send2trash , CoreAudio # This little flag adds a huge number of dependencies, but we assume that @@ -87,7 +88,7 @@ buildPythonApplication rec { propagatedBuildInputs = [ pyqtwebengine sqlalchemy beautifulsoup4 send2trash pyaudio requests decorator - markdown jsonschema + markdown jsonschema setuptools ] ++ lib.optional plotsSupport matplotlib ++ lib.optional stdenv.isDarwin [ CoreAudio ] diff --git a/pkgs/games/liquidwar/5.nix b/pkgs/games/liquidwar/5.nix index 0bd90f77b24..a4bd39f9998 100644 --- a/pkgs/games/liquidwar/5.nix +++ b/pkgs/games/liquidwar/5.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; + NIX_CFLAGS_COMPILE = [ "-lm" ]; + meta = with stdenv.lib; { description = ''The classic version of a quick tactics game LiquidWar''; maintainers = [ maintainers.raskin ]; diff --git a/pkgs/games/neverball/default.nix b/pkgs/games/neverball/default.nix index 50f96a7ee2c..daba54ce810 100644 --- a/pkgs/games/neverball/default.nix +++ b/pkgs/games/neverball/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [ libpng SDL2 libGL libjpeg SDL2_ttf libvorbis gettext physfs ]; - dontPatchElf = true; + dontPatchELF = true; patchPhase = '' sed -i -e 's@\./data@'$out/share/neverball/data@ share/base_config.h Makefile diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix index f524bee3521..81c1f8ab0f5 100644 --- a/pkgs/os-specific/linux/rtl8812au/default.nix +++ b/pkgs/os-specific/linux/rtl8812au/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "rtl8812au-${kernel.version}-${version}"; - version = "5.2.20.2_28373.20180619"; + version = "5.2.20.2_28373.20190903"; src = fetchFromGitHub { owner = "zebulon2"; repo = "rtl8812au-driver-5.2.20"; - rev = "ac063a4b1a87855e10f6cd1f358aaccbeee9b9c1"; - sha256 = "1cmsv22q4k6p2wzm73k60kxbjhcgx4hqr0x3djvqrlv4rzz75l92"; + rev = "30d47a0a3f43ccb19e8fd59fe93d74a955147bf2"; + sha256 = "1fy0f8ihxd0i5kr8gmky8v8xl0ns6bhxfdn64c97c5irzdvg37sr"; }; nativeBuildInputs = [ bc ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 43633b07818..30e4b99ccbc 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -65,10 +65,6 @@ let }; }) - (self: super: { - pyyaml = super.pyyaml_3; - }) - # hass-frontend does not exist in python3.pkgs (self: super: { hass-frontend = self.callPackage ./frontend.nix { }; diff --git a/pkgs/servers/mail/mailman/settings.py b/pkgs/servers/mail/mailman/settings.py new file mode 100644 index 00000000000..5f246db41ad --- /dev/null +++ b/pkgs/servers/mail/mailman/settings.py @@ -0,0 +1,512 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 1998-2019 by the Free Software Foundation, Inc. +# +# This file is part of Postorius. +# +# Postorius is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# Postorius is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# Postorius. If not, see . + +""" +Django settings for postorius project. + +For more information on this file, see +https://docs.djangoproject.com/en/1.9/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.9/ref/settings/ +""" + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +import os + +# Compatibility with Bootstrap 3 +from django.contrib.messages import constants as messages + + +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '$!-7^wl#wiifjbh)5@f7ji%x!vp7s1vzbvwt26hxv$idixq0u0' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = False + +ADMINS = ( + #('Admin', 'webmaster@example.com'), +) + +SITE_ID = 1 + +# Hosts/domain names that are valid for this site; required if DEBUG is False +# See https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts +ALLOWED_HOSTS = [ + "localhost", # Archiving API from Mailman, keep it. + "127.0.0.1", + # Add here all production URLs you may have. + @ALLOWED_HOSTS@ +] + +# Mailman API credentials +MAILMAN_REST_API_URL = 'http://localhost:8001' +MAILMAN_REST_API_USER = 'restadmin' +MAILMAN_REST_API_PASS = 'restpass' +MAILMAN_ARCHIVER_KEY = "@ARCHIVER_KEY@" +MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1') + +# Application definition + +INSTALLED_APPS = ( + 'hyperkitty', + 'postorius', + 'django_mailman3', + # Uncomment the next line to enable the admin: + 'django.contrib.admin', + # Uncomment the next line to enable admin documentation: + # 'django.contrib.admindocs', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'rest_framework', + 'django_gravatar', + 'compressor', + 'haystack', + 'django_extensions', + 'django_q', + 'allauth', + 'allauth.account', + 'allauth.socialaccount', + 'django_mailman3.lib.auth.fedora', + 'allauth.socialaccount.providers.openid', + 'allauth.socialaccount.providers.github', + 'allauth.socialaccount.providers.gitlab', + 'allauth.socialaccount.providers.google', + #'allauth.socialaccount.providers.facebook', + #'allauth.socialaccount.providers.twitter', + 'allauth.socialaccount.providers.stackexchange', +) + + +MIDDLEWARE = ( + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django_mailman3.middleware.TimezoneMiddleware', +) + +ROOT_URLCONF = 'urls' + + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.i18n', + 'django.template.context_processors.media', + 'django.template.context_processors.static', + 'django.template.context_processors.tz', + 'django.template.context_processors.csrf', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + 'django_mailman3.context_processors.common', + 'hyperkitty.context_processors.common', + ], + }, + }, +] + +WSGI_APPLICATION = 'wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.9/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': '/var/lib/mailman-web/mailman-web.db' + } +} + +# Password validation +# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# If you're behind a proxy, use the X-Forwarded-Host header +# See https://docs.djangoproject.com/en/1.8/ref/settings/#use-x-forwarded-host +# USE_X_FORWARDED_HOST = True + +# And if your proxy does your SSL encoding for you, set SECURE_PROXY_SSL_HEADER +# https://docs.djangoproject.com/en/1.8/ref/settings/#secure-proxy-ssl-header +# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') +# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_SCHEME', 'https') + +# Other security settings +# SECURE_SSL_REDIRECT = True +# If you set SECURE_SSL_REDIRECT to True, make sure the SECURE_REDIRECT_EXEMPT +# contains at least this line: +# SECURE_REDIRECT_EXEMPT = [ +# "archives/api/mailman/.*", # Request from Mailman. +# ] +# SESSION_COOKIE_SECURE = True +# SECURE_CONTENT_TYPE_NOSNIFF = True +# SECURE_BROWSER_XSS_FILTER = True +# CSRF_COOKIE_SECURE = True +# CSRF_COOKIE_HTTPONLY = True +# X_FRAME_OPTIONS = 'DENY' + + +# Internationalization +# https://docs.djangoproject.com/en/1.9/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.9/howto/static-files/ + + +# Absolute path to the directory static files should be collected to. +# Don't put anything in this directory yourself; store your static files +# in apps' "static/" subdirectories and in STATICFILES_DIRS. +# Example: "/var/www/example.com/static/" +STATIC_ROOT = 'static' + +# URL prefix for static files. +# Example: "http://example.com/static/", "http://static.example.com/" +STATIC_URL = '/static/' + +# Additional locations of static files +STATICFILES_DIRS = ( + # Put strings here, like "/home/html/static" or "C:/www/django/static". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. + # BASE_DIR + '/static/', +) + +# List of finder classes that know how to find static files in +# various locations. +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + # 'django.contrib.staticfiles.finders.DefaultStorageFinder', + 'compressor.finders.CompressorFinder', +) + +# Django 1.6+ defaults to a JSON serializer, but it won't work with +# django-openid, see +# https://bugs.launchpad.net/django-openid-auth/+bug/1252826 +SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer' + + +LOGIN_URL = 'account_login' +LOGIN_REDIRECT_URL = 'hk_root' +LOGOUT_URL = 'account_logout' + + +# If you enable internal authentication, this is the address that the emails +# will appear to be coming from. Make sure you set a valid domain name, +# otherwise the emails may get rejected. +# https://docs.djangoproject.com/en/1.8/ref/settings/#default-from-email +DEFAULT_FROM_EMAIL = "@SERVER_EMAIL@" + +# If you enable email reporting for error messages, this is where those emails +# will appear to be coming from. Make sure you set a valid domain name, +# otherwise the emails may get rejected. +# https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SERVER_EMAIL +SERVER_EMAIL = "@SERVER_EMAIL@" + + +MESSAGE_TAGS = { + messages.ERROR: 'danger' +} + + +# +# Social auth +# +AUTHENTICATION_BACKENDS = ( + 'django.contrib.auth.backends.ModelBackend', + 'allauth.account.auth_backends.AuthenticationBackend', +) + +# Django Allauth +ACCOUNT_AUTHENTICATION_METHOD = "username_email" +ACCOUNT_EMAIL_REQUIRED = True +ACCOUNT_EMAIL_VERIFICATION = "mandatory" +ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https" +ACCOUNT_UNIQUE_EMAIL = True + +SOCIALACCOUNT_PROVIDERS = { + 'openid': { + 'SERVERS': [ + dict(id='yahoo', + name='Yahoo', + openid_url='http://me.yahoo.com'), + ], + }, + 'google': { + 'SCOPE': ['profile', 'email'], + 'AUTH_PARAMS': {'access_type': 'online'}, + }, + 'facebook': { + 'METHOD': 'oauth2', + 'SCOPE': ['email'], + 'FIELDS': [ + 'email', + 'name', + 'first_name', + 'last_name', + 'locale', + 'timezone', + ], + 'VERSION': 'v2.4', + }, + 'gitlab': { + 'GITLAB_URL': 'https://gitlab.com', + 'SCOPE': ['read_user'], + }, +} + + +# +# Gravatar +# https://github.com/twaddington/django-gravatar +# +# Gravatar base url. +# GRAVATAR_URL = 'http://cdn.libravatar.org/' +# Gravatar base secure https url. +# GRAVATAR_SECURE_URL = 'https://seccdn.libravatar.org/' +# Gravatar size in pixels. +# GRAVATAR_DEFAULT_SIZE = '80' +# An image url or one of the following: 'mm', 'identicon', 'monsterid', +# 'wavatar', 'retro'. +# GRAVATAR_DEFAULT_IMAGE = 'mm' +# One of the following: 'g', 'pg', 'r', 'x'. +# GRAVATAR_DEFAULT_RATING = 'g' +# True to use https by default, False for plain http. +# GRAVATAR_DEFAULT_SECURE = True + +# These can be set to override the defaults but are not mandatory: +# EMAIL_CONFIRMATION_TEMPLATE = 'postorius/address_confirmation_message.txt' +# EMAIL_CONFIRMATION_SUBJECT = 'Confirmation needed' + +# +# django-compressor +# https://pypi.python.org/pypi/django_compressor +# +COMPRESS_PRECOMPILERS = ( + ('text/x-scss', '/run/current-system/sw/bin/sassc -t compressed {infile} {outfile}'), + ('text/x-sass', '/run/current-system/sw/bin/sassc -t compressed {infile} {outfile}'), +) +# On a production setup, setting COMPRESS_OFFLINE to True will bring a +# significant performance improvement, as CSS files will not need to be +# recompiled on each requests. It means running an additional "compress" +# management command after each code upgrade. +# http://django-compressor.readthedocs.io/en/latest/usage/#offline-compression +COMPRESS_ENABLED = True +COMPRESS_OFFLINE = True + +# Needed for debug mode +# INTERNAL_IPS = ('127.0.0.1',) + + +# +# Full-text search engine +# +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', + 'PATH': "/var/lib/mailman-web/fulltext_index", + # You can also use the Xapian engine, it's faster and more accurate, + # but requires another library. + # http://django-haystack.readthedocs.io/en/v2.4.1/installing_search_engines.html#xapian + # Example configuration for Xapian: + #'ENGINE': 'xapian_backend.XapianEngine' + }, +} + + +# +# REST framework +# +REST_FRAMEWORK = { + 'PAGE_SIZE': 10, + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', + 'DEFAULT_FILTER_BACKENDS': ( + 'rest_framework.filters.OrderingFilter', + ), +} + + +# +# Asynchronous tasks +# +Q_CLUSTER = { + 'timeout': 300, + 'save_limit': 100, + 'orm': 'default', +} + + +# A sample logging configuration. The only tangible logging +# performed by this configuration is to send an email to +# the site admins on every HTTP 500 error when DEBUG=False. +# See http://docs.djangoproject.com/en/dev/topics/logging for +# more details on how to customize your logging configuration. +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'filters': { + 'require_debug_false': { + '()': 'django.utils.log.RequireDebugFalse' + } + }, + 'handlers': { + 'console': { + 'class': 'logging.StreamHandler', + 'formatter': 'simple', + }, + 'mail_admins': { + 'level': 'ERROR', + 'filters': ['require_debug_false'], + 'class': 'django.utils.log.AdminEmailHandler' + }, + 'file':{ + 'level': 'INFO', + #'class': 'logging.handlers.RotatingFileHandler', + 'class': 'logging.handlers.WatchedFileHandler', + 'filename': 'mailman-web.log', + 'formatter': 'verbose', + }, + }, + 'loggers': { + 'django': { + 'handlers': ['console', 'file'], + 'level': 'INFO', + }, + 'django.request': { + 'handlers': ['console', 'mail_admins', 'file'], + 'level': 'ERROR', + 'propagate': True, + }, + 'postorius': { + 'handlers': ['console', 'file'], + 'level': 'INFO', + }, + 'django': { + 'handlers': ['file'], + 'level': 'ERROR', + 'propagate': True, + }, + 'hyperkitty': { + 'handlers': ['file'], + 'level': 'DEBUG', + 'propagate': True, + }, + }, + 'formatters': { + 'simple': { + 'format': '%(levelname)s: %(message)s' + }, + 'verbose': { + 'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s' + }, + 'simple': { + 'format': '%(levelname)s %(message)s' + }, + }, + #'root': { + # 'handlers': ['file'], + # 'level': 'INFO', + #}, +} + + +POSTORIUS_TEMPLATE_BASE_URL = "http://localhost:8000" + + +# Using the cache infrastructure can significantly improve performance on a +# production setup. This is an example with a local Memcached server. +#CACHES = { +# 'default': { +# 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache', +# 'LOCATION': '127.0.0.1:11211', +# } +#} + + +# When DEBUG is True, don't actually send emails to the SMTP server, just store +# them in a directory. This way you won't accidentally spam your mailing-lists +# while you're fiddling with the code. +if DEBUG == True: + EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend' + EMAIL_FILE_PATH = '/tmp/hyperkitty-emails' + + +# +# HyperKitty-specific +# +# Only display mailing-lists from the same virtual host as the webserver +FILTER_VHOST = False +# Disable singleton locking for Django-Q tasks. +HYPERKITTY_DISABLE_SINGLETON_TASKS = False +# Maximum time between two task runs with same function and arguments. +# This setting is mostly meant for Mailman Developers and should be used +# with caution. +# Default set to 10mins. +HYPERKITTY_TASK_LOCK_TIMEOUT = 10 * 60 + + +try: + from settings_local import * +except ImportError: + pass diff --git a/pkgs/servers/mail/mailman/urls.py b/pkgs/servers/mail/mailman/urls.py new file mode 100644 index 00000000000..9e18da2a218 --- /dev/null +++ b/pkgs/servers/mail/mailman/urls.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 1998-2019 by the Free Software Foundation, Inc. +# +# This file is part of Postorius. +# +# Postorius is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# Postorius is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# Postorius. If not, see . + + +from django.conf.urls import include, url +from django.contrib import admin +from django.urls import reverse_lazy +from django.views.generic import RedirectView + + +urlpatterns = [ + url(r'^$', RedirectView.as_view(url=reverse_lazy('hk_root'))), + url(r'^hyperkitty/', include('hyperkitty.urls')), + url(r'^postorius/', include('postorius.urls')), + url(r'', include('django_mailman3.urls')), + url(r'^accounts/', include('allauth.urls')), + # Django admin + url(r'^admin/', admin.site.urls), +] diff --git a/pkgs/servers/mail/mailman/web.nix b/pkgs/servers/mail/mailman/web.nix new file mode 100644 index 00000000000..b0ead765a60 --- /dev/null +++ b/pkgs/servers/mail/mailman/web.nix @@ -0,0 +1,37 @@ +{ stdenv, python, hyperkitty, postorius, buildPythonPackage +, serverEMail ? "postmaster@example.org" +, archiverKey ? "SecretArchiverAPIKey" +, allowedHosts ? [] +}: + +let + + allowedHostsString = stdenv.lib.concatMapStringsSep ", " (x: "\""+x+"\"") allowedHosts; + +in + +# We turn those Djando configuration files into a make-shift Python library so +# that Nix users can use this package as a part of their buildInputs to import +# the code. Also, this package implicitly provides an environment in which the +# Django app can be run. + +buildPythonPackage { + name = "mailman-web-0"; + + propagatedBuildInputs = [ hyperkitty postorius ]; + + unpackPhase = ":"; + buildPhase = ":"; + setuptoolsCheckPhase = ":"; + + installPhase = '' + d=$out/${python.sitePackages} + install -D -m 444 ${./urls.py} $d/urls.py + install -D -m 444 ${./wsgi.py} $d/wsgi.py + substitute ${./settings.py} $d/settings.py \ + --subst-var-by SERVER_EMAIL '${serverEMail}' \ + --subst-var-by ARCHIVER_KEY '${archiverKey}' \ + --subst-var-by ALLOWED_HOSTS '${allowedHostsString}' + chmod 444 $d/settings.py + ''; +} diff --git a/pkgs/servers/mail/mailman/wsgi.py b/pkgs/servers/mail/mailman/wsgi.py new file mode 100644 index 00000000000..5bdbc511473 --- /dev/null +++ b/pkgs/servers/mail/mailman/wsgi.py @@ -0,0 +1,17 @@ +""" +WSGI config for meh project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") + +application = get_wsgi_application() diff --git a/pkgs/servers/mautrix-telegram/default.nix b/pkgs/servers/mautrix-telegram/default.nix index 7499f203136..5ee491a0b8a 100644 --- a/pkgs/servers/mautrix-telegram/default.nix +++ b/pkgs/servers/mautrix-telegram/default.nix @@ -28,6 +28,7 @@ buildPythonPackage rec { telethon-session-sqlalchemy pillow lxml + setuptools ]; # `alembic` (a database migration tool) is only needed for the initial setup, diff --git a/pkgs/servers/mirrorbits/default.nix b/pkgs/servers/mirrorbits/default.nix index 48817f76bda..0761468bd1f 100644 --- a/pkgs/servers/mirrorbits/default.nix +++ b/pkgs/servers/mirrorbits/default.nix @@ -24,6 +24,11 @@ buildGoPackage rec { rm -rf testing ''; + # Fix build with go >=1.12 + preBuild = '' + sed -i s/"_Ctype_struct_GeoIPRecordTag"/"C.struct_GeoIPRecordTag"/ ./go/src/github.com/etix/geoip/geoip.go + ''; + goPackagePath = "github.com/etix/mirrorbits"; goDeps = ./deps.nix; diff --git a/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix b/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix index 970f49713a3..983eb6bf6c8 100644 --- a/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "blackbox_exporter"; - version = "0.14.0"; + version = "0.15.0"; rev = version; goPackagePath = "github.com/prometheus/blackbox_exporter"; @@ -11,7 +11,7 @@ buildGoPackage rec { rev = "v${version}"; owner = "prometheus"; repo = "blackbox_exporter"; - sha256 = "1v5n59p9jl6y1ka9mqp0ibx1kpcb3gbpl0i6bhqpbr154frmqm4x"; + sha256 = "06llb37xpn5zjnqkw526vbk4mfdiwrv3yg7aw4365p3gz5dk085i"; }; doCheck = true; diff --git a/pkgs/servers/prayer/default.nix b/pkgs/servers/prayer/default.nix index 7997d0ebcd8..d1351afa0b3 100644 --- a/pkgs/servers/prayer/default.nix +++ b/pkgs/servers/prayer/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, perl, openssl, db, zlib, uwimap, html-tidy, pam}: +{ stdenv, fetchurl, fetchpatch, perl, openssl, db, zlib, uwimap, html-tidy, pam}: let ssl = stdenv.lib.optionals uwimap.withSSL @@ -12,7 +12,20 @@ stdenv.mkDerivation rec { sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda"; }; - patches = [ ./install.patch ]; + patches = [ + ./install.patch + + # fix build errors which result from openssl changes + (fetchpatch { + url = "https://sources.debian.org/data/main/p/prayer/1.3.5-dfsg1-6/debian/patches/disable_ssl3.patch"; + sha256 = "1rx4bidc9prh4gffipykp144cyi3zd6qzd990s2aad3knzv5bkdd"; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/p/prayer/1.3.5-dfsg1-6/debian/patches/openssl1.1.patch"; + sha256 = "0zinylvq3bcifdmki867gir49pbjx6qb5h019hawwif2l4jmlxw1"; + }) + ]; + postPatch = '' sed -i -e s/gmake/make/ -e 's/LDAP_ENABLE.*= true/LDAP_ENABLE=false/' \ ${ssl} \ diff --git a/pkgs/tools/admin/dehydrated/default.nix b/pkgs/tools/admin/dehydrated/default.nix index 699c86b5fe3..6cc69c2290d 100644 --- a/pkgs/tools/admin/dehydrated/default.nix +++ b/pkgs/tools/admin/dehydrated/default.nix @@ -1,10 +1,7 @@ -{ stdenv, coreutils, curl, diffutils, gawk, gnugrep, gnused, openssl, makeWrapper, fetchFromGitHub }: -let - pkgName = "dehydrated"; - version = "0.6.5"; -in +{ stdenv, coreutils, curl, diffutils, gawk, gnugrep, gnused, openssl, makeWrapper, fetchFromGitHub, installShellFiles }: stdenv.mkDerivation rec { - name = pkgName + "-" + version; + pname = "dehydrated"; + version = "0.6.5"; src = fetchFromGitHub { owner = "lukas2511"; @@ -13,9 +10,16 @@ stdenv.mkDerivation rec { sha256 = "14k7ykry16zp09i0bqb5pqaclvnjcb6p3x8knm9v5q0bdvlplkjv"; }; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper installShellFiles ]; installPhase = '' + installManPage docs/man/dehydrated.1 + + mkdir -p "$out/share/docs/dehydrated" + cp docs/*.md "$out/share/docs/dehydrated" + cp -r docs/examples "$out/share/docs/dehydrated" + cp {CHANGELOG,LICENSE,README.md} "$out/share/docs/dehydrated" + mkdir -p $out/bin cp -a dehydrated $out/bin wrapProgram "$out/bin/dehydrated" --prefix PATH : "${stdenv.lib.makeBinPath [ openssl coreutils gnused gnugrep diffutils curl gawk ]}" diff --git a/pkgs/tools/misc/dupd/default.nix b/pkgs/tools/misc/dupd/default.nix new file mode 100644 index 00000000000..06b9f3adac9 --- /dev/null +++ b/pkgs/tools/misc/dupd/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchFromGitHub, perl, which +, openssl, sqlite }: + +# Instead of writing directly into $HOME, we change the default db location +# from $HOME/.dupd_sqlite to $HOME/.cache/dupd.sqlite3 + +stdenv.mkDerivation rec { + pname = "dupd"; + version = "1.7"; + + src = fetchFromGitHub { + owner = "jvirkki"; + repo = "dupd"; + rev = version; + sha256 = "0vg4vbiwjc5p22cisj8970mym4y2r29fcm08ibik92786vsbxcqk"; + }; + + postPatch = '' + patchShebangs tests + + # tests need HOME to write the database + export HOME=$TMPDIR + + mkdir -p $HOME/.cache + + for f in man/dupd man/dupd.1 src/main.c tests/test.56 tests/test.57 ; do + substituteInPlace $f --replace .dupd_sqlite .cache/dupd.sqlite3 + done + ''; + + buildInputs = [ openssl sqlite ]; + + nativeBuildInputs = [ perl which ]; + + makeFlags = [ + "INSTALL_PREFIX=$(out)" + ]; + + enableParallelBuilding = true; + + doCheck = true; + + meta = with stdenv.lib; { + description = "CLI utility to find duplicate files"; + homepage = http://www.virkki.com/dupd; + license = licenses.gpl3; + maintainers = with maintainers; [ peterhoeg ]; + }; +} diff --git a/pkgs/tools/misc/mongodb-tools/default.nix b/pkgs/tools/misc/mongodb-tools/default.nix index dc7a64bdcf7..fd95faa40e1 100644 --- a/pkgs/tools/misc/mongodb-tools/default.nix +++ b/pkgs/tools/misc/mongodb-tools/default.nix @@ -1,27 +1,38 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, openssl_1_0_2, pkgconfig, libpcap }: +{ stdenv +, lib +, buildGoPackage +, fetchFromGitHub +, openssl_1_0_2 +, pkgconfig +, libpcap +}: let tools = [ - "bsondump" "mongodump" "mongoexport" "mongofiles" "mongoimport" - "mongoreplay" "mongorestore" "mongostat" "mongotop" + "bsondump" + "mongoimport" + "mongoexport" + "mongodump" + "mongorestore" + "mongostat" + "mongofiles" + "mongotop" + "mongoreplay" ]; -in + version = "4.2.0"; -with stdenv.lib; - -buildGoPackage rec { +in buildGoPackage { pname = "mongo-tools"; - version = "3.7.2"; - rev = "r${version}"; + inherit version; goPackagePath = "github.com/mongodb/mongo-tools"; - subPackages = map (t: t + "/main") tools; + subPackages = tools; src = fetchFromGitHub { - inherit rev; + rev = "r${version}"; owner = "mongodb"; repo = "mongo-tools"; - sha256 = "1y5hd4qw7422sqkj8vmy4agscvin3ck54r515bjrzn69iw73nhfl"; + sha256 = "0mjwvx0cxvb6zam6jyr3753xjnwcygxcjzqhhlsq0b3xnwws9yh7"; }; nativeBuildInputs = [ pkgconfig ]; @@ -31,18 +42,18 @@ buildGoPackage rec { # Let's work around this with our own installer buildPhase = '' # move vendored codes so nixpkgs go builder could find it - mv go/src/github.com/mongodb/mongo-tools/vendor/src/* go/src/github.com/mongodb/mongo-tools/vendor/ - runHook preBuild + ${stdenv.lib.concatMapStrings (t: '' go build -o "$bin/bin/${t}" -tags ssl -ldflags "-s -w" $goPackagePath/${t}/main '') tools} + runHook postBuild ''; meta = { homepage = https://github.com/mongodb/mongo-tools; description = "Tools for the MongoDB"; - license = licenses.asl20; + license = lib.licenses.asl20; }; } diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix index d378e541b50..98449f8f554 100644 --- a/pkgs/tools/misc/youtube-dl/default.nix +++ b/pkgs/tools/misc/youtube-dl/default.nix @@ -18,11 +18,11 @@ buildPythonPackage rec { # The websites youtube-dl deals with are a very moving target. That means that # downloads break constantly. Because of that, updates should always be backported # to the latest stable release. - version = "2019.09.01"; + version = "2019.09.12.1"; src = fetchurl { url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz"; - sha256 = "0jbby0x5krww1acc8qxhmmwg0dsqmj6yjnynfm7r6k3rxbvlydqr"; + sha256 = "0h7v81kcxcpy82wq9b1aiz2zg6hg7rnlcfmzd13j6k8yhr7ah9yf"; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/tools/networking/chrony/default.nix b/pkgs/tools/networking/chrony/default.nix index bbc0cac0551..69c4f897c93 100644 --- a/pkgs/tools/networking/chrony/default.nix +++ b/pkgs/tools/networking/chrony/default.nix @@ -5,7 +5,6 @@ assert stdenv.isLinux -> libcap != null; stdenv.mkDerivation rec { pname = "chrony"; - version = "3.5"; src = fetchurl { @@ -32,7 +31,7 @@ stdenv.mkDerivation rec { repositories.git = git://git.tuxfamily.org/gitroot/chrony/chrony.git; license = licenses.gpl2; platforms = with platforms; linux ++ freebsd ++ openbsd; - maintainers = with maintainers; [ fpletz ]; + maintainers = with maintainers; [ fpletz thoughtpolice ]; longDescription = '' Chronyd is a daemon which runs in background on the system. It obtains diff --git a/pkgs/tools/networking/mtr/default.nix b/pkgs/tools/networking/mtr/default.nix index 1acd513be31..217f3b7d7cc 100644 --- a/pkgs/tools/networking/mtr/default.nix +++ b/pkgs/tools/networking/mtr/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig +{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig , libcap, ncurses , withGtk ? false, gtk2 ? null }: assert withGtk -> gtk2 != null; stdenv.mkDerivation rec { - pname = "mtr"; + pname = "mtr${lib.optionalString withGtk "-gui"}"; version = "0.93"; src = fetchFromGitHub { diff --git a/pkgs/tools/networking/ntp/default.nix b/pkgs/tools/networking/ntp/default.nix index a990cb1ee92..b890e07845e 100644 --- a/pkgs/tools/networking/ntp/default.nix +++ b/pkgs/tools/networking/ntp/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { # very close to isc and bsd2 url = https://www.eecis.udel.edu/~mills/ntp/html/copyright.html; }; - maintainers = [ maintainers.eelco ]; + maintainers = with maintainers; [ eelco thoughtpolice ]; platforms = platforms.linux; }; } diff --git a/pkgs/tools/networking/openntpd/default.nix b/pkgs/tools/networking/openntpd/default.nix index 9ef8c75b728..9cfb24ce95d 100644 --- a/pkgs/tools/networking/openntpd/default.nix +++ b/pkgs/tools/networking/openntpd/default.nix @@ -37,5 +37,6 @@ stdenv.mkDerivation rec { license = licenses.bsd3; description = "OpenBSD NTP daemon (Debian port)"; platforms = platforms.all; + maintainers = with maintainers; [ thoughtpolice ]; }; } diff --git a/pkgs/tools/security/bitwarden/default.nix b/pkgs/tools/security/bitwarden/default.nix index d94e02c4adc..c67cc447431 100644 --- a/pkgs/tools/security/bitwarden/default.nix +++ b/pkgs/tools/security/bitwarden/default.nix @@ -51,7 +51,7 @@ let dontBuild = true; dontConfigure = true; - dontPatchElf = true; + dontPatchELF = true; dontWrapGApps = true; buildInputs = [ libsecret ] ++ atomEnv.packages; diff --git a/pkgs/tools/security/keybase/gui.nix b/pkgs/tools/security/keybase/gui.nix index 3954ec818b1..944e73dd46c 100644 --- a/pkgs/tools/security/keybase/gui.nix +++ b/pkgs/tools/security/keybase/gui.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { dontBuild = true; dontConfigure = true; - dontPatchElf = true; + dontPatchELF = true; unpackPhase = '' ar xf $src diff --git a/pkgs/tools/security/lesspass-cli/default.nix b/pkgs/tools/security/lesspass-cli/default.nix index afcdf0c0a07..76732170079 100644 --- a/pkgs/tools/security/lesspass-cli/default.nix +++ b/pkgs/tools/security/lesspass-cli/default.nix @@ -2,14 +2,15 @@ let inherit (python3.pkgs) buildPythonApplication pytest mock pexpect; + repo = "lesspass"; in buildPythonApplication rec { pname = "lesspass-cli"; version = "9.0.0"; src = fetchFromGitHub { - owner = pname; - repo = pname; + owner = repo; + repo = repo; rev = version; sha256 = "1mdv0c0fn4d72iigy8hz4s7kf7q3pg4gjjadxwxyjwsalapnsapk"; }; diff --git a/pkgs/tools/security/metasploit/default.nix b/pkgs/tools/security/metasploit/default.nix index 8b67e90f415..8486f10bab0 100644 --- a/pkgs/tools/security/metasploit/default.nix +++ b/pkgs/tools/security/metasploit/default.nix @@ -28,7 +28,7 @@ in stdenv.mkDerivation rec { buildInputs = [ makeWrapper ]; - dontPatchelf = true; # stay away from exploit executables + dontPatchELF = true; # stay away from exploit executables installPhase = '' mkdir -p $out/{bin,share/msf} diff --git a/pkgs/tools/typesetting/scdoc/default.nix b/pkgs/tools/typesetting/scdoc/default.nix index 9b695100150..011a8f24ece 100644 --- a/pkgs/tools/typesetting/scdoc/default.nix +++ b/pkgs/tools/typesetting/scdoc/default.nix @@ -2,19 +2,17 @@ stdenv.mkDerivation rec { pname = "scdoc"; - version = "1.9.7"; + version = "1.10.0"; src = fetchurl { url = "https://git.sr.ht/~sircmpwn/scdoc/archive/${version}.tar.gz"; - sha256 = "0y9p03dzdaszx02jbkdf3vcs52fqml591cmic5jdch5yznrg03ky"; + sha256 = "0lk8wpz95ld1fnpnc3xkhvnd58px1vbhvlpkr8labi2ck65y10il"; }; postPatch = '' substituteInPlace Makefile \ --replace "-static" "" \ --replace "/usr/local" "$out" - # It happens from time to time that the version wasn't updated: - sed -iE 's/VERSION=[0-9]\.[0-9]\.[0-9]/VERSION=${version}/' Makefile ''; doCheck = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd36574e124..280041646b4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1993,11 +1993,7 @@ in mongodb-compass = callPackage ../tools/misc/mongodb-compass { }; - mongodb-tools = callPackage ../tools/misc/mongodb-tools { - # XXX: this is failing with Go 1.12. Error is related to cgo, an - # update to this package might fix it. - buildGoPackage = buildGo111Package; - }; + mongodb-tools = callPackage ../tools/misc/mongodb-tools { }; moosefs = callPackage ../tools/filesystems/moosefs { }; @@ -4798,11 +4794,7 @@ in miredo = callPackage ../tools/networking/miredo { }; - mirrorbits = callPackage ../servers/mirrorbits { - # XXX: this is failing with Go 1.12. Error is related to cgo, an - # update to this package might fix it. - buildGoPackage = buildGo111Package; - }; + mirrorbits = callPackage ../servers/mirrorbits { }; mitmproxy = callPackage ../tools/networking/mitmproxy { }; @@ -4868,6 +4860,8 @@ in mtr = callPackage ../tools/networking/mtr {}; + mtr-gui = callPackage ../tools/networking/mtr { withGtk = true; }; + mtx = callPackage ../tools/backup/mtx {}; mt-st = callPackage ../tools/backup/mt-st {}; @@ -5693,7 +5687,7 @@ in openmodelica = callPackage ../applications/science/misc/openmodelica { }; - qarte = callPackage ../applications/video/qarte { }; + qarte = libsForQt5.callPackage ../applications/video/qarte { }; qlcplus = libsForQt5.callPackage ../applications/misc/qlcplus { }; @@ -7908,10 +7902,6 @@ in inherit (darwin.apple_sdk.frameworks) Security; }; - go_1_11 = callPackage ../development/compilers/go/1.11.nix { - inherit (darwin.apple_sdk.frameworks) Security Foundation; - }; - go_1_12 = callPackage ../development/compilers/go/1.12.nix { inherit (darwin.apple_sdk.frameworks) Security Foundation; }; @@ -13176,7 +13166,7 @@ in qt511 = recurseIntoAttrs (makeOverridable (import ../development/libraries/qt-5/5.11) { inherit newScope; - inherit stdenv fetchurl fetchFromGitHub makeSetupHook makeWrapper; + inherit stdenv fetchurl fetchFromGitHub fetchpatch makeSetupHook makeWrapper; bison = bison2; # error: too few arguments to function 'int yylex(... inherit cups; harfbuzz = harfbuzzFull; @@ -14349,19 +14339,12 @@ in ### DEVELOPMENT / GO MODULES - buildGo111Package = callPackage ../development/go-packages/generic { - go = buildPackages.go_1_11; - }; buildGo112Package = callPackage ../development/go-packages/generic { go = buildPackages.go_1_12; }; buildGoPackage = buildGo112Package; - buildGo111Module = callPackage ../development/go-modules/generic { - go = buildPackages.go_1_11; - }; - buildGo112Module = callPackage ../development/go-modules/generic { go = buildPackages.go_1_12; }; @@ -17693,6 +17676,8 @@ in cpp_ethereum = callPackage ../applications/misc/cpp-ethereum { }; + crun = callPackage ../applications/virtualization/crun {}; + csdp = callPackage ../applications/science/math/csdp { }; ctop = callPackage ../tools/system/ctop { }; @@ -18928,6 +18913,8 @@ in japa = callPackage ../applications/audio/japa { }; + dupd = callPackage ../tools/misc/dupd { }; + jdupes = callPackage ../tools/misc/jdupes { }; jedit = callPackage ../applications/editors/jedit { }; @@ -24336,7 +24323,7 @@ in terraform_plugins_test ; - terraform = terraform_0_11; + terraform = terraform_0_12; # deprecated terraform-full = terraform.full; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c7183f7a793..96885a83ebb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -719,6 +719,8 @@ in { mailman = disabledIf (!isPy3k) (callPackage ../servers/mail/mailman/core.nix { }); + mailman-web = disabledIf (!isPy3k) (callPackage ../servers/mail/mailman/web.nix { }); + mailmanclient = callPackage ../development/python-modules/mailmanclient { }; mailman-hyperkitty = callPackage ../development/python-modules/mailman-hyperkitty { }; @@ -1000,6 +1002,8 @@ in { */ pyqt5_with_qtwebkit = self.pyqt5.override { withWebKit = true; }; + pyqt5_with_qtmultimedia = self.pyqt5.override { withMultimedia = true; }; + pyqtwebengine = pkgs.libsForQt5.callPackage ../development/python-modules/pyqtwebengine { pythonPackages = self; };