Use variable for cacert PEM version
This commit is contained in:
parent
ada06c3c43
commit
9a89b3eeae
|
@ -1,13 +1,13 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, caCertVersion, ... }:
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
pname = "triton-utils";
|
pname = "triton-utils";
|
||||||
version = "0.0.6";
|
version = caCertVersion;
|
||||||
src = pkgs.lib.cleanSource ./.;
|
src = pkgs.lib.cleanSource ./.;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/share/certs
|
mkdir -p $out/bin $out/share/certs
|
||||||
cd ./utils
|
cd ./utils
|
||||||
cp ./cacert-2022-10-11.pem $out/share/certs
|
cp ./cacert-${caCertVersion}.pem $out/share/certs
|
||||||
cp ./ttp.sh $out/bin
|
cp ./ttp.sh $out/bin
|
||||||
cp ./unset-env.sh $out/bin
|
cp ./unset-env.sh $out/bin
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -5,6 +5,7 @@ let
|
||||||
dataCenters = tritonConfig.dataCenters;
|
dataCenters = tritonConfig.dataCenters;
|
||||||
mantaDomain = tritonConfig.mantaDomain;
|
mantaDomain = tritonConfig.mantaDomain;
|
||||||
tritonApiDomain = tritonConfig.tritonApiDomain;
|
tritonApiDomain = tritonConfig.tritonApiDomain;
|
||||||
|
caCertVersion = "2022-10-11";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# devshell docs: https://numtide.github.io/devshell/modules_schema.html
|
# devshell docs: https://numtide.github.io/devshell/modules_schema.html
|
||||||
|
@ -64,7 +65,7 @@ in
|
||||||
# see overlay.nix
|
# see overlay.nix
|
||||||
docker-compose_1
|
docker-compose_1
|
||||||
# shell scripts and utilities to set and unset triton environment variables
|
# shell scripts and utilities to set and unset triton environment variables
|
||||||
self.packages.${system}.triton-utils
|
self.packages.${system}.triton-utils { inherit caCertVersion; }
|
||||||
self.packages.${system}.triton-docker-env
|
self.packages.${system}.triton-docker-env
|
||||||
# useful for working with JSON data
|
# useful for working with JSON data
|
||||||
bunyan-rs
|
bunyan-rs
|
||||||
|
@ -77,7 +78,7 @@ in
|
||||||
# see: https://github.com/joyent/triton-docker-cli/issues/17
|
# see: https://github.com/joyent/triton-docker-cli/issues/17
|
||||||
{
|
{
|
||||||
name = "CURL_CA_BUNDLE";
|
name = "CURL_CA_BUNDLE";
|
||||||
value = "${self.packages.${system}.triton-utils}/share/certs/cacert-2022-07-19.pem";
|
value = "${self.packages.${system}.triton-utils}/share/certs/cacert-${caCertVersion}.pem";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "CONSUL_HTTP_ADDR";
|
name = "CONSUL_HTTP_ADDR";
|
||||||
|
|
Loading…
Reference in a new issue