diff options
67 files changed, 1443 insertions, 279 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 3a7b23baaa7e1..2a3316b8d0183 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -1802,6 +1802,20 @@ addEnvHooks "$hostOffset" myBashFunction disabled or patched to work with PaX.</para></listitem> </varlistentry> + <varlistentry> + <term>autoPatchelfHook</term> + <listitem><para>This is a special setup hook which helps in packaging + proprietary software in that it automatically tries to find missing shared + library dependencies of ELF files. All packages within the + <envar>runtimeDependencies</envar> environment variable are unconditionally + added to executables, which is useful for programs that use + <citerefentry> + <refentrytitle>dlopen</refentrytitle> + <manvolnum>3</manvolnum> + </citerefentry> + to load libraries at runtime.</para></listitem> + </varlistentry> + </variablelist> </para> diff --git a/lib/lists.nix b/lib/lists.nix index f7e09040a5aa6..424d2c57f5563 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -464,8 +464,12 @@ rec { init = list: assert list != []; take (length list - 1) list; - /* FIXME(zimbatm) Not used anywhere - */ + /* return the image of the cross product of some lists by a function + + Example: + crossLists (x:y: "${toString x}${toString y}") [[1 2] [3 4]] + => [ "13" "14" "23" "24" ] + */ crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f]; diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 85e1e6171be7a..b73a2854c7829 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -449,6 +449,7 @@ mirrexagon = "Andrew Abbott <mirrexagon@mirrexagon.com>"; mjanczyk = "Marcin Janczyk <m@dragonvr.pl>"; mjp = "Mike Playle <mike@mythik.co.uk>"; # github = "MikePlayle"; + mkg = "Mark K Gardner <mkg@vt.edu>"; mlieberman85 = "Michael Lieberman <mlieberman85@gmail.com>"; mmahut = "Marek Mahut <marek.mahut@gmail.com>"; moaxcp = "John Mercier <moaxcp@gmail.com>"; @@ -699,6 +700,7 @@ tomberek = "Thomas Bereknyei <tomberek@gmail.com>"; tomsmeets = "Tom Smeets <tom@tsmeets.nl>"; travisbhartwell = "Travis B. Hartwell <nafai@travishartwell.net>"; + treemo = "Matthieu Chevrier <matthieu.chevrier@treemo.fr>"; trevorj = "Trevor Joynson <nix@trevor.joynson.io>"; trino = "Hubert Mühlhans <muehlhans.hubert@ekodia.de>"; tstrobel = "Thomas Strobel <4ZKTUB6TEP74PYJOPWIR013S2AV29YUBW5F9ZH2F4D5UMJUJ6S@hash.domains>"; diff --git a/nixos/default.nix b/nixos/default.nix index 0e45a1cd75e24..45da78e9261cc 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -9,8 +9,6 @@ let modules = [ configuration ]; }; - inherit (eval) pkgs; - # This is for `nixos-rebuild build-vm'. vmConfig = (import ./lib/eval-config.nix { inherit system; @@ -30,7 +28,7 @@ let in { - inherit (eval) config options; + inherit (eval) pkgs config options; system = eval.config.system.build.toplevel; diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix index c3e7ab9a666a4..e747fbc6755ca 100644 --- a/nixos/modules/misc/nixpkgs.nix +++ b/nixos/modules/misc/nixpkgs.nix @@ -3,6 +3,8 @@ with lib; let + cfg = config.nixpkgs; + isConfig = x: builtins.isAttrs x || lib.isFunction x; @@ -42,12 +44,51 @@ let merge = lib.mergeOneOption; }; - _pkgs = import ../../.. config.nixpkgs; + pkgsType = mkOptionType { + name = "nixpkgs"; + description = "An evaluation of Nixpkgs; the top level attribute set of packages"; + check = builtins.isAttrs; + }; in { options.nixpkgs = { + + pkgs = mkOption { + defaultText = literalExample + ''import "''${nixos}/.." { + inherit (config.nixpkgs) config overlays system; + } + ''; + default = import ../../.. { inherit (cfg) config overlays system; }; + type = pkgsType; + example = literalExample ''import <nixpkgs> {}''; + description = '' + This is the evaluation of Nixpkgs that will be provided to + all NixOS modules. Defining this option has the effect of + ignoring the other options that would otherwise be used to + evaluate Nixpkgs, because those are arguments to the default + value. The default value imports the Nixpkgs source files + relative to the location of this NixOS module, because + NixOS and Nixpkgs are distributed together for consistency, + so the <code>nixos</code> in the default value is in fact a + relative path. The <code>config</code>, <code>overlays</code> + and <code>system</code> come from this option's siblings. + + This option can be used by applications like NixOps to increase + the performance of evaluation, or to create packages that depend + on a container that should be built with the exact same evaluation + of Nixpkgs, for example. Applications like this should set + their default value using <code>lib.mkDefault</code>, so + user-provided configuration can override it without using + <code>lib</code>. + + Note that using a distinct version of Nixpkgs with NixOS may + be an unexpected source of problems. Use this option with care. + ''; + }; + config = mkOption { default = {}; example = literalExample @@ -59,6 +100,8 @@ in The configuration of the Nix Packages collection. (For details, see the Nixpkgs documentation.) It allows you to set package configuration options. + + Ignored when <code>nixpkgs.pkgs</code> is set. ''; }; @@ -82,6 +125,8 @@ in takes as an argument the <emphasis>original</emphasis> Nixpkgs. The first argument should be used for finding dependencies, and the second should be used for overriding recipes. + + Ignored when <code>nixpkgs.pkgs</code> is set. ''; }; @@ -93,14 +138,16 @@ in If unset, it defaults to the platform type of your host system. Specifying this option is useful when doing distributed multi-platform deployment, or when building virtual machines. + + Ignored when <code>nixpkgs.pkgs</code> is set. ''; }; }; config = { _module.args = { - pkgs = _pkgs; - pkgs_i686 = _pkgs.pkgsi686Linux; + pkgs = cfg.pkgs; + pkgs_i686 = cfg.pkgs.pkgsi686Linux; }; }; } diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 91dd0529d3c8f..c0c72f2bdb9dd 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -111,6 +111,7 @@ ./programs/wireshark.nix ./programs/xfs_quota.nix ./programs/xonsh.nix + ./programs/yabar.nix ./programs/zsh/oh-my-zsh.nix ./programs/zsh/zsh.nix ./programs/zsh/zsh-syntax-highlighting.nix diff --git a/nixos/modules/programs/yabar.nix b/nixos/modules/programs/yabar.nix new file mode 100644 index 0000000000000..a01083c3ace98 --- /dev/null +++ b/nixos/modules/programs/yabar.nix @@ -0,0 +1,149 @@ +{ lib, pkgs, config, ... }: + +with lib; + +let + cfg = config.programs.yabar; + + mapExtra = v: lib.concatStringsSep "\n" (mapAttrsToList ( + key: val: "${key} = ${if (isString val) then "\"${val}\"" else "${builtins.toString val}"};" + ) v); + + listKeys = r: concatStringsSep "," (map (n: "\"${n}\"") (attrNames r)); + + configFile = let + bars = mapAttrsToList ( + name: cfg: '' + ${name}: { + font: "${cfg.font}"; + position: "${cfg.position}"; + + ${mapExtra cfg.extra} + + block-list: [${listKeys cfg.indicators}] + + ${concatStringsSep "\n" (mapAttrsToList ( + name: cfg: '' + ${name}: { + exec: "${cfg.exec}"; + align: "${cfg.align}"; + ${mapExtra cfg.extra} + }; + '' + ) cfg.indicators)} + }; + '' + ) cfg.bars; + in pkgs.writeText "yabar.conf" '' + bar-list = [${listKeys cfg.bars}]; + ${concatStringsSep "\n" bars} + ''; +in + { + options.programs.yabar = { + enable = mkEnableOption "yabar"; + + package = mkOption { + default = pkgs.yabar; + example = literalExample "pkgs.yabar-unstable"; + type = types.package; + + description = '' + The package which contains the `yabar` binary. + + Nixpkgs provides the `yabar` and `yabar-unstable` + derivations since 18.03, so it's possible to choose. + ''; + }; + + bars = mkOption { + default = {}; + type = types.attrsOf(types.submodule { + options = { + font = mkOption { + default = "sans bold 9"; + example = "Droid Sans, FontAwesome Bold 9"; + type = types.string; + + description = '' + The font that will be used to draw the status bar. + ''; + }; + + position = mkOption { + default = "top"; + example = "bottom"; + type = types.enum [ "top" "bottom" ]; + + description = '' + The position where the bar will be rendered. + ''; + }; + + extra = mkOption { + default = {}; + type = types.attrsOf types.string; + + description = '' + An attribute set which contains further attributes of a bar. + ''; + }; + + indicators = mkOption { + default = {}; + type = types.attrsOf(types.submodule { + options.exec = mkOption { + example = "YABAR_DATE"; + type = types.string; + description = '' + The type of the indicator to be executed. + ''; + }; + + options.align = mkOption { + default = "left"; + example = "right"; + type = types.enum [ "left" "center" "right" ]; + + description = '' + Whether to align the indicator at the left or right of the bar. + ''; + }; + + options.extra = mkOption { + default = {}; + type = types.attrsOf (types.either types.string types.int); + + description = '' + An attribute set which contains further attributes of a indicator. + ''; + }; + }); + + description = '' + Indicators that should be rendered by yabar. + ''; + }; + }; + }); + + description = '' + List of bars that should be rendered by yabar. + ''; + }; + }; + + config = mkIf cfg.enable { + systemd.user.services.yabar = { + description = "yabar service"; + wantedBy = [ "graphical-session.target" ]; + partOf = [ "graphical-session.target" ]; + + script = '' + ${cfg.package}/bin/yabar -c ${configFile} + ''; + + serviceConfig.Restart = "always"; + }; + }; + } diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index c5cb06cf54e23..b42c73b866687 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -113,7 +113,7 @@ let mailboxes = { lib, pkgs, ... }: { options = { name = mkOption { - type = types.str; + type = types.strMatching ''[^"]+''; example = "Spam"; description = "The name of the mailbox."; }; diff --git a/nixos/modules/services/mail/rspamd.nix b/nixos/modules/services/mail/rspamd.nix index b80aa48f2c865..09fb587e74b56 100644 --- a/nixos/modules/services/mail/rspamd.nix +++ b/nixos/modules/services/mail/rspamd.nix @@ -1,14 +1,152 @@ -{ config, lib, pkgs, ... }: +{ config, options, pkgs, lib, ... }: with lib; let cfg = config.services.rspamd; + opts = options.services.rspamd; - mkBindSockets = socks: concatStringsSep "\n" (map (each: " bind_socket = \"${each}\"") socks); + bindSocketOpts = {options, config, ... }: { + options = { + socket = mkOption { + type = types.str; + example = "localhost:11333"; + description = '' + Socket for this worker to listen on in a format acceptable by rspamd. + ''; + }; + mode = mkOption { + type = types.str; + default = "0644"; + description = "Mode to set on unix socket"; + }; + owner = mkOption { + type = types.str; + default = "${cfg.user}"; + description = "Owner to set on unix socket"; + }; + group = mkOption { + type = types.str; + default = "${cfg.group}"; + description = "Group to set on unix socket"; + }; + rawEntry = mkOption { + type = types.str; + internal = true; + }; + }; + config.rawEntry = let + maybeOption = option: + optionalString options.${option}.isDefined " ${option}=${config.${option}}"; + in + if (!(hasPrefix "/" config.socket)) then "${config.socket}" + else "${config.socket}${maybeOption "mode"}${maybeOption "owner"}${maybeOption "group"}"; + }; - rspamdConfFile = pkgs.writeText "rspamd.conf" + workerOpts = { name, ... }: { + options = { + enable = mkOption { + type = types.nullOr types.bool; + default = null; + description = "Whether to run the rspamd worker."; + }; + name = mkOption { + type = types.nullOr types.str; + default = name; + description = "Name of the worker"; + }; + type = mkOption { + type = types.nullOr (types.enum [ + "normal" "controller" "fuzzy_storage" "proxy" "lua" + ]); + description = "The type of this worker"; + }; + bindSockets = mkOption { + type = types.listOf (types.either types.str (types.submodule bindSocketOpts)); + default = []; + description = '' + List of sockets to listen, in format acceptable by rspamd + ''; + example = [{ + socket = "/run/rspamd.sock"; + mode = "0666"; + owner = "rspamd"; + } "*:11333"]; + apply = value: map (each: if (isString each) + then if (isUnixSocket each) + then {socket = each; owner = cfg.user; group = cfg.group; mode = "0644"; rawEntry = "${each}";} + else {socket = each; rawEntry = "${each}";} + else each) value; + }; + count = mkOption { + type = types.nullOr types.int; + default = null; + description = '' + Number of worker instances to run + ''; + }; + includes = mkOption { + type = types.listOf types.str; + default = []; + description = '' + List of files to include in configuration + ''; + }; + extraConfig = mkOption { + type = types.lines; + default = ""; + description = "Additional entries to put verbatim into worker section of rspamd config file."; + }; + }; + config = mkIf (name == "normal" || name == "controller" || name == "fuzzy") { + type = mkDefault name; + includes = mkDefault [ "$CONFDIR/worker-${name}.inc" ]; + bindSockets = mkDefault (if name == "normal" + then [{ + socket = "/run/rspamd/rspamd.sock"; + mode = "0660"; + owner = cfg.user; + group = cfg.group; + }] + else if name == "controller" + then [ "localhost:11334" ] + else [] ); + }; + }; + + indexOf = default: start: list: e: + if list == [] + then default + else if (head list) == e then start + else (indexOf default (start + (length (listenStreams (head list).socket))) (tail list) e); + + systemdSocket = indexOf (abort "Socket not found") 0 allSockets; + + isUnixSocket = socket: hasPrefix "/" (if (isString socket) then socket else socket.socket); + isPort = hasPrefix "*:"; + isIPv4Socket = hasPrefix "*v4:"; + isIPv6Socket = hasPrefix "*v6:"; + isLocalHost = hasPrefix "localhost:"; + listenStreams = socket: + if (isLocalHost socket) then + let port = (removePrefix "localhost:" socket); + in [ "127.0.0.1:${port}" ] ++ (if config.networking.enableIPv6 then ["[::1]:${port}"] else []) + else if (isIPv6Socket socket) then [removePrefix "*v6:" socket] + else if (isPort socket) then [removePrefix "*:" socket] + else if (isIPv4Socket socket) then + throw "error: IPv4 only socket not supported in rspamd with socket activation" + else if (length (splitString " " socket)) != 1 then + throw "error: string options not supported in rspamd with socket activation" + else [socket]; + + mkBindSockets = enabled: socks: concatStringsSep "\n " (flatten (map (each: + if cfg.socketActivation && enabled != false then + let systemd = (systemdSocket each); + in (imap (idx: e: "bind_socket = \"systemd:${toString (systemd + idx - 1)}\";") (listenStreams each.socket)) + else "bind_socket = \"${each.rawEntry}\";") socks)); + + rspamdConfFile = pkgs.writeText "rspamd.conf" '' .include "$CONFDIR/common.conf" @@ -22,19 +160,33 @@ let .include "$CONFDIR/logging.inc" } - worker { - ${mkBindSockets cfg.bindSocket} - .include "$CONFDIR/worker-normal.inc" - } - - worker { - ${mkBindSockets cfg.bindUISocket} - .include "$CONFDIR/worker-controller.inc" - } + ${concatStringsSep "\n" (mapAttrsToList (name: value: '' + worker ${optionalString (value.name != "normal" && value.name != "controller") "${value.name}"} { + type = "${value.type}"; + ${optionalString (value.enable != null) + "enabled = ${if value.enable != false then "yes" else "no"};"} + ${mkBindSockets value.enable value.bindSockets} + ${optionalString (value.count != null) "count = ${toString value.count};"} + ${concatStringsSep "\n " (map (each: ".include \"${each}\"") value.includes)} + ${value.extraConfig} + } + '') cfg.workers)} ${cfg.extraConfig} ''; + allMappedSockets = flatten (mapAttrsToList (name: value: + if value.enable != false + then imap (idx: each: { + name = "${name}"; + index = idx; + value = each; + }) value.bindSockets + else []) cfg.workers); + allSockets = map (e: e.value) allMappedSockets; + + allSocketNames = map (each: "rspamd-${each.name}-${toString each.index}.socket") allMappedSockets; + in { @@ -48,36 +200,43 @@ in enable = mkEnableOption "Whether to run the rspamd daemon."; debug = mkOption { + type = types.bool; default = false; description = "Whether to run the rspamd daemon in debug mode."; }; - bindSocket = mkOption { - type = types.listOf types.str; - default = [ - "/run/rspamd/rspamd.sock mode=0660 owner=${cfg.user} group=${cfg.group}" - ]; - defaultText = ''[ - "/run/rspamd/rspamd.sock mode=0660 owner=${cfg.user} group=${cfg.group}" - ]''; + socketActivation = mkOption { + type = types.bool; description = '' - List of sockets to listen, in format acceptable by rspamd - ''; - example = '' - bindSocket = [ - "/run/rspamd.sock mode=0666 owner=rspamd" - "*:11333" - ]; + Enable systemd socket activation for rspamd. ''; }; - bindUISocket = mkOption { - type = types.listOf types.str; - default = [ - "localhost:11334" - ]; + workers = mkOption { + type = with types; attrsOf (submodule workerOpts); description = '' - List of sockets for web interface, in format acceptable by rspamd + Attribute set of workers to start. + ''; + default = { + normal = {}; + controller = {}; + }; + example = literalExample '' + { + normal = { + includes = [ "$CONFDIR/worker-normal.inc" ]; + bindSockets = [{ + socket = "/run/rspamd/rspamd.sock"; + mode = "0660"; + owner = "${cfg.user}"; + group = "${cfg.group}"; + }]; + }; + controller = { + includes = [ "$CONFDIR/worker-controller.inc" ]; + bindSockets = [ "[::1]:11334" ]; + }; + } ''; }; @@ -113,6 +272,13 @@ in config = mkIf cfg.enable { + services.rspamd.socketActivation = mkDefault (!opts.bindSocket.isDefined && !opts.bindUISocket.isDefined); + + assertions = [ { + assertion = !cfg.socketActivation || !(opts.bindSocket.isDefined || opts.bindUISocket.isDefined); + message = "Can't use socketActivation for rspamd when using renamed bind socket options"; + } ]; + # Allow users to run 'rspamc' and 'rspamadm'. environment.systemPackages = [ pkgs.rspamd ]; @@ -128,17 +294,22 @@ in gid = config.ids.gids.rspamd; }; + environment.etc."rspamd.conf".source = rspamdConfFile; + systemd.services.rspamd = { description = "Rspamd Service"; - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; + wantedBy = mkIf (!cfg.socketActivation) [ "multi-user.target" ]; + after = [ "network.target" ] ++ + (if cfg.socketActivation then allSocketNames else []); + requires = mkIf cfg.socketActivation allSocketNames; serviceConfig = { ExecStart = "${pkgs.rspamd}/bin/rspamd ${optionalString cfg.debug "-d"} --user=${cfg.user} --group=${cfg.group} --pid=/run/rspamd.pid -c ${rspamdConfFile} -f"; Restart = "always"; RuntimeDirectory = "rspamd"; PrivateTmp = true; + Sockets = mkIf cfg.socketActivation (concatStringsSep " " allSocketNames); }; preStart = '' @@ -146,5 +317,25 @@ in ${pkgs.coreutils}/bin/chown ${cfg.user}:${cfg.group} /var/lib/rspamd ''; }; + systemd.sockets = mkIf cfg.socketActivation + (listToAttrs (map (each: { + name = "rspamd-${each.name}-${toString each.index}"; + value = { + description = "Rspamd socket ${toString each.index} for worker ${each.name}"; + wantedBy = [ "sockets.target" ]; + listenStreams = (listenStreams each.value.socket); + socketConfig = { + BindIPv6Only = mkIf (isIPv6Socket each.value.socket) "ipv6-only"; + Service = "rspamd.service"; + SocketUser = mkIf (isUnixSocket each.value.socket) each.value.owner; + SocketGroup = mkIf (isUnixSocket each.value.socket) each.value.group; + SocketMode = mkIf (isUnixSocket each.value.socket) each.value.mode; + }; + }; + }) allMappedSockets)); }; + imports = [ + (mkRenamedOptionModule [ "services" "rspamd" "bindSocket" ] [ "services" "rspamd" "workers" "normal" "bindSockets" ]) + (mkRenamedOptionModule [ "services" "rspamd" "bindUISocket" ] [ "services" "rspamd" "workers" "controller" "bindSockets" ]) + ]; } diff --git a/nixos/modules/services/web-servers/traefik.nix b/nixos/modules/services/web-servers/traefik.nix index 4ede4fc209670..b6c7fef21fb29 100644 --- a/nixos/modules/services/web-servers/traefik.nix +++ b/nixos/modules/services/web-servers/traefik.nix @@ -64,6 +64,16 @@ in { ''; }; + group = mkOption { + default = "traefik"; + type = types.string; + example = "docker"; + description = '' + Set the group that traefik runs under. + For the docker backend this needs to be set to <literal>docker</literal> instead. + ''; + }; + package = mkOption { default = pkgs.traefik; defaultText = "pkgs.traefik"; @@ -87,7 +97,7 @@ in { ]; Type = "simple"; User = "traefik"; - Group = "traefik"; + Group = cfg.group; Restart = "on-failure"; StartLimitInterval = 86400; StartLimitBurst = 5; diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index d4f77ea445d06..9d4a551a958b8 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -2,7 +2,7 @@ # and nixos-14.04). The channel is updated every time the ‘tested’ job # succeeds, and all other jobs have finished (they may fail). -{ nixpkgs ? { outPath = ./..; revCount = 56789; shortRev = "gfedcba"; } +{ nixpkgs ? { outPath = (import ../lib).cleanSource ./..; revCount = 56789; shortRev = "gfedcba"; } , stableBranch ? false , supportedSystems ? [ "x86_64-linux" ] , limitedSupportedSystems ? [ "i686-linux" ] diff --git a/nixos/release-small.nix b/nixos/release-small.nix index e9f3cfb4de539..2b532c70763fa 100644 --- a/nixos/release-small.nix +++ b/nixos/release-small.nix @@ -2,7 +2,7 @@ # small subset of Nixpkgs, mostly useful for servers that need fast # security updates. -{ nixpkgs ? { outPath = ./..; revCount = 56789; shortRev = "gfedcba"; } +{ nixpkgs ? { outPath = (import ../lib).cleanSource ./..; revCount = 56789; shortRev = "gfedcba"; } , stableBranch ? false , supportedSystems ? [ "x86_64-linux" ] # no i686-linux }: @@ -41,6 +41,7 @@ in rec { nfs3 openssh php-pcre + predictable-interface-names proxy simple; installer = { diff --git a/nixos/release.nix b/nixos/release.nix index a9c0aae7a5263..8057e2d50fa67 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -1,4 +1,4 @@ -{ nixpkgs ? { outPath = ./..; revCount = 56789; shortRev = "gfedcba"; } +{ nixpkgs ? { outPath = (import ../lib).cleanSource ./..; revCount = 56789; shortRev = "gfedcba"; } , stableBranch ? false , supportedSystems ? [ "x86_64-linux" "aarch64-linux" ] }: @@ -326,6 +326,7 @@ in rec { tests.pgmanage = callTest tests/pgmanage.nix {}; tests.postgis = callTest tests/postgis.nix {}; #tests.pgjwt = callTest tests/pgjwt.nix {}; + tests.predictable-interface-names = callSubTests tests/predictable-interface-names.nix {}; tests.printing = callTest tests/printing.nix {}; tests.prometheus = callTest tests/prometheus.nix {}; tests.proxy = callTest tests/proxy.nix {}; @@ -333,6 +334,7 @@ in rec { # tests.quagga = callTest tests/quagga.nix {}; tests.quake3 = callTest tests/quake3.nix {}; tests.radicale = callTest tests/radicale.nix {}; + tests.rspamd = callSubTests tests/rspamd.nix {}; tests.runInMachine = callTest tests/run-in-machine.nix {}; tests.samba = callTest tests/samba.nix {}; tests.sddm = callSubTests tests/sddm.nix {}; @@ -351,6 +353,7 @@ in rec { tests.wordpress = callTest tests/wordpress.nix {}; tests.xfce = callTest tests/xfce.nix {}; tests.xmonad = callTest tests/xmonad.nix {}; + tests.yabar = callTest tests/yabar.nix {}; tests.zookeeper = callTest tests/zookeeper.nix {}; /* Build a bunch of typical closures so that Hydra can keep track of diff --git a/nixos/tests/predictable-interface-names.nix b/nixos/tests/predictable-interface-names.nix new file mode 100644 index 0000000000000..b4c2039923cf0 --- /dev/null +++ b/nixos/tests/predictable-interface-names.nix @@ -0,0 +1,27 @@ +{ system ? builtins.currentSystem +, pkgs ? import ../.. { inherit system; } +}: +with import ../lib/testing.nix { inherit system; }; +let boolToString = x: if x then "yes" else "no"; in +let testWhenSetTo = predictable: withNetworkd: +makeTest { + name = "${if predictable then "" else "un"}predictableInterfaceNames${if withNetworkd then "-with-networkd" else ""}"; + meta = {}; + + machine = { config, pkgs, ... }: { + networking.usePredictableInterfaceNames = pkgs.stdenv.lib.mkForce predictable; + networking.useNetworkd = withNetworkd; + networking.dhcpcd.enable = !withNetworkd; + }; + + testScript = '' + print $machine->succeed("ip link"); + $machine->succeed("ip link show ${if predictable then "ens3" else "eth0"}"); + $machine->fail("ip link show ${if predictable then "eth0" else "ens3"}"); + ''; +}; in +with pkgs.stdenv.lib.lists; +with pkgs.stdenv.lib.attrsets; +listToAttrs (map (drv: nameValuePair drv.name drv) ( +crossLists testWhenSetTo [[true false] [true false]] +)) diff --git a/nixos/tests/rspamd.nix b/nixos/tests/rspamd.nix new file mode 100644 index 0000000000000..6b2e2dd3a5317 --- /dev/null +++ b/nixos/tests/rspamd.nix @@ -0,0 +1,140 @@ +{ system ? builtins.currentSystem }: +with import ../lib/testing.nix { inherit system; }; +with pkgs.lib; +let + initMachine = '' + startAll + $machine->waitForUnit("rspamd.service"); + $machine->succeed("id \"rspamd\" >/dev/null"); + ''; + checkSocket = socket: user: group: mode: '' + $machine->succeed("ls ${socket} >/dev/null"); + $machine->succeed("[[ \"\$(stat -c %U ${socket})\" == \"${user}\" ]]"); + $machine->succeed("[[ \"\$(stat -c %G ${socket})\" == \"${group}\" ]]"); + $machine->succeed("[[ \"\$(stat -c %a ${socket})\" == \"${mode}\" ]]"); + ''; + simple = name: socketActivation: enableIPv6: makeTest { + name = "rspamd-${name}"; + machine = { + services.rspamd = { + enable = true; + socketActivation = socketActivation; + }; + networking.enableIPv6 = enableIPv6; + }; + testScript = '' + startAll + $machine->waitForUnit("multi-user.target"); + $machine->waitForOpenPort(11334); + $machine->waitForUnit("rspamd.service"); + $machine->succeed("id \"rspamd\" >/dev/null"); + ${checkSocket "/run/rspamd/rspamd.sock" "rspamd" "rspamd" "660" } + sleep 10; + $machine->log($machine->succeed("cat /etc/rspamd.conf")); + $machine->log($machine->succeed("systemctl cat rspamd.service")); + ${if socketActivation then '' + $machine->log($machine->succeed("systemctl cat rspamd-controller-1.socket")); + $machine->log($machine->succeed("systemctl cat rspamd-normal-1.socket")); + '' else '' + $machine->fail("systemctl cat rspamd-controller-1.socket"); + $machine->fail("systemctl cat rspamd-normal-1.socket"); + ''} + $machine->log($machine->succeed("curl http://localhost:11334/auth")); + $machine->log($machine->succeed("curl http://127.0.0.1:11334/auth")); + ${optionalString enableIPv6 '' + $machine->log($machine->succeed("curl http://[::1]:11334/auth")); + ''} + ''; + }; +in +{ + simple = simple "simple" false true; + ipv4only = simple "ipv4only" false false; + simple-socketActivated = simple "simple-socketActivated" true true; + ipv4only-socketActivated = simple "ipv4only-socketActivated" true false; + deprecated = makeTest { + name = "rspamd-deprecated"; + machine = { + services.rspamd = { + enable = true; + bindSocket = [ "/run/rspamd.sock mode=0600 user=root group=root" ]; + bindUISocket = [ "/run/rspamd-worker.sock mode=0666 user=root group=root" ]; + }; + }; + + testScript = '' + ${initMachine} + $machine->waitForFile("/run/rspamd.sock"); + ${checkSocket "/run/rspamd.sock" "root" "root" "600" } + ${checkSocket "/run/rspamd-worker.sock" "root" "root" "666" } + $machine->log($machine->succeed("cat /etc/rspamd.conf")); + $machine->fail("systemctl cat rspamd-normal-1.socket"); + $machine->log($machine->succeed("rspamc -h /run/rspamd-worker.sock stat")); + $machine->log($machine->succeed("curl --unix-socket /run/rspamd-worker.sock http://localhost/ping")); + ''; + }; + + bindports = makeTest { + name = "rspamd-bindports"; + machine = { + services.rspamd = { + enable = true; + socketActivation = false; + workers.normal.bindSockets = [{ + socket = "/run/rspamd.sock"; + mode = "0600"; + owner = "root"; + group = "root"; + }]; + workers.controller.bindSockets = [{ + socket = "/run/rspamd-worker.sock"; + mode = "0666"; + owner = "root"; + group = "root"; + }]; + }; + }; + + testScript = '' + ${initMachine} + $machine->waitForFile("/run/rspamd.sock"); + ${checkSocket "/run/rspamd.sock" "root" "root" "600" } + ${checkSocket "/run/rspamd-worker.sock" "root" "root" "666" } + $machine->log($machine->succeed("cat /etc/rspamd.conf")); + $machine->fail("systemctl cat rspamd-normal-1.socket"); + $machine->log($machine->succeed("rspamc -h /run/rspamd-worker.sock stat")); + $machine->log($machine->succeed("curl --unix-socket /run/rspamd-worker.sock http://localhost/ping")); + ''; + }; + socketActivated = makeTest { + name = "rspamd-socketActivated"; + machine = { + services.rspamd = { + enable = true; + workers.normal.bindSockets = [{ + socket = "/run/rspamd.sock"; + mode = "0600"; + owner = "root"; + group = "root"; + }]; + workers.controller.bindSockets = [{ + socket = "/run/rspamd-worker.sock"; + mode = "0666"; + owner = "root"; + group = "root"; + }]; + }; + }; + + testScript = '' + startAll + $machine->waitForFile("/run/rspamd.sock"); + ${checkSocket "/run/rspamd.sock" "root" "root" "600" } + ${checkSocket "/run/rspamd-worker.sock" "root" "root" "666" } + $machine->log($machine->succeed("cat /etc/rspamd.conf")); + $machine->log($machine->succeed("systemctl cat rspamd-normal-1.socket")); + $machine->log($machine->succeed("rspamc -h /run/rspamd-worker.sock stat")); + $machine->log($machine->succeed("curl --unix-socket /run/rspamd-worker.sock http://localhost/ping")); + ''; + }; +} diff --git a/nixos/tests/yabar.nix b/nixos/tests/yabar.nix new file mode 100644 index 0000000000000..40ca91e8064d5 --- /dev/null +++ b/nixos/tests/yabar.nix @@ -0,0 +1,25 @@ +import ./make-test.nix ({ pkgs, lib }: + +with lib; + +{ + name = "yabar"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ ma27 ]; + }; + + nodes.yabar = { + imports = [ ./common/x11.nix ./common/user-account.nix ]; + + services.xserver.displayManager.auto.user = "bob"; + + programs.yabar.enable = true; + }; + + testScript = '' + $yabar->start; + $yabar->waitForX; + + $yabar->waitForUnit("yabar.service", "bob"); + ''; +}) diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix index 9ac0c49ebc319..35c5dff271066 100644 --- a/pkgs/applications/audio/spotify/default.nix +++ b/pkgs/applications/audio/spotify/default.nix @@ -9,7 +9,7 @@ let # Latest version number can be found at: # http://repository-origin.spotify.com/pool/non-free/s/spotify-client/ # Be careful not to pick the testing version. - version = "1.0.69.336.g7edcc575-39"; + version = "1.0.70.399.g5ffabd56-26"; deps = [ alsaLib @@ -54,7 +54,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_${version}_amd64.deb"; - sha256 = "0bh2q7g478g7wj661fypxcbhrbq87zingfyigg7rz1shgsgwc3gd"; + sha256 = "0kpakz11xkyqqjvln4jkhc3z5my8zgpw8m6jx954cjdbc6vkxd29"; }; buildInputs = [ dpkg makeWrapper ]; diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix b/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix index 1cdcb9b855446..de72b24f87acb 100644 --- a/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix +++ b/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation (rec { name = "ProofGeneral-unstable-${version}"; - version = "2017-11-06"; + version = "2018-01-30"; src = fetchFromGitHub { owner = "ProofGeneral"; repo = "PG"; - rev = "2eab72c33751768c8a6cde36b978ea4a36b91843"; - sha256 = "1l3n48d6d4l5q3wkhdyp8dc6hzdw1ckdzr57dj8rdm78j87vh2cg"; + rev = "945cada601c5729edd16fcc989a3969c8b34d20a"; + sha256 = "1zjmbhq6c8g8b93nnsvr5pxx6mlcndb0fz152b2h80vfh9663cn8"; }; buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive; diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index 6ff67728ea117..6b7881c490cf3 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -4,7 +4,10 @@ }: let - version = "1.1.414"; + verMajor = "1"; + verMinor = "1"; + verPatch = "423"; + version = "${verMajor}.${verMinor}.${verPatch}"; ginVer = "1.5"; gwtVer = "2.7.0"; in @@ -19,46 +22,30 @@ stdenv.mkDerivation rec { owner = "rstudio"; repo = "rstudio"; rev = "v${version}"; - sha256 = "1rr2zkv53r8swhq5d745jpp0ivxpsizzh7srf34isqpkn5pgx3v8"; + sha256 = "02kpmzh0vr0gb5dhiwcm4gwjbc3biwz0km655mgzmx9j64cyd3nf"; }; # Hack RStudio to only use the input R. patches = [ ./r-location.patch ]; postPatch = "substituteInPlace src/cpp/core/r_util/REnvironmentPosix.cpp --replace '@R@' ${R}"; - inherit ginVer; ginSrc = fetchurl { url = "https://s3.amazonaws.com/rstudio-buildtools/gin-${ginVer}.zip"; sha256 = "155bjrgkf046b8ln6a55x06ryvm8agnnl7l8bkwwzqazbpmz8qgm"; }; - inherit gwtVer; gwtSrc = fetchurl { url = "https://s3.amazonaws.com/rstudio-buildtools/gwt-${gwtVer}.zip"; sha256 = "1cs78z9a1jg698j2n35wsy07cy4fxcia9gi00x0r0qc3fcdhcrda"; }; - hunspellDictionaries = builtins.attrValues hunspellDicts; + hunspellDictionaries = with stdenv.lib; filter isDerivation (attrValues hunspellDicts); mathJaxSrc = fetchurl { url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-26.zip; sha256 = "0wbcqb9rbfqqvvhqr1pbqax75wp8ydqdyhp91fbqfqp26xzjv6lk"; }; - rmarkdownSrc = fetchFromGitHub { - owner = "rstudio"; - repo = "rmarkdown"; - rev = "v1.8"; - sha256 = "1blqxdr1vp2z5wd52nmf8hq36sdd4s2pyms441dqj50v35f8girb"; - }; - - rsconnectSrc = fetchFromGitHub { - owner = "rstudio"; - repo = "rsconnect"; - rev = "953c945779dd180c1bfe68f41c173c13ec3e222d"; - sha256 = "1yxwd9v4mvddh7m5rbljicmssw7glh1lhin7a9f01vxxa92vpj7z"; - }; - rstudiolibclang = fetchurl { url = https://s3.amazonaws.com/rstudio-buildtools/libclang-3.5.zip; sha256 = "1sl5vb8misipwbbbykdymw172w9qrh8xv3p29g0bf3nzbnv6zc7c"; @@ -71,31 +58,31 @@ stdenv.mkDerivation rec { preConfigure = '' + export RSTUDIO_VERSION_MAJOR=${verMajor} + export RSTUDIO_VERSION_MINOR=${verMinor} + export RSTUDIO_VERSION_PATCH=${verPatch} + GWT_LIB_DIR=src/gwt/lib - mkdir -p $GWT_LIB_DIR/gin/$ginVer - unzip $ginSrc -d $GWT_LIB_DIR/gin/$ginVer + mkdir -p $GWT_LIB_DIR/gin/${ginVer} + unzip ${ginSrc} -d $GWT_LIB_DIR/gin/${ginVer} - unzip $gwtSrc + unzip ${gwtSrc} mkdir -p $GWT_LIB_DIR/gwt - mv gwt-$gwtVer $GWT_LIB_DIR/gwt/$gwtVer + mv gwt-${gwtVer} $GWT_LIB_DIR/gwt/${gwtVer} mkdir dependencies/common/dictionaries - for dict in $hunspellDictionaries; do - for i in "$dict/share/hunspell/"* - do ln -sv $i dependencies/common/dictionaries/ - done + for dict in ${builtins.concatStringsSep " " hunspellDictionaries}; do + for i in "$dict/share/hunspell/"*; do + ln -sv $i dependencies/common/dictionaries/ + done done - unzip $mathJaxSrc -d dependencies/common/mathjax-26 - mkdir -p dependencies/common/rmarkdown - ln -s $rmarkdownSrc dependencies/common/rmarkdown/ - mkdir -p dependencies/common/rsconnect - ln -s $rsconnectSrc dependencies/common/rsconnect/ + unzip ${mathJaxSrc} -d dependencies/common/mathjax-26 mkdir -p dependencies/common/libclang/3.5 - unzip $rstudiolibclang -d dependencies/common/libclang/3.5 + unzip ${rstudiolibclang} -d dependencies/common/libclang/3.5 mkdir -p dependencies/common/libclang/builtin-headers - unzip $rstudiolibclangheaders -d dependencies/common/libclang/builtin-headers + unzip ${rstudiolibclangheaders} -d dependencies/common/libclang/builtin-headers mkdir -p dependencies/common/pandoc cp ${pandoc}/bin/pandoc dependencies/common/pandoc/ diff --git a/pkgs/applications/editors/typora/default.nix b/pkgs/applications/editors/typora/default.nix index 22e7c3d31b361..7c6d186b88302 100644 --- a/pkgs/applications/editors/typora/default.nix +++ b/pkgs/applications/editors/typora/default.nix @@ -3,18 +3,18 @@ stdenv.mkDerivation rec { name = "typora-${version}"; - version = "0.9.41"; + version = "0.9.44"; src = if stdenv.system == "x86_64-linux" then fetchurl { url = "https://www.typora.io/linux/typora_${version}_amd64.deb"; - sha256 = "e4916f86c7c12aec8fd59b3ef79c2a4d3f77b02a0a9e962916c688871c9fda1d"; + sha256 = "9442c090bf2619d270890228abd7dabb9e217c0b200615f8ed3cb255efd122d5"; } else fetchurl { url = "https://www.typora.io/linux/typora_${version}_i386.deb"; - sha256 = "18960fb4b2cd6cf9cb77025a4035a3258f1599b1d225fb673b49c1588fa272d6"; + sha256 = "ae228ca946d03940b85df30c995c4de3f942a780e32d4dcab872dec671c66ef3"; } ; diff --git a/pkgs/applications/graphics/darktable/default.nix b/pkgs/applications/graphics/darktable/default.nix index 787ddc72ec9ad..e9932b93fbe04 100644 --- a/pkgs/applications/graphics/darktable/default.nix +++ b/pkgs/applications/graphics/darktable/default.nix @@ -1,15 +1,10 @@ -{ stdenv, fetchurl, libsoup, graphicsmagick, SDL, json_glib -, GConf, atk, cairo, cmake, curl, dbus_glib, exiv2, glib -, libgnome_keyring, gtk3, ilmbase, intltool, lcms, lcms2 -, lensfun, libXau, libXdmcp, libexif, libglade, libgphoto2, libjpeg -, libpng, libpthreadstubs, librsvg, libtiff, libxcb -, openexr, osm-gps-map, pixman, pkgconfig, sqlite, bash, libxslt, openjpeg -, mesa, lua, pugixml, colord, colord-gtk, libxshmfence, libxkbcommon -, epoxy, at_spi2_core, libwebp, libsecret, wrapGAppsHook, gnome3 +{ stdenv, fetchurl, libsoup, graphicsmagick, json_glib, wrapGAppsHook +, cairo, cmake, ninja, curl, perl, llvm, desktop_file_utils, exiv2, glib +, ilmbase, gtk3, intltool, lcms2, lensfun, libX11, libexif, libgphoto2, libjpeg +, libpng, librsvg, libtiff, openexr, osm-gps-map, pkgconfig, sqlite, libxslt +, openjpeg, lua, pugixml, colord, colord-gtk, libwebp, libsecret, gnome3 }: -assert stdenv ? glibc; - stdenv.mkDerivation rec { version = "2.4.1"; name = "darktable-${version}"; @@ -19,16 +14,15 @@ stdenv.mkDerivation rec { sha256 = "014pq80i5k1kdvvrl7xrgaaq3i4fzv09h7a3pwzlp2ahkczwcm32"; }; - buildInputs = - [ GConf atk cairo cmake curl dbus_glib exiv2 glib libgnome_keyring gtk3 - ilmbase intltool lcms lcms2 lensfun libXau libXdmcp libexif - libglade libgphoto2 libjpeg libpng libpthreadstubs - librsvg libtiff libxcb openexr pixman pkgconfig sqlite libxslt - libsoup graphicsmagick SDL json_glib openjpeg mesa lua pugixml - colord colord-gtk libxshmfence libxkbcommon epoxy at_spi2_core - libwebp libsecret wrapGAppsHook gnome3.adwaita-icon-theme - osm-gps-map - ]; + nativeBuildInputs = [ cmake ninja llvm pkgconfig intltool perl desktop_file_utils wrapGAppsHook ]; + + buildInputs = [ + cairo curl exiv2 glib gtk3 ilmbase lcms2 lensfun libX11 libexif + libgphoto2 libjpeg libpng librsvg libtiff openexr sqlite libxslt + libsoup graphicsmagick json_glib openjpeg lua pugixml + colord colord-gtk libwebp libsecret gnome3.adwaita-icon-theme + osm-gps-map + ]; cmakeFlags = [ "-DBUILD_USERMANUAL=False" diff --git a/pkgs/applications/misc/alacritty/default.nix b/pkgs/applications/misc/alacritty/default.nix index 7bfcc6e72c89e..0f629aace4563 100644 --- a/pkgs/applications/misc/alacritty/default.nix +++ b/pkgs/applications/misc/alacritty/default.nix @@ -30,18 +30,18 @@ let ]; in buildRustPackage rec { name = "alacritty-unstable-${version}"; - version = "2017-12-29"; + version = "2018-01-31"; # At the moment we cannot handle git dependencies in buildRustPackage. # This fork only replaces rust-fontconfig/libfontconfig with a git submodules. src = fetchgit { url = https://github.com/Mic92/alacritty.git; rev = "rev-${version}"; - sha256 = "0pk4b8kfxixmd9985v2fya1m7np8ggws8d9msw210drc0grwbfkd"; + sha256 = "0jc8haijd6f8r5fqiknrvqnwc9q4cp93852lr2p7zak7dv29v45p"; fetchSubmodules = true; }; - cargoSha256 = "0acj526cx4xl52vbcbd3hp1klh4p756j6alxqqz3x715zi2dqkzf"; + cargoSha256 = "0023jpc6krilmp5wzbbwapxafsi6m1k13mvjh4zlvls1nyyhk808"; nativeBuildInputs = [ cmake diff --git a/pkgs/applications/misc/electrum-dash/default.nix b/pkgs/applications/misc/electrum-dash/default.nix index bde8d5b81e3e9..c98efa547b393 100644 --- a/pkgs/applications/misc/electrum-dash/default.nix +++ b/pkgs/applications/misc/electrum-dash/default.nix @@ -1,12 +1,13 @@ { stdenv, fetchurl, python2Packages }: python2Packages.buildPythonApplication rec { + version = "2.9.3.1"; name = "electrum-dash-${version}"; - version = "2.4.1"; src = fetchurl { - url = "https://github.com/dashpay/electrum-dash/releases/download/v${version}/Electrum-DASH-${version}.tar.gz"; - sha256 = "02k7m7fyn0cvlgmwxr2gag7rf2knllkch1ma58shysp7zx9jb000"; + url = "https://github.com/akhavr/electrum-dash/releases/download/${version}/Electrum-DASH-${version}.tar.gz"; + #"https://github.com/dashpay/electrum-dash/releases/download/v${version}/Electrum-DASH-${version}.tar.gz"; + sha256 = "9b7ac205f63fd4bfb15d77a34a4451ef82caecf096f31048a7603bd276dfc33e"; }; propagatedBuildInputs = with python2Packages; [ @@ -20,10 +21,11 @@ python2Packages.buildPythonApplication rec { pyqt4 qrcode requests - slowaes + pyaes tlslite x11_hash mnemonic + jsonrpclib # plugins trezor diff --git a/pkgs/applications/misc/slic3r-prusa3d/default.nix b/pkgs/applications/misc/slic3r-prusa3d/default.nix new file mode 100644 index 0000000000000..ef8bfb1b2be53 --- /dev/null +++ b/pkgs/applications/misc/slic3r-prusa3d/default.nix @@ -0,0 +1,93 @@ +{ stdenv, fetchFromGitHub, makeWrapper, which, cmake, perl, perlPackages, + boost, tbb, wxGTK30, pkgconfig, gtk3, fetchurl, gtk2, bash, mesa_glu }: +let + AlienWxWidgets = perlPackages.buildPerlPackage rec { + name = "Alien-wxWidgets-0.69"; + src = fetchurl { + url = "mirror://cpan/authors/id/M/MD/MDOOTSON/${name}.tar.gz"; + sha256 = "075m880klf66pbcfk0la2nl60vd37jljizqndrklh5y4zvzdy1nr"; + }; + propagatedBuildInputs = [ + pkgconfig perlPackages.ModulePluggable perlPackages.ModuleBuild + gtk2 gtk3 wxGTK30 + ]; + }; + + Wx = perlPackages.Wx.overrideAttrs (oldAttrs: { + propagatedBuildInputs = [ + perlPackages.ExtUtilsXSpp + AlienWxWidgets + ]; + }); + + WxGLCanvas = perlPackages.buildPerlPackage rec { + name = "Wx-GLCanvas-0.09"; + src = fetchurl { + url = "mirror://cpan/authors/id/M/MB/MBARBON/${name}.tar.gz"; + sha256 = "1q4gvj4gdx4l8k4mkgiix24p9mdfy1miv7abidf0my3gy2gw5lka"; + }; + propagatedBuildInputs = [ Wx perlPackages.OpenGL mesa_glu ]; + doCheck = false; + }; +in +stdenv.mkDerivation rec { + name = "slic3r-prusa-edition-${version}"; + version = "1.38.7"; + + buildInputs = [ + cmake + perl + makeWrapper + tbb + which + Wx + WxGLCanvas + ] ++ (with perlPackages; [ + boost + ClassXSAccessor + EncodeLocale + ExtUtilsMakeMaker + ExtUtilsXSpp + GrowlGNTP + ImportInto + IOStringy + locallib + LWP + MathClipper + MathConvexHullMonotoneChain + MathGeometryVoronoi + MathPlanePath + ModuleBuild + Moo + NetDBus + OpenGL + threads + XMLSAX + ]); + + postInstall = '' + echo 'postInstall' + wrapProgram "$out/bin/slic3r-prusa3d" \ + --prefix PERL5LIB : "$out/lib/slic3r-prusa3d:$PERL5LIB" + + # it seems we need to copy the icons... + mkdir -p $out/bin/var + cp ../resources/icons/* $out/bin/var/ + cp -r ../resources $out/bin/ + ''; + + src = fetchFromGitHub { + owner = "prusa3d"; + repo = "Slic3r"; + sha256 = "1nrryd2bxmk4y59bq5fp7n2alyvc5a9xvnbx5j4fg4mqr91ccs5c"; + rev = "version_${version}"; + }; + + meta = with stdenv.lib; { + description = "G-code generator for 3D printer"; + homepage = https://github.com/prusa3d/Slic3r; + license = licenses.agpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ tweber ]; + }; +} diff --git a/pkgs/applications/networking/flexget/default.nix b/pkgs/applications/networking/flexget/default.nix index 105239aca0244..585e0c847da29 100644 --- a/pkgs/applications/networking/flexget/default.nix +++ b/pkgs/applications/networking/flexget/default.nix @@ -75,5 +75,6 @@ buildPythonApplication rec { description = "Multipurpose automation tool for content like torrents"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ domenkozar tari ]; + broken = true; # as of 2018-02-09 }; } diff --git a/pkgs/applications/networking/instant-messengers/gajim/default.nix b/pkgs/applications/networking/instant-messengers/gajim/default.nix index b01c6497fb238..42c510495574c 100644 --- a/pkgs/applications/networking/instant-messengers/gajim/default.nix +++ b/pkgs/applications/networking/instant-messengers/gajim/default.nix @@ -1,9 +1,6 @@ { stdenv, fetchurl, autoreconfHook, python, intltool, pkgconfig, libX11 , ldns, pythonPackages -# Test requirements -, xvfb_run - , enableJingle ? true, farstream ? null, gst-plugins-bad ? null , libnice ? null , enableE2E ? true @@ -25,13 +22,13 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "gajim-${version}"; - version = "0.16.8"; + version = "0.16.9"; src = fetchurl { name = "${name}.tar.bz2"; url = "https://dev.gajim.org/gajim/gajim/repository/archive.tar.bz2?" + "ref=${name}"; - sha256 = "009cpzqh4zy7hc9pq3r5m4lgagwawhjab13rjzavb0n9ggijcscb"; + sha256 = "121dh906zya9n7npyk7b5xama0z3ycy9jl7l5jm39pc86h1winh3"; }; patches = let @@ -46,8 +43,7 @@ stdenv.mkDerivation rec { name = "gajim-${name}.patch"; url = "https://dev.gajim.org/gajim/gajim/commit/${rev}.diff"; inherit sha256; - }) cherries) - ++ [./fix-tests.patch]; # https://dev.gajim.org/gajim/gajim/issues/8660 + }) cherries); postPatch = '' sed -i -e '0,/^[^#]/ { @@ -74,8 +70,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pythonPackages.wrapPython intltool pkgconfig - # Test dependencies - xvfb_run ]; autoreconfPhase = '' @@ -114,9 +108,8 @@ stdenv.mkDerivation rec { doInstallCheck = true; installCheckPhase = '' - XDG_DATA_DIRS="$out/share/gajim''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS" \ PYTHONPATH="test:$out/share/gajim/src:''${PYTHONPATH:+:}$PYTHONPATH" \ - xvfb-run make test + make test_nogui ''; enableParallelBuilding = true; diff --git a/pkgs/applications/networking/instant-messengers/gajim/fix-tests.patch b/pkgs/applications/networking/instant-messengers/gajim/fix-tests.patch deleted file mode 100644 index cb866bb2d7392..0000000000000 --- a/pkgs/applications/networking/instant-messengers/gajim/fix-tests.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/common/gajim.py b/src/common/gajim.py -index 4a5d884b6..95d401b67 100644 ---- a/src/common/gajim.py -+++ b/src/common/gajim.py -@@ -415,7 +415,7 @@ def get_jid_from_account(account_name, full=False): - jid = name + '@' + hostname - if full: - resource = connections[account_name].server_resource -- jid += '/' + resource -+ jid += '/' + str(resource) - return jid - - def get_our_jids(): diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index 56436d047f2e2..339d3e8490d9b 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -209,14 +209,14 @@ rec { tiniSha256 = "0zj4kdis1vvc6dwn4gplqna0bs7v6d1y2zc8v80s3zi018inhznw"; }; - docker_18_01 = dockerGen rec { - version = "18.01.0-ce"; - rev = "03596f51b120095326d2004d676e97228a21014d"; # git commit - sha256 = "1zffaxwkfz8ca76f5ql5z76mcjx37jbgv2kk75i68487yg16x0md"; - runcRev = "b2567b37d7b75eb4cf325b77297b140ea686ce8f"; - runcSha256 = "0zarsrbfcm1yp6mdl6rcrigdf7nb70xmv2cbggndz0qqyrw0mk0l"; - containerdRev = "89623f28b87a6004d4b785663257362d1658a729"; - containerdSha256 = "0irx7ps6rhq7z69cr3gspxdr7ywrv6dz62gkr1z2723cki9hsxma"; + docker_18_02 = dockerGen rec { + version = "18.02.0-ce"; + rev = "fc4de447b563498eb4da89f56fb858bbe761d91b"; # git commit + sha256 = "1025cwv2niiwg5pc30nb1qky1raisvd9ix2qw6rdib232hwq9k8m"; + runcRev = "9f9c96235cc97674e935002fc3d78361b696a69e"; + runcSha256 = "18f8vqdbf685dd777pjh8jzpxafw2vapqh4m43xgyi7lfwa0gsln"; + containerdRev = "9b55aab90508bd389d7654c4baf173a981477d55"; + containerdSha256 = "0kfafqi66yp4qy738pl11f050hfrx9m4kc670qpx7fmf9ii7q6p2"; tiniRev = "949e6facb77383876aeff8a6944dde66b3089574"; tiniSha256 = "0zj4kdis1vvc6dwn4gplqna0bs7v6d1y2zc8v80s3zi018inhznw"; }; diff --git a/pkgs/applications/virtualization/looking-glass-client/default.nix b/pkgs/applications/virtualization/looking-glass-client/default.nix index 16be0cc5b6d2a..e9cee2503851d 100644 --- a/pkgs/applications/virtualization/looking-glass-client/default.nix +++ b/pkgs/applications/virtualization/looking-glass-client/default.nix @@ -42,6 +42,6 @@ stdenv.mkDerivation rec { homepage = https://looking-glass.hostfission.com/; license = licenses.gpl2Plus; maintainers = [ maintainers.pneumaticat ]; - platforms = platforms.linux; + platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh new file mode 100644 index 0000000000000..0f9d7603d48fb --- /dev/null +++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh @@ -0,0 +1,174 @@ +declare -a autoPatchelfLibs + +gatherLibraries() { + autoPatchelfLibs+=("$1/lib") +} + +addEnvHooks "$targetOffset" gatherLibraries + +isExecutable() { + [ "$(file -b -N --mime-type "$1")" = application/x-executable ] +} + +findElfs() { + find "$1" -type f -exec "$SHELL" -c ' + while [ -n "$1" ]; do + mimeType="$(file -b -N --mime-type "$1")" + if [ "$mimeType" = application/x-executable \ + -o "$mimeType" = application/x-sharedlib ]; then + echo "$1" + fi + shift + done + ' -- {} + +} + +# We cache dependencies so that we don't need to search through all of them on +# every consecutive call to findDependency. +declare -a cachedDependencies + +addToDepCache() { + local existing + for existing in "${cachedDependencies[@]}"; do + if [ "$existing" = "$1" ]; then return; fi + done + cachedDependencies+=("$1") +} + +declare -gi depCacheInitialised=0 +declare -gi doneRecursiveSearch=0 +declare -g foundDependency + +getDepsFromSo() { + ldd "$1" 2> /dev/null | sed -n -e 's/[^=]*=> *\(.\+\) \+([^)]*)$/\1/p' +} + +populateCacheWithRecursiveDeps() { + local so found foundso + for so in "${cachedDependencies[@]}"; do + for found in $(getDepsFromSo "$so"); do + local libdir="${found%/*}" + local base="${found##*/}" + local soname="${base%.so*}" + for foundso in "${found%/*}/$soname".so*; do + addToDepCache "$foundso" + done + done + done +} + +getSoArch() { + objdump -f "$1" | sed -ne 's/^architecture: *\([^,]\+\).*/\1/p' +} + +# NOTE: If you want to use this function outside of the autoPatchelf function, +# keep in mind that the dependency cache is only valid inside the subshell +# spawned by the autoPatchelf function, so invoking this directly will possibly +# rebuild the dependency cache. See the autoPatchelf function below for more +# information. +findDependency() { + local filename="$1" + local arch="$2" + local lib dep + + if [ $depCacheInitialised -eq 0 ]; then + for lib in "${autoPatchelfLibs[@]}"; do + for so in "$lib/"*.so*; do addToDepCache "$so"; done + done + depCacheInitialised=1 + fi + + for dep in "${cachedDependencies[@]}"; do + if [ "$filename" = "${dep##*/}" ]; then + if [ "$(getSoArch "$dep")" = "$arch" ]; then + foundDependency="$dep" + return 0 + fi + fi + done + + # Populate the dependency cache with recursive dependencies *only* if we + # didn't find the right dependency so far and afterwards run findDependency + # again, but this time with $doneRecursiveSearch set to 1 so that it won't + # recurse again (and thus infinitely). + if [ $doneRecursiveSearch -eq 0 ]; then + populateCacheWithRecursiveDeps + doneRecursiveSearch=1 + findDependency "$filename" "$arch" || return 1 + return 0 + fi + return 1 +} + +autoPatchelfFile() { + local dep rpath="" toPatch="$1" + + local interpreter="$(< "$NIX_CC/nix-support/dynamic-linker")" + if isExecutable "$toPatch"; then + patchelf --set-interpreter "$interpreter" "$toPatch" + if [ -n "$runtimeDependencies" ]; then + for dep in $runtimeDependencies; do + rpath="$rpath${rpath:+:}$dep/lib" + done + fi + fi + + echo "searching for dependencies of $toPatch" >&2 + + # We're going to find all dependencies based on ldd output, so we need to + # clear the RPATH first. + patchelf --remove-rpath "$toPatch" + + local missing="$( + ldd "$toPatch" 2> /dev/null | \ + sed -n -e 's/^[\t ]*\([^ ]\+\) => not found.*/\1/p' + )" + + # This ensures that we get the output of all missing dependencies instead + # of failing at the first one, because it's more useful when working on a + # new package where you don't yet know its dependencies. + local -i depNotFound=0 + + for dep in $missing; do + echo -n " $dep -> " >&2 + if findDependency "$dep" "$(getSoArch "$toPatch")"; then + rpath="$rpath${rpath:+:}${foundDependency%/*}" + echo "found: $foundDependency" >&2 + else + echo "not found!" >&2 + depNotFound=1 + fi + done + + # This makes sure the builder fails if we didn't find a dependency, because + # the stdenv setup script is run with set -e. The actual error is emitted + # earlier in the previous loop. + [ $depNotFound -eq 0 ] + + if [ -n "$rpath" ]; then + echo "setting RPATH to: $rpath" >&2 + patchelf --set-rpath "$rpath" "$toPatch" + fi +} + +autoPatchelf() { + echo "automatically fixing dependencies for ELF files" >&2 + + # Add all shared objects of the current output path to the start of + # cachedDependencies so that it's choosen first in findDependency. + cachedDependencies+=( + $(find "$prefix" \! -type d \( -name '*.so' -o -name '*.so.*' \)) + ) + local elffile + + # Here we actually have a subshell, which also means that + # $cachedDependencies is final at this point, so whenever we want to run + # findDependency outside of this, the dependency cache needs to be rebuilt + # from scratch, so keep this in mind if you want to run findDependency + # outside of this function. + findElfs "$prefix" | while read -r elffile; do + autoPatchelfFile "$elffile" + done +} + +fixupOutputHooks+=(autoPatchelf) diff --git a/pkgs/development/compilers/scala/dotty-bare.nix b/pkgs/development/compilers/scala/dotty-bare.nix index 60cb3e9a20291..bff73337e9e85 100644 --- a/pkgs/development/compilers/scala/dotty-bare.nix +++ b/pkgs/development/compilers/scala/dotty-bare.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, makeWrapper, jre }: stdenv.mkDerivation rec { - version = "0.4.0-RC1"; + version = "0.6.0-RC1"; name = "dotty-bare-${version}"; src = fetchurl { url = "https://github.com/lampepfl/dotty/releases/download/${version}/dotty-${version}.tar.gz"; - sha256 = "1d1ab08b85bd6898ce6273fa50818de0d314fc6e5377fb6ee05494827043321b"; + sha256 = "de1f5e72fb0e0b4c377d6cec93f565eff49769698cd8be01b420705fe8475ca4"; }; propagatedBuildInputs = [ jre ] ; diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index eb66a6f892236..14a8a628b58c2 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -72,8 +72,7 @@ assert enableSplitObjs == null; let inherit (stdenv.lib) optional optionals optionalString versionOlder versionAtLeast - concatStringsSep enableFeature optionalAttrs toUpper - filter makeLibraryPath; + concatStringsSep enableFeature optionalAttrs toUpper; isGhcjs = ghc.isGhcjs or false; isHaLVM = ghc.isHaLVM or false; @@ -384,7 +383,7 @@ stdenv.mkDerivation ({ env = stdenv.mkDerivation { name = "interactive-${pname}-${version}-environment"; buildInputs = systemBuildInputs; - nativeBuildInputs = [ ghcEnv ]; + nativeBuildInputs = [ ghcEnv ] ++ nativeBuildInputs; LANG = "en_US.UTF-8"; LOCALE_ARCHIVE = optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive"; shellHook = '' @@ -392,9 +391,6 @@ stdenv.mkDerivation ({ export NIX_${ghcCommandCaps}PKG="${ghcEnv}/bin/${ghcCommand}-pkg" # TODO: is this still valid? export NIX_${ghcCommandCaps}_DOCDIR="${ghcEnv}/share/doc/ghc/html" - export LD_LIBRARY_PATH="''${LD_LIBRARY_PATH:+''${LD_LIBRARY_PATH}:}${ - makeLibraryPath (filter (x: !isNull x) systemBuildInputs) - }" ${if isHaLVM then ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/HaLVM-${ghc.version}"'' else ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/${ghcCommand}-${ghc.version}"''} diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index aa0090e4cff53..d858787f43cd0 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -56,7 +56,6 @@ symlinkJoin { # as a dedicated drv attribute, like `compiler-name` name = ghc.name + "-with-packages"; paths = paths ++ [ghc]; - extraOutputsToInstall = [ "out" "doc" ]; postBuild = '' . ${makeWrapper}/nix-support/setup-hook diff --git a/pkgs/development/libraries/libproxy/default.nix b/pkgs/development/libraries/libproxy/default.nix index 614890e929f74..bf9e2d079cd6e 100644 --- a/pkgs/development/libraries/libproxy/default.nix +++ b/pkgs/development/libraries/libproxy/default.nix @@ -1,5 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake -, dbus, networkmanager, spidermonkey_38, pcre, python2, python3 }: +{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake, zlib +, dbus, networkmanager, spidermonkey_38, pcre, python2, python3 +, SystemConfiguration, CoreFoundation, JavaScriptCore }: stdenv.mkDerivation rec { name = "libproxy-${version}"; @@ -16,7 +17,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig cmake ]; - buildInputs = [ dbus networkmanager spidermonkey_38 pcre python2 python3 ]; + buildInputs = [ pcre python2 python3 zlib ] + ++ (if stdenv.hostPlatform.isDarwin + then [ SystemConfiguration CoreFoundation JavaScriptCore ] + else [ spidermonkey_38 dbus networkmanager ]); preConfigure = '' cmakeFlagsArray+=( @@ -27,7 +31,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; license = licenses.lgpl21; homepage = http://libproxy.github.io/libproxy/; description = "A library that provides automatic proxy configuration management"; diff --git a/pkgs/development/python-modules/awesome-slugify/default.nix b/pkgs/development/python-modules/awesome-slugify/default.nix index 105c70c28b34d..945c941dec4ea 100644 --- a/pkgs/development/python-modules/awesome-slugify/default.nix +++ b/pkgs/development/python-modules/awesome-slugify/default.nix @@ -3,13 +3,17 @@ buildPythonPackage rec { pname = "awesome-slugify"; version = "1.6.5"; - name = "${pname}-${version}"; src = fetchPypi { inherit pname version; sha256 = "0wgxrhr8s5vk2xmcz9s1z1aml4ppawmhkbggl9rp94c747xc7pmv"; }; + prePatch = '' + substituteInPlace setup.py \ + --replace 'Unidecode>=0.04.14,<0.05' 'Unidecode>=0.04.14' + ''; + patches = [ ./slugify_filename_test.patch # fixes broken test by new unidecode ]; diff --git a/pkgs/development/python-modules/dateparser/default.nix b/pkgs/development/python-modules/dateparser/default.nix index 21deadf146dca..fdc408e1c4c10 100644 --- a/pkgs/development/python-modules/dateparser/default.nix +++ b/pkgs/development/python-modules/dateparser/default.nix @@ -1,47 +1,40 @@ -{ stdenv, fetchFromGitHub, buildPythonPackage, isPy3k +{ lib, fetchPypi, buildPythonPackage, isPy3k , nose , parameterized , mock , glibcLocales , six , jdatetime -, pyyaml , dateutil , umalqurra , pytz , tzlocal , regex , ruamel_yaml }: + buildPythonPackage rec { pname = "dateparser"; - version = "0.6.0"; + version = "0.7.0"; - src = fetchFromGitHub { - owner = "scrapinghub"; - repo = pname; - rev = "refs/tags/v${version}"; - sha256 = "0q2vyzvlj46r6pr0s6m1a0md1cpg9nv1n3xw286l4x2cc7fj2g3y"; + src = fetchPypi { + inherit pname version; + sha256 = "940828183c937bcec530753211b70f673c0a9aab831e43273489b310538dff86"; }; - # Replace nose-parameterized by parameterized - prePatch = '' - sed -i s/nose_parameterized/parameterized/g tests/*.py - sed -i s/nose-parameterized/parameterized/g tests/requirements.txt - ''; - - # Upstream Issue: https://github.com/scrapinghub/dateparser/issues/364 - disabled = isPy3k; - - checkInputs = [ nose parameterized mock glibcLocales ]; + checkInputs = [ nose mock parameterized six glibcLocales ]; preCheck ='' # skip because of missing convertdate module, which is an extra requirement rm tests/test_jalali.py ''; - propagatedBuildInputs = [ six jdatetime pyyaml dateutil - umalqurra pytz tzlocal regex ruamel_yaml ]; + propagatedBuildInputs = [ + # install_requires + dateutil pytz regex tzlocal + # extra_requires + jdatetime ruamel_yaml umalqurra + ]; - meta = with stdenv.lib;{ + meta = with lib; { description = "Date parsing library designed to parse dates from HTML pages"; homepage = https://github.com/scrapinghub/dateparser; license = licenses.bsd3; diff --git a/pkgs/development/python-modules/pytest-httpbin/default.nix b/pkgs/development/python-modules/pytest-httpbin/default.nix index caa2c27e3f85d..cfa24fdfe528b 100644 --- a/pkgs/development/python-modules/pytest-httpbin/default.nix +++ b/pkgs/development/python-modules/pytest-httpbin/default.nix @@ -24,6 +24,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ flask decorator httpbin six requests ]; + checkPhase = '' + py.test + ''; + meta = { description = "Easily test your HTTP library against a local copy of httpbin.org"; homepage = https://github.com/kevin1024/pytest-httpbin; diff --git a/pkgs/development/python-modules/pytest-sugar/default.nix b/pkgs/development/python-modules/pytest-sugar/default.nix index 2965d169599a8..a266b4617492c 100644 --- a/pkgs/development/python-modules/pytest-sugar/default.nix +++ b/pkgs/development/python-modules/pytest-sugar/default.nix @@ -1,17 +1,20 @@ { stdenv, buildPythonPackage, fetchPypi, termcolor, pytest }: buildPythonPackage rec { - name = "${pname}-${version}"; pname = "pytest-sugar"; - version = "0.9.0"; + version = "0.9.1"; src = fetchPypi { inherit pname version; - sha256 = "11lni9kn0r1y896xg20qjv4yjcyr56h0hx9dprdgjnam4dqcl6lg"; + sha256 = "ab8cc42faf121344a4e9b13f39a51257f26f410e416c52ea11078cdd00d98a2c"; }; propagatedBuildInputs = [ termcolor pytest ]; + checkPhase = '' + py.test + ''; + meta = with stdenv.lib; { description = "A plugin that changes the default look and feel of py.test"; homepage = https://github.com/Frozenball/pytest-sugar; diff --git a/pkgs/development/python-modules/pythonnet/default.nix b/pkgs/development/python-modules/pythonnet/default.nix new file mode 100644 index 0000000000000..98f714c8d5383 --- /dev/null +++ b/pkgs/development/python-modules/pythonnet/default.nix @@ -0,0 +1,84 @@ +{ lib +, fetchPypi +, fetchNuGet +, buildPythonPackage +, python +, pytest +, pycparser +, pkgconfig +, dotnetbuildhelpers +, clang +, mono +}: + +let + + UnmanagedExports127 = fetchNuGet { + baseName = "UnmanagedExports"; + version = "1.2.7"; + sha256 = "0bfrhpmq556p0swd9ssapw4f2aafmgp930jgf00sy89hzg2bfijf"; + outputFiles = [ "*" ]; + }; + + NUnit360 = fetchNuGet { + baseName = "NUnit"; + version = "3.6.0"; + sha256 = "0wz4sb0hxlajdr09r22kcy9ya79lka71w0k1jv5q2qj3d6g2frz1"; + outputFiles = [ "*" ]; + }; + +in + +buildPythonPackage rec { + pname = "pythonnet"; + version = "2.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1hxnkrfj8ark9sbamcxzd63p98vgljfvdwh79qj3ac8pqrgghq80"; + }; + + postPatch = '' + substituteInPlace setup.py --replace 'self._install_packages()' '#self._install_packages()' + ''; + + preConfigure = '' + [ -z "$dontPlacateNuget" ] && placate-nuget.sh + [ -z "$dontPlacatePaket" ] && placate-paket.sh + ''; + + nativeBuildInputs = [ + pytest + pycparser + + pkgconfig + dotnetbuildhelpers + clang + + NUnit360 + UnmanagedExports127 + ]; + + buildInputs = [ + mono + ]; + + preBuild = '' + rm -rf packages + mkdir packages + + ln -s ${NUnit360}/lib/dotnet/NUnit/ packages/NUnit.3.6.0 + ln -s ${UnmanagedExports127}/lib/dotnet/NUnit/ packages/UnmanagedExports.1.2.7 + ''; + + checkPhase = '' + ${python.interpreter} -m pytest + ''; + + meta = with lib; { + description = ".Net and Mono integration for Python"; + homepage = https://pythonnet.github.io; + license = licenses.mit; + maintainers = with maintainers; [ jraygauthier ]; + }; +} diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 4510308d3e563..ee1fb24b3098b 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -285,7 +285,7 @@ let pbdMPI = [ pkgs.openmpi ]; pbdNCDF4 = [ pkgs.netcdf ]; pbdPROF = [ pkgs.openmpi ]; - pbdZMQ = [ pkgs.which ]; + pbdZMQ = lib.optionals stdenv.isDarwin [ pkgs.which ]; pdftools = [ pkgs.poppler.dev ]; PKI = [ pkgs.openssl.dev ]; png = [ pkgs.libpng.dev ]; @@ -393,6 +393,7 @@ let nat = [ pkgs.which ]; nat_nblast = [ pkgs.which ]; nat_templatebrains = [ pkgs.which ]; + pbdZMQ = lib.optionals stdenv.isDarwin [ pkgs.binutils.bintools ]; RMark = [ pkgs.which ]; RPushbullet = [ pkgs.which ]; qtpaint = [ pkgs.cmake ]; @@ -776,6 +777,14 @@ let PKG_LIBS = "-L${pkgs.openblasCompat}/lib -lopenblas"; }); + pbdZMQ = old.pbdZMQ.overrideDerivation (attrs: { + postPatch = lib.optionalString stdenv.isDarwin '' + for file in R/*.{r,r.in}; do + sed -i 's#system("which \(\w\+\)"[^)]*)#"${pkgs.binutils.bintools}/bin/\1"#g' $file + done + ''; + }); + qtbase = old.qtbase.overrideDerivation (attrs: { patches = [ ./patches/qtbase.patch ]; }); diff --git a/pkgs/development/tools/hcloud/default.nix b/pkgs/development/tools/hcloud/default.nix new file mode 100644 index 0000000000000..e56502a4ad051 --- /dev/null +++ b/pkgs/development/tools/hcloud/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "hcloud-${version}"; + version = "1.3.0"; + goPackagePath = "github.com/hetznercloud/cli"; + + src = fetchFromGitHub { + owner = "hetznercloud"; + repo = "cli"; + rev = "v${version}"; + sha256 = "1216qz1kk38vkvfrznjwb65vsbhscqvvrsbp2i6pnf0i85p00pqm"; + }; + + buildFlagsArray = [ "-ldflags=" "-X github.com/hetznercloud/cli.Version=${version}" ]; + + meta = { + description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers"; + homepage = https://github.com/hetznercloud/cli; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.all; + maintainers = [ stdenv.lib.maintainers.zauberpony ]; + }; +} diff --git a/pkgs/development/tools/misc/uhd/default.nix b/pkgs/development/tools/misc/uhd/default.nix index 8212eccc6d138..78195e994c947 100644 --- a/pkgs/development/tools/misc/uhd/default.nix +++ b/pkgs/development/tools/misc/uhd/default.nix @@ -7,18 +7,29 @@ # SUBSYSTEMS=="usb", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0002", MODE:="0666" # SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0002", MODE:="0666" -stdenv.mkDerivation rec { - name = "uhd-${version}"; - version = "3.10.2.0"; +let + uhdVer = "003_010_003_000"; + ImgVer = stdenv.lib.replaceStrings ["_"] ["."] uhdVer; # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz # and xxx.yyy.zzz. Hrmpf... + version = "3.10.3.0"; + + # Firmware images are downloaded (pre-built) from: + # http://files.ettus.com/binaries/images/ + uhdImagesSrc = fetchurl { + url = "http://files.ettus.com/binaries/images/uhd-images_${ImgVer}-release.tar.gz"; + sha256 = "198awvw6zsh19ydgx5qry5yc6yahdval9wjrsqbyj51pnr6s5qvy"; + }; + +in stdenv.mkDerivation { + name = "uhd-${version}"; src = fetchFromGitHub { owner = "EttusResearch"; repo = "uhd"; - rev = "release_003_010_002_000"; - sha256 = "0g6f4amw7h0vr6faa1nc1zs3bc645binza0zqqx5cwgfxybv8cfy"; + rev = "release_${uhdVer}"; + sha256 = "1aj8qizbyz4shwawj3qlhl6pyyda59hhgm9cwrj7s5kfdi4vdlc3"; }; enableParallelBuilding = true; @@ -31,13 +42,6 @@ stdenv.mkDerivation rec { # Build only the host software preConfigure = "cd host"; - # Firmware images are downloaded (pre-built) - uhdImagesName = "uhd-images_003.007.003-release"; - uhdImagesSrc = fetchurl { - url = "http://files.ettus.com/binaries/maint_images/archive/${uhdImagesName}.tar.gz"; - sha256 = "1pv5c5902041494z0jfw623ca29pvylrw5klybbhklvn5wwlr6cv"; - }; - postPhases = [ "installFirmware" ]; installFirmware = '' diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix index 61f5f93ebfaa1..554a5585f150e 100644 --- a/pkgs/development/tools/selenium/chromedriver/default.nix +++ b/pkgs/development/tools/selenium/chromedriver/default.nix @@ -4,19 +4,14 @@ }: let allSpecs = { - "i686-linux" = { - system = "linux32"; - sha256 = "13fngjg2v0l3vhlmjnffy785ckgk2kbpm7307li75vinkcly91cj"; - }; - "x86_64-linux" = { system = "linux64"; - sha256 = "0x5vnmnw6mws6iw9s0kcm4crx9gfgy0vjjpk1v0wk7jpn6d0bl47"; + sha256 = "13iyz6579yw4fk9dr4nf2pdj55v1iflj8yf9a4zz7qw5996d5yk7"; }; "x86_64-darwin" = { system = "mac64"; - sha256 = "09y8ijj75q5a7snzchxinxfq2ad2sw0f30zi0p3hqf1n88y28jq6"; + sha256 = "11xa31bxhrq0p7kd3j76dihp73abdbmbwdng5454m1wir6yj25f1"; }; }; @@ -33,7 +28,7 @@ let in stdenv.mkDerivation rec { name = "chromedriver-${version}"; - version = "2.33"; + version = "2.35"; src = fetchurl { url = "http://chromedriver.storage.googleapis.com/${version}/chromedriver_${spec.system}.zip"; diff --git a/pkgs/development/tools/yaml2json/default.nix b/pkgs/development/tools/yaml2json/default.nix new file mode 100644 index 0000000000000..1a8d7f13aff5d --- /dev/null +++ b/pkgs/development/tools/yaml2json/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + + +buildGoPackage rec { + name = "yaml2json-${version}"; + version = "unstable-2017-05-03"; + goPackagePath = "github.com/bronze1man/yaml2json"; + + goDeps = ./deps.nix; + + src = fetchFromGitHub { + rev = "ee8196e587313e98831c040c26262693d48c1a0c"; + owner = "bronze1man"; + repo = "yaml2json"; + sha256 = "16a2sqzbam5adbhfvilnpdabzwncs7kgpr0cn4gp09h2imzsprzw"; + }; + + meta = with stdenv.lib; { + homepage = https://github.com/bronze1man/yaml2json; + description = "Convert yaml to json"; + license = with licenses; [ mit ]; + maintainers = [ maintainers.adisbladis ]; + }; +} diff --git a/pkgs/development/tools/yaml2json/deps.nix b/pkgs/development/tools/yaml2json/deps.nix new file mode 100644 index 0000000000000..f907520cc872a --- /dev/null +++ b/pkgs/development/tools/yaml2json/deps.nix @@ -0,0 +1,11 @@ +[ + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "d670f9405373e636a5a2765eea47fac0c9bc91a4"; + sha256 = "1w1xid51n8v1mydn2m3vgggw8qgpd5a5sr62snsc77d99fpjsrs0"; + }; + } +] diff --git a/pkgs/misc/emulators/atari++/default.nix b/pkgs/misc/emulators/atari++/default.nix index d669233e7593f..5a37b1b32c5be 100644 --- a/pkgs/misc/emulators/atari++/default.nix +++ b/pkgs/misc/emulators/atari++/default.nix @@ -1,16 +1,20 @@ -{ stdenv, fetchurl, libSM, libX11, SDL }: +{ stdenv, fetchurl, libSM, libX11, libICE, SDL, alsaLib, gcc-unwrapped, libXext }: with stdenv.lib; stdenv.mkDerivation rec{ name = "atari++-${version}"; - version = "1.73"; + version = "1.81"; src = fetchurl { url = "http://www.xl-project.com/download/atari++_${version}.tar.gz"; - sha256 = "1y5kwh08717jsa5agxrvxnggnwxq36irrid9rzfhca1nnvp9a45l"; + sha256 = "1sv268dsjddirhx47zaqgqiahy6zjxj7xaiiksd1gjvs4lvf3cdg"; }; - buildInputs = [ libSM libX11 SDL ]; + buildInputs = [ libSM libX11 SDL libICE alsaLib gcc-unwrapped libXext ]; + + postFixup = '' + patchelf --set-rpath ${stdenv.lib.makeLibraryPath buildInputs} "$out/bin/atari++" + ''; meta = { homepage = http://www.xl-project.com/; diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index d041d6de4f6f2..0172faaea3d2d 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -2035,6 +2035,17 @@ rec { buildInputs = [ python ]; }; + targets-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation + name = "targets-vim-2017-12-03"; + src = fetchgit { + url = "https://github.com/wellle/targets.vim"; + rev = "6f809397526797f8f419a5d2b86d90e5aff68e66"; + sha256 = "0djjm7b41kgrkz447br7qi3w96ayz9lyxd164gyp082qqxxpz63q"; + }; + dependencies = []; + + }; + command-t = buildVimPluginFrom2Nix { # created by nix#NixDerivation name = "command-t-2017-11-16"; src = fetchgit { diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 661917c955be3..a0906e4f3b4aa 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -165,6 +165,7 @@ "github:vim-scripts/wombat256.vim" "github:w0rp/ale" "github:wakatime/vim-wakatime" +"github:wellle/targets.vim" "github:wincent/command-t" "github:will133/vim-dirdiff" "github:xolox/vim-easytags" diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 23749fd4ce602..e11419846aeb8 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -325,11 +325,14 @@ rec { # add a customize option to a vim derivation makeCustomizable = vim: vim // { - customize = {name, vimrcConfig}: vimWithRC { + customize = { name, vimrcConfig }: vimWithRC { vimExecutable = "${vim}/bin/vim"; inherit name; vimrcFile = vimrcFile vimrcConfig; }; + + override = f: makeCustomizable (vim.override f); + overrideAttrs = f: makeCustomizable (vim.overrideAttrs f); }; pluginnames2Nix = {name, namefiles} : vim_configurable.customize { diff --git a/pkgs/shells/nix-bash-completions/default.nix b/pkgs/shells/nix-bash-completions/default.nix index bb945f404215b..fb6fa24ac334b 100644 --- a/pkgs/shells/nix-bash-completions/default.nix +++ b/pkgs/shells/nix-bash-completions/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { - version = "0.6.2"; + version = "0.6.3"; name = "nix-bash-completions-${version}"; src = fetchFromGitHub { owner = "hedning"; repo = "nix-bash-completions"; rev = "v${version}"; - sha256 = "0w6mimi70drjkdpx5pcw66xy2a4kysjfzmank0kc5vbhrjgkjwyp"; + sha256 = "1zmk9f53xpwk5j6qqisjlddgm2fr68p1q6pn3wa14bd777lranhj"; }; # To enable lazy loading via. bash-completion we need a symlink to the script diff --git a/pkgs/shells/nix-zsh-completions/default.nix b/pkgs/shells/nix-zsh-completions/default.nix index 29fb065a6f8bb..2bcff6b809dca 100644 --- a/pkgs/shells/nix-zsh-completions/default.nix +++ b/pkgs/shells/nix-zsh-completions/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub }: let - version = "0.3.7"; + version = "0.3.8"; in stdenv.mkDerivation rec { @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { owner = "spwhitt"; repo = "nix-zsh-completions"; rev = "${version}"; - sha256 = "164x8awia56z481r898pbywjgrx8fv8gfw8pxp4qgbxzp3gwq9iy"; + sha256 = "05ynd38br2kn657g7l01jg1q8ja9xwrdyb95w02gh7j9cww2k06w"; }; installPhase = '' diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix index 4b2b79a210466..43b766fdaf2e5 100644 --- a/pkgs/shells/zsh/default.nix +++ b/pkgs/shells/zsh/default.nix @@ -20,15 +20,19 @@ stdenv.mkDerivation { buildInputs = [ ncurses pcre ]; + configureFlags = [ + "--enable-maildir-support" + "--enable-multibyte" + "--with-tcsetpgrp" + "--enable-pcre" + ]; preConfigure = '' - configureFlags="--enable-maildir-support --enable-multibyte --enable-zprofile=$out/etc/zprofile --with-tcsetpgrp --enable-pcre" + configureFlagsArray+=(--enable-zprofile=$out/etc/zprofile) ''; # the zsh/zpty module is not available on hydra # so skip groups Y Z - checkFlagsArray = '' - (TESTNUM=A TESTNUM=B TESTNUM=C TESTNUM=D TESTNUM=E TESTNUM=V TESTNUM=W) - ''; + checkFlags = map (T: "TESTNUM=${T}") (stdenv.lib.stringToCharacters "ABCDEVW"); # XXX: think/discuss about this, also with respect to nixos vs nix-on-X postInstall = '' diff --git a/pkgs/tools/audio/abcmidi/default.nix b/pkgs/tools/audio/abcmidi/default.nix index 941c5e343b923..6915f8a907119 100644 --- a/pkgs/tools/audio/abcmidi/default.nix +++ b/pkgs/tools/audio/abcmidi/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "abcMIDI-${version}"; - version = "2018.01.25"; + version = "2018.02.07"; src = fetchzip { url = "http://ifdo.ca/~seymour/runabc/${name}.zip"; - sha256 = "18h6gqhh75qdi8krpp0m2pxbxi0n08wrh8xay477jm3vaggyr8s9"; + sha256 = "16hdv114hs5agg288kpbijqw53wdiswjmprpbhy7kgdjnp9ijwxw"; }; # There is also a file called "makefile" which seems to be preferred by the standard build phase diff --git a/pkgs/tools/filesystems/exfat/default.nix b/pkgs/tools/filesystems/exfat/default.nix index 831594973e21a..47ff22ae20ddc 100644 --- a/pkgs/tools/filesystems/exfat/default.nix +++ b/pkgs/tools/filesystems/exfat/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "exfat-${version}"; - version = "1.2.7"; + version = "1.2.8"; src = fetchFromGitHub { owner = "relan"; repo = "exfat"; rev = "v${version}"; - sha256 = "1sk4z133djh8sdvx2vvmd8kf4qfly2i3hdar4zpg0s41jpbzdx69"; + sha256 = "0q02g3yvfmxj70h85a69d8s4f6y7jask268vr87j44ya51lzndd9"; }; nativeBuildInputs = [ autoreconfHook pkgconfig ]; diff --git a/pkgs/tools/misc/rename/default.nix b/pkgs/tools/misc/rename/default.nix new file mode 100644 index 0000000000000..e30c2e89349d8 --- /dev/null +++ b/pkgs/tools/misc/rename/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchFromGitHub, buildPerlPackage }: + +buildPerlPackage rec { + name = "rename-${version}"; + version = "1.9"; + src = fetchFromGitHub { + owner = "pstray"; + repo = "rename"; + rev = "d46f1d0ced25dc5849acb5d5974a3e2e9d97d536"; + sha256 = "0qahs1cqfaci2hdf1xncrz4k0z5skkfr43apnm3kybs7za33apzw"; + }; + meta = with stdenv.lib; { + description = "Rename files according to a Perl rewrite expression"; + homepage = http://search.cpan.org/~pederst/rename-1.9/bin/rename.PL; + maintainers = with maintainers; [ mkg ]; + license = with licenses; [ gpl1Plus ]; + }; +} diff --git a/pkgs/tools/misc/screenfetch/default.nix b/pkgs/tools/misc/screenfetch/default.nix index 9ef0c9ebdf7d5..a9cd9d75de8e2 100644 --- a/pkgs/tools/misc/screenfetch/default.nix +++ b/pkgs/tools/misc/screenfetch/default.nix @@ -3,14 +3,30 @@ , darwin }: -stdenv.mkDerivation { - name = "screenFetch-2016-10-11"; +let + path = lib.makeBinPath ([ + coreutils gawk gnused findutils + gnugrep ncurses bc + ] ++ lib.optionals stdenv.isLinux [ + procps + xdpyinfo + xprop + ] ++ lib.optionals stdenv.isDarwin (with darwin; [ + adv_cmds + DarwinTools + system_cmds + "/usr" # some commands like defaults is not available to us + ])); + +in stdenv.mkDerivation rec { + name = "screenFetch-${version}"; + version = "3.8.0"; src = fetchFromGitHub { - owner = "KittyKatt"; - repo = "screenFetch"; - rev = "89e51f24018c89b3647deb24406a9af3a78bbe99"; - sha256 = "0i2k261jj2s4sfhav7vbsd362pa0gghw6qhwafhmicmf8hq2a18v"; + owner = "KittyKatt"; + repo = "screenFetch"; + rev = "v${version}"; + sha256 = "00ibv72cb7cqfpljyzgvajhbp0clqsqliz18nyv83bfy3gkf2qs8"; }; nativeBuildInputs = [ makeWrapper ]; @@ -18,40 +34,29 @@ stdenv.mkDerivation { installPhase = '' install -Dm 0755 screenfetch-dev $out/bin/screenfetch install -Dm 0644 screenfetch.1 $out/share/man/man1/screenfetch.1 + install -Dm 0644 -t $out/share/doc/screenfetch CHANGELOG COPYING README.mkdn TODO - # Fix all of the depedencies of screenfetch + # Fix all of the dependencies of screenfetch patchShebangs $out/bin/screenfetch wrapProgram "$out/bin/screenfetch" \ - --set PATH ${lib.makeBinPath ([ - coreutils gawk gnused findutils - gnugrep ncurses bc - ] ++ lib.optionals stdenv.isLinux [ - procps - xdpyinfo - xprop - ] ++ lib.optionals stdenv.isDarwin (with darwin; [ - adv_cmds - DarwinTools - system_cmds - "/usr" # some commands like defaults is not available to us - ]))} + --prefix PATH : ${path} ''; meta = with lib; { description = "Fetches system/theme information in terminal for Linux desktop screenshots"; longDescription = '' - screenFetch is a "Bash Screenshot Information Tool". This handy Bash - script can be used to generate one of those nifty terminal theme - information + ASCII distribution logos you see in everyone's screenshots - nowadays. It will auto-detect your distribution and display an ASCII - version of that distribution's logo and some valuable information to the - right. There are options to specify no ascii art, colors, taking a - screenshot upon displaying info, and even customizing the screenshot - command! This script is very easy to add to and can easily be extended. + screenFetch is a "Bash Screenshot Information Tool". This handy Bash + script can be used to generate one of those nifty terminal theme + information + ASCII distribution logos you see in everyone's screenshots + nowadays. It will auto-detect your distribution and display an ASCII + version of that distribution's logo and some valuable information to the + right. There are options to specify no ascii art, colors, taking a + screenshot upon displaying info, and even customizing the screenshot + command! This script is very easy to add to and can easily be extended. ''; license = licenses.gpl3; - homepage = http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/; - maintainers = with maintainers; [relrod]; + homepage = https://github.com/KittyKatt/screenFetch; + maintainers = with maintainers; [ relrod ]; platforms = platforms.all; }; } diff --git a/pkgs/tools/misc/uudeview/default.nix b/pkgs/tools/misc/uudeview/default.nix new file mode 100644 index 0000000000000..e66580f25ffb1 --- /dev/null +++ b/pkgs/tools/misc/uudeview/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, tcl, tk }: + +stdenv.mkDerivation rec { + name = "uudeview-0.5.20"; + src = fetchurl { + url = "http://www.fpx.de/fp/Software/UUDeview/download/${name}.tar.gz"; + sha256 = "0dg4v888fxhmf51vxq1z1gd57fslsidn15jf42pj4817vw6m36p4"; + }; + + buildInputs = [ tcl tk ]; + hardeningDisable = [ "format" ]; + configureFlags = [ "--enable-tk=${tk.dev}" "--enable-tcl=${tcl}" ]; + postPatch = '' + substituteInPlace tcl/xdeview --replace "exec uuwish" "exec $out/bin/uuwish" + ''; + + meta = { + description = "The Nice and Friendly Decoder"; + homepage = http://www.fpx.de/fp/Software/UUDeview/; + license = stdenv.lib.licenses.gpl2; + maintainers = with stdenv.lib.maintainers; [ woffs ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix index c4595a1a94e15..0386896d97f83 100644 --- a/pkgs/tools/misc/youtube-dl/default.nix +++ b/pkgs/tools/misc/youtube-dl/default.nix @@ -16,11 +16,11 @@ with stdenv.lib; buildPythonApplication rec { name = "youtube-dl-${version}"; - version = "2018.01.27"; + version = "2018.02.08"; src = fetchurl { url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz"; - sha256 = "14vbm8pr6xdrdbk8j9k4v82rnalbdpk2lcm7n9wj6z6d441ymji9"; + sha256 = "0iq5mav782gz0gm00rry3v7gdxkkx4y1k0p20pvz32ga4id5k1mg"; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 16b22e3f25542..dbe2a66393523 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { name = "curl-7.58.0"; src = fetchurl { - url = "http://curl.haxx.se/download/${name}.tar.bz2"; + url = "https://curl.haxx.se/download/${name}.tar.bz2"; sha256 = "0cg7klhf1ksnbw5wvwa802qir877zv4y3dj7swz1xh07g3wq3c0w"; }; diff --git a/pkgs/tools/networking/keepalived/default.nix b/pkgs/tools/networking/keepalived/default.nix index fe8988dc41d9e..140ea6860fc33 100644 --- a/pkgs/tools/networking/keepalived/default.nix +++ b/pkgs/tools/networking/keepalived/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "keepalived-${version}"; - version = "1.3.6"; + version = "1.4.1"; src = fetchFromGitHub { owner = "acassen"; repo = "keepalived"; rev = "v${version}"; - sha256 = "05088vv510dlflzyg8sh8l8qfscnvxl6n6pw9ycp27zhb6r5cr5y"; + sha256 = "1d3jnfhj9mpnc27wvgsiz2vr4lnvvccw3v128z16jpyibyv20ph0"; }; buildInputs = [ diff --git a/pkgs/tools/networking/stunnel/default.nix b/pkgs/tools/networking/stunnel/default.nix index deac37468360a..0d328c02d3715 100644 --- a/pkgs/tools/networking/stunnel/default.nix +++ b/pkgs/tools/networking/stunnel/default.nix @@ -5,8 +5,10 @@ stdenv.mkDerivation rec { version = "5.44"; src = fetchurl { - url = "http://www.stunnel.org/downloads/${name}.tar.gz"; - sha256 = "1692y69wl7j6yjgnrrzclgzb34bxsaxjzl1dfy47vms7pdfk42lr"; + url = "https://www.stunnel.org/downloads/${name}.tar.gz"; + sha256 = "990a325dbb47d77d88772dd02fbbd27d91b1fea3ece76c9ff4461eca93f12299"; + # please use the contents of "https://www.stunnel.org/downloads/${name}.tar.gz.sha256", + # not the output of `nix-prefetch-url` }; buildInputs = [ openssl ]; diff --git a/pkgs/tools/security/eschalot/default.nix b/pkgs/tools/security/eschalot/default.nix new file mode 100644 index 0000000000000..d628a28023a42 --- /dev/null +++ b/pkgs/tools/security/eschalot/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, openssl }: + +stdenv.mkDerivation rec { + pname = "eschalot"; + version = "2018-01-19"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "ReclaimYourPrivacy"; + repo = pname; + rev = "56a967b62631cfd3c7ef68541263dbd54cbbc2c4"; + sha256 = "1iw1jrydasm9dmgpcdimd8dy9n281ys9krvf3fd3dlymkgsj604d"; + }; + + buildInputs = [ openssl ]; + + installPhase = '' + install -D -t $out/bin eschalot worgen + ''; + + meta = with stdenv.lib; { + description = "Tor hidden service name generator"; + homepage = src.meta.homepage; + license = licenses.isc; + platforms = platforms.unix; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/tools/security/theharvester/default.nix b/pkgs/tools/security/theharvester/default.nix new file mode 100644 index 0000000000000..f1bac7adba108 --- /dev/null +++ b/pkgs/tools/security/theharvester/default.nix @@ -0,0 +1,41 @@ +{ stdenv, makeWrapper, python2Packages, fetchFromGitHub, python2 }: + +stdenv.mkDerivation rec { + pname = "theHarvester"; + version = "2.7.1"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "laramies"; + repo = "${pname}"; + rev = "25553762d2d93a39083593adb08a34d5f5142c60"; + sha256 = "0gnm598y6paz0knwvdv1cx0w6ngdbbpzkdark3q5vs66yajv24w4"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + # add dependencies + propagatedBuildInputs = [ python2Packages.requests ]; + + installPhase = '' + # create dirs + mkdir -p $out/share/${pname} $out/bin + + # move project code + mv * $out/share/${pname}/ + + # make project runnable + chmod +x $out/share/${pname}/theHarvester.py + ln -s $out/share/${pname}/theHarvester.py $out/bin + + wrapProgram "$out/bin/theHarvester.py" --prefix PYTHONPATH : $out/share/${pname}:$PYTHONPATH + ''; + + meta = with stdenv.lib; { + description = "Gather E-mails, subdomains and names from different public sources"; + homepage = "https://github.com/laramies/theHarvester"; + platforms = platforms.all; + maintainers = with maintainers; [ treemo ]; + license = licenses.gpl2; + }; +} diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix index f494f1911593b..02b57ee3a13b9 100644 --- a/pkgs/tools/typesetting/asciidoctor/default.nix +++ b/pkgs/tools/typesetting/asciidoctor/default.nix @@ -1,12 +1,18 @@ -{ stdenv, lib, bundlerEnv, ruby, curl }: - -bundlerEnv { - pname = "asciidoctor"; +{ stdenv, lib, bundlerApp, ruby, curl }: +bundlerApp { inherit ruby; - + pname = "asciidoctor"; gemdir = ./.; + exes = [ + "asciidoctor" + "asciidoctor-bespoke" + "asciidoctor-latex" + "asciidoctor-pdf" + "asciidoctor-safe" + ]; + meta = with lib; { description = "A faster Asciidoc processor written in Ruby"; homepage = http://asciidoctor.org/; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 12b00338723a8..3a2eb7c918b97 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -79,6 +79,10 @@ with pkgs; { deps = [ autoconf264 automake111x gettext libtool ]; } ../build-support/setup-hooks/autoreconf.sh; + autoPatchelfHook = makeSetupHook + { deps = [ file ]; } + ../build-support/setup-hooks/auto-patchelf.sh; + ensureNewerSourcesHook = { year }: makeSetupHook {} (writeScript "ensure-newer-sources-hook.sh" '' postUnpackHooks+=(_ensureNewerSources) @@ -1099,6 +1103,8 @@ with pkgs; envconsul = callPackage ../tools/system/envconsul { }; + eschalot = callPackage ../tools/security/eschalot { }; + esptool = callPackage ../tools/misc/esptool { }; esptool-ck = callPackage ../tools/misc/esptool-ck { }; @@ -1977,6 +1983,8 @@ with pkgs; mcrcon = callPackage ../tools/networking/mcrcon {}; + uudeview = callPackage ../tools/misc/uudeview { }; + zabbix-cli = callPackage ../tools/misc/zabbix-cli { }; ### DEVELOPMENT / EMSCRIPTEN @@ -4400,6 +4408,10 @@ with pkgs; gsettings_desktop_schemas = gnome3.gsettings_desktop_schemas; }; + rename = callPackage ../tools/misc/rename { + inherit (perlPackages) buildPerlPackage; + }; + renameutils = callPackage ../tools/misc/renameutils { }; renderdoc = libsForQt5.callPackage ../applications/graphics/renderdoc { }; @@ -4866,6 +4878,8 @@ with pkgs; thc-hydra = callPackage ../tools/security/thc-hydra { }; + theharvester = callPackage ../tools/security/theharvester { }; + thefuck = python3Packages.callPackage ../tools/misc/thefuck { }; thin-provisioning-tools = callPackage ../tools/misc/thin-provisioning-tools { }; @@ -7613,6 +7627,8 @@ with pkgs; guile = guile_2_0; }; + hcloud = callPackage ../development/tools/hcloud { }; + help2man = callPackage ../development/tools/misc/help2man { inherit (perlPackages) LocaleGettext; }; @@ -7991,9 +8007,7 @@ with pkgs; tweak = callPackage ../applications/editors/tweak { }; - uhd = callPackage ../development/tools/misc/uhd { - boost = boost165; - }; + uhd = callPackage ../development/tools/misc/uhd { }; uisp = callPackage ../development/tools/misc/uisp { }; @@ -8054,6 +8068,8 @@ with pkgs; yacc = bison; + yaml2json = callPackage ../development/tools/yaml2json { }; + ycmd = callPackage ../development/tools/misc/ycmd { inherit (darwin.apple_sdk.frameworks) Cocoa; llvmPackages = llvmPackages_5; @@ -9882,9 +9898,7 @@ with pkgs; }; libproxy = callPackage ../development/libraries/libproxy { - stdenv = if stdenv.isDarwin - then overrideCC stdenv gcc - else stdenv; + inherit (darwin.apple_sdk.frameworks) SystemConfiguration CoreFoundation JavaScriptCore; }; libpseudo = callPackage ../development/libraries/libpseudo { }; @@ -11155,7 +11169,7 @@ with pkgs; strigi = callPackage ../development/libraries/strigi { clucene_core = clucene_core_2; }; subdl = callPackage ../applications/video/subdl { }; - + subtitleeditor = callPackage ../applications/video/subtitleeditor { }; suil-qt4 = callPackage ../development/libraries/audio/suil { @@ -14639,7 +14653,6 @@ with pkgs; }); darktable = callPackage ../applications/graphics/darktable { - inherit (gnome2) GConf libglade; lua = lua5_3; pugixml = pugixml.override { shared = true; }; }; @@ -14700,10 +14713,10 @@ with pkgs; inherit (callPackage ../applications/virtualization/docker { }) docker_17_12 - docker_18_01; + docker_18_02; docker = docker_17_12; - docker-edge = docker_18_01; + docker-edge = docker_18_02; docker-proxy = callPackage ../applications/virtualization/docker/proxy.nix { }; @@ -17160,6 +17173,8 @@ with pkgs; slic3r = callPackage ../applications/misc/slic3r { }; + slic3r-prusa3d = callPackage ../applications/misc/slic3r-prusa3d { }; + curaengine_stable = callPackage ../applications/misc/curaengine/stable.nix { }; cura_stable = callPackage ../applications/misc/cura/stable.nix { curaengine = curaengine_stable; diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index c27a2e7d39d8c..12a62ba3851bf 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -75,7 +75,7 @@ in rec { coqPackages_8_5 = mkCoqPackages coq_8_5; coqPackages_8_6 = mkCoqPackages coq_8_6; coqPackages_8_7 = mkCoqPackages coq_8_7; - coqPackages = coqPackages_8_6; + coqPackages = coqPackages_8_7; coq = coqPackages.coq; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b36407936127e..ca0acaa69057b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14845,6 +14845,11 @@ in { }; }; + pythonnet = callPackage ../development/python-modules/pythonnet { + # `mono >= 4.6` required to prevent crashes encountered with earlier versions. + mono = pkgs.mono46; + }; + pytz = callPackage ../development/python-modules/pytz { }; pytzdata = callPackage ../development/python-modules/pytzdata { }; |