diff options
author | Shawn8901 <shawn8901@googlemail.com> | 2023-01-24 17:35:54 +0100 |
---|---|---|
committer | Shawn8901 <shawn8901@googlemail.com> | 2023-01-24 17:41:44 +0100 |
commit | 133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a (patch) | |
tree | 9dead942010487480968a8fbada2ef7c487a0033 /pkgs/tools/networking/openssh | |
parent | c0aeb3305473e3a0df97785f562ea8707630e999 (diff) | |
download | nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.gz nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.bz2 nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.lz nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.xz nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.tar.zst nixpkgs-133fa5f86741d2af5ea4dc50ab98c0f23b7c2a6a.zip |
treewide: remove global with lib; in pkgs/tools
Diffstat (limited to 'pkgs/tools/networking/openssh')
-rw-r--r-- | pkgs/tools/networking/openssh/common.nix | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/pkgs/tools/networking/openssh/common.nix b/pkgs/tools/networking/openssh/common.nix index 2f0b36f4972..c1b2199d0f9 100644 --- a/pkgs/tools/networking/openssh/common.nix +++ b/pkgs/tools/networking/openssh/common.nix @@ -30,7 +30,6 @@ , linkOpenssl ? true }: -with lib; stdenv.mkDerivation rec { inherit pname version src; @@ -57,12 +56,12 @@ stdenv.mkDerivation rec { # This is not the same as the libkrb5 from the inputs! pkgs.libkrb5 is # needed here to access krb5-config in order to cross compile. See: # https://github.com/NixOS/nixpkgs/pull/107606 - ++ optional withKerberos pkgs.libkrb5 + ++ lib.optional withKerberos pkgs.libkrb5 ++ extraNativeBuildInputs; buildInputs = [ zlib openssl libedit ] - ++ optional withFIDO libfido2 - ++ optional withKerberos libkrb5 - ++ optional stdenv.isLinux pam; + ++ lib.optional withFIDO libfido2 + ++ lib.optional withKerberos libkrb5 + ++ lib.optional stdenv.isLinux pam; preConfigure = '' # Setting LD causes `configure' and `make' to disagree about which linker @@ -80,11 +79,11 @@ stdenv.mkDerivation rec { "--with-libedit=yes" "--disable-strip" (if stdenv.isLinux then "--with-pam" else "--without-pam") - ] ++ optional (etcDir != null) "--sysconfdir=${etcDir}" - ++ optional withFIDO "--with-security-key-builtin=yes" - ++ optional withKerberos (assert libkrb5 != null; "--with-kerberos5=${libkrb5}") - ++ optional stdenv.isDarwin "--disable-libutil" - ++ optional (!linkOpenssl) "--without-openssl" + ] ++ lib.optional (etcDir != null) "--sysconfdir=${etcDir}" + ++ lib.optional withFIDO "--with-security-key-builtin=yes" + ++ lib.optional withKerberos (assert libkrb5 != null; "--with-kerberos5=${libkrb5}") + ++ lib.optional stdenv.isDarwin "--disable-libutil" + ++ lib.optional (!linkOpenssl) "--without-openssl" ++ extraConfigureFlags; ${if stdenv.hostPlatform.isStatic then "NIX_LDFLAGS" else null}= [ "-laudit" ] ++ lib.optionals withKerberos [ "-lkeyutils" ]; @@ -97,7 +96,7 @@ stdenv.mkDerivation rec { doCheck = true; enableParallelChecking = false; - nativeCheckInputs = optional (!stdenv.isDarwin) hostname; + nativeCheckInputs = lib.optional (!stdenv.isDarwin) hostname; preCheck = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' # construct a dummy HOME export HOME=$(realpath ../dummy-home) @@ -145,7 +144,7 @@ stdenv.mkDerivation rec { # integration tests hard to get working on darwin with its shaky # sandbox # t-exec tests fail on musl - checkTarget = optional (!stdenv.isDarwin && !stdenv.hostPlatform.isMusl) "t-exec" + checkTarget = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isMusl) "t-exec" # other tests are less demanding of the environment ++ [ "unit" "file-tests" "interop-tests" ]; @@ -165,7 +164,7 @@ stdenv.mkDerivation rec { borgbackup-integration = nixosTests.borgbackup; }; - meta = { + meta = with lib; { description = "An implementation of the SSH protocol${extraDesc}"; homepage = "https://www.openssh.com/"; changelog = "https://www.openssh.com/releasenotes.html"; |