anchor.diff:        done
       ''
       # config is a configure script which is not installed.
  -    + optionalString (versionAtLeast version "1.1.1") ''
  +    + lib.optionalString (lib.versionAtLeast version "1.1.1") ''
         substituteInPlace config --replace '/usr/bin/env' '${buildPackages.coreutils}/bin/env'
  -    '' + optionalString (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isMusl) ''
  +    '' + lib.optionalString (lib.versionAtLeast version "1.1.0" && stdenv.hostPlatform.isMusl) ''
         substituteInPlace crypto/async/arch/async_posix.h \
           --replace '!defined(__ANDROID__) && !defined(__OpenBSD__)' \
                     '!defined(__ANDROID__) && !defined(__OpenBSD__) && 0'
       '';
   
  -    outputs = [ "bin" "dev" "out" "man" ] ++ optional withDocs "doc";
  +    outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional withDocs "doc";
       setOutputFlags = false;
       separateDebugInfo =
         !stdenv.hostPlatform.isDarwin &&
  
positive.code: # cgit) that are needed here should be included directly in Nixpkgs as
  # files.
  
  with lib;
  
  let
    common = { version, sha256, patches ? [], withDocs ? false, extraMeta ? {} }:
     stdenv.mkDerivation rec {
  
negative.code: 
      postPatch = ''
        patchShebangs Configure
      '' + lib.optionalString (lib.versionOlder version "1.1.0") ''
        patchShebangs test/*
        for a in test/t* ; do
          substituteInPlace "$a" \
  