Unverified Commit 3588aea4 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents a2e3bd87 d32ecd77
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ in pkgs.stdenv.mkDerivation {
      ${lib-docs}/index.md \
      > ./functions/library.md
    substitute ./manual.md.in ./manual.md \
      --replace '@MANUAL_VERSION@' '${pkgs.lib.version}'
      --replace-fail '@MANUAL_VERSION@' '${pkgs.lib.version}'

    mkdir -p out/media

+60 −1
Original line number Diff line number Diff line
@@ -53,6 +53,53 @@ rec {

  inherit type isGVariant;

  intConstructors = [
    {
      name = "mkInt32";
      type = type.int32;
      min = -2147483648;
      max = 2147483647;
    }
    {
      name = "mkUint32";
      type = type.uint32;
      min = 0;
      max = 4294967295;
    }
    {
      name = "mkInt64";
      type = type.int64;
      # Nix does not support such large numbers.
      min = null;
      max = null;
    }
    {
      name = "mkUint64";
      type = type.uint64;
      min = 0;
      # Nix does not support such large numbers.
      max = null;
    }
    {
      name = "mkInt16";
      type = type.int16;
      min = -32768;
      max = 32767;
    }
    {
      name = "mkUint16";
      type = type.uint16;
      min = 0;
      max = 65535;
    }
    {
      name = "mkUchar";
      type = type.uchar;
      min = 0;
      max = 255;
    }
  ];

  /* Returns the GVariant value that most closely matches the given Nix value.
     If no GVariant value can be found unambiguously then error is thrown.

@@ -70,8 +117,20 @@ rec {
      mkArray v
    else if isGVariant v then
      v
    else if builtins.isInt v then
      let
        validConstructors = builtins.filter ({ min, max, ... }: (min == null || min <= v) && (max == null || v <= max)) intConstructors;
      in
      throw ''
        The GVariant type for number “${builtins.toString v}” is unclear.
        Please wrap the value with one of the following, depending on the value type in GSettings schema:

        ${lib.concatMapStringsSep "\n" ({ name, type, ...}: "- `lib.gvariant.${name}` for `${type}`") validConstructors}
      ''
    else if builtins.isAttrs v then
      throw "Cannot construct GVariant value from an attribute set. If you want to construct a dictionary, you will need to create an array containing items constructed with `lib.gvariant.mkDictionaryEntry`."
    else
      throw "The GVariant type of ${v} can't be inferred.";
      throw "The GVariant type of ${builtins.typeOf v} can't be inferred.";

  /* Returns the GVariant array from the given type of the elements and a Nix list.

+6 −0
Original line number Diff line number Diff line
@@ -7600,6 +7600,12 @@
    githubId = 76716;
    name = "Graham Christensen";
  };
  grahamnorris = {
    email = "oss@grahamjnorris.com";
    github = "grahamnorris";
    githubId = 66037909;
    name = "Graham J. Norris";
  };
  gravndal = {
    email = "gaute.ravndal+nixos@gmail.com";
    github = "gravndal";
+4 −4
Original line number Diff line number Diff line
@@ -80,17 +80,17 @@ let
    cp -r --no-preserve=all $inputs/* .

    substituteInPlace ./manual.md \
      --replace '@NIXOS_VERSION@' "${version}"
      --replace-fail '@NIXOS_VERSION@' "${version}"
    substituteInPlace ./configuration/configuration.md \
      --replace \
      --replace-fail \
          '@MODULE_CHAPTERS@' \
          ${escapeShellArg (concatMapStringsSep "\n" (p: "${p.value}") config.meta.doc)}
    substituteInPlace ./nixos-options.md \
      --replace \
      --replace-fail \
        '@NIXOS_OPTIONS_JSON@' \
        ${optionsDoc.optionsJSON}/${common.outputPath}/options.json
    substituteInPlace ./development/writing-nixos-tests.section.md \
      --replace \
      --replace-fail \
        '@NIXOS_TEST_OPTIONS_JSON@' \
        ${testOptionsDoc.optionsJSON}/${common.outputPath}/options.json
    sed -e '/@PYTHON_MACHINE_METHODS@/ {' -e 'r ${testDriverMachineDocstrings}/machine-methods.md' -e 'd' -e '}' \
+3 −12
Original line number Diff line number Diff line
@@ -2,28 +2,19 @@

{ config, pkgs, lib, ... }:

with lib;

let cfg = config.programs.evince;

in {

  # Added 2019-08-09
  imports = [
    (mkRenamedOptionModule
      [ "services" "gnome3" "evince" "enable" ]
      [ "programs" "evince" "enable" ])
  ];

  ###### interface

  options = {

    programs.evince = {

      enable = mkEnableOption "Evince, the GNOME document viewer";
      enable = lib.mkEnableOption "Evince, the GNOME document viewer";

      package = mkPackageOption pkgs "evince" { };
      package = lib.mkPackageOption pkgs "evince" { };

    };

@@ -32,7 +23,7 @@ in {

  ###### implementation

  config = mkIf config.programs.evince.enable {
  config = lib.mkIf config.programs.evince.enable {

    environment.systemPackages = [ cfg.package ];

Loading