diff --git a/.travis.yml b/.travis.yml index 2bd784ed30a..8ecd12642a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,4 @@ env: - GITHUB_TOKEN=5edaaf1017f691ed34e7f80878f8f5fbd071603f notifications: - email: - on_success: never - on_failure: change + email: false diff --git a/lib/maintainers.nix b/lib/maintainers.nix index db40b36fd6a..7bf7b43df65 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -178,6 +178,7 @@ exlevan = "Alexey Levan "; expipiplus1 = "Joe Hermaszewski "; fadenb = "Tristan Helmich "; + fare = "Francois-Rene Rideau "; falsifian = "James Cook "; flosse = "Markus Kohlhase "; fluffynukeit = "Daniel Austin "; diff --git a/lib/meta.nix b/lib/meta.nix index ae652e579c3..8f77bbe0148 100644 --- a/lib/meta.nix +++ b/lib/meta.nix @@ -17,6 +17,11 @@ rec { drv // { meta = (drv.meta or {}) // newAttrs; }; + /* Disable Hydra builds of given derivation. + */ + dontDistribute = drv: addMetaAttrs { hydraPlatforms = []; } drv; + + /* Change the symbolic name of a package for presentation purposes (i.e., so that nix-env users can tell them apart). */ diff --git a/nixos/doc/manual/development/building-nixos.xml b/nixos/doc/manual/development/building-nixos.xml index 150fa1d7017..2f963f8666f 100644 --- a/nixos/doc/manual/development/building-nixos.xml +++ b/nixos/doc/manual/development/building-nixos.xml @@ -12,12 +12,12 @@ your configuration.nix to configure the system that would be installed on the CD. Default CD/DVD configurations are available -inside nixos/modules/installer/cd-dvd. To build them -you have to set NIXOS_CONFIG before -running nix-build to build the ISO. +inside nixos/modules/installer/cd-dvd. -$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix +$ git clone https://github.com/NixOS/nixpkgs.git +$ cd nixpkgs/nixos +$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index d217b3452fb..d7459e3fe91 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -294,6 +294,7 @@ jackett = 276; aria2 = 277; clickhouse = 278; + rslsync = 279; # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! @@ -557,6 +558,7 @@ jackett = 276; aria2 = 277; clickhouse = 278; + rslsync = 279; # When adding a gid, make sure it doesn't match an existing # uid. Users and groups with the same name should have equal diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 7afcb9051bd..47adfa334ee 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -485,6 +485,7 @@ ./services/networking/radvd.nix ./services/networking/rdnssd.nix ./services/networking/redsocks.nix + ./services/networking/resilio.nix ./services/networking/rpcbind.nix ./services/networking/sabnzbd.nix ./services/networking/searx.nix diff --git a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix index 39176b28784..9452489e2fb 100644 --- a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix +++ b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix @@ -8,13 +8,7 @@ in { options = { programs.zsh.syntaxHighlighting = { - enable = mkOption { - default = false; - type = types.bool; - description = '' - Enable zsh-syntax-highlighting. - ''; - }; + enable = mkEnableOption "zsh-syntax-highlighting"; highlighters = mkOption { default = [ "main" ]; @@ -38,13 +32,13 @@ in }; patterns = mkOption { - default = []; - type = types.listOf(types.listOf(types.string)); + default = {}; + type = types.attrsOf types.string; example = literalExample '' - [ - ["rm -rf *" "fg=white,bold,bg=red"] - ] + { + "rm -rf *" = "fg=white,bold,bg=red"; + } ''; description = '' @@ -67,14 +61,17 @@ in "ZSH_HIGHLIGHT_HIGHLIGHTERS=(${concatStringsSep " " cfg.highlighters})" } - ${optionalString (length(cfg.patterns) > 0) - (assert(elem "pattern" cfg.highlighters); (foldl ( - a: b: - assert(length(b) == 2); '' - ${a} - ZSH_HIGHLIGHT_PATTERNS+=('${elemAt b 0}' '${elemAt b 1}') - '' - ) "") cfg.patterns) + ${let + n = attrNames cfg.patterns; + in + optionalString (length(n) > 0) + (assert(elem "pattern" cfg.highlighters); (foldl ( + a: b: + '' + ${a} + ZSH_HIGHLIGHT_PATTERNS+=('${b}' '${attrByPath [b] "" cfg.patterns}') + '' + ) "") n) } ''; }; diff --git a/nixos/modules/services/monitoring/dd-agent/dd-agent-defaults.nix b/nixos/modules/services/monitoring/dd-agent/dd-agent-defaults.nix new file mode 100644 index 00000000000..04512819742 --- /dev/null +++ b/nixos/modules/services/monitoring/dd-agent/dd-agent-defaults.nix @@ -0,0 +1,8 @@ +# Generated using update-dd-agent-default, please re-run after updating dd-agent. DO NOT EDIT MANUALLY. +[ + "auto_conf" + "agent_metrics.yaml.default" + "disk.yaml.default" + "network.yaml.default" + "ntp.yaml.default" +] diff --git a/nixos/modules/services/monitoring/dd-agent/dd-agent.nix b/nixos/modules/services/monitoring/dd-agent/dd-agent.nix index e55faed8e07..8d3d4f2065e 100644 --- a/nixos/modules/services/monitoring/dd-agent/dd-agent.nix +++ b/nixos/modules/services/monitoring/dd-agent/dd-agent.nix @@ -16,24 +16,100 @@ let forwarder_log_file: /var/log/datadog/forwarder.log dogstatsd_log_file: /var/log/datadog/dogstatsd.log pup_log_file: /var/log/datadog/pup.log + + # proxy_host: my-proxy.com + # proxy_port: 3128 + # proxy_user: user + # proxy_password: password + + # tags: mytag0, mytag1 ${optionalString (cfg.tags != null ) "tags: ${concatStringsSep "," cfg.tags }"} - ${cfg.extraDdConfig} + + # collect_ec2_tags: no + # recent_point_threshold: 30 + # use_mount: no + # listen_port: 17123 + # graphite_listen_port: 17124 + # non_local_traffic: no + # use_curl_http_client: False + # bind_host: localhost + + # use_pup: no + # pup_port: 17125 + # pup_interface: localhost + # pup_url: http://localhost:17125 + + # dogstatsd_port : 8125 + # dogstatsd_interval : 10 + # dogstatsd_normalize : yes + # statsd_forward_host: address_of_own_statsd_server + # statsd_forward_port: 8125 + + # device_blacklist_re: .*\/dev\/mapper\/lxc-box.* + + # ganglia_host: localhost + # ganglia_port: 8651 ''; - etcfiles = - map (i: { source = if builtins.hasAttr "config" i - then pkgs.writeText "${i.name}.yaml" i.config - else "${pkgs.dd-agent}/agent/conf.d-system/${i.name}.yaml"; - target = "dd-agent/conf.d/${i.name}.yaml"; - } - ) cfg.integrations ++ - [ { source = ddConf; - target = "dd-agent/datadog.conf"; - } - ]; + diskConfig = pkgs.writeText "disk.yaml" '' + init_config: - # restart triggers - etcSources = map (i: i.source) etcfiles; + instances: + - use_mount: no + ''; + + networkConfig = pkgs.writeText "network.yaml" '' + init_config: + + instances: + # Network check only supports one configured instance + - collect_connection_state: false + excluded_interfaces: + - lo + - lo0 + ''; + + postgresqlConfig = pkgs.writeText "postgres.yaml" cfg.postgresqlConfig; + nginxConfig = pkgs.writeText "nginx.yaml" cfg.nginxConfig; + mongoConfig = pkgs.writeText "mongo.yaml" cfg.mongoConfig; + jmxConfig = pkgs.writeText "jmx.yaml" cfg.jmxConfig; + processConfig = pkgs.writeText "process.yaml" cfg.processConfig; + + etcfiles = + let + defaultConfd = import ./dd-agent-defaults.nix; + in (map (f: { source = "${pkgs.dd-agent}/agent/conf.d-system/${f}"; + target = "dd-agent/conf.d/${f}"; + }) defaultConfd) ++ [ + { source = ddConf; + target = "dd-agent/datadog.conf"; + } + { source = diskConfig; + target = "dd-agent/conf.d/disk.yaml"; + } + { source = networkConfig; + target = "dd-agent/conf.d/network.yaml"; + } ] ++ + (optional (cfg.postgresqlConfig != null) + { source = postgresqlConfig; + target = "dd-agent/conf.d/postgres.yaml"; + }) ++ + (optional (cfg.nginxConfig != null) + { source = nginxConfig; + target = "dd-agent/conf.d/nginx.yaml"; + }) ++ + (optional (cfg.mongoConfig != null) + { source = mongoConfig; + target = "dd-agent/conf.d/mongo.yaml"; + }) ++ + (optional (cfg.processConfig != null) + { source = processConfig; + target = "dd-agent/conf.d/process.yaml"; + }) ++ + (optional (cfg.jmxConfig != null) + { source = jmxConfig; + target = "dd-agent/conf.d/jmx.yaml"; + }); in { options.services.dd-agent = { @@ -63,46 +139,44 @@ in { type = types.uniq (types.nullOr types.string); }; - agent = mkOption { - description = "The dd-agent package to use. Useful when overriding the package."; - default = pkgs.dd-agent; - type = types.package; + postgresqlConfig = mkOption { + description = "Datadog PostgreSQL integration configuration"; + default = null; + type = types.uniq (types.nullOr types.string); }; - integrations = mkOption { + nginxConfig = mkOption { + description = "Datadog nginx integration configuration"; + default = null; + type = types.uniq (types.nullOr types.string); + }; + + mongoConfig = mkOption { + description = "MongoDB integration configuration"; + default = null; + type = types.uniq (types.nullOr types.string); + }; + + jmxConfig = mkOption { + description = "JMX integration configuration"; + default = null; + type = types.uniq (types.nullOr types.string); + }; + + processConfig = mkOption { description = '' - Any integrations to use. Default config used if none - specified. It is currently up to the user to make sure that - the dd-agent package used has all the dependencies chosen - integrations require in scope. - ''; - type = types.listOf (types.attrsOf types.string); - default = []; - example = '' - [ { name = "elastic"; - config = ''' - init_config: - - instances: - - url: http://localhost:9200 - '''; - } - { name = "nginx"; } - { name = "ntp"; } - { name = "network"; } - ] + Process integration configuration + + See http://docs.datadoghq.com/integrations/process/ ''; + default = null; + type = types.uniq (types.nullOr types.string); }; - extraDdConfig = mkOption { - description = "Extra settings to append to datadog agent config."; - default = ""; - type = types.string; - }; }; config = mkIf cfg.enable { - environment.systemPackages = [ cfg.agent pkgs.sysstat pkgs.procps ]; + environment.systemPackages = [ pkgs."dd-agent" pkgs.sysstat pkgs.procps ]; users.extraUsers.datadog = { description = "Datadog Agent User"; @@ -116,7 +190,7 @@ in { systemd.services.dd-agent = { description = "Datadog agent monitor"; - path = [ cfg.agent pkgs.python pkgs.sysstat pkgs.procps ]; + path = [ pkgs."dd-agent" pkgs.python pkgs.sysstat pkgs.procps ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { ExecStart = "${pkgs.dd-agent}/bin/dd-agent foreground"; @@ -125,12 +199,28 @@ in { Restart = "always"; RestartSec = 2; }; - restartTriggers = [ pkgs.dd-agent ddConf ] ++ etcSources; + restartTriggers = [ pkgs.dd-agent ddConf diskConfig networkConfig postgresqlConfig nginxConfig mongoConfig jmxConfig processConfig ]; }; - systemd.services.dd-jmxfetch = lib.mkIf (builtins.any (i: i.name == "jmx") cfg.integrations) { + systemd.services.dogstatsd = { + description = "Datadog statsd"; + path = [ pkgs."dd-agent" pkgs.python pkgs.procps ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + ExecStart = "${pkgs.dd-agent}/bin/dogstatsd start"; + User = "datadog"; + Group = "datadog"; + Type = "forking"; + PIDFile = "/tmp/dogstatsd.pid"; + Restart = "always"; + RestartSec = 2; + }; + restartTriggers = [ pkgs.dd-agent ddConf diskConfig networkConfig postgresqlConfig nginxConfig mongoConfig jmxConfig processConfig ]; + }; + + systemd.services.dd-jmxfetch = lib.mkIf (cfg.jmxConfig != null) { description = "Datadog JMX Fetcher"; - path = [ cfg.agent pkgs.python pkgs.sysstat pkgs.procps pkgs.jdk ]; + path = [ pkgs."dd-agent" pkgs.python pkgs.sysstat pkgs.procps pkgs.jdk ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { ExecStart = "${pkgs.dd-agent}/bin/dd-jmxfetch"; @@ -139,7 +229,7 @@ in { Restart = "always"; RestartSec = 2; }; - restartTriggers = [ cfg.agent ddConf ] ++ etcSources; + restartTriggers = [ pkgs.dd-agent ddConf diskConfig networkConfig postgresqlConfig nginxConfig mongoConfig jmxConfig ]; }; environment.etc = etcfiles; diff --git a/nixos/modules/services/monitoring/dd-agent/update-dd-agent-defaults b/nixos/modules/services/monitoring/dd-agent/update-dd-agent-defaults new file mode 100755 index 00000000000..76724173171 --- /dev/null +++ b/nixos/modules/services/monitoring/dd-agent/update-dd-agent-defaults @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +dd=$(nix-build --no-out-link -A dd-agent ../../../..) +echo '# Generated using update-dd-agent-default, please re-run after updating dd-agent. DO NOT EDIT MANUALLY.' > dd-agent-defaults.nix +echo '[' >> dd-agent-defaults.nix +echo ' "auto_conf"' >> dd-agent-defaults.nix +for f in $(find $dd/agent/conf.d-system -maxdepth 1 -type f | grep -v '\.example' | sort); do + echo " \"$(basename $f)\"" >> dd-agent-defaults.nix +done +echo ']' >> dd-agent-defaults.nix diff --git a/nixos/modules/services/networking/dnschain.nix b/nixos/modules/services/networking/dnschain.nix index b6492996057..ab7bbb15ad4 100644 --- a/nixos/modules/services/networking/dnschain.nix +++ b/nixos/modules/services/networking/dnschain.nix @@ -17,7 +17,7 @@ let host = ${cfg.dns.address} port = ${toString cfg.dns.port} oldDNSMethod = NO_OLD_DNS - externalIP = ${cfg.dns.address} + externalIP = ${cfg.dns.externalAddress} [http] host = ${cfg.api.hostname} @@ -47,8 +47,18 @@ in type = types.str; default = "127.0.0.1"; description = '' - The IP address that will be used to reach this machine. - Leave this unchanged if you do not wish to directly expose the DNSChain resolver. + The IP address the DNSChain resolver will bind to. + Leave this unchanged if you do not wish to directly expose the resolver. + ''; + }; + + dns.externalAddress = mkOption { + type = types.str; + default = cfg.dns.address; + description = '' + The IP address used by clients to reach the resolver and the value of + the namecoin.dns record. Set this in case the bind address + is not the actual IP address (e.g. the machine is behind a NAT). ''; }; diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 876dbe1524e..f8b7f26f5f2 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -12,6 +12,7 @@ let configFile = writeText "NetworkManager.conf" '' [main] plugins=keyfile + dhcp=${cfg.dhcp} dns=${if cfg.useDnsmasq then "dnsmasq" else "default"} [keyfile] @@ -21,7 +22,7 @@ let ''unmanaged-devices=${lib.concatStringsSep ";" cfg.unmanaged}''} [logging] - level=WARN + level=${cfg.logLevel} [connection] ipv6.ip6-privacy=2 @@ -138,6 +139,22 @@ in { apply = list: (attrValues cfg.basePackages) ++ list; }; + dhcp = mkOption { + type = types.enum [ "dhclient" "dhcpcd" "internal" ]; + default = "dhclient"; + description = '' + Which program (or internal library) should be used for DHCP. + ''; + }; + + logLevel = mkOption { + type = types.enum [ "OFF" "ERR" "WARN" "INFO" "DEBUG" "TRACE" ]; + default = "WARN"; + description = '' + Set the default logging verbosity level. + ''; + }; + appendNameservers = mkOption { type = types.listOf types.str; default = []; @@ -181,7 +198,7 @@ in { }; type = mkOption { - type = types.enum (attrNames dispatcherTypesSubdirMap); + type = types.enum (attrNames dispatcherTypesSubdirMap); default = "basic"; description = '' Dispatcher hook type. Only basic hooks are currently available. diff --git a/nixos/modules/services/networking/resilio.nix b/nixos/modules/services/networking/resilio.nix new file mode 100644 index 00000000000..6d2b7bdbca1 --- /dev/null +++ b/nixos/modules/services/networking/resilio.nix @@ -0,0 +1,268 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.resilio; + + resilioSync = pkgs.resilio-sync; + + sharedFoldersRecord = map (entry: { + secret = entry.secret; + dir = entry.directory; + + use_relay_server = entry.useRelayServer; + use_tracker = entry.useTracker; + use_dht = entry.useDHT; + + search_lan = entry.searchLAN; + use_sync_trash = entry.useSyncTrash; + known_hosts = knownHosts; + }) cfg.sharedFolders; + + configFile = pkgs.writeText "config.json" (builtins.toJSON ({ + device_name = cfg.deviceName; + storage_path = cfg.storagePath; + listening_port = cfg.listeningPort; + use_gui = false; + check_for_updates = cfg.checkForUpdates; + use_upnp = cfg.useUpnp; + download_limit = cfg.downloadLimit; + upload_limit = cfg.uploadLimit; + lan_encrypt_data = cfg.encryptLAN; + } // optionalAttrs cfg.enableWebUI { + webui = { listen = "${cfg.httpListenAddr}:${toString cfg.httpListenPort}"; } // + (optionalAttrs (cfg.httpLogin != "") { login = cfg.httpLogin; }) // + (optionalAttrs (cfg.httpPass != "") { password = cfg.httpPass; }) // + (optionalAttrs (cfg.apiKey != "") { api_key = cfg.apiKey; }) // + (optionalAttrs (cfg.directoryRoot != "") { directory_root = cfg.directoryRoot; }); + } // optionalAttrs (sharedFoldersRecord != []) { + shared_folders = sharedFoldersRecord; + })); + +in +{ + options = { + services.resilio = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + If enabled, start the Resilio Sync daemon. Once enabled, you can + interact with the service through the Web UI, or configure it in your + NixOS configuration. Enabling the resilio service + also installs a systemd user unit which can be used to start + user-specific copies of the daemon. Once installed, you can use + systemctl --user start resilio as your user to start + the daemon using the configuration file located at + $HOME/.config/resilio-sync/config.json. + ''; + }; + + deviceName = mkOption { + type = types.str; + example = "Voltron"; + default = config.networking.hostName; + description = '' + Name of the Resilio Sync device. + ''; + }; + + listeningPort = mkOption { + type = types.int; + default = 0; + example = 44444; + description = '' + Listening port. Defaults to 0 which randomizes the port. + ''; + }; + + checkForUpdates = mkOption { + type = types.bool; + default = true; + description = '' + Determines whether to check for updates and alert the user + about them in the UI. + ''; + }; + + useUpnp = mkOption { + type = types.bool; + default = true; + description = '' + Use Universal Plug-n-Play (UPnP) + ''; + }; + + downloadLimit = mkOption { + type = types.int; + default = 0; + example = 1024; + description = '' + Download speed limit. 0 is unlimited (default). + ''; + }; + + uploadLimit = mkOption { + type = types.int; + default = 0; + example = 1024; + description = '' + Upload speed limit. 0 is unlimited (default). + ''; + }; + + httpListenAddr = mkOption { + type = types.str; + default = "0.0.0.0"; + example = "1.2.3.4"; + description = '' + HTTP address to bind to. + ''; + }; + + httpListenPort = mkOption { + type = types.int; + default = 9000; + description = '' + HTTP port to bind on. + ''; + }; + + httpLogin = mkOption { + type = types.str; + example = "allyourbase"; + default = ""; + description = '' + HTTP web login username. + ''; + }; + + httpPass = mkOption { + type = types.str; + example = "arebelongtous"; + default = ""; + description = '' + HTTP web login password. + ''; + }; + + encryptLAN = mkOption { + type = types.bool; + default = true; + description = "Encrypt LAN data."; + }; + + enableWebUI = mkOption { + type = types.bool; + default = false; + description = '' + Enable Web UI for administration. Bound to the specified + httpListenAddress and + httpListenPort. + ''; + }; + + storagePath = mkOption { + type = types.path; + default = "/var/lib/resilio-sync/"; + description = '' + Where BitTorrent Sync will store it's database files (containing + things like username info and licenses). Generally, you should not + need to ever change this. + ''; + }; + + apiKey = mkOption { + type = types.str; + default = ""; + description = "API key, which enables the developer API."; + }; + + directoryRoot = mkOption { + type = types.str; + default = ""; + example = "/media"; + description = "Default directory to add folders in the web UI."; + }; + + sharedFolders = mkOption { + default = []; + example = + [ { secret = "AHMYFPCQAHBM7LQPFXQ7WV6Y42IGUXJ5Y"; + directory = "/home/user/sync_test"; + useRelayServer = true; + useTracker = true; + useDHT = false; + searchLAN = true; + useSyncTrash = true; + knownHosts = [ + "192.168.1.2:4444" + "192.168.1.3:4444" + ]; + } + ]; + description = '' + Shared folder list. If enabled, web UI must be + disabled. Secrets can be generated using rslsync + --generate-secret. Note that this secret will be + put inside the Nix store, so it is realistically not very + secret. + + If you would like to be able to modify the contents of this + directories, it is recommended that you make your user a + member of the resilio group. + + Directories in this list should be in the + resilio group, and that group must have + write access to the directory. It is also recommended that + chmod g+s is applied to the directory + so that any sub directories created will also belong to + the resilio group. Also, + setfacl -d -m group:resilio:rwx and + setfacl -m group:resilio:rwx should also + be applied so that the sub directories are writable by + the group. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + assertions = + [ { assertion = cfg.deviceName != ""; + message = "Device name cannot be empty."; + } + { assertion = cfg.enableWebUI -> cfg.sharedFolders == []; + message = "If using shared folders, the web UI cannot be enabled."; + } + { assertion = cfg.apiKey != "" -> cfg.enableWebUI; + message = "If you're using an API key, you must enable the web server."; + } + ]; + + users.extraUsers.rslsync = { + description = "Resilio Sync Service user"; + home = cfg.storagePath; + createHome = true; + uid = config.ids.uids.rslsync; + group = "rslsync"; + }; + + users.extraGroups = [ { name = "rslsync"; } ]; + + systemd.services.resilio = with pkgs; { + description = "Resilio Sync Service"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" "local-fs.target" ]; + serviceConfig = { + Restart = "on-abort"; + UMask = "0002"; + User = "rslsync"; + ExecStart = '' + ${resilioSync}/bin/rslsync --nodaemon --config ${configFile} + ''; + }; + }; + }; +} diff --git a/pkgs/applications/audio/airwave/default.nix b/pkgs/applications/audio/airwave/default.nix index 39946fd5c7d..5a6901a9434 100644 --- a/pkgs/applications/audio/airwave/default.nix +++ b/pkgs/applications/audio/airwave/default.nix @@ -1,5 +1,5 @@ { stdenv, cmake, fetchFromGitHub, file, gcc_multi, libX11, makeWrapper -, overrideCC, qt5, requireFile, unzip, wineStable +, overrideCC, qt5, requireFile, unzip, wine }: let @@ -26,7 +26,8 @@ let installPhase = "cp -r . $out"; }; - wine-wow64 = wineStable.override { + wine-wow64 = wine.override { + wineRelease = "stable"; wineBuild = "wineWow"; }; diff --git a/pkgs/applications/audio/csound/default.nix b/pkgs/applications/audio/csound/default.nix index 4f58ae48390..dc0c8eabcac 100644 --- a/pkgs/applications/audio/csound/default.nix +++ b/pkgs/applications/audio/csound/default.nix @@ -1,20 +1,20 @@ -{ stdenv, fetchFromGitHub, cmake, libsndfile, flex, bison, boost +{ stdenv, fetchFromGitHub, cmake, libsndfile, libsamplerate, flex, bison, boost, gettext , alsaLib ? null , libpulseaudio ? null -, tcltk ? null +, libjack2 ? null , liblo ? null - -# maybe csound can be compiled with support for those, see configure output -# , ladspa ? null -# , fluidsynth ? null -# , jack ? null -# , gmm ? null -# , wiiuse ? null +, ladspa-sdk ? null +, fluidsynth ? null +# , gmm ? null # opcodes don't build with gmm 5.1 +, eigen ? null +, curl ? null +, tcltk ? null +, fltk ? null }: stdenv.mkDerivation rec { - name = "csound-6.08.1"; - version = "6.08.1"; + name = "csound-${version}"; + version = "6.09.0"; enableParallelBuilding = true; @@ -24,11 +24,18 @@ stdenv.mkDerivation rec { owner = "csound"; repo = "csound"; rev = version; - sha256 = "03xnva17sw35ga3n96x1zdfgw913dga1hccly85wzfn0kxz4rld9"; + sha256 = "1vfb0mab89psfwidadjrn5mbzq3bhjbyrrmyp98yp0xm6a8cssih"; }; - nativeBuildInputs = [ cmake flex bison ]; - buildInputs = [ libsndfile alsaLib libpulseaudio tcltk boost liblo ]; + cmakeFlags = [ "-DBUILD_CSOUND_AC=0" ] # fails to find Score.hpp + ++ stdenv.lib.optional (libjack2 != null) "-DJACK_HEADER=${libjack2}/include/jack/jack.h"; + + nativeBuildInputs = [ cmake flex bison gettext ]; + buildInputs = [ libsndfile libsamplerate boost ] + ++ builtins.filter (optional: optional != null) [ + alsaLib libpulseaudio libjack2 + liblo ladspa-sdk fluidsynth eigen + curl tcltk fltk ]; meta = with stdenv.lib; { description = "Sound design, audio synthesis, and signal processing system, providing facilities for music composition and performance on all major operating systems and platforms"; diff --git a/pkgs/applications/editors/vscode/default.nix b/pkgs/applications/editors/vscode/default.nix index 81aca06267b..47fb24ca2cc 100644 --- a/pkgs/applications/editors/vscode/default.nix +++ b/pkgs/applications/editors/vscode/default.nix @@ -2,7 +2,7 @@ makeWrapper, libXScrnSaver, libxkbfile }: let - version = "1.12.1"; + version = "1.12.2"; channel = "stable"; plat = { @@ -12,9 +12,9 @@ let }.${stdenv.system}; sha256 = { - "i686-linux" = "0i4zqxbq7bm2afzyny3a53sq1fghlz5an1z8fkqh5i3029s635h9"; - "x86_64-linux" = "0kwmfiyb70if4svamnivbc9w65c14j3lrn5vysqkc4b8hlk4r75i"; - "x86_64-darwin" = "1dgs4k4m885qzammhj0x9k6pd8rayxn61iq3fiazp0w8v5bhl4l5"; + "i686-linux" = "0221s8vx32haqr31wkkm637gya3vljbkim59i7a2hhwxh2gcs2fk"; + "x86_64-linux" = "0p6ck2lc9lln96lib5r5yfbrd04rgsbzhvf1lx2kykn428ddxi9s"; + "x86_64-darwin" = "1s7hyr245v4z2g357m7ajnh8y1cqixricpkx329xls4292qb7rh4"; }.${stdenv.system}; archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz"; diff --git a/pkgs/applications/graphics/gimp/2.8.nix b/pkgs/applications/graphics/gimp/2.8.nix index 8c430435dd7..47004a02500 100644 --- a/pkgs/applications/graphics/gimp/2.8.nix +++ b/pkgs/applications/graphics/gimp/2.8.nix @@ -8,7 +8,7 @@ let inherit (python2Packages) pygtk wrapPython python; in stdenv.mkDerivation rec { name = "gimp-${version}"; - version = "2.8.20"; + version = "2.8.22"; # This declarations for `gimp-with-plugins` wrapper, # (used for determining $out/lib/gimp/${majorVersion}/ paths) @@ -18,7 +18,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://download.gimp.org/pub/gimp/v2.8/${name}.tar.bz2"; - sha256 = "939ca1df70be865c672ffd654f4e20f188121d01601c5c90237214101533c805"; + sha256 = "12k3lp938qdc9cqj29scg55f3bb8iav2fysd29w0s49bqmfa71wi"; }; buildInputs = diff --git a/pkgs/applications/misc/albert/default.nix b/pkgs/applications/misc/albert/default.nix index 80e77858a06..f3c011e3333 100644 --- a/pkgs/applications/misc/albert/default.nix +++ b/pkgs/applications/misc/albert/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "albert-${version}"; - version = "0.11.1"; + version = "0.11.3"; src = fetchFromGitHub { owner = "albertlauncher"; repo = "albert"; rev = "v${version}"; - sha256 = "1ai0h3lbdac0a4xzd6pm3i0r8w0gfdnw9rdkj0szyzvm428f88s6"; + sha256 = "0ddz6h1334b9kqy1lfi7qa21znm3l0b9h0d4s62llxdasv103jh5"; }; nativeBuildInputs = [ cmake makeQtWrapper ]; diff --git a/pkgs/applications/misc/apvlv/default.nix b/pkgs/applications/misc/apvlv/default.nix index 977f5e94e5d..a07e0b6db61 100644 --- a/pkgs/applications/misc/apvlv/default.nix +++ b/pkgs/applications/misc/apvlv/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig, pcre, libxkbcommon, epoxy -, gtk3, poppler, freetype, libpthreadstubs, libXdmcp, libxshmfence +, gtk3, poppler, freetype, libpthreadstubs, libXdmcp, libxshmfence, wrapGAppsHook }: stdenv.mkDerivation rec { @@ -22,6 +22,10 @@ stdenv.mkDerivation rec { libpthreadstubs libXdmcp libxshmfence # otherwise warnings in compilation ]; + nativeBuildInputs = [ + wrapGAppsHook + ]; + patches = [ (fetchpatch { url = "https://github.com/naihe2010/apvlv/commit/d432635b9c5ea6c052a2ae1fb71aedec5c4ad57a.patch"; @@ -41,6 +45,7 @@ stdenv.mkDerivation rec { # displays pdfStartup.pdf as default pdf entry mkdir -p $out/share/doc/apvlv/ cp ../Startup.pdf $out/share/doc/apvlv/Startup.pdf + cp ../main_menubar.glade $out/share/doc/apvlv/main_menubar.glade ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index 6dcd96216cb..5d228d264d0 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -62,6 +62,8 @@ stdenv.mkDerivation rec { ]); installPhase = '' + runHook preInstall + export HOME=$TMPDIR/fakehome export POPPLER_INC_DIR=${poppler_utils.dev}/include/poppler export POPPLER_LIB_DIR=${poppler_utils.out}/lib @@ -92,6 +94,8 @@ stdenv.mkDerivation rec { for entry in $out/share/applications/*.desktop; do substituteAllInPlace $entry done + + runHook postInstall ''; calibreDesktopItem = makeDesktopItem { diff --git a/pkgs/applications/misc/gollum/Gemfile.lock b/pkgs/applications/misc/gollum/Gemfile.lock index 074a0c6fa43..4322b408843 100644 --- a/pkgs/applications/misc/gollum/Gemfile.lock +++ b/pkgs/applications/misc/gollum/Gemfile.lock @@ -2,48 +2,53 @@ GEM remote: https://rubygems.org/ specs: charlock_holmes (0.7.3) - diff-lcs (1.2.5) - github-markup (1.3.3) - gitlab-grit (2.7.3) + diff-lcs (1.3) + gemojione (3.2.0) + json + github-markup (1.6.0) + gitlab-grit (2.8.1) charlock_holmes (~> 0.6) diff-lcs (~> 1.1) - mime-types (~> 1.15) + mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gollum (4.0.1) + gollum (4.1.1) + gemojione (~> 3.2) gollum-lib (~> 4.0, >= 4.0.1) - kramdown (~> 1.8.0) + kramdown (~> 1.9.0) mustache (>= 0.99.5, < 1.0.0) sinatra (~> 1.4, >= 1.4.4) - useragent (~> 0.14.0) - gollum-grit_adapter (1.0.0) + useragent (~> 0.16.2) + gollum-grit_adapter (1.0.1) gitlab-grit (~> 2.7, >= 2.7.1) - gollum-lib (4.1.0) - github-markup (~> 1.3.3) + gollum-lib (4.2.5) + gemojione (~> 3.2) + github-markup (~> 1.6) gollum-grit_adapter (~> 1.0) nokogiri (~> 1.6.4) - rouge (~> 1.9) - sanitize (~> 2.1.0) - stringex (~> 2.5.1) - kramdown (1.8.0) - mime-types (1.25.1) - mini_portile2 (2.0.0) + rouge (~> 2.0) + sanitize (~> 2.1) + stringex (~> 2.6) + json (2.1.0) + kramdown (1.9.0) + mime-types (2.99.3) + mini_portile2 (2.1.0) mustache (0.99.8) - nokogiri (1.6.7.2) - mini_portile2 (~> 2.0.0.rc2) - posix-spawn (0.3.11) - rack (1.6.4) + nokogiri (1.6.8.1) + mini_portile2 (~> 2.1.0) + posix-spawn (0.3.13) + rack (1.6.8) rack-protection (1.5.3) rack - rouge (1.10.1) + rouge (2.0.7) sanitize (2.1.0) nokogiri (>= 1.4.4) - sinatra (1.4.7) + sinatra (1.4.8) rack (~> 1.5) rack-protection (~> 1.4) tilt (>= 1.3, < 3) - stringex (2.5.2) - tilt (2.0.2) - useragent (0.14.0) + stringex (2.7.1) + tilt (2.0.7) + useragent (0.16.8) PLATFORMS ruby @@ -52,4 +57,4 @@ DEPENDENCIES gollum BUNDLED WITH - 1.10.6 + 1.15.0 diff --git a/pkgs/applications/misc/gollum/default.nix b/pkgs/applications/misc/gollum/default.nix index 1f3cc9e27c0..160b38463b6 100644 --- a/pkgs/applications/misc/gollum/default.nix +++ b/pkgs/applications/misc/gollum/default.nix @@ -1,16 +1,32 @@ -{ stdenv, lib, bundlerEnv, ruby_2_2, icu, zlib }: +{ stdenv, bundlerEnv, ruby, makeWrapper +, git }: -bundlerEnv rec { - name = "gollum-${version}"; - version = "4.0.1"; +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "gollum"; + version = (import ./gemset.nix).gollum.version; - ruby = ruby_2_2; - gemdir = ./.; + nativeBuildInputs = [ makeWrapper ]; - meta = with lib; { + env = bundlerEnv { + name = "${name}-gems"; + inherit pname ruby; + gemdir = ./.; + }; + + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -p $out/bin + makeWrapper ${env}/bin/gollum $out/bin/gollum \ + --prefix PATH ":" ${stdenv.lib.makeBinPath [ git ]} + ''; + + meta = with stdenv.lib; { description = "A simple, Git-powered wiki"; + homepage = "https://github.com/gollum/gollum"; license = licenses.mit; - maintainers = with maintainers; [ jgillich ]; + maintainers = with maintainers; [ jgillich primeos ]; platforms = platforms.unix; }; } diff --git a/pkgs/applications/misc/gollum/gemset.nix b/pkgs/applications/misc/gollum/gemset.nix index f0c71fa455c..2ad724b2bc7 100644 --- a/pkgs/applications/misc/gollum/gemset.nix +++ b/pkgs/applications/misc/gollum/gemset.nix @@ -1,170 +1,186 @@ { - useragent = { - version = "0.14.0"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "124r3mgkw1zjymsqq9r25zh1vwjrjgiji5fm620z53lpmmryj22j"; - }; - }; - tilt = { - version = "2.0.2"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "0lkd40xfdqkp333vdfhrfjmi2y7k2hjs4azawfb62mrkfp7ivj84"; - }; - }; - stringex = { - version = "2.5.2"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "150adm7rfh6r9b5ra6vk75mswf9m3wwyslcf8f235a08m29fxa17"; - }; - }; - sinatra = { - version = "1.4.7"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "1b81kbr65mmcl9cdq2r6yc16wklyp798rxkgmm5pr9fvsj7jwmxp"; - }; - }; - sanitize = { - version = "2.1.0"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "0xsv6xqrlz91rd8wifjknadbl3z5h6qphmxy0hjb189qbdghggn3"; - }; - }; - rouge = { - version = "1.10.1"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "0wp8as9ypdy18kdj9h70kny1rdfq71mr8cj2bpahr9vxjjvjasqz"; - }; - }; - rack-protection = { - version = "1.5.3"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "0cvb21zz7p9wy23wdav63z5qzfn4nialik22yqp6gihkgfqqrh5r"; - }; - }; - rack = { - version = "1.6.4"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "09bs295yq6csjnkzj7ncj50i6chfxrhmzg1pk6p0vd2lb9ac8pj5"; - }; - }; - posix-spawn = { - version = "0.3.11"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "052lnxbkvlnwfjw4qd7vn2xrlaaqiav6f5x5bcjin97bsrfq6cmr"; - }; - }; - nokogiri = { - version = "1.6.7.2"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "11sbmpy60ynak6s3794q32lc99hs448msjy8rkp84ay7mq7zqspv"; - }; - }; - mustache = { - version = "0.99.8"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "1g5hplm0k06vwxwqzwn1mq5bd02yp0h3rym4zwzw26aqi7drcsl2"; - }; - }; - mini_portile2 = { - version = "2.0.0"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "056drbn5m4khdxly1asmiik14nyllswr6sh3wallvsywwdiryz8l"; - }; - }; - mime-types = { - version = "1.25.1"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "0mhzsanmnzdshaba7gmsjwnv168r1yj8y0flzw88frw1cickrvw8"; - }; - }; - kramdown = { - version = "1.8.0"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "0ryqq055h5n10c1cfba6pxsssa907l2hkw29anp0d41ryh47ca2l"; - }; - }; - gollum-lib = { - version = "4.1.0"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "01s8pgzhc3cgcmsy6hh79wrcbn5vbadniq2a7d4qw87kpq7mzfdm"; - }; - }; - gollum-grit_adapter = { - version = "1.0.0"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "02c5qfq0s0kx2ifnpbnbgz6258fl7rchzzzc7vpx72shi8gbpac7"; - }; - }; - gollum = { - version = "4.0.1"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "02pgx083sns75zgnqx94p5h5bpr7cfiw5mys4ayb4k33hcjm6ydg"; - }; - }; - gitlab-grit = { - version = "2.7.3"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "0nv8shx7w7fww8lf5a2rbvf7bq173rllm381m6x7g1i0qqc68q1b"; - }; - }; - github-markup = { - version = "1.3.3"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "01r901wcgn0gs0n9h684gs5n90y1vaj9lxnx4z5ig611jwa43ivq"; - }; - }; - diff-lcs = { - version = "1.2.5"; - source = { - type = "gem"; - remotes = ["https://rubygems.org"]; - sha256 = "1vf9civd41bnqi6brr5d9jifdw73j9khc6fkhfl1f8r9cpkdvlx1"; - }; - }; charlock_holmes = { - version = "0.7.3"; source = { - type = "gem"; remotes = ["https://rubygems.org"]; sha256 = "0jsl6k27wjmssxbwv9wpf7hgp9r0nvizcf6qpjnr7qs2nia53lf7"; + type = "gem"; }; + version = "0.7.3"; + }; + diff-lcs = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"; + type = "gem"; + }; + version = "1.3"; + }; + gemojione = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0svj3hsmwyr306vg75cd7p9i4bwnajrda60n2vhiav2cvhnkawik"; + type = "gem"; + }; + version = "3.2.0"; + }; + github-markup = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1g538d7kcj2iw4d9ll8266d8n526hz2fbx7zlx8z7gxg1gzwiki9"; + type = "gem"; + }; + version = "1.6.0"; + }; + gitlab-grit = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0lf1cr6pzqrbnxiiwym6q74b1a2ihdi91dynajk8hi1p093hl66n"; + type = "gem"; + }; + version = "2.8.1"; + }; + gollum = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0jrafhy8p9pgvya0gj2g6knrpg58g65s7j9bcyfj6fp4n2dz2w7s"; + type = "gem"; + }; + version = "4.1.1"; + }; + gollum-grit_adapter = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0fcibm63v1afc0fj5rki0mm51m7nndil4cjcjjvkh3yigfn4nr4b"; + type = "gem"; + }; + version = "1.0.1"; + }; + gollum-lib = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0399lfqv3hbpr7v14p9snyimva440d2mb8y7xm2zlgwv7l0n9z0z"; + type = "gem"; + }; + version = "4.2.5"; + }; + json = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"; + type = "gem"; + }; + version = "2.1.0"; + }; + kramdown = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "12sral2xli39mnr4b9m2sxdlgam4ni0a1mkxawc5311z107zj3p0"; + type = "gem"; + }; + version = "1.9.0"; + }; + mime-types = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "03j98xr0qw2p2jkclpmk7pm29yvmmh0073d8d43ajmr0h3w7i5l9"; + type = "gem"; + }; + version = "2.99.3"; + }; + mini_portile2 = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1y25adxb1hgg1wb2rn20g3vl07qziq6fz364jc5694611zz863hb"; + type = "gem"; + }; + version = "2.1.0"; + }; + mustache = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1g5hplm0k06vwxwqzwn1mq5bd02yp0h3rym4zwzw26aqi7drcsl2"; + type = "gem"; + }; + version = "0.99.8"; + }; + nokogiri = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "045xdg0w7nnsr2f2gb7v7bgx53xbc9dxf0jwzmh2pr3jyrzlm0cj"; + type = "gem"; + }; + version = "1.6.8.1"; + }; + posix-spawn = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1pmxmpins57qrbr31bs3bm7gidhaacmrp4md6i962gvpq4gyfcjw"; + type = "gem"; + }; + version = "0.3.13"; + }; + rack = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "19m7aixb2ri7p1n0iqaqx8ldi97xdhvbxijbyrrcdcl6fv5prqza"; + type = "gem"; + }; + version = "1.6.8"; + }; + rack-protection = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0cvb21zz7p9wy23wdav63z5qzfn4nialik22yqp6gihkgfqqrh5r"; + type = "gem"; + }; + version = "1.5.3"; + }; + rouge = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0sfikq1q8xyqqx690iiz7ybhzx87am4w50w8f2nq36l3asw4x89d"; + type = "gem"; + }; + version = "2.0.7"; + }; + sanitize = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0xsv6xqrlz91rd8wifjknadbl3z5h6qphmxy0hjb189qbdghggn3"; + type = "gem"; + }; + version = "2.1.0"; + }; + sinatra = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0byxzl7rx3ki0xd7aiv1x8mbah7hzd8f81l65nq8857kmgzj1jqq"; + type = "gem"; + }; + version = "1.4.8"; + }; + stringex = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1zc93v00av643lc6njl09wwki7h5yqayhh1din8zqfylw814l1dv"; + type = "gem"; + }; + version = "2.7.1"; + }; + tilt = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1is1ayw5049z8pd7slsk870bddyy5g2imp4z78lnvl8qsl8l0s7b"; + type = "gem"; + }; + version = "2.0.7"; + }; + useragent = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1139cjqyv1hk1qcw89k81ajjkqyakqgbcyvmfrsmjqi8yn9kgqhq"; + type = "gem"; + }; + version = "0.16.8"; }; } \ No newline at end of file diff --git a/pkgs/applications/misc/inspectrum/default.nix b/pkgs/applications/misc/inspectrum/default.nix index 6ec968ecc94..5097496d399 100644 --- a/pkgs/applications/misc/inspectrum/default.nix +++ b/pkgs/applications/misc/inspectrum/default.nix @@ -10,14 +10,13 @@ }: stdenv.mkDerivation rec { - name = "inspectrum-${version}"; - version = "20170218"; + name = "inspectrum-unstable-2017-05-31"; src = fetchFromGitHub { owner = "miek"; repo = "inspectrum"; - rev = "d8d1969a4cceeee0ebfd2f39e791fddd5155d4de"; - sha256 = "05sarfin9wqkvgwn3fil1r4bay03cwzzhjwbdjslibc5chdrr2cn"; + rev = "a89d1337efb31673ccb6a6681bb89c21894c76f7"; + sha256 = "1fvnr8gca25i6s9mg9b2hyqs0zzr4jicw13mimc9dhrgxklrr1yv"; }; buildInputs = [ diff --git a/pkgs/applications/networking/instant-messengers/qtox/default.nix b/pkgs/applications/networking/instant-messengers/qtox/default.nix index bb5e26f3310..d1773456df2 100644 --- a/pkgs/applications/networking/instant-messengers/qtox/default.nix +++ b/pkgs/applications/networking/instant-messengers/qtox/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { name = "qtox-${version}"; - version = "1.10.1"; + version = "1.10.2"; src = fetchFromGitHub { owner = "tux3"; repo = "qTox"; rev = "v${version}"; - sha256 = "1c5y7fwhsq1f6z8208xl1jd6bl1r6k8g0fjqxf0z10373c9395jq"; + sha256 = "0c2633rc9l73q9qs9hybn11hmlqbwsvih3sf6jk1jp4151k5wp1y"; }; buildInputs = [ diff --git a/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix b/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix index aa89e802cb2..9bad366b8ef 100644 --- a/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix +++ b/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix @@ -4,7 +4,7 @@ let - version = "5.2.0.1"; + version = "5.3.0.1"; rpath = stdenv.lib.makeLibraryPath [ alsaLib @@ -24,7 +24,7 @@ let gnome2.pango gnome2.gnome_keyring - + libnotify nspr nss @@ -49,8 +49,8 @@ let src = if stdenv.system == "x86_64-linux" then fetchurl { - url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_5.2.0.1_amd64.deb"; - sha256 = "1dwyj5wm2amkysbnzxsskq6sl7rbqggm6n4sabnq7wd5xnbq4i06"; + url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"; + sha256 = "08sf9nqnznsydw4965w7ixwwba54hjc02ga7vcnz9vpx5hln3nrz"; } else throw "Skype for linux is not supported on ${stdenv.system}"; diff --git a/pkgs/applications/networking/instant-messengers/slack/default.nix b/pkgs/applications/networking/instant-messengers/slack/default.nix index c0d50a86c71..edd66bd900b 100644 --- a/pkgs/applications/networking/instant-messengers/slack/default.nix +++ b/pkgs/applications/networking/instant-messengers/slack/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, dpkg -, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib, gnome2 -, libnotify, nspr, nss, systemd, xorg }: +, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib +, gnome2, libnotify, libxcb, nspr, nss, systemd, xorg }: let - version = "2.5.2"; + version = "2.6.2"; rpath = stdenv.lib.makeLibraryPath [ alsaLib @@ -22,6 +22,7 @@ let gnome2.gtk gnome2.pango libnotify + libxcb nspr nss stdenv.cc.cc @@ -45,7 +46,7 @@ let if stdenv.system == "x86_64-linux" then fetchurl { url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb"; - sha256 = "0mg8js18lnnwyvqksrhpym7d04bin16bh7sdmxbm36iijb9ajxmi"; + sha256 = "01zdzzpnv8qpmcpy6h9x7izrnwm0y015j5p5rnjwx8ki712wnmm8"; } else throw "Slack is not supported on ${stdenv.system}"; diff --git a/pkgs/applications/networking/insync/default.nix b/pkgs/applications/networking/insync/default.nix index 7beb489178b..5690705d1f2 100644 --- a/pkgs/applications/networking/insync/default.nix +++ b/pkgs/applications/networking/insync/default.nix @@ -3,10 +3,14 @@ stdenv.mkDerivation rec { name = "insync-${version}"; version = "1.3.16.36155"; - src = fetchurl { - url = "http://s.insynchq.com/builds/insync-portable_${version}_amd64.tar.bz2"; - sha256 = "1gf1qg7mkbcgqhwxkiljmd1w2zvarq6vhxhips3w06bqdyg12210"; - }; + src = + if stdenv.system == "x86_64-linux" then + fetchurl { + url = "http://s.insynchq.com/builds/insync-portable_${version}_amd64.tar.bz2"; + sha256 = "1gf1qg7mkbcgqhwxkiljmd1w2zvarq6vhxhips3w06bqdyg12210"; + } + else + throw "${name} is not supported on ${stdenv.system}"; buildInputs = [ makeWrapper ]; diff --git a/pkgs/applications/networking/mailreaders/neomutt/default.nix b/pkgs/applications/networking/mailreaders/neomutt/default.nix index ad2f6e7b3ca..d9ec66a53e7 100644 --- a/pkgs/applications/networking/mailreaders/neomutt/default.nix +++ b/pkgs/applications/networking/mailreaders/neomutt/default.nix @@ -1,21 +1,29 @@ { stdenv, fetchFromGitHub, which, autoreconfHook, ncurses, perl -, cyrus_sasl, gdbm, gpgme, kerberos, libidn, notmuch, openssl, lmdb }: +, cyrus_sasl, gdbm, gpgme, kerberos, libidn, notmuch, openssl, lmdb, libxslt, docbook_xsl }: stdenv.mkDerivation rec { - version = "20170428"; + version = "20170602"; name = "neomutt-${version}"; src = fetchFromGitHub { owner = "neomutt"; repo = "neomutt"; rev = "neomutt-${version}"; - sha256 = "1p6214agfv9plskkzalh03r5naiiyg1habrnknnjgck3nypb78ik"; + sha256 = "0rpvxmv10ypl7la4nmp0s02ixmm9g5pn9g9ms8ygzsix9pa86w45"; }; - nativeBuildInputs = [ which autoreconfHook ]; - buildInputs = - [ cyrus_sasl gdbm gpgme kerberos libidn ncurses - notmuch openssl perl lmdb ]; + nativeBuildInputs = [ autoreconfHook docbook_xsl libxslt.bin which ]; + buildInputs = [ + cyrus_sasl gdbm gpgme kerberos libidn ncurses + notmuch openssl perl lmdb + ]; + + postPatch = '' + for f in doc/*.xsl ; do + substituteInPlace $f \ + --replace http://docbook.sourceforge.net/release/xsl/current ${docbook_xsl}/share/xml/docbook-xsl + done + ''; configureFlags = [ "--enable-debug" @@ -46,6 +54,8 @@ stdenv.mkDerivation rec { configureScript = "./prepare"; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "A small but very powerful text-based mail client"; homepage = http://www.neomutt.org; diff --git a/pkgs/applications/networking/resilio-sync/default.nix b/pkgs/applications/networking/resilio-sync/default.nix new file mode 100644 index 00000000000..7622cb76ad2 --- /dev/null +++ b/pkgs/applications/networking/resilio-sync/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, ... }: + +let + arch = { + "x86_64-linux" = "x64"; + "i686-linux" = "i386"; + }.${stdenv.system}; + libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ]; + +in stdenv.mkDerivation rec { + name = "resilio-sync-${version}"; + version = "2.5.2"; + + src = fetchurl { + url = "https://download-cdn.resilio.com/${version}/linux-${arch}/resilio-sync_${arch}.tar.gz"; + sha256 = { + "x86_64-linux" = "15gji5zqs1py92bpwvvq0r1spl0yynbrsnh4ajphwq17bqys3192"; + "i686-linux" = "1y67bd63b95va7g2676rgp2clvcy09pnmivy00r2w46y7kwwwbj8"; + }.${stdenv.system}; + }; + + dontStrip = true; # Don't strip, otherwise patching the rpaths breaks + sourceRoot = "."; + + installPhase = '' + install -D rslsync "$out/bin/rslsync" + patchelf \ + --interpreter "$(< $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath ${libPath} "$out/bin/rslsync" + ''; + + meta = with stdenv.lib; { + description = "Automatically sync files via secure, distributed technology"; + homepage = https://www.resilio.com/; + license = licenses.unfreeRedistributable; + platforms = platforms.linux; + maintainers = with maintainers; [ domenkozar thoughtpolice cwoac ]; + }; +} diff --git a/pkgs/applications/science/chemistry/pymol/default.nix b/pkgs/applications/science/chemistry/pymol/default.nix index af0c2e85549..ed208014f7d 100644 --- a/pkgs/applications/science/chemistry/pymol/default.nix +++ b/pkgs/applications/science/chemistry/pymol/default.nix @@ -1,24 +1,50 @@ -{ stdenv, fetchurl, python27Packages, glew, freeglut, libpng, libxml2, tk, freetype }: +{ stdenv, fetchurl, makeDesktopItem +, python3, python3Packages +, glew, freeglut, libpng, libxml2, tk, freetype }: + + +with stdenv.lib; let - version = "1.8.4.0"; + pname = "pymol"; + ver_maj = "1.8"; + ver_min = "4"; + version = "${ver_maj}.${ver_min}.0"; + description = "A Python-enhanced molecular graphics tool"; + + desktopItem = makeDesktopItem { + name = "${pname}"; + exec = "${pname}"; + desktopName = "PyMol Molecular Graphics System"; + genericName = "Molecular Modeller"; + comment = description; + mimeType = "chemical/x-pdb;chemical/x-mdl-molfile;chemical/x-mol2;chemical/seq-aa-fasta;chemical/seq-na-fasta;chemical/x-xyz;chemical/x-mdl-sdf;"; + categories = "Graphics;Education;Science;Chemistry;"; + }; in -python27Packages.buildPythonApplication { +python3Packages.buildPythonApplication { name = "pymol-${version}"; src = fetchurl { - url = "mirror://sourceforge/project/pymol/pymol/1.8/pymol-v1.8.4.0.tar.bz2"; + url = "mirror://sourceforge/project/pymol/pymol/${ver_maj}/pymol-v${version}.tar.bz2"; sha256 = "0yfj8g5yic9zz6f0bw2n8h6ifvgsn8qvhq84alixsi28wzppn55n"; }; - buildInputs = [ python27Packages.numpy glew freeglut libpng libxml2 tk freetype ]; + buildInputs = [ python3Packages.numpy glew freeglut libpng libxml2 tk freetype ]; NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2"; installPhase = '' python setup.py install --home=$out + cp -r ${desktopItem}/share/ $out/ + runHook postInstall ''; - meta = with stdenv.lib; { - description = "A Python-enhanced molecular graphics tool"; + postInstall = with python3Packages; '' + wrapProgram $out/bin/pymol \ + --prefix PYTHONPATH : ${makeSearchPathOutput "lib" python3.sitePackages [ Pmw tkinter ]} + ''; + + meta = { + description = description; homepage = "https://www.pymol.org/"; license = licenses.psfl; }; diff --git a/pkgs/applications/version-management/gitkraken/default.nix b/pkgs/applications/version-management/gitkraken/default.nix index 1404bd97599..23a3ab7fa5e 100644 --- a/pkgs/applications/version-management/gitkraken/default.nix +++ b/pkgs/applications/version-management/gitkraken/default.nix @@ -9,11 +9,11 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "gitkraken-${version}"; - version = "2.5.0"; + version = "2.6.0"; src = fetchurl { url = "https://release.gitkraken.com/linux/v${version}.deb"; - sha256 = "1in8caxsc8fld1sl6d9nzch86s9x0770qi6amh573zmb80yyd743"; + sha256 = "1msdwqp20pwaxv1a6maqb7wmaq00m8jpdga7fmbjcnpvkcdz49l7"; }; libPath = makeLibraryPath [ diff --git a/pkgs/applications/window-managers/i3/lock-color.nix b/pkgs/applications/window-managers/i3/lock-color.nix index aa4001f62de..ade6182ec7b 100644 --- a/pkgs/applications/window-managers/i3/lock-color.nix +++ b/pkgs/applications/window-managers/i3/lock-color.nix @@ -2,14 +2,14 @@ , xcbutilimage, pam, libX11, libev, cairo, libxkbcommon, libxkbfile }: stdenv.mkDerivation rec { - version = "2.7-2017-04-01"; + version = "2.9.1-c"; name = "i3lock-color-${version}"; src = fetchFromGitHub { owner = "chrjguill"; repo = "i3lock-color"; - rev = "61f6428aedbe4829d3e0f51d137283c8aec1e206"; - sha256 = "0h4nzx46kcsp6b1i2lm9y4d1w1icrpvjl8g1h3wbpa5x4crh4703"; + rev = version; + sha256 = "0qnw71qbppgp3ywj1k07av7wkl9syfb8j6izrkhj143q2ks4rkvl"; }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ which libxcb xcbutilkeysyms xcbutilimage pam libX11 diff --git a/pkgs/build-support/emacs/elpa2nix.el b/pkgs/build-support/emacs/elpa2nix.el index 7eef81b9e7a..64587c0fad1 100644 --- a/pkgs/build-support/emacs/elpa2nix.el +++ b/pkgs/build-support/emacs/elpa2nix.el @@ -28,3 +28,6 @@ The file can either be a tar file or an Emacs Lisp file." (insert-file-contents file)) (when is-tar (tar-mode)) (elpa2nix-install-from-buffer)))) + +;; Allow installing package tarfiles larger than 10MB +(setq large-file-warning-threshold nil) diff --git a/pkgs/build-support/fetchdarcs/default.nix b/pkgs/build-support/fetchdarcs/default.nix index c28cc35219c..2df1b136c55 100644 --- a/pkgs/build-support/fetchdarcs/default.nix +++ b/pkgs/build-support/fetchdarcs/default.nix @@ -7,7 +7,7 @@ if md5 != "" then else stdenv.mkDerivation { name = "fetchdarcs"; - SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; + NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; builder = ./builder.sh; buildInputs = [darcs]; diff --git a/pkgs/build-support/fetchgit/builder.sh b/pkgs/build-support/fetchgit/builder.sh index 4bbef1d6e62..6ae46469738 100644 --- a/pkgs/build-support/fetchgit/builder.sh +++ b/pkgs/build-support/fetchgit/builder.sh @@ -12,4 +12,5 @@ $SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \ ${fetchSubmodules:+--fetch-submodules} \ ${branchName:+--branch-name "$branchName"} +runHook postFetch stopNest diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index d85d2c893c5..a5f81ef1794 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -15,6 +15,9 @@ in , fetchSubmodules ? true, deepClone ? false , branchName ? null , name ? urlToName url rev +, # Shell code executed after the file has been fetched + # successfully. This can do things like check or transform the file. + postFetch ? "" }: /* NOTE: @@ -54,7 +57,7 @@ stdenv.mkDerivation { outputHashMode = "recursive"; outputHash = sha256; - inherit url rev leaveDotGit fetchSubmodules deepClone branchName; + inherit url rev leaveDotGit fetchSubmodules deepClone branchName postFetch; GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt"; diff --git a/pkgs/data/fonts/iosevka/default.nix b/pkgs/data/fonts/iosevka/default.nix index 5fde19e0128..10bc5787e40 100644 --- a/pkgs/data/fonts/iosevka/default.nix +++ b/pkgs/data/fonts/iosevka/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "iosevka-${version}"; - version = "1.12.5"; + version = "1.13.0"; buildInputs = [ unzip ]; src = fetchurl { url = "https://github.com/be5invis/Iosevka/releases/download/v${version}/iosevka-pack-${version}.zip"; - sha256 = "0s3g6mk0ngwsrw9h9dqinb50cd9i8zhqdcmmh93fhyf4d87yfwyi"; + sha256 = "03jc8a10177wk35gyp0n317azakyy5qzc6vbh331552asawckswr"; }; sourceRoot = "."; diff --git a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix index a955f5cf8a4..a527765688d 100644 --- a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix +++ b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchurl, ruby }: let @@ -10,6 +10,8 @@ let inherit sha256; }; + buildInputs = [ ruby ]; + dontBuild = true; installPhase = '' @@ -21,6 +23,9 @@ let # Backwards compatibility. Will remove eventually. mkdir -p $out/xml/xsl ln -s $dst $out/xml/xsl/docbook + + ln -sv $dst/epub/bin $out + chmod +x $out/bin/dbtoepub ''; meta = { diff --git a/pkgs/desktops/gnome-3/3.22/core/gnome-backgrounds/default.nix b/pkgs/desktops/gnome-3/3.22/core/gnome-backgrounds/default.nix index 32d6d6e7535..eb801caf565 100644 --- a/pkgs/desktops/gnome-3/3.22/core/gnome-backgrounds/default.nix +++ b/pkgs/desktops/gnome-3/3.22/core/gnome-backgrounds/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig intltool ]; meta = with stdenv.lib; { - platforms = platforms.linux; + platforms = platforms.unix; maintainers = gnome3.maintainers; }; } diff --git a/pkgs/development/compilers/binaryen/default.nix b/pkgs/development/compilers/binaryen/default.nix new file mode 100644 index 00000000000..31f5845cc86 --- /dev/null +++ b/pkgs/development/compilers/binaryen/default.nix @@ -0,0 +1,24 @@ +{ stdenv, cmake, fetchFromGitHub }: + +stdenv.mkDerivation rec { + version = "32"; + rev = "version_${version}"; + name = "binaryen-${version}"; + + src = fetchFromGitHub { + owner = "WebAssembly"; + repo = "binaryen"; + sha256 = "0zclw6pa2pkzrnp8ib9qwbjvq38r2h5ynfg8fjl99b5lcyz5m590"; + inherit rev; + }; + + nativeBuildInputs = [ cmake ]; + + meta = with stdenv.lib; { + homepage = https://github.com/WebAssembly/binaryen; + description = "Compiler infrastructure and toolchain library for WebAssembly, in C++"; + platforms = platforms.all; + maintainers = with maintainers; [ asppsa ]; + license = licenses.asl20; + }; +} diff --git a/pkgs/development/compilers/emscripten/default.nix b/pkgs/development/compilers/emscripten/default.nix index ad1cd437ffa..f118a11e419 100644 --- a/pkgs/development/compilers/emscripten/default.nix +++ b/pkgs/development/compilers/emscripten/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchFromGitHub, emscriptenfastcomp, python, nodejs, closurecompiler, jre }: +{ stdenv, fetchFromGitHub, emscriptenfastcomp, python, nodejs, closurecompiler +, jre, binaryen, enableWasm ? true +}: let rev = "1.37.10"; @@ -36,6 +38,9 @@ stdenv.mkDerivation { echo "COMPILER_ENGINE = NODE_JS" >> $out/${appdir}/config echo "CLOSURE_COMPILER = '${closurecompiler}/share/java/closure-compiler-v${closurecompiler.version}.jar'" >> $out/${appdir}/config echo "JAVA = '${jre}/bin/java'" >> $out/${appdir}/config + '' + + stdenv.lib.optionalString enableWasm '' + echo "BINARYEN_ROOT = '${binaryen}'" >> $out/share/emscripten/config ''; meta = with stdenv.lib; { diff --git a/pkgs/development/compilers/gambit/default.nix b/pkgs/development/compilers/gambit/default.nix index 99a4d6fc4d1..7e17cee9abd 100644 --- a/pkgs/development/compilers/gambit/default.nix +++ b/pkgs/development/compilers/gambit/default.nix @@ -1,16 +1,25 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, openssl }: stdenv.mkDerivation rec { name = "gambit-${version}"; - version = "4.8.5"; - devver = "4_8_5"; + version = "4.8.6"; + devver = "4_8_6"; src = fetchurl { url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${devver}-devel.tgz"; - sha256 = "02b5bm06k2qr0lvdwwsl0ygxs7n8410rrkq95picn4s02kxszqnq"; + sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl"; }; - configureFlags = [ "--enable-shared" "--enable-single-host" ]; + configureFlags = [ + "--enable-single-host" + "--enable-shared" + "--enable-absolute-shared-libs" + "--enable-c-opt=-O6" "--enable-gcc-opts" "--enable-inline-jumps" + "--enable-thread-system=posix" "--enable-dynamic-tls" + "--enable-openssl" + ]; + + buildInputs = [ openssl ]; meta = { description = "Optimizing Scheme to C compiler"; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix new file mode 100644 index 00000000000..a14fc0ce246 --- /dev/null +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -0,0 +1,551 @@ +{ stdenv, fetchurl, noSysDirs +, langC ? true, langCC ? true, langFortran ? false +, langObjC ? stdenv.isDarwin +, langObjCpp ? stdenv.isDarwin +, langJava ? false +, langAda ? false +, langVhdl ? false +, langGo ? false +, profiledCompiler ? false +, staticCompiler ? false +, enableShared ? true +, texinfo ? null +, perl ? null # optional, for texi2pod (then pod2man); required for Java +, gmp, mpfr, libmpc, gettext, which +, libelf # optional, for link-time optimizations (LTO) +, isl ? null # optional, for the Graphite optimization framework. +, zlib ? null, boehmgc ? null +, zip ? null, unzip ? null, pkgconfig ? null +, gtk2 ? null, libart_lgpl ? null +, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null +, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null +, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null +, x11Support ? langJava +, gnatboot ? null +, enableMultilib ? false +, enablePlugin ? true # whether to support user-supplied plug-ins +, name ? "gcc" +, cross ? null +, libcCross ? null +, crossStageStatic ? true +, gnat ? null +, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd +, stripped ? true +, gnused ? null +, binutils ? null +, cloog # unused; just for compat with gcc4, as we override the parameter on some places +, darwin ? null +, flex ? null +, buildPlatform, hostPlatform, targetPlatform +}: + +assert langJava -> zip != null && unzip != null + && zlib != null && boehmgc != null + && perl != null; # for `--enable-java-home' +assert langAda -> gnatboot != null; +assert langVhdl -> gnat != null; + +# LTO needs libelf and zlib. +assert libelf != null -> zlib != null; + +# Make sure we get GNU sed. +assert stdenv.isDarwin -> gnused != null; + +# Need c++filt on darwin +assert stdenv.isDarwin -> binutils != null; + +# The go frontend is written in c++ +assert langGo -> langCC; + +with stdenv.lib; +with builtins; + +let version = "7.1.0"; + + # Whether building a cross-compiler for GNU/Hurd. + crossGNU = cross != null && cross.config == "i586-pc-gnu"; + + enableParallelBuilding = true; + + patches = + [ ] + ++ optional (cross != null) ../libstdc++-target.patch + ++ optional noSysDirs ../no-sys-dirs.patch + # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its + # target libraries and tools. + ++ optional langAda ../gnat-cflags.patch + ++ optional langFortran ../gfortran-driving.patch; + + javaEcj = fetchurl { + # The `$(top_srcdir)/ecj.jar' file is automatically picked up at + # `configure' time. + + # XXX: Eventually we might want to take it from upstream. + url = "ftp://sourceware.org/pub/java/ecj-4.3.jar"; + sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx"; + }; + + # Antlr (optional) allows the Java `gjdoc' tool to be built. We want a + # binary distribution here to allow the whole chain to be bootstrapped. + javaAntlr = fetchurl { + url = http://www.antlr.org/download/antlr-4.4-complete.jar; + sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz"; + }; + + xlibs = [ + libX11 libXt libSM libICE libXtst libXrender libXrandr libXi + xproto renderproto xextproto inputproto randrproto + ]; + + javaAwtGtk = langJava && x11Support; + + /* Platform flags */ + platformFlags = let + gccArch = stdenv.platform.gcc.arch or null; + gccCpu = stdenv.platform.gcc.cpu or null; + gccAbi = stdenv.platform.gcc.abi or null; + gccFpu = stdenv.platform.gcc.fpu or null; + gccFloat = stdenv.platform.gcc.float or null; + gccMode = stdenv.platform.gcc.mode or null; + withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; + withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; + withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; + withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; + withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; + withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; + in + withArch + + withCpu + + withAbi + + withFpu + + withFloat + + withMode; + + /* Cross-gcc settings */ + crossMingw = cross != null && cross.libc == "msvcrt"; + crossDarwin = cross != null && cross.libc == "libSystem"; + crossConfigureFlags = let + gccArch = targetPlatform.gcc.arch or null; + gccCpu = targetPlatform.gcc.cpu or null; + gccAbi = targetPlatform.gcc.abi or null; + gccFpu = targetPlatform.gcc.fpu or null; + gccFloat = targetPlatform.gcc.float or null; + gccMode = targetPlatform.gcc.mode or null; + withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; + withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; + withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; + withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; + withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; + withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; + in + "--target=${cross.config}" + + withArch + + withCpu + + withAbi + + withFpu + + withFloat + + withMode + + # Ensure that -print-prog-name is able to find the correct programs. + " --with-as=${binutils}/bin/${cross.config}-as" + + " --with-ld=${binutils}/bin/${cross.config}-ld" + + (if crossMingw && crossStageStatic then + " --with-headers=${libcCross}/include" + + " --with-gcc" + + " --with-gnu-as" + + " --with-gnu-ld" + + " --with-gnu-ld" + + " --disable-shared" + + " --disable-nls" + + " --disable-debug" + + " --enable-sjlj-exceptions" + + " --enable-threads=win32" + + " --disable-win32-registry" + else if crossStageStatic then + " --disable-libssp --disable-nls" + + " --without-headers" + + " --disable-threads " + + " --disable-libgomp " + + " --disable-libquadmath" + + " --disable-shared" + + " --disable-libatomic " + # libatomic requires libc + " --disable-decimal-float" # libdecnumber requires libc + else + (if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot" + else " --with-headers=${getDev libcCross}/include") + + # Ensure that -print-prog-name is able to find the correct programs. + " --enable-__cxa_atexit" + + " --enable-long-long" + + (if crossMingw then + " --enable-threads=win32" + + " --enable-sjlj-exceptions" + + " --enable-hash-synchronization" + + " --disable-libssp" + + " --disable-nls" + + " --with-dwarf2" + + # I think noone uses shared gcc libs in mingw, so we better do the same. + # In any case, mingw32 g++ linking is broken by default with shared libs, + # unless adding "-lsupc++" to any linking command. I don't know why. + " --disable-shared" + + # To keep ABI compatibility with upstream mingw-w64 + " --enable-fully-dynamic-string" + else (if cross.libc == "uclibc" then + # libsanitizer requires netrom/netrom.h which is not + # available in uclibc. + " --disable-libsanitizer" + + # In uclibc cases, libgomp needs an additional '-ldl' + # and as I don't know how to pass it, I disable libgomp. + " --disable-libgomp" else "") + + " --enable-threads=posix" + + " --enable-nls" + + " --disable-decimal-float") # No final libdecnumber (it may work only in 386) + ); + stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; + crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; + + bootstrap = cross == null; + +in + +# We need all these X libraries when building AWT with GTK+. +assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == []; + +stdenv.mkDerivation ({ + name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon; + + builder = ../builder.sh; + + src = fetchurl { + url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.bz2"; + sha256 = "05xwps0ci7wgxh50askpa2r9p8518qxdgh6ad7pnyk7n6p13d0ca"; + }; + + inherit patches; + + outputs = [ "out" "lib" "man" "info" ]; + setOutputFlags = false; + NIX_NO_SELF_RPATH = true; + + libc_dev = stdenv.cc.libc_dev; + + hardeningDisable = [ "format" ]; + + postPatch = + if (stdenv.isHurd + || (libcCross != null # e.g., building `gcc.crossDrv' + && libcCross ? crossConfig + && libcCross.crossConfig == "i586-pc-gnu") + || (crossGNU && libcCross != null)) + then + # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not + # in glibc, so add the right `-I' flags to the default spec string. + assert libcCross != null -> libpthreadCross != null; + let + libc = if libcCross != null then libcCross else stdenv.glibc; + gnu_h = "gcc/config/gnu.h"; + extraCPPDeps = + libc.propagatedBuildInputs + ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross + ++ stdenv.lib.optional (libpthread != null) libpthread; + extraCPPSpec = + concatStrings (intersperse " " + (map (x: "-I${x.dev or x}/include") extraCPPDeps)); + extraLibSpec = + if libpthreadCross != null + then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" + else "-L${libpthread}/lib"; + in + '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." + sed -i "${gnu_h}" \ + -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' + + echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." + sed -i "${gnu_h}" \ + -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' + + echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." + sed -i "${gnu_h}" \ + -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' + '' + else if cross != null || stdenv.cc.libc != null then + # On NixOS, use the right path to the dynamic linker instead of + # `/lib/ld*.so'. + let + libc = if libcCross != null then libcCross else stdenv.cc.libc; + in + '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..." + for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h + do + grep -q LIBC_DYNAMIC_LINKER "$header" || continue + echo " fixing \`$header'..." + sed -i "$header" \ + -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' + done + '' + else null; + + inherit noSysDirs staticCompiler langJava crossStageStatic + libcCross crossMingw; + + nativeBuildInputs = [ texinfo which gettext ] + ++ (optional (perl != null) perl) + ++ (optional javaAwtGtk pkgconfig); + + buildInputs = [ gmp mpfr libmpc libelf flex ] + ++ (optional (isl != null) isl) + ++ (optional (zlib != null) zlib) + ++ (optionals langJava [ boehmgc zip unzip ]) + ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) + ++ (optionals (cross != null) [binutils]) + ++ (optionals langAda [gnatboot]) + ++ (optionals langVhdl [gnat]) + + # The builder relies on GNU sed (for instance, Darwin's `sed' fails with + # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. + ++ (optional stdenv.isDarwin gnused) + ++ (optional stdenv.isDarwin binutils) + ; + + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; + + preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) '' + export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` + export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" + export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" + export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" + ''; + + dontDisableStatic = true; + + configureFlags = " + ${if stdenv.isSunOS then + " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " + + # On Illumos/Solaris GNU as is preferred + " --with-gnu-as --without-gnu-ld " + else ""} + --enable-lto + ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"} + ${if enableShared then "" else "--disable-shared"} + ${if enablePlugin then "--enable-plugin" else "--disable-plugin"} + ${optionalString (isl != null) "--with-isl=${isl}"} + ${if langJava then + "--with-ecj-jar=${javaEcj} " + + + # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See + # . + "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " + else ""} + ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} + ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} + --with-gmp-include=${gmp.dev}/include + --with-gmp-lib=${gmp.out}/lib + --with-mpfr-include=${mpfr.dev}/include + --with-mpfr-lib=${mpfr.out}/lib + --with-mpc=${libmpc} + ${if libelf != null then "--with-libelf=${libelf}" else ""} + --disable-libstdcxx-pch + --without-included-gettext + --with-system-zlib + --enable-static + --enable-languages=${ + concatStrings (intersperse "," + ( optional langC "c" + ++ optional langCC "c++" + ++ optional langFortran "fortran" + ++ optional langJava "java" + ++ optional langAda "ada" + ++ optional langVhdl "vhdl" + ++ optional langGo "go" + ++ optional langObjC "objc" + ++ optional langObjCpp "obj-c++" + ++ optionals crossDarwin [ "objc" "obj-c++" ] + ) + ) + } + ${if cross == null + then if stdenv.isDarwin + then " --with-native-system-header-dir=${darwin.usr-include}" + else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include" + else ""} + ${if langAda then " --enable-libada" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} + ${if cross != null then crossConfigureFlags else ""} + ${if !bootstrap then "--disable-bootstrap" else ""} + ${if cross == null then platformFlags else ""} + "; + + targetConfig = if cross != null then cross.config else null; + + buildFlags = if bootstrap then + (if profiledCompiler then "profiledbootstrap" else "bootstrap") + else ""; + + installTargets = + if stripped + then "install-strip" + else "install"; + + crossAttrs = let + xgccArch = targetPlatform.gcc.arch or null; + xgccCpu = targetPlatform.gcc.cpu or null; + xgccAbi = targetPlatform.gcc.abi or null; + xgccFpu = targetPlatform.gcc.fpu or null; + xgccFloat = targetPlatform.gcc.float or null; + xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; + xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; + xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; + xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; + xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else ""; + in { + AR = "${targetPlatform.config}-ar"; + LD = "${targetPlatform.config}-ld"; + CC = "${targetPlatform.config}-gcc"; + CXX = "${targetPlatform.config}-gcc"; + AR_FOR_TARGET = "${targetPlatform.config}-ar"; + LD_FOR_TARGET = "${targetPlatform.config}-ld"; + CC_FOR_TARGET = "${targetPlatform.config}-gcc"; + NM_FOR_TARGET = "${targetPlatform.config}-nm"; + CXX_FOR_TARGET = "${targetPlatform.config}-g++"; + # If we are making a cross compiler, cross != null + NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else ""; + dontStrip = true; + configureFlags = '' + ${if enableMultilib then "" else "--disable-multilib"} + ${if enableShared then "" else "--disable-shared"} + ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} + ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} + ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} + --with-gmp=${gmp.crossDrv} + --with-mpfr=${mpfr.crossDrv} + --with-mpc=${libmpc.crossDrv} + --disable-libstdcxx-pch + --without-included-gettext + --with-system-zlib + --enable-languages=${ + concatStrings (intersperse "," + ( optional langC "c" + ++ optional langCC "c++" + ++ optional langFortran "fortran" + ++ optional langJava "java" + ++ optional langAda "ada" + ++ optional langVhdl "vhdl" + ++ optional langGo "go" + ) + ) + } + ${if langAda then " --enable-libada" else ""} + --target=${targetPlatform.config} + ${xwithArch} + ${xwithCpu} + ${xwithAbi} + ${xwithFpu} + ${xwithFloat} + ''; + buildFlags = ""; + }; + + + # Needed for the cross compilation to work + AR = "ar"; + LD = "ld"; + # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 + CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc"; + + # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find + # the library headers and binaries, regarless of the language being + # compiled. + + # Note: When building the Java AWT GTK+ peer, the build system doesn't + # honor `--with-gmp' et al., e.g., when building + # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just + # add them to $CPATH and $LIBRARY_PATH in this case. + # + # Likewise, the LTO code doesn't find zlib. + + CPATH = makeSearchPathOutput "dev" "include" ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread + ++ optional (libpthreadCross != null) libpthreadCross + + # On GNU/Hurd glibc refers to Mach & Hurd + # headers. + ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs") + libcCross.propagatedBuildInputs); + + LIBRARY_PATH = makeLibraryPath ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread); + + EXTRA_TARGET_CFLAGS = + if cross != null && libcCross != null then [ + "-idirafter ${getDev libcCross}/include" + ] + ++ optionals (! crossStageStatic) [ + "-B${libcCross.out}/lib" + ] + else null; + + EXTRA_TARGET_LDFLAGS = + if cross != null && libcCross != null then [ + "-Wl,-L${libcCross.out}/lib" + ] + ++ (if crossStageStatic then [ + "-B${libcCross.out}/lib" + ] else [ + "-Wl,-rpath,${libcCross.out}/lib" + "-Wl,-rpath-link,${libcCross.out}/lib" + ]) + ++ optionals (libpthreadCross != null) [ + "-L${libpthreadCross}/lib" + "-Wl,${libpthreadCross.TARGET_LDFLAGS}" + ] + else null; + + passthru = + { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; }; + + inherit enableParallelBuilding enableMultilib; + + inherit (stdenv) is64bit; + + meta = { + homepage = http://gcc.gnu.org/; + license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+ + description = "GNU Compiler Collection, version ${version}" + + (if stripped then "" else " (with debugging info)"); + + longDescription = '' + The GNU Compiler Collection includes compiler front ends for C, C++, + Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well + as libraries for these languages (libstdc++, libgcj, libgomp,...). + + GCC development is a part of the GNU Project, aiming to improve the + compiler used in the GNU system including the GNU/Linux variant. + ''; + + maintainers = with stdenv.lib.maintainers; [ ]; + + # gnatboot is not available out of linux platforms, so we disable the darwin build + # for the gnat (ada compiler). + platforms = + stdenv.lib.platforms.linux ++ + stdenv.lib.platforms.freebsd ++ + optionals (langAda == false) stdenv.lib.platforms.darwin; + }; +} + +// optionalAttrs (cross != null && cross.libc == "msvcrt" && crossStageStatic) { + makeFlags = [ "all-gcc" "all-target-libgcc" ]; + installTargets = "install-gcc install-target-libgcc"; +} + +# Strip kills static libs of other archs (hence cross != null) +// optionalAttrs (!stripped || cross != null) { dontStrip = true; NIX_STRIP_DEBUG = 0; } + +// optionalAttrs (enableMultilib) { dontMoveLib64 = true; } +) diff --git a/pkgs/development/compilers/gerbil/default.nix b/pkgs/development/compilers/gerbil/default.nix new file mode 100644 index 00000000000..1bffd1bd1c8 --- /dev/null +++ b/pkgs/development/compilers/gerbil/default.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchurl, fetchgit, gambit, openssl, zlib, coreutils, rsync, bash }: + +stdenv.mkDerivation rec { + name = "gerbil-${version}"; + + version = "0.10"; + src = fetchurl { + url = "https://github.com/vyzo/gerbil/archive/v${version}.tar.gz"; + sha256 = "14wzdnifr99g1mvm2xwks97nhaq62hfx43pxcw9gs647i7cymbly"; + }; + + buildInputs = [ gambit openssl zlib coreutils rsync bash ]; + + postPatch = '' + patchShebangs . + + find . -type f -executable -print0 | while IFS= read -r -d ''$'\0' f; do + substituteInPlace "$f" --replace '#!/usr/bin/env' '#!${coreutils}/bin/env' + done + ''; + + buildPhase = '' + runHook preBuild + ( cd src && sh build.sh ) + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/ + cp -fa bin lib etc doc $out/ + + cat > $out/bin/gxi < + #include + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++#include ++#endif + #include + #include + #include +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c +index 489c9f5..f8278ad 100644 +--- a/src/wl/sys/wl_linux.c ++++ b/src/wl/sys/wl_linux.c +@@ -117,6 +117,9 @@ int wl_found = 0; + + typedef struct priv_link { + wl_if_t *wlif; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++ unsigned long last_rx; ++#endif + } priv_link_t; + + #define WL_DEV_IF(dev) ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif) +@@ -2450,6 +2453,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) + { + struct sk_buff *oskb = (struct sk_buff *)p; + struct sk_buff *skb; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++ priv_link_t *priv_link; ++#endif + uchar *pdata; + uint len; + +@@ -2916,7 +2922,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) + if (skb == NULL) return; + + skb->dev = wl->monitor_dev; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++ priv_link = MALLOC(wl->osh, sizeof(priv_link_t)); ++ priv_link = netdev_priv(skb->dev); ++ priv_link->last_rx = jiffies; ++#else + skb->dev->last_rx = jiffies; ++#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) + skb_reset_mac_header(skb); + #else diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index e7c101918ac..ed0e0849721 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -12,6 +12,14 @@ stdenv.mkDerivation rec { sha256 = "1h3f9nkc5fkvks6va0maq377m9qxnsf4q3f2dc14rdzfvnzidy06"; }; + patches = [ + (fetchpatch { + # Sysdig fails to run on linux kernels with unified cgroups enabled + url = https://github.com/draios/sysdig/files/909689/0001-Fix-for-linux-kernels-with-cgroup-v2-API-enabled.patch.txt; + sha256 = "10nmisifa500hzpa3899rs837bcal72pnqidxmrnr1js187z8j84"; + }) + ]; + buildInputs = [ cmake zlib luajit ncurses perl jsoncpp libb64 openssl curl jq gcc ]; diff --git a/pkgs/os-specific/linux/tomb/default.nix b/pkgs/os-specific/linux/tomb/default.nix index 141af86a337..f1347c197bf 100644 --- a/pkgs/os-specific/linux/tomb/default.nix +++ b/pkgs/os-specific/linux/tomb/default.nix @@ -1,18 +1,23 @@ -{ stdenv, fetchurl, zsh, pinentry, cryptsetup, gnupg1orig, makeWrapper }: - -let - version = "2.4"; -in +{ stdenv, lib, fetchFromGitHub, gettext, zsh, pinentry, cryptsetup, gnupg, makeWrapper }: stdenv.mkDerivation rec { name = "tomb-${version}"; + version = "2.4"; - src = fetchurl { - url = "https://files.dyne.org/tomb/Tomb-${version}.tar.gz"; - sha256 = "1hv1w79as7swqj0n137vz8n8mwvcgwlvd91sdyssz41jarg7f1vr"; + src = fetchFromGitHub { + owner = "dyne"; + repo = "Tomb"; + rev = "v${version}"; + sha256 = "192jpgn02mvi4d4inbq2q11zl7xw6njymvali7al8wmygkkycrw4"; }; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; + + postPatch = '' + # if not, it shows .tomb-wrapped when running + substituteInPlace tomb \ + --replace 'TOMBEXEC=$0' 'TOMBEXEC=tomb' + ''; buildPhase = '' # manually patch the interpreter @@ -20,22 +25,21 @@ stdenv.mkDerivation rec { ''; installPhase = '' - mkdir -p $out/bin - mkdir -p $out/share/man/man1 + install -Dm755 tomb $out/bin/tomb + install -Dm644 doc/tomb.1 $out/share/man/man1/tomb.1 - cp tomb $out/bin/tomb - cp doc/tomb.1 $out/share/man/man1 + # it works fine with gnupg v2, but it looks for an executable named gpg + ln -s ${gnupg}/bin/gpg2 $out/bin/gpg wrapProgram $out/bin/tomb \ - --prefix PATH : "${pinentry}/bin" \ - --prefix PATH : "${cryptsetup}/bin" \ - --prefix PATH : "${gnupg1orig}/bin" + --prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext pinentry ]} ''; - meta = { + meta = with stdenv.lib; { description = "File encryption on GNU/Linux"; - homepage = https://www.dyne.org/software/tomb/; - license = stdenv.lib.licenses.gpl3; - platforms = stdenv.lib.platforms.linux; + homepage = https://www.dyne.org/software/tomb/; + license = licenses.gpl3; + maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.linux; }; } diff --git a/pkgs/os-specific/linux/wireguard/default.nix b/pkgs/os-specific/linux/wireguard/default.nix index 10c84948a49..696166f3947 100644 --- a/pkgs/os-specific/linux/wireguard/default.nix +++ b/pkgs/os-specific/linux/wireguard/default.nix @@ -6,11 +6,11 @@ assert kernel != null -> stdenv.lib.versionAtLeast kernel.version "3.10"; let name = "wireguard-${version}"; - version = "0.0.20170517"; + version = "0.0.20170531"; src = fetchurl { url = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${version}.tar.xz"; - sha256 = "7303e973654a3585039f4789e89a562f807f0d6010c7787b9b69ca72aa7a6908"; + sha256 = "1k6asxx7qzmxasvdwkvlalvav643fqfbndv80vjkbjqxy6mdkdrf"; }; meta = with stdenv.lib; { diff --git a/pkgs/servers/dex/default.nix b/pkgs/servers/dex/default.nix new file mode 100644 index 00000000000..119d5f03f62 --- /dev/null +++ b/pkgs/servers/dex/default.nix @@ -0,0 +1,32 @@ +{ lib, buildGoPackage, fetchFromGitHub }: + +let version = "2.4.1"; in + +buildGoPackage rec { + name = "dex-${version}"; + + goPackagePath = "github.com/coreos/dex"; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "coreos"; + repo = "dex"; + sha256 = "11qpn3wh74mq16xgl9l50n2v02ffqcd14xccf77j5il04xr764nx"; + }; + + subPackages = [ + "cmd/dex" + ]; + + buildFlagsArray = [ + "-ldflags=-w -X ${goPackagePath}/version.Version=${src.rev}" + ]; + + meta = { + description = "OpenID Connect and OAuth2 identity provider with pluggable connectors"; + license = lib.licenses.asl20; + homepage = https://github.com/coreos/dex; + maintainers = with lib.maintainers; [benley]; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/servers/search/groonga/default.nix b/pkgs/servers/search/groonga/default.nix index e71c570f736..500913b5eec 100644 --- a/pkgs/servers/search/groonga/default.nix +++ b/pkgs/servers/search/groonga/default.nix @@ -7,11 +7,11 @@ stdenv.mkDerivation rec { name = "groonga-${version}"; - version = "7.0.0"; + version = "7.0.3"; src = fetchurl { url = "http://packages.groonga.org/source/groonga/${name}.tar.gz"; - sha256 = "0c3vzw2ias0xpz1hwywlib1qqfjvvzwj1zggswd5l2cj87f1krfd"; + sha256 = "17pp4sbfa6wpiiiqvdbnvd1qxrchmj7zh27zdrmmnbvwpyc5g2n6"; }; buildInputs = with stdenv.lib; diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix index 36d6fc3a62d..f871e6adf2b 100644 --- a/pkgs/servers/uwsgi/default.nix +++ b/pkgs/servers/uwsgi/default.nix @@ -34,7 +34,7 @@ let pythonPlugin = pkg : lib.nameValuePair "python${if pkg ? isPy2 then "2" else # usage: https://uwsgi-docs.readthedocs.io/en/latest/PHP.html#running-php-apps-with-nginx path = "plugins/php"; preBuild = "touch unix.h"; - inputs = [ php-embed php-embed.nativeBuildInputs ]; + inputs = [ php-embed ] ++ php-embed.buildInputs; }) ]; diff --git a/pkgs/tools/misc/patdiff/default.nix b/pkgs/tools/misc/patdiff/default.nix index 6e3c635f87a..908da587d4b 100644 --- a/pkgs/tools/misc/patdiff/default.nix +++ b/pkgs/tools/misc/patdiff/default.nix @@ -8,6 +8,5 @@ janePackage { buildInputs = [ core_extended expect_test_helpers patience_diff ocaml_pcre ]; meta = { description = "File Diff using the Patience Diff algorithm"; - inherit (core_extended.meta) platforms; }; } diff --git a/pkgs/tools/misc/qt5ct/default.nix b/pkgs/tools/misc/qt5ct/default.nix index 4377b386d85..dd62fe461c6 100644 --- a/pkgs/tools/misc/qt5ct/default.nix +++ b/pkgs/tools/misc/qt5ct/default.nix @@ -1,17 +1,18 @@ -{stdenv, fetchurl, qtbase, qtsvg, qttools, qmakeHook, makeQtWrapper}: +{ stdenv, fetchurl, qtbase, qtsvg, qttools, qmakeHook, makeQtWrapper }: stdenv.mkDerivation rec { name = "qt5ct-${version}"; - version = "0.30"; + version = "0.32"; src = fetchurl { url = "mirror://sourceforge/qt5ct/qt5ct-${version}.tar.bz2"; - sha256 = "1k0ywd440qvf84chadjb4fnkn8dkfl56cc3a6wqg6a59drslvng6"; + sha256 = "0gzmqx6j8g8vgdg5sazfw31h825jdsjbkj8lk167msvahxgrf0fm"; }; - buildInputs = [ qtbase qtsvg ]; nativeBuildInputs = [ makeQtWrapper qmakeHook qttools ]; + buildInputs = [ qtbase qtsvg ]; + preConfigure = '' qmakeFlags="$qmakeFlags PLUGINDIR=$out/lib/qt5/plugins" ''; diff --git a/pkgs/tools/misc/tmuxp/default.nix b/pkgs/tools/misc/tmuxp/default.nix index c254490555c..03950d601d0 100644 --- a/pkgs/tools/misc/tmuxp/default.nix +++ b/pkgs/tools/misc/tmuxp/default.nix @@ -2,17 +2,17 @@ pythonPackages.buildPythonApplication rec { name = "tmuxp-${version}"; - version = "1.2.7"; + version = "1.3.1"; namePrefix = ""; src = fetchurl { url = "mirror://pypi/t/tmuxp/${name}.tar.gz"; - sha256 = "19s17frgyjvyvmr16fs0gl5mnbaxbmdffmkckadwhd5mg0pz2i4s"; + sha256 = "189mxnb2pxj3wjijn56j8y5x1r23fil00fn2q7d6bd13vgr0f85s"; }; patchPhase = '' - sed -i 's/==.*$//' requirements/test.txt + sed -i 's/==.*$//' requirements/base.txt requirements/test.txt ''; buildInputs = with pythonPackages; [ diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix index 40fc72a0d71..77308ecf2ed 100644 --- a/pkgs/tools/misc/trash-cli/default.nix +++ b/pkgs/tools/misc/trash-cli/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, coreutils +{ stdenv, fetchFromGitHub, fetchpatch, coreutils , python3, python3Packages, substituteAll }: assert stdenv.isLinux; @@ -21,6 +21,12 @@ python3Packages.buildPythonApplication rec { df = "${coreutils}/bin/df"; libc = "${stdenv.cc.libc.out}/lib/libc.so.6"; }) + + # Fix build on Python 3.6. + (fetchpatch { + url = "https://github.com/andreafrancia/trash-cli/commit/a21b80d1e69783bb09376c3f60dd2f2a10578805.patch"; + sha256 = "0w49rjh433sjfc2cl5a9wlbr6kcn9f1qg905qsyv7ay3ar75wvyp"; + }) ]; buildInputs = with python3Packages; [ nose mock ]; diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix index 1acf0e65dea..853f644634d 100644 --- a/pkgs/tools/misc/youtube-dl/default.nix +++ b/pkgs/tools/misc/youtube-dl/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, buildPythonApplication -, zip, ffmpeg, rtmpdump, atomicparsley, pandoc +, zip, ffmpeg, rtmpdump, atomicparsley, pycryptodome, pandoc # Pandoc is required to build the package's man page. Release tarballs contain a # formatted man page already, though, it will still be installed. We keep the # manpage argument in place in case someone wants to use this derivation to @@ -8,21 +8,23 @@ , generateManPage ? false , ffmpegSupport ? true , rtmpSupport ? true +, hlsEncryptedSupport ? true , makeWrapper }: with stdenv.lib; buildPythonApplication rec { name = "youtube-dl-${version}"; - version = "2017.05.23"; + version = "2017.05.29"; src = fetchurl { url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz"; - sha256 = "1na2ccja8p18i3ypf7vjrxlh653906746l966fwm06b5q6867iwd"; + sha256 = "11zh0h4hwwx39iv6qbkqbvf5a5mgj71ngj2kp7zmq7g0qh37x9rx"; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ zip ] ++ optional generateManPage pandoc; + propagatedBuildInputs = optional hlsEncryptedSupport pycryptodome; # Ensure ffmpeg is available in $PATH for post-processing & transcoding support. # rtmpdump is required to download files over RTMP diff --git a/pkgs/tools/networking/dd-agent/default.nix b/pkgs/tools/networking/dd-agent/default.nix index 2556287570f..d1171a3c835 100644 --- a/pkgs/tools/networking/dd-agent/default.nix +++ b/pkgs/tools/networking/dd-agent/default.nix @@ -1,11 +1,5 @@ { stdenv, fetchFromGitHub, pythonPackages -, sysstat, unzip, makeWrapper -# We need extraBuildInputs as we want to be able to override this -# package with python packages _and_ have the produced binaries -# wrapper with their PYTHONPATH. This means overrideAttrs is not -# strong enough (it overrides too late), we need to call it -# beforehand. -, extraBuildInputs ? [ pythonPackages.psutil ] }: +, sysstat, unzip, makeWrapper }: let inherit (pythonPackages) python; docker_1_10 = pythonPackages.buildPythonPackage rec { @@ -32,42 +26,33 @@ let # due to flake8 doCheck = false; }; - version = "5.13.2"; - - integrations = fetchFromGitHub { - owner = "datadog"; - repo = "integrations-core"; - rev = version; - sha256 = "1nbjmkq0wdfndmx0qap69h2rkwkkb0632j87h9d3j99bykyav3y3"; - }; in stdenv.mkDerivation rec { + version = "5.11.2"; name = "dd-agent-${version}"; src = fetchFromGitHub { owner = "datadog"; repo = "dd-agent"; rev = version; - sha256 = "0x2bxi70l2yf0wi232qksvcscjdpjg8l7dmgg1286vqryyfazfjb"; + sha256 = "1iqxvgpsqibqw3vk79158l2pnb6y4pjhjp2d6724lm5rpz4825lx"; }; buildInputs = [ python unzip makeWrapper - pythonPackages.boto - docker_1_10 - pythonPackages.kazoo - pythonPackages.ntplib - pythonPackages.consul - pythonPackages.python-etcd - pythonPackages.pyyaml pythonPackages.requests + pythonPackages.psycopg2 + pythonPackages.psutil + pythonPackages.ntplib pythonPackages.simplejson - pythonPackages.supervisor - pythonPackages.tornado - pythonPackages.uptime - ] ++ extraBuildInputs; + pythonPackages.pyyaml + pythonPackages.pymongo_2_9_1 + pythonPackages.python-etcd + pythonPackages.consul + docker_1_10 + ]; propagatedBuildInputs = with pythonPackages; [ python tornado ]; buildCommand = '' @@ -82,24 +67,6 @@ in stdenv.mkDerivation rec { # Move out default conf.d so that /etc/dd-agent/conf.d is used mv $out/agent/conf.d $out/agent/conf.d-system - # Sometime between 5.11.2 and 5.13.2 datadog moved out all its - # checks into separate repository. Copy them back in so dd-agent - # service can easily pick and choose by copying out configs into - # its etc files. - mkdir -p $out/agent/checks.d - for i in ${toString integrations}/* # */ - do - if [ -f "$i/check.py" ]; then - if [ -f "$i/conf.yaml.default" -o -f "$i/conf.yaml.example" ]; then - local name=$(basename $i) - cp $i/check.py $out/agent/checks.d/$name.py - # Copy .default file first unless it doesn't exist then copy .default - cp $i/conf.yaml.default $out/agent/conf.d-system/$name.yaml &> /dev/null || \ - cp $i/conf.yaml.example $out/agent/conf.d-system/$name.yaml - fi - fi - done - cat > $out/bin/dd-jmxfetch <' >> systemd/pyutil.h - ''; + # Certain tests only run successfully on a machine w/ systemd. + doCheck = false; meta = { description = "Python module for native access to the systemd facilities"; @@ -28026,27 +27883,7 @@ EOF }; - uncertainties = buildPythonPackage rec { - name = "uncertainties-${version}"; - version = "3.0.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/u/uncertainties/${name}.tar.gz"; - sha256 = "de0765cac6911e5afa93ee941063a07b4a98dbd9c314c5eea4ab14bfff0054a4"; - }; - - buildInputs = with self; [ nose numpy ]; - - meta = { - homepage = "http://pythonhosted.org/uncertainties/"; - description = "Transparent calculations with uncertainties on the quantities involved (aka error propagation)"; - license = licenses.bsd3; - }; - - # No tests included - doCheck = false; - }; - + uncertainties = callPackage ../development/python-modules/uncertainties { }; funcy = buildPythonPackage rec { name = "funcy-1.6";