anchor.diff:      chmod a+x $pslibs/pwsh
   
       ls $pslibs
  -  '' + lib.optionalString (!stdenv.isDarwin) ''
  +  '' + lib.optionalString (!stdenv.isDarwin && !stdenv.isAarch64) ''
       patchelf --replace-needed libcrypto${ext}.1.0.0 libcrypto${ext}.1.1 $pslibs/libmi.so
       patchelf --replace-needed libssl${ext}.1.0.0 libssl${ext}.1.1 $pslibs/libmi.so
     '' + ''
  
positive.code: { stdenv, lib, autoPatchelfHook, fetchzip, libunwind, libuuid, icu, curl
  , darwin, makeWrapper, less, openssl_1_1, pam, lttng-ust }:
  
  let platformString = if stdenv.isDarwin then "osx"
                       else if stdenv.isLinux then "linux"
                       else throw "unsupported platform";
      platformSha = if stdenv.isDarwin then "0w44ws8b6zfixf7xz93hmplqsx18279n9x8j77y4rbzs13fldvsn"
                       else if stdenv.isLinux then "0xm7l49zhkz2fly3d751kjd5cy3ws9zji9i0061lkd06dvkch7jy"
                       else throw "unsupported platform";
      platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH"
                       else if stdenv.isLinux then "LD_LIBRARY_PATH"
  
negative.code:   version = "7.1.3";
  
    src = fetchzip {
      url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${platformString}-${archString}.tar.gz";
      sha256 = platformSha;
      stripRoot = false;
    };
  