# unpackPhase
# patchPhase
# configurePhase
# buildPhase
# checkPhase
# installPhase
# fixupPhase
# installCheckPhase
# distPhase
{
  stdenv,
  openssl,
  ...
}:
stdenv.mkDerivation (finalAttrs: {
  name = "k8s-ca";
  nativeBuildInputs = [ openssl ];
  buildInputs = [ ];

  unpackPhase = "true";

  installPhase = ''
    mkdir -p "$out"
    cd "$out"

    openssl genrsa -out ca.key 4096
    openssl req -x509 -new -sha512 -noenc \
            -key ca.key -days 3653 \
            -config ${./files/ca.conf} \
            -out ca.crt
  '';
})
