diff --git a/lib/customisation.nix b/lib/customisation.nix index 3988f4e9b69..823395f04d4 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -1,7 +1,7 @@ { lib }: let - inherit (builtins) attrNames isFunction; + inherit (builtins) attrNames; in @@ -72,7 +72,7 @@ rec { makeOverridable = f: origArgs: let ff = f origArgs; - overrideWith = newArgs: origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs); + overrideWith = newArgs: origArgs // (if lib.isFunction newArgs then newArgs origArgs else newArgs); in if builtins.isAttrs ff then (ff // { override = newArgs: makeOverridable f (overrideWith newArgs); @@ -81,7 +81,7 @@ rec { ${if ff ? overrideAttrs then "overrideAttrs" else null} = fdrv: makeOverridable (args: (f args).overrideAttrs fdrv) origArgs; }) - else if builtins.isFunction ff then { + else if lib.isFunction ff then { override = newArgs: makeOverridable f (overrideWith newArgs); __functor = self: ff; overrideDerivation = throw "overrideDerivation not yet supported for functors"; @@ -112,8 +112,8 @@ rec { */ callPackageWith = autoArgs: fn: args: let - f = if builtins.isFunction fn then fn else import fn; - auto = builtins.intersectAttrs (builtins.functionArgs f) autoArgs; + f = if lib.isFunction fn then fn else import fn; + auto = builtins.intersectAttrs (lib.functionArgs f) autoArgs; in makeOverridable f (auto // args); @@ -122,8 +122,8 @@ rec { individual attributes. */ callPackagesWith = autoArgs: fn: args: let - f = if builtins.isFunction fn then fn else import fn; - auto = builtins.intersectAttrs (builtins.functionArgs f) autoArgs; + f = if lib.isFunction fn then fn else import fn; + auto = builtins.intersectAttrs (lib.functionArgs f) autoArgs; origArgs = auto // args; pkgs = f origArgs; mkAttrOverridable = name: pkg: makeOverridable (newArgs: (f newArgs).${name}) origArgs; diff --git a/lib/debug.nix b/lib/debug.nix index 646ef220ad0..d163e60b695 100644 --- a/lib/debug.nix +++ b/lib/debug.nix @@ -2,10 +2,10 @@ let -inherit (builtins) trace attrNamesToStr isAttrs isFunction isList isInt +inherit (builtins) trace attrNamesToStr isAttrs isList isInt isString isBool head substring attrNames; -inherit (lib) all id mapAttrsFlatten elem; +inherit (lib) all id mapAttrsFlatten elem isFunction; in diff --git a/lib/default.nix b/lib/default.nix index 6d2a95e559c..97d7c10192a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -51,12 +51,12 @@ let inherit (builtins) add addErrorContext attrNames concatLists deepSeq elem elemAt filter genericClosure genList - getAttr hasAttr head isAttrs isBool isFunction isInt isList + getAttr hasAttr head isAttrs isBool isInt isList isString length lessThan listToAttrs pathExists readFile replaceStrings seq stringLength sub substring tail; inherit (trivial) id const concat or and boolToString mergeAttrs flip mapNullable inNixShell min max importJSON warn info - nixpkgsVersion mod; + nixpkgsVersion mod functionArgs setFunctionArgs isFunction; inherit (fixedPoints) fix fix' extends composeExtensions makeExtensible makeExtensibleWithCustomName; diff --git a/lib/deprecated.nix b/lib/deprecated.nix index 2a0f5a55bf1..34cf336d1f4 100644 --- a/lib/deprecated.nix +++ b/lib/deprecated.nix @@ -1,6 +1,6 @@ { lib }: let - inherit (builtins) isFunction head tail isList isAttrs isInt attrNames; + inherit (builtins) head tail isList isAttrs isInt attrNames; in @@ -53,7 +53,7 @@ rec { f: # the function applied to the arguments initial: # you pass attrs, the functions below are passing a function taking the fix argument let - takeFixed = if isFunction initial then initial else (fixed : initial); # transform initial to an expression always taking the fixed argument + takeFixed = if lib.isFunction initial then initial else (fixed : initial); # transform initial to an expression always taking the fixed argument tidy = args: let # apply all functions given in "applyPreTidy" in sequence applyPreTidyFun = fold ( n: a: x: n ( a x ) ) lib.id (maybeAttr "applyPreTidy" [] args); @@ -63,7 +63,7 @@ rec { let args = takeFixed fixed; mergeFun = args.${n}; in if isAttrs x then (mergeFun args x) - else assert isFunction x; + else assert lib.isFunction x; mergeFun args (x ( args // { inherit fixed; })); in overridableDelayableArgs f newArgs; in @@ -374,7 +374,7 @@ rec { if isAttrs x then if x ? outPath then "derivation" else "attrs" - else if isFunction x then "function" + else if lib.isFunction x then "function" else if isList x then "list" else if x == true then "bool" else if x == false then "bool" diff --git a/lib/generators.nix b/lib/generators.nix index f207033c955..73017f2c679 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -14,6 +14,8 @@ let libAttr = lib.attrsets; flipMapAttrs = flip libAttr.mapAttrs; + + inherit (lib) isFunction; in rec { @@ -110,7 +112,7 @@ rec { else if isString v then "\"" + v + "\"" else if null == v then "null" else if isFunction v then - let fna = functionArgs v; + let fna = lib.functionArgs v; showFnas = concatStringsSep "," (libAttr.mapAttrsToList (name: hasDefVal: if hasDefVal then "(${name})" else name) fna); diff --git a/lib/licenses.nix b/lib/licenses.nix index 1fdcc15fd72..0086bd63ebd 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -200,6 +200,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec { fullName = "Eclipse Public License 1.0"; }; + epl20 = spdx { + spdxId = "EPL-2.0"; + fullName = "Eclipse Public License 2.0"; + }; + epson = { fullName = "Seiko Epson Corporation Software License Agreement for Linux"; url = https://download.ebz.epson.net/dsc/du/02/eula/global/LINUX_EN.html; diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 36ff2d154d8..348212df095 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -231,6 +231,7 @@ fadenb = "Tristan Helmich "; falsifian = "James Cook "; fare = "Francois-Rene Rideau "; + f-breidenstein = "Felix Breidenstein "; fgaz = "Francesco Gazzetta "; FireyFly = "Jonas Höglund "; flokli = "Florian Klink "; @@ -542,6 +543,7 @@ pmahoney = "Patrick Mahoney "; pmeunier = "Pierre-Étienne Meunier "; pmiddend = "Philipp Middendorf "; + pneumaticat = "Kevin Liu "; polyrod = "Maurizio Di Pietro "; pradeepchhetri = "Pradeep Chhetri "; prikhi = "Pavan Rikhi "; diff --git a/lib/modules.nix b/lib/modules.nix index 8c3584bbbf4..654c4c588de 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -155,7 +155,7 @@ rec { # a module will resolve strictly the attributes used as argument but # not their values. The values are forwarding the result of the # evaluation of the option. - requiredArgs = builtins.attrNames (builtins.functionArgs f); + requiredArgs = builtins.attrNames (lib.functionArgs f); context = name: ''while evaluating the module argument `${name}' in "${key}":''; extraArgs = builtins.listToAttrs (map (name: { inherit name; diff --git a/lib/trivial.nix b/lib/trivial.nix index c452c7b65bc..d8d51298143 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -52,7 +52,7 @@ rec { # Pull in some builtins not included elsewhere. inherit (builtins) - pathExists readFile isBool isFunction + pathExists readFile isBool isInt add sub lessThan seq deepSeq genericClosure; @@ -99,4 +99,29 @@ rec { */ warn = msg: builtins.trace "WARNING: ${msg}"; info = msg: builtins.trace "INFO: ${msg}"; + + # | Add metadata about expected function arguments to a function. + # The metadata should match the format given by + # builtins.functionArgs, i.e. a set from expected argument to a bool + # representing whether that argument has a default or not. + # setFunctionArgs : (a → b) → Map String Bool → (a → b) + # + # This function is necessary because you can't dynamically create a + # function of the { a, b ? foo, ... }: format, but some facilities + # like callPackage expect to be able to query expected arguments. + setFunctionArgs = f: args: + { # TODO: Should we add call-time "type" checking like built in? + __functor = self: f; + __functionArgs = args; + }; + + # | Extract the expected function arguments from a function. + # This works both with nix-native { a, b ? foo, ... }: style + # functions and functions with args set with 'setFunctionArgs'. It + # has the same return type and semantics as builtins.functionArgs. + # setFunctionArgs : (a → b) → Map String Bool. + functionArgs = f: f.__functionArgs or (builtins.functionArgs f); + + isFunction = f: builtins.isFunction f || + (f ? __functor && isFunction (f.__functor f)); } diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 9bc83be6610..8079a2feb29 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -12,7 +12,7 @@ let substFunction = x: if builtins.isAttrs x then lib.mapAttrs (name: substFunction) x else if builtins.isList x then map substFunction x - else if builtins.isFunction x then "" + else if lib.isFunction x then "" else x; # Clean up declaration sites to not refer to the NixOS source tree. diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index a67d6939790..46cbeb0a158 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -88,6 +88,28 @@ following incompatible changes: . + + + Package attributes starting with a digit have been prefixed with an + underscore sign. This is to avoid quoting in the configuration and + other issues with command-line tools like nix-env. + The change affects the following packages: + + + 2048-in-terminal_2048-in-terminal + + + 90secondportraits_90secondportraits + + + 2bwm_2bwm + + + 389-ds-base_389-ds-base + + + + diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix index 532fff681d3..cf213d906f5 100644 --- a/nixos/lib/testing.nix +++ b/nixos/lib/testing.nix @@ -85,7 +85,7 @@ rec { testScript' = # Call the test script with the computed nodes. - if builtins.isFunction testScript + if lib.isFunction testScript then testScript { inherit nodes; } else testScript; diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 415be580e97..28ed10a5ece 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -302,6 +302,7 @@ kodi = 283; restya-board = 284; mighttpd2 = 285; + hass = 286; # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! @@ -572,6 +573,7 @@ kodi = 283; restya-board = 284; mighttpd2 = 285; + hass = 286; # 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/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix index 6eb42494124..c3e7ab9a666 100644 --- a/nixos/modules/misc/nixpkgs.nix +++ b/nixos/modules/misc/nixpkgs.nix @@ -4,10 +4,10 @@ with lib; let isConfig = x: - builtins.isAttrs x || builtins.isFunction x; + builtins.isAttrs x || lib.isFunction x; optCall = f: x: - if builtins.isFunction f + if lib.isFunction f then f x else f; @@ -38,7 +38,7 @@ let overlayType = mkOptionType { name = "nixpkgs-overlay"; description = "nixpkgs overlay"; - check = builtins.isFunction; + check = lib.isFunction; merge = lib.mergeOneOption; }; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 1942cca23d6..2ec8b28c3fc 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -315,6 +315,7 @@ ./services/misc/gogs.nix ./services/misc/gollum.nix ./services/misc/gpsd.nix + ./services/misc/home-assistant.nix ./services/misc/ihaskell.nix ./services/misc/irkerd.nix ./services/misc/jackett.nix diff --git a/nixos/modules/profiles/clone-config.nix b/nixos/modules/profiles/clone-config.nix index 77d86f8d740..5b4e68beb6a 100644 --- a/nixos/modules/profiles/clone-config.nix +++ b/nixos/modules/profiles/clone-config.nix @@ -17,7 +17,7 @@ let # you should use files). moduleFiles = # FIXME: use typeOf (Nix 1.6.1). - filter (x: !isAttrs x && !builtins.isFunction x) modules; + filter (x: !isAttrs x && !lib.isFunction x) modules; # Partition module files because between NixOS and non-NixOS files. NixOS # files may change if the repository is updated. diff --git a/nixos/modules/services/misc/home-assistant.nix b/nixos/modules/services/misc/home-assistant.nix new file mode 100644 index 00000000000..bc463d3e670 --- /dev/null +++ b/nixos/modules/services/misc/home-assistant.nix @@ -0,0 +1,90 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.home-assistant; + + configFile = pkgs.writeText "configuration.yaml" (builtins.toJSON cfg.config); +in { + meta.maintainers = with maintainers; [ dotlambda ]; + + options.services.home-assistant = { + enable = mkEnableOption "Home Assistant"; + + configDir = mkOption { + default = "/var/lib/hass"; + type = types.path; + description = "The config directory, where your configuration.yaml is located."; + }; + + config = mkOption { + default = null; + type = with types; nullOr attrs; + example = literalExample '' + { + homeassistant = { + name = "Home"; + time_zone = "UTC"; + }; + frontend = { }; + http = { }; + } + ''; + description = '' + Your configuration.yaml as a Nix attribute set. + Beware that setting this option will delete your previous configuration.yaml. + ''; + }; + + package = mkOption { + default = pkgs.home-assistant; + defaultText = "pkgs.home-assistant"; + type = types.package; + example = literalExample '' + pkgs.home-assistant.override { + extraPackages = ps: with ps; [ colorlog ]; + } + ''; + description = '' + Home Assistant package to use. + Most Home Assistant components require additional dependencies, + which are best specified by overriding pkgs.home-assistant. + You can find the dependencies by searching for failed imports in your log or by looking at this list: + + ''; + }; + }; + + config = mkIf cfg.enable { + systemd.services.home-assistant = { + description = "Home Assistant"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + preStart = lib.optionalString (cfg.config != null) '' + rm -f ${cfg.configDir}/configuration.yaml + ln -s ${configFile} ${cfg.configDir}/configuration.yaml + ''; + serviceConfig = { + ExecStart = '' + ${cfg.package}/bin/hass --config "${cfg.configDir}" + ''; + User = "hass"; + Group = "hass"; + Restart = "on-failure"; + ProtectSystem = "strict"; + ReadWritePaths = "${cfg.configDir}"; + PrivateTmp = true; + }; + }; + + users.extraUsers.hass = { + home = cfg.configDir; + createHome = true; + group = "hass"; + uid = config.ids.uids.hass; + }; + + users.extraGroups.hass.gid = config.ids.gids.hass; + }; +} diff --git a/nixos/modules/services/networking/kresd.nix b/nixos/modules/services/networking/kresd.nix index 011a9b2f58e..d0c19c4ecb7 100644 --- a/nixos/modules/services/networking/kresd.nix +++ b/nixos/modules/services/networking/kresd.nix @@ -43,7 +43,7 @@ in type = with types; listOf str; default = [ "::1" "127.0.0.1" ]; description = '' - What addresses the server should listen on. + What addresses the server should listen on. (UDP+TCP 53) ''; }; # TODO: perhaps options for more common stuff like cache size or forwarding @@ -99,9 +99,9 @@ in Restart = "on-failure"; }; + # Trust anchor goes from dns-root-data by default. script = '' - exec '${package}/bin/kresd' --config '${configFile}' \ - -k '${pkgs.dns-root-data}/root.key' + exec '${package}/bin/kresd' --config '${configFile}' --forks=1 ''; requires = [ "kresd.socket" ]; diff --git a/nixos/modules/services/x11/window-managers/2bwm.nix b/nixos/modules/services/x11/window-managers/2bwm.nix index e3f5ec7dbe6..fdbdf35b0f5 100644 --- a/nixos/modules/services/x11/window-managers/2bwm.nix +++ b/nixos/modules/services/x11/window-managers/2bwm.nix @@ -25,12 +25,12 @@ in { name = "2bwm"; start = '' - ${pkgs."2bwm"}/bin/2bwm & + ${pkgs._2bwm}/bin/2bwm & waitPID=$! ''; }; - environment.systemPackages = [ pkgs."2bwm" ]; + environment.systemPackages = [ pkgs._2bwm ]; }; diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index 1f424f84c6e..63d07832d10 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -230,9 +230,7 @@ let RemainAfterExit = true; }; script = '' - ip tuntap add dev "${i.name}" \ - ${optionalString (i.virtualType != null) "mode ${i.virtualType}"} \ - user "${i.virtualOwner}" + ip tuntap add dev "${i.name}" mode "${i.virtualType}" user "${i.virtualOwner}" ''; postStop = '' ip link del ${i.name} || true diff --git a/nixos/modules/tasks/network-interfaces-systemd.nix b/nixos/modules/tasks/network-interfaces-systemd.nix index a365a01bfb1..5d72ad0f1bd 100644 --- a/nixos/modules/tasks/network-interfaces-systemd.nix +++ b/nixos/modules/tasks/network-interfaces-systemd.nix @@ -74,21 +74,17 @@ in networks."99-main" = genericNetwork mkDefault; } (mkMerge (flip map interfaces (i: { - netdevs = mkIf i.virtual ( - let - devType = if i.virtualType != null then i.virtualType - else (if hasPrefix "tun" i.name then "tun" else "tap"); - in { - "40-${i.name}" = { - netdevConfig = { - Name = i.name; - Kind = devType; - }; - "${devType}Config" = optionalAttrs (i.virtualOwner != null) { - User = i.virtualOwner; - }; + netdevs = mkIf i.virtual ({ + "40-${i.name}" = { + netdevConfig = { + Name = i.name; + Kind = i.virtualType; }; - }); + "${i.virtualType}Config" = optionalAttrs (i.virtualOwner != null) { + User = i.virtualOwner; + }; + }; + }); networks."40-${i.name}" = mkMerge [ (genericNetwork mkDefault) { name = mkDefault i.name; DHCP = mkForce (dhcpStr diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index b7e85e402aa..f4851988d63 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -273,11 +273,13 @@ let }; virtualType = mkOption { - default = null; - type = with types; nullOr (enum [ "tun" "tap" ]); + default = if hasPrefix "tun" name then "tun" else "tap"; + defaultText = literalExample ''if hasPrefix "tun" name then "tun" else "tap"''; + type = with types; enum [ "tun" "tap" ]; description = '' - The explicit type of interface to create. Accepts tun or tap strings. - Also accepts null to implicitly detect the type of device. + The type of interface to create. + The default is TUN for an interface name starting + with "tun", otherwise TAP. ''; }; diff --git a/nixos/release.nix b/nixos/release.nix index 972c89c1a41..a396eaac9a3 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -267,6 +267,7 @@ in rec { tests.graphite = callTest tests/graphite.nix {}; tests.hardened = callTest tests/hardened.nix { }; tests.hibernate = callTest tests/hibernate.nix {}; + tests.home-assistant = callTest tests/home-assistant.nix { }; tests.hound = callTest tests/hound.nix {}; tests.i3wm = callTest tests/i3wm.nix {}; tests.initrd-network-ssh = callTest tests/initrd-network-ssh {}; diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix new file mode 100644 index 00000000000..0e2fee8e808 --- /dev/null +++ b/nixos/tests/home-assistant.nix @@ -0,0 +1,41 @@ +import ./make-test.nix ({ pkgs, ... }: + +let + configDir = "/var/lib/foobar"; + +in { + name = "home-assistant"; + + nodes = { + hass = + { config, pkgs, ... }: + { + services.home-assistant = { + inherit configDir; + enable = true; + config = { + homeassistant = { + name = "Home"; + time_zone = "UTC"; + }; + frontend = { }; + http = { }; + }; + }; + }; + }; + + testScript = '' + startAll; + $hass->waitForUnit("home-assistant.service"); + + # Since config is specified using a Nix attribute set, + # configuration.yaml is a link to the Nix store + $hass->succeed("test -L ${configDir}/configuration.yaml"); + + # Check that Home Assistant's web interface and API can be reached + $hass->waitForOpenPort(8123); + $hass->succeed("curl --fail http://localhost:8123/states"); + $hass->succeed("curl --fail http://localhost:8123/api/ | grep 'API running'"); + ''; +}) diff --git a/nixos/tests/make-test.nix b/nixos/tests/make-test.nix index f3e26aa7e74..ee4ba310ad5 100644 --- a/nixos/tests/make-test.nix +++ b/nixos/tests/make-test.nix @@ -2,4 +2,4 @@ f: { system ? builtins.currentSystem, ... } @ args: with import ../lib/testing.nix { inherit system; }; -makeTest (if builtins.isFunction f then f (args // { inherit pkgs; inherit (pkgs) lib; }) else f) +makeTest (if pkgs.lib.isFunction f then f (args // { inherit pkgs; inherit (pkgs) lib; }) else f) diff --git a/nixos/tests/networking.nix b/nixos/tests/networking.nix index 7708775f73f..182328b3296 100644 --- a/nixos/tests/networking.nix +++ b/nixos/tests/networking.nix @@ -433,6 +433,49 @@ let $client2->succeed("ip addr show dev vlan >&2"); ''; }; + virtual = { + name = "Virtual"; + machine = { + networking.interfaces."tap0" = { + ip4 = [ { address = "192.168.1.1"; prefixLength = 24; } ]; + ip6 = [ { address = "2001:1470:fffd:2096::"; prefixLength = 64; } ]; + virtual = true; + }; + networking.interfaces."tun0" = { + ip4 = [ { address = "192.168.1.2"; prefixLength = 24; } ]; + ip6 = [ { address = "2001:1470:fffd:2097::"; prefixLength = 64; } ]; + virtual = true; + }; + }; + + testScript = '' + my $targetList = <<'END'; + tap0: tap UNKNOWN_FLAGS:800 user 0 + tun0: tun UNKNOWN_FLAGS:800 user 0 + END + + # Wait for networking to come up + $machine->start; + $machine->waitForUnit("network.target"); + + # Test interfaces set up + my $list = $machine->succeed("ip tuntap list | sort"); + "$list" eq "$targetList" or die( + "The list of virtual interfaces does not match the expected one:\n", + "Result:\n", "$list\n", + "Expected:\n", "$targetList\n" + ); + + # Test interfaces clean up + $machine->succeed("systemctl stop network-addresses-tap0"); + $machine->succeed("systemctl stop network-addresses-tun0"); + my $residue = $machine->succeed("ip tuntap list"); + $residue eq "" or die( + "Some virtual interface has not been properly cleaned:\n", + "$residue\n" + ); + ''; + }; }; in mapAttrs (const (attrs: makeTest (attrs // { diff --git a/pkgs/applications/audio/ncmpc/default.nix b/pkgs/applications/audio/ncmpc/default.nix index 1b865642178..93e909fc604 100644 --- a/pkgs/applications/audio/ncmpc/default.nix +++ b/pkgs/applications/audio/ncmpc/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { buildInputs = [ glib ncurses mpd_clientlib ]; nativeBuildInputs = [ meson ninja pkgconfig gettext ]; + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; + meta = with stdenv.lib; { description = "Curses-based interface for MPD (music player daemon)"; homepage = https://www.musicpd.org/clients/ncmpc/; diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index 86faeeb0533..4cd0553e4d2 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -27,9 +27,9 @@ in rec { preview = mkStudio { pname = "android-studio-preview"; - version = "3.1.0.8"; # "Android Studio 3.1 Canary 9" - build = "173.4559767"; - sha256Hash = "0wy3bqd4wvvcwlqcv06mwlqgc119pjpc102ix3yacqvki9qyi1r0"; + version = "3.1.0.9"; # "Android Studio 3.1 Beta 1" + build = "173.4567466"; + sha256Hash = "01c6a46pk5zbhwk2w038nm68fkx86nafiw1v2i5rdr93mxvx9cag"; meta = stable.meta // { description = "The Official IDE for Android (preview version)"; diff --git a/pkgs/applications/editors/vim/common.nix b/pkgs/applications/editors/vim/common.nix index 21b0f7a85d2..5155f94eef5 100644 --- a/pkgs/applications/editors/vim/common.nix +++ b/pkgs/applications/editors/vim/common.nix @@ -1,12 +1,12 @@ { lib, fetchFromGitHub }: rec { - version = "8.0.1428"; + version = "8.0.1451"; src = fetchFromGitHub { owner = "vim"; repo = "vim"; rev = "v${version}"; - sha256 = "0pqqh7g96w8jfc5kvv2il6fcbhccwhk4k5skk52g1c1ixsblwz3y"; + sha256 = "1vxd5mr8c62qyf7ax7gi2wka48282yplckq91154yd55xcqw36zx"; }; enableParallelBuilding = true; diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 0d72b8e55ee..91b86a18375 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -38,12 +38,25 @@ ## other -# If you want the resulting program to call itself -# "Firefox"/"Torbrowser" instead of "Nightly" or whatever, enable this -# option. However, in Firefox's case, those binaries may not be -# distributed without permission from the Mozilla Foundation, see -# http://www.mozilla.org/foundation/trademarks/. -, enableOfficialBranding ? isTorBrowserLike +# As stated by Sylvestre Ledru (@sylvestre) on Nov 22, 2017 at +# https://github.com/NixOS/nixpkgs/issues/31843#issuecomment-346372756 we +# have permission to use the official firefox branding. +# +# Fur purposes of documentation the statement of @sylvestre: +# > As the person who did part of the work described in the LWN article +# > and release manager working for Mozilla, I can confirm the statement +# > that I made in +# > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815006 +# > +# > @garbas shared with me the list of patches applied for the Nix package. +# > As they are just for portability and tiny modifications, they don't +# > alter the experience of the product. In parallel, Rok also shared the +# > build options. They seem good (even if I cannot judge the quality of the +# > packaging of the underlying dependencies like sqlite, png, etc). +# > Therefor, as long as you keep the patch queue sane and you don't alter +# > the experience of Firefox users, you won't have any issues using the +# > official branding. +, enableOfficialBranding ? true }: assert stdenv.cc ? libc && stdenv.cc.libc != null; @@ -91,12 +104,14 @@ stdenv.mkDerivation (rec { '' + lib.optionalString (stdenv.lib.versionAtLeast version "58.0.0") '' cat >.mozconfig < $TMPDIR/ga + configureFlagsArray+=("--with-google-api-keyfile=$TMPDIR/ga") '' + '' # this will run autoconf213 ${if (stdenv.lib.versionAtLeast version "58.0.0") then "./mach configure" else "make -f client.mk configure-files"} @@ -171,7 +186,6 @@ stdenv.mkDerivation (rec { ++ flag gssSupport "negotiateauth" ++ lib.optional (!ffmpegSupport) "--disable-gstreamer" ++ flag webrtcSupport "webrtc" - ++ lib.optional googleAPISupport "--with-google-api-keyfile=$TMPDIR/ga" ++ flag crashreporterSupport "crashreporter" ++ lib.optional drmSupport "--enable-eme=widevine" diff --git a/pkgs/applications/virtualization/looking-glass-client/default.nix b/pkgs/applications/virtualization/looking-glass-client/default.nix new file mode 100644 index 00000000000..16be0cc5b6d --- /dev/null +++ b/pkgs/applications/virtualization/looking-glass-client/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchFromGitHub +, pkgconfig, SDL2, SDL, SDL2_ttf, openssl, spice_protocol, fontconfig +, libX11, freefont_ttf +}: + +stdenv.mkDerivation rec { + name = "looking-glass-client-${version}"; + version = "a10"; + + src = fetchFromGitHub { + owner = "gnif"; + repo = "LookingGlass"; + rev = version; + sha256 = "10jxnkrvskjzkg86iz3hnb5v91ykzx6pvcnpy1v4436g5f2d62wn"; + }; + + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ + SDL SDL2 SDL2_ttf openssl spice_protocol fontconfig + libX11 freefont_ttf + ]; + + enableParallelBuilding = true; + + sourceRoot = "source/client"; + + installPhase = '' + mkdir -p $out + mv bin $out/ + ''; + + meta = with stdenv.lib; { + description = "A KVM Frame Relay (KVMFR) implementation"; + longDescription = '' + Looking Glass is an open source application that allows the use of a KVM + (Kernel-based Virtual Machine) configured for VGA PCI Pass-through + without an attached physical monitor, keyboard or mouse. This is the final + step required to move away from dual booting with other operating systems + for legacy programs that require high performance graphics. + ''; + homepage = https://looking-glass.hostfission.com/; + license = licenses.gpl2Plus; + maintainers = [ maintainers.pneumaticat ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/window-managers/qtile/0001-Substitution-vars-for-absolute-paths.patch b/pkgs/applications/window-managers/qtile/0001-Substitution-vars-for-absolute-paths.patch index e3c88a5fa55..71d3d9cafaa 100644 --- a/pkgs/applications/window-managers/qtile/0001-Substitution-vars-for-absolute-paths.patch +++ b/pkgs/applications/window-managers/qtile/0001-Substitution-vars-for-absolute-paths.patch @@ -1,15 +1,5 @@ -From 00c5af939567429d40877845dc52b54fde2d8a50 Mon Sep 17 00:00:00 2001 -From: "Alexander V. Nikolaev" -Date: Thu, 26 Nov 2015 10:53:12 +0200 -Subject: [PATCH 1/3] Substitution vars for absolute paths - ---- - libqtile/pangocffi.py | 6 +++--- - libqtile/xcursors.py | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - diff --git a/libqtile/pangocffi.py b/libqtile/pangocffi.py -index 27691d1..25f690d 100644 +index 1e8f5c04..e860d43a 100644 --- a/libqtile/pangocffi.py +++ b/libqtile/pangocffi.py @@ -58,9 +58,9 @@ except ImportError: @@ -26,18 +16,15 @@ index 27691d1..25f690d 100644 def CairoContext(cairo_t): diff --git a/libqtile/xcursors.py b/libqtile/xcursors.py -index e0e55e1..59b6428 100644 +index f1133555..3e61204a 100644 --- a/libqtile/xcursors.py +++ b/libqtile/xcursors.py -@@ -114,7 +114,7 @@ class Cursors(dict): +@@ -112,7 +112,7 @@ class Cursors(dict): def _setup_xcursor_binding(self): try: - xcursor = ffi.dlopen('libxcb-cursor.so') + xcursor = ffi.dlopen('@xcb-cursor@/lib/libxcb-cursor.so') except OSError: - self.log.warning("xcb-cursor not found, fallback to font pointer") + logger.warning("xcb-cursor not found, fallback to font pointer") return False --- -2.6.3 - diff --git a/pkgs/applications/window-managers/qtile/0002-Restore-PATH-and-PYTHONPATH.patch b/pkgs/applications/window-managers/qtile/0002-Restore-PATH-and-PYTHONPATH.patch index b620bfb2501..7d184838fba 100644 --- a/pkgs/applications/window-managers/qtile/0002-Restore-PATH-and-PYTHONPATH.patch +++ b/pkgs/applications/window-managers/qtile/0002-Restore-PATH-and-PYTHONPATH.patch @@ -1,57 +1,52 @@ -From f299a0aa0eefcf16bb4990f00ac3946727f43ef3 Mon Sep 17 00:00:00 2001 -From: "Alexander V. Nikolaev" -Date: Fri, 27 Nov 2015 10:49:48 +0200 -Subject: [PATCH 2/3] Restore PATH and PYTHONPATH - ---- - bin/qtile | 1 + - bin/qtile-run | 1 + - bin/qtile-session | 2 ++ - libqtile/utils.py | 7 +++++++ - 4 files changed, 11 insertions(+) - +diff --git a/bin/qshell b/bin/qshell +index 2ba7e61c..0ac2a2ef 100755 +--- a/bin/qshell ++++ b/bin/qshell +@@ -28,5 +28,6 @@ base_dir = os.path.abspath(os.path.join(this_dir, "..")) + sys.path.insert(0, base_dir) + + if __name__ == '__main__': ++ __import__("importlib").import_module("libqtile.utils").restore_os_environment() + from libqtile.scripts import qshell + qshell.main() diff --git a/bin/qtile b/bin/qtile -index 66034fe..ce3fcd1 100755 +index 3e82814d..335b5cea 100755 --- a/bin/qtile +++ b/bin/qtile -@@ -131,6 +131,7 @@ def make_qtile(): +@@ -29,5 +29,6 @@ base_dir = os.path.abspath(os.path.join(this_dir, "..")) + sys.path.insert(0, base_dir) - - if __name__ == "__main__": + if __name__ == '__main__': + __import__("importlib").import_module("libqtile.utils").restore_os_environment() - rename_process() - q = make_qtile() - try: + from libqtile.scripts import qtile + qtile.main() diff --git a/bin/qtile-run b/bin/qtile-run -index ccedb96..646a476 100755 +index e4b121be..1c203bc9 100755 --- a/bin/qtile-run +++ b/bin/qtile-run -@@ -50,6 +50,7 @@ def main(): - proc.wait() +@@ -8,5 +8,6 @@ base_dir = os.path.abspath(os.path.join(this_dir, "..")) + sys.path.insert(0, base_dir) - if __name__ == "__main__": + if __name__ == '__main__': + __import__("importlib").import_module("libqtile.utils").restore_os_environment() - try: - main() - except KeyboardInterrupt: -diff --git a/bin/qtile-session b/bin/qtile-session -index 84f6a2d..da31b12 100755 ---- a/bin/qtile-session -+++ b/bin/qtile-session -@@ -25,6 +25,8 @@ - Qtile session manager. - """ + from libqtile.scripts import qtile_run + qtile_run.main() +diff --git a/bin/qtile-top b/bin/qtile-top +index 5316e0e7..272c6430 100755 +--- a/bin/qtile-top ++++ b/bin/qtile-top +@@ -8,5 +8,6 @@ base_dir = os.path.abspath(os.path.join(this_dir, "..")) + sys.path.insert(0, base_dir) -+__import__("importlib").import_module("libqtile.utils").restore_os_environment() -+ - from libqtile.log_utils import init_log - import logging - import os + if __name__ == '__main__': ++ __import__("importlib").import_module("libqtile.utils").restore_os_environment() + from libqtile.scripts import qtile_top + qtile_top.main() diff --git a/libqtile/utils.py b/libqtile/utils.py -index 284089b..ec3539e 100644 +index 36ed0a58..bca9eab3 100644 --- a/libqtile/utils.py +++ b/libqtile/utils.py -@@ -227,3 +227,11 @@ def describe_attributes(obj, attrs, func=None): +@@ -240,3 +240,11 @@ def describe_attributes(obj, attrs, func=None): pairs.append('%s=%s' % (attr, value)) return ', '.join(pairs) diff --git a/pkgs/applications/window-managers/qtile/0003-Restart-executable.patch b/pkgs/applications/window-managers/qtile/0003-Restart-executable.patch index d9377897fc6..c9ae57c8615 100644 --- a/pkgs/applications/window-managers/qtile/0003-Restart-executable.patch +++ b/pkgs/applications/window-managers/qtile/0003-Restart-executable.patch @@ -1,17 +1,8 @@ -From b560c11078fecc35df2c62f34beda06c4e80a10d Mon Sep 17 00:00:00 2001 -From: "Alexander V. Nikolaev" -Date: Fri, 27 Nov 2015 10:54:35 +0200 -Subject: [PATCH 3/3] Restart executable - ---- - libqtile/manager.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - diff --git a/libqtile/manager.py b/libqtile/manager.py -index b1a38e2..110f7d8 100644 +index 36518a74..9b6bdd02 100644 --- a/libqtile/manager.py +++ b/libqtile/manager.py -@@ -1339,7 +1339,7 @@ class Qtile(command.CommandObject): +@@ -1386,7 +1386,7 @@ class Qtile(command.CommandObject): argv = [s for s in argv if not s.startswith('--with-state')] argv.append('--with-state=' + buf.getvalue().decode()) @@ -19,7 +10,4 @@ index b1a38e2..110f7d8 100644 + self.cmd_execute(os.environ.get("QTILE_WRAPPER", "@out@/bin/qtile"), argv[1:]) def cmd_spawn(self, cmd): - """ --- -2.6.3 - + """Run cmd in a shell. diff --git a/pkgs/applications/window-managers/qtile/default.nix b/pkgs/applications/window-managers/qtile/default.nix index a7b9a77b3db..79752829e2a 100644 --- a/pkgs/applications/window-managers/qtile/default.nix +++ b/pkgs/applications/window-managers/qtile/default.nix @@ -7,13 +7,13 @@ in python27Packages.buildPythonApplication rec { name = "qtile-${version}"; - version = "0.10.4"; + version = "0.10.7"; src = fetchFromGitHub { owner = "qtile"; repo = "qtile"; rev = "v${version}"; - sha256 = "0rwklzgkp3x242xql6qmfpfnhr788hd3jc1l80pc5ybxlwyfx59i"; + sha256 = "18szgplyym0b65vnaa8nqzadq6q0mhsiky9g5hqhn7xzf4kykmj8"; }; patches = [ diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index 27633c912b2..4e780b104b0 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -40,7 +40,7 @@ packagesFun: # packages explicitly requested by the user let explicitRequires = - if builtins.isFunction packagesFun + if lib.isFunction packagesFun then packagesFun self else packagesFun; in diff --git a/pkgs/data/misc/scowl/default.nix b/pkgs/data/misc/scowl/default.nix index 2769ed1a166..5e4d17bcc8f 100644 --- a/pkgs/data/misc/scowl/default.nix +++ b/pkgs/data/misc/scowl/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchFromGitHub, unzip, zip, perl, aspell, dos2unix}: +{stdenv, fetchFromGitHub, unzip, zip, perl, aspell, dos2unix, singleWordlist ? null}: stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "scowl"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { export PERL5LIB="$PERL5LIB''${PERL5LIB:+:}$PWD/varcon" ''; - postBuild = '' + postBuild = stdenv.lib.optionalString (singleWordlist == null) '' ( cd scowl/speller make aspell @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = false; - installPhase = '' + installPhase = if singleWordlist == null then '' eval "$preInstall" mkdir -p "$out/share/scowl" @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { fi echo $region $regcode $regcode_sz - for s in 10 20 30 35 40 50 55 60 70 80 90; do + for s in 10 20 30 35 40 50 55 60 70 80 90 95; do ./mk-list $regcode $s > "$out/share/dict/w$region.$s" ./mk-list --variants=1 $regcode_var $s > "$out/share/dict/w$region.variants.$s" ./mk-list --variants=2 $regcode_var $s > "$out/share/dict/w$region.acceptable.$s" @@ -88,6 +88,10 @@ stdenv.mkDerivation rec { ) eval "$postInstall" + '' else '' + mkdir -p "$out/share/dict" + cd scowl + ./mk-list ${singleWordlist} > "$out/share/dict/words.txt" ''; meta = { diff --git a/pkgs/desktops/gnome-3/apps/gnome-power-manager/default.nix b/pkgs/desktops/gnome-3/apps/gnome-power-manager/default.nix new file mode 100644 index 00000000000..2fd0dfa5ac9 --- /dev/null +++ b/pkgs/desktops/gnome-3/apps/gnome-power-manager/default.nix @@ -0,0 +1,47 @@ +{ stdenv +, intltool +, fetchurl +, pkgconfig +, gtk3 +, glib +, meson +, ninja +, upower +, desktop_file_utils +, wrapGAppsHook +, gnome3 }: + +stdenv.mkDerivation rec { + inherit (import ./src.nix fetchurl) name src; + + propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ]; + + nativeBuildInputs = [ + meson + ninja + pkgconfig + wrapGAppsHook + intltool + + # needed by meson_post_install.sh + glib.dev + desktop_file_utils + ]; + + buildInputs = [ + gtk3 + glib + upower + gnome3.defaultIconTheme + ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = https://projects.gnome.org/gnome-power-manager/; + description = "View battery and power statistics provided by UPower"; + maintainers = gnome3.maintainers; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome-3/apps/gnome-power-manager/src.nix b/pkgs/desktops/gnome-3/apps/gnome-power-manager/src.nix new file mode 100644 index 00000000000..bdffa453504 --- /dev/null +++ b/pkgs/desktops/gnome-3/apps/gnome-power-manager/src.nix @@ -0,0 +1,10 @@ +# Autogenerated by maintainers/scripts/gnome.sh update + +fetchurl: { + name = "gnome-power-manager-3.26.0"; + + src = fetchurl { + url = mirror://gnome/sources/gnome-power-manager/3.26/gnome-power-manager-3.26.0.tar.xz; + sha256 = "20aee0b0b4015e7cc6fbabc3cbc4344c07c230fe3d195e90c8ae0dc5d55a2d4e"; + }; +} diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index d60fddb589b..0650ddf04ea 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -36,6 +36,7 @@ let nautilus-sendto dconf-editor vinagre gnome-weather gnome-logs gnome-maps gnome-characters gnome-calendar accerciser gnome-nettool gnome-getting-started-docs gnome-packagekit gnome-software + gnome-power-manager ]; gamesPackages = with gnome3; [ swell-foop lightsoff iagno @@ -297,6 +298,8 @@ let gegl = gegl_0_3; }; + gnome-power-manager = callPackage ./apps/gnome-power-manager { }; + gnome-weather = callPackage ./apps/gnome-weather { }; nautilus-sendto = callPackage ./apps/nautilus-sendto { }; diff --git a/pkgs/desktops/gnome-3/extensions/clipboard-indicator/default.nix b/pkgs/desktops/gnome-3/extensions/clipboard-indicator/default.nix new file mode 100644 index 00000000000..e41227e8513 --- /dev/null +++ b/pkgs/desktops/gnome-3/extensions/clipboard-indicator/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "gnome-shell-extension-clipboard-indicator-${version}"; + version = "30"; + + src = fetchFromGitHub { + owner = "Tudmotu"; + repo = "gnome-shell-extension-clipboard-indicator"; + rev = "v${version}"; + sha256 = "1fmgmxv2y678bj0kmymkgnnglcpqk8ww053izlq46xg7s27jjdf6"; + }; + + uuid = "clipboard-indicator@tudmotu.com"; + + installPhase = '' + mkdir -p $out/share/gnome-shell/extensions/${uuid} + cp -r * $out/share/gnome-shell/extensions/${uuid} + ''; + + meta = with stdenv.lib; { + description = "Adds a clipboard indicator to the top panel and saves clipboard history"; + license = licenses.mit; + maintainers = with maintainers; [ jonafato ]; + platforms = platforms.linux; + homepage = https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator; + }; +} diff --git a/pkgs/desktops/gnome-3/extensions/icon-hider/default.nix b/pkgs/desktops/gnome-3/extensions/icon-hider/default.nix new file mode 100644 index 00000000000..7ad26a7c6d4 --- /dev/null +++ b/pkgs/desktops/gnome-3/extensions/icon-hider/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "gnome-shell-extension-icon-hider-${version}"; + version = "19"; + + src = fetchFromGitHub { + owner = "ikalnytskyi"; + repo = "gnome-shell-extension-icon-hider"; + rev = "v${version}"; + sha256 = "0cifm6cmxwxrrrva41wvjvrzsdqaczfbillf2vv3wsb60dqr6h39"; + }; + + uuid = "icon-hider@kalnitsky.org"; + + installPhase = '' + mkdir -p $out/share/gnome-shell/extensions + cp -r ${uuid} $out/share/gnome-shell/extensions + ''; + + meta = with stdenv.lib; { + description = "Icon Hider is a GNOME Shell extension for managing status area items"; + license = licenses.bsd3; + maintainers = with maintainers; [ jonafato ]; + platforms = platforms.linux; + homepage = https://github.com/ikalnytskyi/gnome-shell-extension-icon-hider; + }; +} diff --git a/pkgs/desktops/gnome-3/misc/gexiv2/default.nix b/pkgs/desktops/gnome-3/misc/gexiv2/default.nix index d0801714a0f..852ed00ed90 100644 --- a/pkgs/desktops/gnome-3/misc/gexiv2/default.nix +++ b/pkgs/desktops/gnome-3/misc/gexiv2/default.nix @@ -1,29 +1,42 @@ -{ stdenv, fetchurl, pkgconfig, exiv2, glib, libtool, m4, gnome3 }: +{ stdenv, fetchurl, meson, ninja, pkgconfig, exiv2, glib, gnome3, gobjectIntrospection, vala }: let majorVersion = "0.10"; in stdenv.mkDerivation rec { name = "gexiv2-${version}"; - version = "${majorVersion}.6"; + version = "${majorVersion}.7"; src = fetchurl { url = "mirror://gnome/sources/gexiv2/${majorVersion}/${name}.tar.xz"; - sha256 = "09aqsnpah71p9gx0ap2px2dyanrs7jmkkar6q114n9b7js8qh9qk"; + sha256 = "1f7312zygw77ml37i5qilhfvmjm59dn753ax71rcb2jm1p76vgcb"; }; + patches = [ + # Darwin compatibility (https://bugzilla.gnome.org/show_bug.cgi?id=791941) + (fetchurl { + url = https://bugzilla.gnome.org/attachment.cgi?id=365969; + sha256 = "06w744acgnz3hym7sm8c245yzlg05ldkmwgiz3yz4pp6h72brizj"; + }) + # GIR & Vala bindings fix (https://bugzilla.gnome.org/show_bug.cgi?id=792431) + (fetchurl { + url = https://bugzilla.gnome.org/attachment.cgi?id=366662; + sha256 = "1ljb2pap5v9z3zhx69ghfyrbl2b62ck35nyn7h5h410d008lcb4v"; + }) + ]; + preConfigure = '' patchShebangs . ''; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ glib libtool m4 ]; + nativeBuildInputs = [ meson ninja pkgconfig gobjectIntrospection vala ]; + buildInputs = [ glib ]; propagatedBuildInputs = [ exiv2 ]; meta = with stdenv.lib; { homepage = https://wiki.gnome.org/Projects/gexiv2; description = "GObject wrapper around the Exiv2 photo metadata library"; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = gnome3.maintainers; }; } diff --git a/pkgs/development/beam-modules/lib.nix b/pkgs/development/beam-modules/lib.nix index 26d868a8e7c..d6b83cb1af0 100644 --- a/pkgs/development/beam-modules/lib.nix +++ b/pkgs/development/beam-modules/lib.nix @@ -6,8 +6,8 @@ rec { */ callPackageWith = autoArgs: fn: args: let - f = if builtins.isFunction fn then fn else import fn; - auto = builtins.intersectAttrs (builtins.functionArgs f) autoArgs; + f = if pkgs.lib.isFunction fn then fn else import fn; + auto = builtins.intersectAttrs (stdenv.lib.functionArgs f) autoArgs; in f (auto // args); callPackage = callPackageWith pkgs; diff --git a/pkgs/development/haskell-modules/make-package-set.nix b/pkgs/development/haskell-modules/make-package-set.nix index 223f0652887..0f866a96e71 100644 --- a/pkgs/development/haskell-modules/make-package-set.nix +++ b/pkgs/development/haskell-modules/make-package-set.nix @@ -81,8 +81,8 @@ let # lost on `.override`) but determine the auto-args based on `drv` (the problem here # is that nix has no way to "passthrough" args while preserving the reflection # info that callPackage uses to determine the arguments). - drv = if builtins.isFunction fn then fn else import fn; - auto = builtins.intersectAttrs (builtins.functionArgs drv) scope; + drv = if stdenv.lib.isFunction fn then fn else import fn; + auto = builtins.intersectAttrs (stdenv.lib.functionArgs drv) scope; # this wraps the `drv` function to add a `overrideScope` function to the result. drvScope = allArgs: drv allArgs // { diff --git a/pkgs/development/libraries/audiofile/default.nix b/pkgs/development/libraries/audiofile/default.nix index 80aae344dcd..182471acf4a 100644 --- a/pkgs/development/libraries/audiofile/default.nix +++ b/pkgs/development/libraries/audiofile/default.nix @@ -5,7 +5,7 @@ let fetchDebianPatch = { name, debname, sha256 }: fetchpatch { inherit sha256 name; - url = "https://anonscm.debian.org/cgit/pkg-multimedia/audiofile.git/plain/debian/patches/${debname}?h=debian/0.3.6-4"; + url = "https://salsa.debian.org/multimedia-team/audiofile/raw/debian/0.3.6-4/debian/patches/${debname}"; }; in diff --git a/pkgs/development/libraries/babl/default.nix b/pkgs/development/libraries/babl/default.nix index 04e714f886e..f7788eb93cb 100644 --- a/pkgs/development/libraries/babl/default.nix +++ b/pkgs/development/libraries/babl/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "babl-0.1.38"; + name = "babl-0.1.42"; src = fetchurl { url = "http://ftp.gtk.org/pub/babl/0.1/${name}.tar.bz2"; - sha256 = "11pfbyzq20596p9sgwraxspg3djg1jzz6wvz4bapf0yyr97jiyd0"; + sha256 = "1wc7fyj9bfqfiwf1w33g3vv3wcl18pd9cxr9fc0iy391szrsynb8"; }; doCheck = true; diff --git a/pkgs/development/libraries/gegl/3.0.nix b/pkgs/development/libraries/gegl/3.0.nix index 158707557a5..2bb773a17b8 100644 --- a/pkgs/development/libraries/gegl/3.0.nix +++ b/pkgs/development/libraries/gegl/3.0.nix @@ -3,13 +3,15 @@ , libwebp, gnome3 }: stdenv.mkDerivation rec { - name = "gegl-0.3.26"; + name = "gegl-0.3.28"; src = fetchurl { url = "http://download.gimp.org/pub/gegl/0.3/${name}.tar.bz2"; - sha256 = "1a9zbi6ws0r0sqynvg2fh3ad0ipnphg7w62y7whlcrbpqi29izvf"; + sha256 = "1zr3gmmzjhp2d3d3h51x80r5q7gs9rv67ywx69sif6as99h8fbqm"; }; + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; + hardeningDisable = [ "format" ]; # needs fonts otherwise don't know how to pass them @@ -28,11 +30,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig intltool which autoreconfHook ]; - meta = { + meta = with stdenv.lib; { description = "Graph-based image processing framework"; homepage = http://www.gegl.org; - license = stdenv.lib.licenses.gpl3; - maintainers = with stdenv.lib.maintainers; [ jtojnar ]; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl3; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/json-glib/default.nix b/pkgs/development/libraries/json-glib/default.nix index 73fa1f311bf..bf32f4f8e8b 100644 --- a/pkgs/development/libraries/json-glib/default.nix +++ b/pkgs/development/libraries/json-glib/default.nix @@ -1,4 +1,7 @@ -{ stdenv, fetchurl, fetchpatch, glib, meson, ninja, pkgconfig, gettext, gobjectIntrospection, dbus, libintlOrEmpty }: +{ stdenv, fetchurl, fetchpatch, glib, meson, ninja, pkgconfig, gettext +, gobjectIntrospection, dbus, libintlOrEmpty +, fixDarwinDylibNames +}: stdenv.mkDerivation rec { name = "json-glib-${minVer}.2"; @@ -11,7 +14,8 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ glib ]; nativeBuildInputs = [ meson ninja pkgconfig gettext gobjectIntrospection ]; - buildInputs = libintlOrEmpty; + buildInputs = libintlOrEmpty + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; diff --git a/pkgs/development/libraries/libqalculate/default.nix b/pkgs/development/libraries/libqalculate/default.nix index 0e67f970b76..89b71c1855d 100644 --- a/pkgs/development/libraries/libqalculate/default.nix +++ b/pkgs/development/libraries/libqalculate/default.nix @@ -25,6 +25,9 @@ stdenv.mkDerivation rec { substituteInPlace libqalculate/Calculator.cc \ --replace 'commandline = "gnuplot"' 'commandline = "${gnuplot}/bin/gnuplot"' \ --replace '"gnuplot -"' '"${gnuplot}/bin/gnuplot -"' + '' + stdenv.lib.optionalString stdenv.cc.isClang '' + substituteInPlace src/qalc.cc \ + --replace 'printf(_("aborted"))' 'printf("%s", _("aborted"))' ''; preBuild = '' diff --git a/pkgs/development/libraries/liburcu/default.nix b/pkgs/development/libraries/liburcu/default.nix index 3b92aff72a5..0c88f987104 100644 --- a/pkgs/development/libraries/liburcu/default.nix +++ b/pkgs/development/libraries/liburcu/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl }: stdenv.mkDerivation rec { - version = "0.9.3"; + version = "0.9.5"; name = "liburcu-${version}"; src = fetchurl { url = "http://lttng.org/files/urcu/userspace-rcu-${version}.tar.bz2"; - sha256 = "01j0xp3f0w147yfyzybkjvb7i67i7prsvnkssgvgwry9lvk35khv"; + sha256 = "19iq7985rhvbrj99hlmbyq2wjrkhssvigh5454mhaprn3c7jaj6r"; }; nativeBuildInputs = stdenv.lib.optional doCheck perl; diff --git a/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh b/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh index fa914f6d26b..a1cfae0e606 100755 --- a/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh +++ b/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh @@ -101,7 +101,7 @@ nix_lisp_build_system(){ :separator \":\") for l in sb-alien::*shared-objects* for ns := (sb-alien::shared-object-namestring l) - do (and (> (length ns) 0) (not (equal (elt ns 0) "/")) + do (and (> (length ns) 0) (not (equal (elt ns 0) \"/\")) (let* ((prefix (find-if (lambda (s) (probe-file (format nil \"~a/~a\" s ns))) libpath)) (fullpath (and prefix (format nil \"~a/~a\" prefix ns)))) diff --git a/pkgs/development/lisp-modules/clwrapper/setup-hook.sh b/pkgs/development/lisp-modules/clwrapper/setup-hook.sh index eb6052d58db..8975ada5320 100644 --- a/pkgs/development/lisp-modules/clwrapper/setup-hook.sh +++ b/pkgs/development/lisp-modules/clwrapper/setup-hook.sh @@ -15,6 +15,8 @@ setLisp () { sbcl) NIX_LISP_COMMAND="$j" ;; ecl) NIX_LISP_COMMAND="$j" ;; clisp) NIX_LISP_COMMAND="$j" ;; + lx86cl) NIX_LISP_COMMAND="$j" ;; + lx86cl64) NIX_LISP_COMMAND="$j" ;; esac done fi diff --git a/pkgs/development/mobile/xpwn/default.nix b/pkgs/development/mobile/xpwn/default.nix index e1b2b0cb2fa..d5ffb7f6c01 100644 --- a/pkgs/development/mobile/xpwn/default.nix +++ b/pkgs/development/mobile/xpwn/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, cmake, zlib, libpng, bzip2, libusb1, openssl }: +{ stdenv, fetchgit, cmake, zlib, libpng, bzip2, libusb, openssl }: stdenv.mkDerivation { name = "xpwn-0.5.8git"; @@ -18,7 +18,7 @@ stdenv.mkDerivation { sed -i -e '/install/d' CMakeLists.txt ''; - buildInputs = [ cmake zlib libpng bzip2 libusb1 openssl ]; + buildInputs = [ cmake zlib libpng bzip2 libusb openssl ]; cmakeFlags = [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=" diff --git a/pkgs/development/python-modules/aiohttp/cors.nix b/pkgs/development/python-modules/aiohttp/cors.nix index ab9595ec2b9..9da239b524a 100644 --- a/pkgs/development/python-modules/aiohttp/cors.nix +++ b/pkgs/development/python-modules/aiohttp/cors.nix @@ -3,7 +3,7 @@ buildPythonPackage rec { pname = "aiohttp-cors"; version = "0.6.0"; - name = "${pname}-${version}"; + src = fetchPypi { inherit pname version; sha256 = "1r0mb4dw0dc1lpi54dk5vxqs06nyhvagp76lyrvk7rd94z5mjkd4"; diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix index f1eb7a64d79..17737c33986 100644 --- a/pkgs/development/python-modules/aiohttp/default.nix +++ b/pkgs/development/python-modules/aiohttp/default.nix @@ -14,7 +14,6 @@ buildPythonPackage rec { pname = "aiohttp"; version = "2.3.9"; - name = "${pname}-${version}"; src = fetchPypi { inherit pname version; @@ -33,4 +32,4 @@ buildPythonPackage rec { license = with lib.licenses; [ asl20 ]; homepage = https://github.com/KeepSafe/aiohttp/; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/astral/default.nix b/pkgs/development/python-modules/astral/default.nix new file mode 100644 index 00000000000..76dba87f964 --- /dev/null +++ b/pkgs/development/python-modules/astral/default.nix @@ -0,0 +1,26 @@ +{ stdenv, buildPythonPackage, fetchPypi, pytz, pytest }: + +buildPythonPackage rec { + pname = "astral"; + version = "1.4"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "1zm1ypc6w279gh7lbgsfbzfxk2x4gihlq3rfh59hj70hmhjwiwp7"; + }; + + propagatedBuildInputs = [ pytz ]; + + checkInputs = [ pytest ]; + checkPhase = '' + py.test -k "not test_GoogleLocator" + ''; + + meta = with stdenv.lib; { + description = "Calculations for the position of the sun and the moon"; + homepage = https://github.com/sffjunkie/astral/; + license = licenses.asl20; + maintainers = with maintainers; [ flokli ]; + }; +} diff --git a/pkgs/development/python-modules/ptyprocess/default.nix b/pkgs/development/python-modules/ptyprocess/default.nix new file mode 100644 index 00000000000..c1c9ce18c56 --- /dev/null +++ b/pkgs/development/python-modules/ptyprocess/default.nix @@ -0,0 +1,20 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "ptyprocess"; + version = "0.5.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "e64193f0047ad603b71f202332ab5527c5e52aa7c8b609704fc28c0dc20c4365"; + }; + + meta = { + description = "Run a subprocess in a pseudo terminal"; + homepage = https://github.com/pexpect/ptyprocess; + license = lib.licenses.isc; + }; +} diff --git a/pkgs/development/python-modules/pytest-aiohttp/default.nix b/pkgs/development/python-modules/pytest-aiohttp/default.nix new file mode 100644 index 00000000000..afdc085aa9f --- /dev/null +++ b/pkgs/development/python-modules/pytest-aiohttp/default.nix @@ -0,0 +1,20 @@ +{ stdenv, buildPythonPackage, fetchPypi, pytest, aiohttp }: + +buildPythonPackage rec { + pname = "pytest-aiohttp"; + version = "0.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0kx4mbs9bflycd8x9af0idcjhdgnzri3nw1qb0vpfyb3751qaaf9"; + }; + + propagatedBuildInputs = [ pytest aiohttp ]; + + meta = with stdenv.lib; { + homepage = https://github.com/aio-libs/pytest-aiohttp/; + description = "Pytest plugin for aiohttp support"; + license = licenses.asl20; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/xcffib/default.nix b/pkgs/development/python-modules/xcffib/default.nix new file mode 100644 index 00000000000..9b136531a4b --- /dev/null +++ b/pkgs/development/python-modules/xcffib/default.nix @@ -0,0 +1,31 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, xorg +, cffi +, six +}: + +buildPythonPackage rec { + version = "0.5.1"; + pname = "xcffib"; + + src = fetchPypi { + inherit pname version; + sha256 = "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"; + }; + + patchPhase = '' + # Hardcode cairo library path + sed -e 's,ffi\.dlopen(,&"${xorg.libxcb.out}/lib/" + ,' -i xcffib/__init__.py + ''; + + propagatedBuildInputs = [ cffi six ]; + + meta = with stdenv.lib; { + description = "A drop in replacement for xpyb, an XCB python binding"; + homepage = "https://github.com/tych0/xcffib"; + license = licenses.asl20; + maintainers = with maintainers; [ kamilchm ]; + }; +} diff --git a/pkgs/development/tools/continuous-integration/buildkite-agent/default.nix b/pkgs/development/tools/continuous-integration/buildkite-agent/default.nix index 46cee51e0e6..ab090e6dc12 100644 --- a/pkgs/development/tools/continuous-integration/buildkite-agent/default.nix +++ b/pkgs/development/tools/continuous-integration/buildkite-agent/default.nix @@ -44,6 +44,6 @@ buildGoPackage { homepage = https://buildkite.com/docs/agent; license = licenses.mit; maintainers = with maintainers; [ pawelpacana zimbatm ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/misc/cups/filters.nix b/pkgs/misc/cups/filters.nix index be788f9add4..f80f2ddf03e 100644 --- a/pkgs/misc/cups/filters.nix +++ b/pkgs/misc/cups/filters.nix @@ -9,11 +9,11 @@ let in stdenv.mkDerivation rec { name = "cups-filters-${version}"; - version = "1.16.0"; + version = "1.20.0"; src = fetchurl { url = "http://openprinting.org/download/cups-filters/${name}.tar.xz"; - sha256 = "1kcndzpbbcaxafnz1wa6acy3p3r5likfqmf057i5q0q6i176lz5k"; + sha256 = "0g6npicm1cwmxqi6ymfvf9wkplp4z2rzvjjl9v4yfvqdjq85gxnp"; }; nativeBuildInputs = [ pkgconfig makeWrapper ]; diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index c772f4173ce..d041d6de4f6 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -777,11 +777,11 @@ rec { }; vim-elixir = buildVimPluginFrom2Nix { # created by nix#NixDerivation - name = "vim-elixir-2017-10-20"; + name = "vim-elixir-2018-02-01"; src = fetchgit { url = "https://github.com/elixir-lang/vim-elixir"; - rev = "3066d5fb5e1c694e607b2bb5d8277266ca524262"; - sha256 = "1j5sic3rssh2kaj73lv4m5sck3irn1jzgkpdr5qw7qi0gyfgpg81"; + rev = "8ca41c1f02208dd5ca68c7bcb6c71b3b92f46af6"; + sha256 = "0dp9cqflbwc3h1hzgn9fyaxhcn6q9bclgfy9kkgywp8zk5kwzb7p"; }; dependencies = []; diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix index 478f9e7e303..cca729016c2 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -186,7 +186,7 @@ let # There should be an IOVideo here, but they haven't released it :( }; - IOKitSrcs = stdenv.lib.mapAttrs (name: value: if builtins.isFunction value then value name else value) IOKitSpecs; + IOKitSrcs = stdenv.lib.mapAttrs (name: value: if stdenv.lib.isFunction value then value name else value) IOKitSpecs; adv_cmds = applePackage "adv_cmds" "osx-10.5.8" "102ssayxbg9wb35mdmhswbnw0bg7js3pfd8fcbic83c5q3bqa6c6" {}; diff --git a/pkgs/os-specific/darwin/maloader/default.nix b/pkgs/os-specific/darwin/maloader/default.nix index 1684c0e92ce..5f4306ec0c1 100644 --- a/pkgs/os-specific/darwin/maloader/default.nix +++ b/pkgs/os-specific/darwin/maloader/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { src = fetchgit { url = "git://github.com/shinh/maloader.git"; rev = "5f220393e0b7b9ad0cf1aba0e89df2b42a1f0442"; - sha256 = "07j9b7n0grrbxxyn2h8pnk6pa8b370wq5z5zwbds8dlhi7q37rhn"; + sha256 = "0dd1pn07x1y8pyn5wz8qcl1c1xwghyya4d060m3y9vx5dhv9xmzw"; }; postPatch = '' diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix index 435a11f1599..ff6db1b41ee 100644 --- a/pkgs/os-specific/linux/lttng-modules/default.nix +++ b/pkgs/os-specific/linux/lttng-modules/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { pname = "lttng-modules-${version}"; name = "${pname}-${kernel.version}"; - version = "2.10.0"; + version = "2.10.5"; src = fetchurl { url = "http://lttng.org/files/lttng-modules/lttng-modules-${version}.tar.bz2"; - sha256 = "1gzi7j97zymzfj6b7mlih35djflwfgg93b63q9rbs5w1kclmsrgz"; + sha256 = "07rs01zwr4bmjamplix5qz1c6mb6wdawb68vyn0w6wx68ppbpnxq"; }; hardeningDisable = [ "pic" ]; diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 22d415213c4..a4d1629a684 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -17,11 +17,11 @@ in { # Policy: use the highest stable version as the default (on our master). stable = generic { - version = "387.34"; - sha256_32bit = "1haqk5h1fcmwp7kn9644k280wn409kh0xbivrj1ks8r8f4nbvfmq"; - sha256_64bit = "06w8dw6hb40ymz6ax7v82j29ihmp3d7yxsi8ah9ch10jldl973z4"; - settingsSha256 = "0dpm22ggpr93ypz24ap9vgx43ik7lw6cxcb29v8ys2iinhs7zm7s"; - persistencedSha256 = "02lf9b6j85amc1vr84lj98q74a680nrx4fmpxj17cz597yq8s200"; + version = "390.25"; + sha256_32bit = "0fkbpx01l46pprrd4nlc2y6hfmkb55ddlwm1r84kr6j08qmmb0qi"; + sha256_64bit = "0whsls1mm6vkll5qmxnyz8vjgspp1rmqpsampgi83k62n514c08r"; + settingsSha256 = "1jhbr68z36s3fr9vx3ga2f6yrzlwpc0j5mw8h12g65p7wdsbk6y7"; + persistencedSha256 = "033azbhi50f1b0lw759sncgf7ckh2m2c0khj5v15sch9kl1fzk8i"; }; beta = generic { diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix index d3fffe12da4..478fcb9aad7 100644 --- a/pkgs/servers/dns/knot-dns/default.nix +++ b/pkgs/servers/dns/knot-dns/default.nix @@ -7,11 +7,11 @@ let inherit (stdenv.lib) optional optionals; in # Note: ATM only the libraries have been tested in nixpkgs. stdenv.mkDerivation rec { name = "knot-dns-${version}"; - version = "2.6.3"; + version = "2.6.4"; src = fetchurl { url = "http://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz"; - sha256 = "2fb27a4006865fc12873cbadc5b4a870ec65d3293a284972c031522282987790"; + sha256 = "1d0d37b5047ecd554d927519d5565c29c1ba9b501c100eb5f3a5af184d75386a"; }; outputs = [ "bin" "out" "dev" ]; diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix index 7a5aa8da550..2ec12b81f84 100644 --- a/pkgs/servers/dns/knot-resolver/default.nix +++ b/pkgs/servers/dns/knot-resolver/default.nix @@ -1,63 +1,55 @@ -{ stdenv, fetchurl, pkgconfig, hexdump, which +{ stdenv, fetchurl, runCommand, pkgconfig, hexdump, which , knot-dns, luajit, libuv, lmdb, gnutls, nettle , cmocka, systemd, dns-root-data, makeWrapper , extraFeatures ? false /* catch-all if defaults aren't enough */ , hiredis, libmemcached, luajitPackages }: +let # un-indented, over the whole file -let - inherit (stdenv.lib) optional optionals optionalString; -in -stdenv.mkDerivation rec { +result = if extraFeatures then wrapped-full else unwrapped; + +inherit (stdenv.lib) optional optionals optionalString concatStringsSep; + +unwrapped = stdenv.mkDerivation rec { name = "knot-resolver-${version}"; - version = "1.5.3"; + version = "2.0.0"; src = fetchurl { url = "http://secure.nic.cz/files/knot-resolver/${name}.tar.xz"; - sha256 = "03sb05zz6qn966apcprdqhmirkz7kjdbx8hswbvgamk1s2xd7v6f"; + sha256 = "b40d9dbef05031464dfff57712f476e7cddc0fda26b41daf660c5a33ea203ce0"; }; outputs = [ "out" "dev" ]; configurePhase = ":"; - nativeBuildInputs = [ pkgconfig which makeWrapper hexdump ]; + nativeBuildInputs = [ pkgconfig which hexdump ]; # http://knot-resolver.readthedocs.io/en/latest/build.html#requirements buildInputs = [ knot-dns luajit libuv gnutls nettle lmdb ] - ++ optional doInstallCheck cmocka + ++ optional doCheck cmocka ++ optional stdenv.isLinux systemd # sd_notify - ++ optionals extraFeatures [ - hiredis libmemcached # additional cache backends - ]; - ## optional dependencies; TODO: libedit, dnstap, http2 module? + ## optional dependencies; TODO: libedit, dnstap + ; - makeFlags = [ "PREFIX=$(out)" "ROOTHINTS=${dns-root-data}/root.hints" ]; + makeFlags = [ + "PREFIX=$(out)" + "ROOTHINTS=${dns-root-data}/root.hints" + "KEYFILE_DEFAULT=${dns-root-data}/root.ds" + ]; CFLAGS = [ "-O2" "-DNDEBUG" ]; enableParallelBuilding = true; doCheck = true; - doInstallCheck = true; + doInstallCheck = false; # FIXME preInstallCheck = '' patchShebangs tests/config/runtest.sh ''; postInstall = '' - rm "$out"/etc/kresd/root.hints # using system-wide instead - '' - # optional: to allow auto-bootstrapping root trust anchor via https - + (with luajitPackages; '' - wrapProgram "$out/sbin/kresd" \ - --set LUA_PATH '${ - stdenv.lib.concatStringsSep ";" - (map getLuaPath [ luasec luasocket ]) - }' \ - --set LUA_CPATH '${ - stdenv.lib.concatStringsSep ";" - (map getLuaCPath [ luasec luasocket ]) - }' - ''); + rm "$out"/etc/knot-resolver/root.hints # using system-wide instead + ''; meta = with stdenv.lib; { description = "Caching validating DNS resolver, from .cz domain registry"; @@ -67,5 +59,24 @@ stdenv.mkDerivation rec { platforms = filter (p: p != "aarch64-linux") platforms.unix; maintainers = [ maintainers.vcunat /* upstream developer */ ]; }; -} +}; + +wrapped-full = with luajitPackages; let + luaPkgs = [ luasec luasocket ]; # TODO: cqueues and others for http2 module + in runCommand unwrapped.name + { + nativeBuildInputs = [ makeWrapper ]; + preferLocalBuild = true; + allowSubstitutes = false; + } + '' + mkdir -p "$out/sbin" "$out/share" + makeWrapper '${unwrapped}/sbin/kresd' "$out"/sbin/kresd \ + --set LUA_PATH '${concatStringsSep ";" (map getLuaPath luaPkgs)}' \ + --set LUA_CPATH '${concatStringsSep ";" (map getLuaCPath luaPkgs)}' + ln -sr '${unwrapped}/share/man' "$out"/share/ + ln -sr "$out"/{sbin,bin} + ''; + +in result diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix new file mode 100644 index 00000000000..9ec314e5c73 --- /dev/null +++ b/pkgs/servers/home-assistant/default.nix @@ -0,0 +1,72 @@ +{ stdenv, fetchFromGitHub, python3 +, extraPackages ? ps: [] +, skipPip ? true }: + +let + + py = python3.override { + packageOverrides = self: super: { + yarl = super.yarl.overridePythonAttrs (oldAttrs: rec { + version = "0.18.0"; + src = oldAttrs.src.override { + inherit version; + sha256 = "11j8symkxh0ngvpddqpj85qmk6p70p20jca3alxc181gk3vx785s"; + }; + }); + aiohttp = super.aiohttp.overridePythonAttrs (oldAttrs: rec { + version = "2.3.7"; + src = oldAttrs.src.override { + inherit version; + sha256 = "0fzfpx5ny7559xrxaawnylq20dvrkjiag0ypcd13frwwivrlsagy"; + }; + }); + hass-frontend = super.callPackage ./frontend.nix { }; + }; + }; + + # Ensure that we are using a consistent package set + extraBuildInputs = extraPackages py.pkgs; + +in with py.pkgs; buildPythonApplication rec { + pname = "homeassistant"; + version = "0.62.1"; + + diabled = !isPy3k; + + # PyPI tarball is missing tests/ directory + src = fetchFromGitHub { + owner = "home-assistant"; + repo = "home-assistant"; + rev = version; + sha256 = "0151prwk2ci6bih0mdmc3r328nrvazn9jwk0w26wmd4cpvnb5h26"; + }; + + propagatedBuildInputs = [ + # From setup.py + requests pyyaml pytz pip jinja2 voluptuous typing aiohttp yarl async-timeout chardet astral certifi + # From the components that are part of the default configuration.yaml + sqlalchemy aiohttp-cors hass-frontend user-agents distro mutagen xmltodict netdisco + ] ++ extraBuildInputs; + + checkInputs = [ + pytest requests-mock pydispatcher pytest-aiohttp + ]; + + checkPhase = '' + # The components' dependencies are not included, so they cannot be tested + py.test --ignore tests/components + # Some basic components should be tested however + py.test \ + tests/components/{group,http} \ + tests/components/test_{api,configurator,demo,discovery,frontend,init,introduction,logger,script,shell_command,system_log,websocket_api}.py + ''; + + makeWrapperArgs = [] ++ stdenv.lib.optional skipPip [ "--add-flags --skip-pip" ]; + + meta = with stdenv.lib; { + homepage = https://home-assistant.io/; + description = "Open-source home automation platform running on Python 3"; + license = licenses.asl20; + maintainers = with maintainers; [ f-breidenstein dotlambda ]; + }; +} diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix new file mode 100644 index 00000000000..6e1a789012f --- /dev/null +++ b/pkgs/servers/home-assistant/frontend.nix @@ -0,0 +1,11 @@ +{ stdenv, fetchPypi, buildPythonPackage }: + +buildPythonPackage rec { + pname = "home-assistant-frontend"; + version = "20180130.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0b9klisl7hh30rml8qlrp9gpz33z9b825pd1vxbck48k0s98z1zi"; + }; +} diff --git a/pkgs/servers/mail/dovecot/default.nix b/pkgs/servers/mail/dovecot/default.nix index e995763a4a2..6b2adf57217 100644 --- a/pkgs/servers/mail/dovecot/default.nix +++ b/pkgs/servers/mail/dovecot/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, perl, pkgconfig, systemd, openssl +{ stdenv, lib, fetchurl, fetchpatch, perl, pkgconfig, systemd, openssl , bzip2, zlib, lz4, inotify-tools, pam, libcap , clucene_core_2, icu, openldap, libsodium, libstemmer # Auth modules @@ -47,6 +47,16 @@ stdenv.mkDerivation rec { # so we can symlink plugins from several packages there. # The symlinking needs to be done in NixOS. ./2.2.x-module_dir.patch + (fetchpatch { + name = "CVE-2017-14132_part1.patch"; + url = https://github.com/dovecot/core/commit/1a29ed2f96da1be22fa5a4d96c7583aa81b8b060.patch; + sha256 = "1pcfzxr8xlwbpa7z19grp7mlvdnan6ln8zw74dj4pdmynmlk4aw9"; + }) + (fetchpatch { + name = "CVE-2017-14132_part2.patch"; + url = https://github.com/dovecot/core/commit/a9b135760aea6d1790d447d351c56b78889dac22.patch; + sha256 = "0082iid5rvjmh003xi9s09jld2rb31hbvni0yai1h1ggbmd5zf8l"; + }) ]; configureFlags = [ diff --git a/pkgs/servers/mail/dovecot/plugins/antispam/default.nix b/pkgs/servers/mail/dovecot/plugins/antispam/default.nix deleted file mode 100644 index 1a1ba1ad448..00000000000 --- a/pkgs/servers/mail/dovecot/plugins/antispam/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ stdenv, fetchhg, autoconf, automake, dovecot, openssl }: - -stdenv.mkDerivation { - name = "dovecot-antispam-20130429"; - - src = fetchhg { - url = "http://hg.dovecot.org/dovecot-antispam-plugin/"; - rev = "5ebc6aae4d7c"; - sha256 = "181i79c9sf3a80mgmycfq1f77z7fpn3j2s0qiddrj16h3yklf4gv"; - }; - - buildInputs = [ dovecot openssl ]; - nativeBuildInputs = [ autoconf automake ]; - - preConfigure = '' - ./autogen.sh - # Ugly hack; any ideas? - sed "s,^dovecot_moduledir=.*,dovecot_moduledir=$out/lib/dovecot," ${dovecot}/lib/dovecot/dovecot-config > dovecot-config - ''; - - configureFlags = [ - "--with-dovecot=." - ]; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - homepage = http://wiki2.dovecot.org/Plugins/Antispam; - description = "An antispam plugin for the Dovecot IMAP server"; - license = licenses.gpl2; - maintainers = with maintainers; [ abbradar ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix index bf1c16acfeb..f8b36e816e0 100644 --- a/pkgs/servers/mail/postfix/default.nix +++ b/pkgs/servers/mail/postfix/default.nix @@ -90,7 +90,7 @@ in stdenv.mkDerivation rec { meta = { homepage = http://www.postfix.org/; description = "A fast, easy to administer, and secure mail server"; - license = lib.licenses.bsdOriginal; + license = with lib.licenses; [ ipl10 epl20 ]; platforms = lib.platforms.linux; maintainers = [ lib.maintainers.rickynils ]; }; diff --git a/pkgs/servers/mpd/clientlib.nix b/pkgs/servers/mpd/clientlib.nix index 269b20dbebb..dab63a5bad8 100644 --- a/pkgs/servers/mpd/clientlib.nix +++ b/pkgs/servers/mpd/clientlib.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, meson, ninja }: +{ stdenv, fetchFromGitHub, meson, ninja, fixDarwinDylibNames }: stdenv.mkDerivation rec { version = "2.13"; @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { sha256 = "1g1n6rk8kn87mbjqxxj0vi7haj8xx21xmqlzbrx2fvyp5357zvsq"; }; - nativeBuildInputs = [ meson ninja ]; + nativeBuildInputs = [ meson ninja ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; meta = with stdenv.lib; { description = "Client library for MPD (music player daemon)"; diff --git a/pkgs/servers/teleport/default.nix b/pkgs/servers/teleport/default.nix new file mode 100644 index 00000000000..0c6a197b1da --- /dev/null +++ b/pkgs/servers/teleport/default.nix @@ -0,0 +1,41 @@ +# This file was generated by https://github.com/kamilchm/go2nix v2.0-dev +{ stdenv, buildGoPackage, zip, fetchFromGitHub }: + +buildGoPackage rec { + name = "teleport-${version}"; + version = "2.4.0"; + + # This repo has a private submodule "e" which fetchgit cannot handle without failing. + src = fetchFromGitHub { + owner = "gravitational"; + repo = "teleport"; + rev = "v${version}"; + sha256 = "1x4xnqjyb87pzmn2c59fwmzfx1f2k0xhqn2xgki3722qmj2ss846"; + }; + + goPackagePath = "github.com/gravitational/teleport"; + subPackages = [ "tool/tctl" "tool/teleport" "tool/tsh" ]; + buildInputs = [ zip ]; + postBuild = '' + pushd . + cd $NIX_BUILD_TOP/go/src/github.com/gravitational/teleport + mkdir -p build + echo "making webassets" + make build/webassets.zip + cat build/webassets.zip >> $NIX_BUILD_TOP/go/bin/teleport + rm -fr build/webassets.zip + cd $NIX_BUILD_TOP/go/bin + zip -q -A teleport + popd + ''; + + dontStrip = true; + + meta = { + description = "A SSH CA management suite"; + homepage = "https://gravitational.com/teleport/"; + license = stdenv.lib.licenses.asl20; + maintainers = [ stdenv.lib.maintainers.tomberek ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/tools/misc/ethtool/default.nix b/pkgs/tools/misc/ethtool/default.nix index 85672619d61..2527c34feeb 100644 --- a/pkgs/tools/misc/ethtool/default.nix +++ b/pkgs/tools/misc/ethtool/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "ethtool-${version}"; - version = "4.13"; + version = "4.15"; src = fetchurl { url = "mirror://kernel/software/network/ethtool/${name}.tar.xz"; - sha256 = "1flwz4x76ajxigadq9knxgwr778g03y3qfx6c7rflc3x020a7hdp"; + sha256 = "06pr3s7wg2pbvfbf7js61bgh3caff4qf50nqqk3cgz9z90rgvxvi"; }; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/ncdu/default.nix b/pkgs/tools/misc/ncdu/default.nix index 1cb71ce9dd6..330210269d5 100644 --- a/pkgs/tools/misc/ncdu/default.nix +++ b/pkgs/tools/misc/ncdu/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "ncdu-${version}"; - version = "1.12"; + version = "1.13"; src = fetchurl { url = "http://dev.yorhel.nl/download/${name}.tar.gz"; - sha256 = "16j9fyw73y1lk05a35i4q9i66laklgsx41lz5rxfr8m28x3lw3l2"; + sha256 = "0ni56ymlii577src4dzfbrq1mznbf6i0nka4bvh2sb1971f2ingl"; }; buildInputs = [ ncurses ]; diff --git a/pkgs/tools/misc/tlp/default.nix b/pkgs/tools/misc/tlp/default.nix index 3614ec3bc68..91eeb6b0a51 100644 --- a/pkgs/tools/misc/tlp/default.nix +++ b/pkgs/tools/misc/tlp/default.nix @@ -14,13 +14,13 @@ let in stdenv.mkDerivation rec { name = "tlp-${version}"; - version = "1.0"; + version = "1.1"; src = fetchFromGitHub { owner = "linrunner"; repo = "TLP"; rev = "${version}"; - sha256 = "0gq1y1qnzwyv7cw32g4ymlfssi2ayrbnd04y4l242k6n41d05bij"; + sha256 = "01bhb9hdsck1g2s5jvafr3ywml9k2qz7x2cf42a3z8g5d23pdfpy"; }; makeFlags = [ "DESTDIR=$(out)" diff --git a/pkgs/tools/misc/ttwatch/default.nix b/pkgs/tools/misc/ttwatch/default.nix index b816b5225ca..d7e1171064c 100644 --- a/pkgs/tools/misc/ttwatch/default.nix +++ b/pkgs/tools/misc/ttwatch/default.nix @@ -1,19 +1,22 @@ -{ stdenv, fetchFromGitHub, cmake, perl, openssl, curl, libusb1 }: +{ stdenv, fetchFromGitHub, cmake, perl, openssl, curl, libusb1 +, enableUnsafe ? false }: stdenv.mkDerivation rec { name = "ttwatch-${version}"; - version = "2017-12-31"; + version = "2018-02-01"; src = fetchFromGitHub { owner = "ryanbinns"; repo = "ttwatch"; - rev = "a261851d91e3304a47a04995758f6940747bc54a"; - sha256 = "0llcai1yxikh8nvzry71rr1zz365rg0k0lwp24np5w74kzza3kwx"; + rev = "b5c54647ed9b640584e53c4c15ee12d210790021"; + sha256 = "136sskz9hnbwp49gxp983mswzgpl8yfc25ni79csbsnwp0k4lb94"; }; nativeBuildInputs = [ cmake perl ]; buildInputs = [ openssl curl libusb1 ]; + cmakeFlags = stdenv.lib.optional enableUnsafe [ "-Dunsafe=on" ]; + preFixup = '' chmod +x $out/bin/ttbin2mysports ''; diff --git a/pkgs/tools/system/awstats/default.nix b/pkgs/tools/system/awstats/default.nix index 9f0e50642ac..aaf5bf136cb 100644 --- a/pkgs/tools/system/awstats/default.nix +++ b/pkgs/tools/system/awstats/default.nix @@ -41,6 +41,9 @@ perlPackages.buildPerlPackage rec { mv wwwroot "$out/wwwroot" rm -r "$out/wwwroot/classes/src/" + mkdir -p "$out/share/awstats" + mv tools "$out/share/awstats/tools" + mkdir -p "$bin/bin" ln -s "$out/wwwroot/cgi-bin/awstats.pl" "$bin/bin/awstats" diff --git a/pkgs/tools/system/supervise/default.nix b/pkgs/tools/system/supervise/default.nix index b6e0700e47f..c264b73b502 100644 --- a/pkgs/tools/system/supervise/default.nix +++ b/pkgs/tools/system/supervise/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { name = "supervise-${version}"; - version = "1.1.0"; + version = "1.2.0"; src = fetchzip { url = "https://github.com/catern/supervise/releases/download/v${version}/supervise-${version}.tar.gz"; - sha256 = "0i20znchvydk8ww31ka4b0wjkaizz38racwgvqj32idwhqgar5x2"; + sha256 = "07v3197nf3jbx2w6jxzyk9b8p5qjj9irpr4jvv5lkfbi7s6rav3k"; }; meta = with stdenv.lib; { diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index a6b1ac6c9f4..dc8f0908ea8 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -37,8 +37,10 @@ let /* # beware: the URL below changes contents continuously curl http://mirror.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz \ | xzcat | uniq -u | sed -rn -f ./tl2nix.sed > ./pkgs.nix */ - orig = import ./pkgs.nix tl; # XXX XXX XXX FIXME: the file is probably too big now XXX XXX XXX XXX XXX XXX - removeSelfDep = lib.mapAttrs (n: p: if p ? deps then p // { deps = lib.filterAttrs (dn: _: n != dn) p.deps; } else p); + orig = import ./pkgs.nix tl; + removeSelfDep = lib.mapAttrs + (n: p: if p ? deps then p // { deps = lib.filterAttrs (dn: _: n != dn) p.deps; } + else p); clean = removeSelfDep (orig // { # overrides of texlive.tlpdb @@ -112,6 +114,10 @@ let urls = args.urls or (if args ? url then [ args.url ] else map (up: "${up}/${urlName}.tar.xz") urlPrefixes ); + + # Upstream refuses to distribute stable tarballs, so we host snapshots on IPFS. + # Common packages should get served from the binary cache anyway. + # See discussions, e.g. https://github.com/NixOS/nixpkgs/issues/24683 urlPrefixes = args.urlPrefixes or [ http://146.185.144.154/texlive-2017 # IPFS GW is second, as it doesn't have a good time-outing behavior diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 7d371881f94..68c4a3c4acb 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -24,7 +24,11 @@ in ### Deprecated aliases - for backward compatibility mapAliases (rec { - accounts-qt = libsForQt5.accounts-qt; # added 2015-12-19 + _2048-in-terminal = "2048-in-terminal"; # added 2017-01-16 + _2bwm = "2bwm"; # added 2017-01-16 + _389-ds-base = "389-ds-base"; # added 2017-01-16 + _90secondportraits = "90secondsportraits"; # added 2017-01-16 + accounts-qt = libsForQt5.accounts-qt; # added 2015-12-19 adobeReader = adobe-reader; # added 2013-11-04 aircrackng = aircrack-ng; # added 2016-01-14 ammonite-repl = ammonite; # added 2017-05-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2539baf3003..1035d5273a5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4831,6 +4831,8 @@ with pkgs; telegraf = callPackage ../servers/monitoring/telegraf { }; + teleport = callPackage ../servers/teleport {}; + telepresence = callPackage ../tools/networking/telepresence { }; tewisay = callPackage ../tools/misc/tewisay { }; @@ -7340,7 +7342,7 @@ with pkgs; cide = callPackage ../development/tools/continuous-integration/cide { }; - "cl-launch" = callPackage ../development/tools/misc/cl-launch {}; + cl-launch = callPackage ../development/tools/misc/cl-launch {}; cloudfoundry-cli = callPackage ../development/tools/cloudfoundry-cli { }; @@ -11780,7 +11782,7 @@ with pkgs; ### SERVERS - "389-ds-base" = callPackage ../servers/ldap/389 { + _389-ds-base = callPackage ../servers/ldap/389 { kerberos = libkrb5; }; @@ -11901,7 +11903,6 @@ with pkgs; dovecot = callPackage ../servers/mail/dovecot { }; dovecot_pigeonhole = callPackage ../servers/mail/dovecot/plugins/pigeonhole { }; - dovecot_antispam = callPackage ../servers/mail/dovecot/plugins/antispam { }; dspam = callPackage ../servers/mail/dspam { inherit (perlPackages) NetSMTP; @@ -11976,6 +11977,8 @@ with pkgs; hiawatha = callPackage ../servers/http/hiawatha {}; + home-assistant = callPackage ../servers/home-assistant { }; + ircdHybrid = callPackage ../servers/irc/ircd-hybrid { }; jboss = callPackage ../servers/http/jboss { }; @@ -14104,7 +14107,7 @@ with pkgs; ### APPLICATIONS - "2bwm" = callPackage ../applications/window-managers/2bwm { + _2bwm = callPackage ../applications/window-managers/2bwm { patches = config."2bwm".patches or []; }; @@ -15009,7 +15012,7 @@ with pkgs; inherit (gnome3) evince; evolution_data_server = gnome3.evolution_data_server; - keepass = callPackage ../applications/misc/keepass { + keepass = callPackage ../applications/misc/keepass { buildDotnetPackage = buildDotnetPackage.override { mono = mono54; }; }; @@ -16037,6 +16040,8 @@ with pkgs; flavour = "git"; }; + looking-glass-client = callPackage ../applications/virtualization/looking-glass-client { }; + lumail = callPackage ../applications/networking/mailreaders/lumail { }; lv2bm = callPackage ../applications/audio/lv2bm { }; @@ -18136,9 +18141,9 @@ with pkgs; ### GAMES - "2048-in-terminal" = callPackage ../games/2048-in-terminal { }; + _2048-in-terminal = callPackage ../games/2048-in-terminal { }; - "90secondportraits" = callPackage ../games/90secondportraits { love = love_0_10; }; + _90secondportraits = callPackage ../games/90secondportraits { love = love_0_10; }; adom = callPackage ../games/adom { }; @@ -18873,8 +18878,10 @@ with pkgs; gnomeExtensions = { caffeine = callPackage ../desktops/gnome-3/extensions/caffeine { }; + clipboard-indicator = callPackage ../desktops/gnome-3/extensions/clipboard-indicator { }; dash-to-dock = callPackage ../desktops/gnome-3/extensions/dash-to-dock { }; dash-to-panel = callPackage ../desktops/gnome-3/extensions/dash-to-panel { }; + icon-hider = callPackage ../desktops/gnome-3/extensions/icon-hider { }; mediaplayer = callPackage ../desktops/gnome-3/extensions/mediaplayer { }; nohotcorner = callPackage ../desktops/gnome-3/extensions/nohotcorner { }; pixel-saver = callPackage ../desktops/gnome-3/extensions/pixel-saver { }; diff --git a/pkgs/top-level/default.nix b/pkgs/top-level/default.nix index 96d5e1fe283..9cf9eb4db65 100644 --- a/pkgs/top-level/default.nix +++ b/pkgs/top-level/default.nix @@ -49,7 +49,7 @@ in let # { /* the config */ } and # { pkgs, ... } : { /* the config */ } config = - if builtins.isFunction configExpr + if lib.isFunction configExpr then configExpr { inherit pkgs; } else configExpr; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 89ed53796a8..8c092b769ad 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -40,7 +40,7 @@ let makeOverridablePythonPackage = f: origArgs: let ff = f origArgs; - overrideWith = newArgs: origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs); + overrideWith = newArgs: origArgs // (if pkgs.lib.isFunction newArgs then newArgs origArgs else newArgs); in if builtins.isAttrs ff then (ff // { overridePythonAttrs = newArgs: makeOverridablePythonPackage f (overrideWith newArgs); @@ -165,6 +165,8 @@ in { asn1crypto = callPackage ../development/python-modules/asn1crypto { }; + astral = callPackage ../development/python-modules/astral { }; + astropy = callPackage ../development/python-modules/astropy { }; augeas = callPackage ../development/python-modules/augeas { @@ -3215,6 +3217,8 @@ in { pytest-asyncio = callPackage ../development/python-modules/pytest-asyncio { }; + pytest-aiohttp = callPackage ../development/python-modules/pytest-aiohttp { }; + pytestcache = buildPythonPackage rec { name = "pytest-cache-1.0"; src = pkgs.fetchurl { @@ -14446,21 +14450,7 @@ in { }; }; - ptyprocess = buildPythonPackage rec { - name = "ptyprocess-${version}"; - version = "0.5"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/ptyprocess/${name}.tar.gz"; - sha256= "dcb78fb2197b49ca1b7b2f37b047bc89c0da7a90f90bd5bc17c3ce388bb6ef59"; - }; - - meta = { - description = "Run a subprocess in a pseudo terminal"; - homepage = https://github.com/pexpect/ptyprocess; - license = licenses.isc; - }; - }; + ptyprocess = callPackage ../development/python-modules/ptyprocess { }; pylibacl = callPackage ../development/python-modules/pylibacl { }; @@ -21012,29 +21002,7 @@ EOF pluggy = callPackage ../development/python-modules/pluggy {}; - xcffib = buildPythonPackage rec { - version = "0.3.2"; - name = "xcffib-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/x/xcffib/${name}.tar.gz"; - sha256 = "a84eecd5a1bb7570e26c83aca87a2016578ca4e353e1fa56189e95bdef063e6a"; - }; - - patchPhase = '' - # Hardcode cairo library path - sed -e 's,ffi\.dlopen(,&"${pkgs.xorg.libxcb.out}/lib/" + ,' -i xcffib/__init__.py - ''; - - propagatedBuildInputs = [ self.cffi self.six ]; - - meta = { - description = "A drop in replacement for xpyb, an XCB python binding"; - homepage = "https://github.com/tych0/xcffib"; - license = licenses.asl20; - maintainers = with maintainers; [ kamilchm ]; - }; - }; + xcffib = callPackage ../development/python-modules/xcffib {}; pafy = callPackage ../development/python-modules/pafy { };