anchor.diff:    nativeBuildInputs = [ autoreconfHook libtool pkg-config ];
   
     configureFlags = [
  -    (enableFeature (withJitterEntropy) "jitterentropy")
  -    (withFeature   (withNistBeacon)    "nistbeacon")
  -    (withFeature   (withPkcs11)        "pkcs11")
  -    (withFeature   (withRtlsdr)        "rtlsdr")
  +    (lib.enableFeature (withJitterEntropy) "jitterentropy")
  +    (lib.withFeature   (withNistBeacon)    "nistbeacon")
  +    (lib.withFeature   (withPkcs11)        "pkcs11")
  +    (lib.withFeature   (withRtlsdr)        "rtlsdr")
     ];
   
     buildInputs = [ openssl ]
  -    ++ optionals (stdenv.hostPlatform.isMusl) [ argp-standalone ]
  -    ++ optionals (withJitterEntropy) [ jitterentropy ]
  -    ++ optionals (withNistBeacon)    [ curl jansson libxml2 ]
  -    ++ optionals (withPkcs11)        [ libp11 openssl ]
  -    ++ optionals (withRtlsdr)        [ librtlsdr ];
  +    ++ lib.optionals stdenv.hostPlatform.isMusl [ argp-standalone ]
  +    ++ lib.optionals withJitterEntropy [ jitterentropy ]
  +    ++ lib.optionals withNistBeacon    [ curl jansson libxml2 ]
  +    ++ lib.optionals withPkcs11        [ libp11 openssl ]
  +    ++ lib.optionals withRtlsdr        [ librtlsdr ];
   
     enableParallelBuilding = true;
   
     makeFlags = [
       "AR:=$(AR)" # For cross-compilation
  -  ] ++ optionals (withPkcs11) [
  +  ] ++ lib.optionals withPkcs11 [
       "PKCS11_ENGINE=${opensc}/lib/opensc-pkcs11.so" # Overrides configure script paths
     ];
   
  
positive.code:     runHook postInstallCheck
    '';
  
    meta = {
      description = "A random number generator daemon";
      homepage = "https://github.com/nhorman/rng-tools";
      changelog = "https://github.com/nhorman/rng-tools/releases/tag/v${version}";
  
negative.code: , libtool
  , pkg-config
  , psmisc
  , argp-standalone
  , openssl
  , jitterentropy, withJitterEntropy ? true
    # WARNING: DO NOT USE BEACON GENERATED VALUES AS SECRET CRYPTOGRAPHIC KEYS
    # https://www.nist.gov/programs-projects/nist-randomness-beacon
  , curl, jansson, libxml2, withNistBeacon ? false
  , libp11, opensc, withPkcs11 ? true
  , librtlsdr, withRtlsdr ? true
  }:
  
  stdenv.mkDerivation rec {
    pname = "rng-tools";
  