2025-11-30 14:32:36 -05:00
|
|
|
# unpackPhase
|
|
|
|
|
# patchPhase
|
|
|
|
|
# configurePhase
|
|
|
|
|
# buildPhase
|
|
|
|
|
# checkPhase
|
|
|
|
|
# installPhase
|
|
|
|
|
# fixupPhase
|
|
|
|
|
# installCheckPhase
|
|
|
|
|
# distPhase
|
|
|
|
|
{
|
|
|
|
|
stdenv,
|
2025-12-14 18:24:24 -05:00
|
|
|
openssl,
|
2025-11-30 14:32:36 -05:00
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
|
name = "k8s-ca";
|
2025-12-14 18:24:24 -05:00
|
|
|
nativeBuildInputs = [ openssl ];
|
2025-11-30 14:32:36 -05:00
|
|
|
buildInputs = [ ];
|
|
|
|
|
|
|
|
|
|
unpackPhase = "true";
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p "$out"
|
|
|
|
|
cd "$out"
|
2025-12-14 18:24:24 -05:00
|
|
|
|
|
|
|
|
openssl genrsa -out ca.key 4096
|
|
|
|
|
openssl req -x509 -new -sha512 -noenc \
|
|
|
|
|
-key ca.key -days 3653 \
|
|
|
|
|
-config ${./files/ca.conf} \
|
|
|
|
|
-out ca.crt
|
2025-11-30 14:32:36 -05:00
|
|
|
'';
|
|
|
|
|
})
|