Commit d10e69c8 authored by Felix Buehler's avatar Felix Buehler
Browse files
parent 794f3465
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -422,7 +422,7 @@ ${expr "" v}
      (if v then "True" else "False")
    else if isFunction v then
      abort "generators.toDhall: cannot convert a function to Dhall"
    else if isNull v then
    else if v == null then
      abort "generators.toDhall: cannot convert a null to Dhall"
    else
      builtins.toJSON v;
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ let
  pkgs = import ../../.. {};
  inherit (pkgs) lib;
  getDeps = _: pkg: {
    deps = builtins.filter (x: !isNull x) (map (x: x.pname or null) (pkg.propagatedBuildInputs or []));
    deps = builtins.filter (x: x != null) (map (x: x.pname or null) (pkg.propagatedBuildInputs or []));
    broken = (pkg.meta.hydraPlatforms or [null]) == [];
  };
in
+4 −4
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ let
    };
  };

  filterDTBs = src: if isNull cfg.filter
  filterDTBs = src: if cfg.filter == null
    then "${src}/dtbs"
    else
      pkgs.runCommand "dtbs-filtered" {} ''
@@ -93,8 +93,8 @@ let
  # Fill in `dtboFile` for each overlay if not set already.
  # Existence of one of these is guarded by assertion below
  withDTBOs = xs: flip map xs (o: o // { dtboFile =
    if isNull o.dtboFile then
      if !isNull o.dtsFile then compileDTS o.name o.dtsFile
    if o.dtboFile == null then
      if o.dtsFile != null then compileDTS o.name o.dtsFile
      else compileDTS o.name (pkgs.writeText "dts" o.dtsText)
    else o.dtboFile; } );

@@ -181,7 +181,7 @@ in
  config = mkIf (cfg.enable) {

    assertions = let
      invalidOverlay = o: isNull o.dtsFile && isNull o.dtsText && isNull o.dtboFile;
      invalidOverlay = o: (o.dtsFile == null) && (o.dtsText == null) && (o.dtboFile == null);
    in lib.singleton {
      assertion = lib.all (o: !invalidOverlay o) cfg.overlays;
      message = ''
+3 −3
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ let
  ];

  mkArgs = rule:
    if (isNull rule.args) then ""
    if (rule.args == null) then ""
    else if (length rule.args == 0) then "args"
    else "args ${concatStringsSep " " rule.args}";

@@ -27,9 +27,9 @@ let
    let
      opts = mkOpts rule;

      as = optionalString (!isNull rule.runAs) "as ${rule.runAs}";
      as = optionalString (rule.runAs != null) "as ${rule.runAs}";

      cmd = optionalString (!isNull rule.cmd) "cmd ${rule.cmd}";
      cmd = optionalString (rule.cmd != null) "cmd ${rule.cmd}";

      args = mkArgs rule;
    in
+2 −2
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ let
    };
  }));

  motd = if isNull config.users.motdFile
  motd = if config.users.motdFile == null
         then pkgs.writeText "motd" config.users.motd
         else config.users.motdFile;

@@ -1233,7 +1233,7 @@ in
  config = {
    assertions = [
      {
        assertion = isNull config.users.motd || isNull config.users.motdFile;
        assertion = config.users.motd == null || config.users.motdFile == null;
        message = ''
          Only one of users.motd and users.motdFile can be set.
        '';
Loading