Unverified Commit 179bff39 authored by John Ericson's avatar John Ericson Committed by GitHub
Browse files

Merge pull request #216360 from Stunkymonkey/use-optionals

treewide: use lib.optionals
parents 66ac2ab8 bc3d5934
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -25,8 +25,7 @@
}:
let
  mutableExtensionsFilePath = toString mutableExtensionsFile;
  mutableExtensions = if builtins.pathExists mutableExtensionsFile
                      then import mutableExtensionsFilePath else [];
  mutableExtensions = lib.optionals builtins.pathExists mutableExtensionsFile (import mutableExtensionsFilePath);
  vscodeWithConfiguration = import ./vscodeWithConfiguration.nix {
    inherit lib writeShellScriptBin extensionsFromVscodeMarketplace;
    vscodeDefault = vscode;
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
  buildInputs = [
    gtk3 udev desktop-file-utils shared-mime-info
    wrapGAppsHook ffmpegthumbnailer jmtpfs lsof udisks2
  ] ++ (if ifuseSupport then [ ifuse ] else []);
  ] ++ (lib.optionals ifuseSupport [ ifuse ]);
  # Introduced because ifuse doesn't build due to CVEs in libplist
  # Revert when libplist builds again…

+2 −2
Original line number Diff line number Diff line
{ symlinkJoin, kdevelop-unwrapped, plugins ? null }:
{ lib, symlinkJoin, kdevelop-unwrapped, plugins ? null }:

symlinkJoin {
  name = "kdevelop-with-plugins";

  paths = [ kdevelop-unwrapped ] ++ (if plugins != null then plugins else []);
  paths = [ kdevelop-unwrapped ] ++ (lib.optionals (plugins != null) plugins);
}
+1 −3
Original line number Diff line number Diff line
@@ -90,9 +90,7 @@ mkChromiumDerivation (base: rec {
    license = if enableWideVine then lib.licenses.unfree else lib.licenses.bsd3;
    platforms = lib.platforms.linux;
    mainProgram = "chromium";
    hydraPlatforms = if (channel == "stable" || channel == "ungoogled-chromium")
      then ["aarch64-linux" "x86_64-linux"]
      else [];
    hydraPlatforms = lib.optionals (channel == "stable" || channel == "ungoogled-chromium") ["aarch64-linux" "x86_64-linux"];
    timeout = 172800; # 48 hours (increased from the Hydra default of 10h)
  };
})
+2 −2
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ let

      usesNixExtensions = nixExtensions != null;

      nameArray = builtins.map(a: a.name) (if usesNixExtensions then nixExtensions else []);
      nameArray = builtins.map(a: a.name) (lib.optionals usesNixExtensions nixExtensions);

      requiresSigning = browser ? MOZ_REQUIRE_SIGNING
                     -> toString browser.MOZ_REQUIRE_SIGNING != "";
@@ -114,7 +114,7 @@ let
        throw "nixExtensions has an invalid entry. Missing extid attribute. Please use fetchfirefoxaddon"
        else
        a
      ) (if usesNixExtensions then nixExtensions else []);
      ) (lib.optionals usesNixExtensions nixExtensions);

      enterprisePolicies =
      {
Loading