From 341aa68b667a8fb9b77f8af319b7439e82c78793 Mon Sep 17 00:00:00 2001 From: jhonas Date: Sun, 27 Nov 2022 21:30:47 +0100 Subject: [PATCH] Use cacert from nixpkgs for CURL_CA_BUNDLE --- pkgs/triton-utils.nix | 7 +++---- tritonshell.nix | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/triton-utils.nix b/pkgs/triton-utils.nix index 573e952..4335269 100644 --- a/pkgs/triton-utils.nix +++ b/pkgs/triton-utils.nix @@ -1,13 +1,12 @@ -{ pkgs, caCertVersion, ... }: +{ pkgs, ... }: pkgs.stdenv.mkDerivation { pname = "triton-utils"; - version = caCertVersion; + version = "0.0.7"; src = pkgs.lib.cleanSource ./.; installPhase = '' - mkdir -p $out/bin $out/share/certs + mkdir -p $out/bin cd ./utils - cp ./cacert-${caCertVersion}.pem $out/share/certs cp ./ttp.sh $out/bin cp ./unset-env.sh $out/bin ''; diff --git a/tritonshell.nix b/tritonshell.nix index e816cb7..ede0d60 100644 --- a/tritonshell.nix +++ b/tritonshell.nix @@ -5,7 +5,6 @@ let dataCenters = tritonConfig.dataCenters; mantaDomain = tritonConfig.mantaDomain; tritonApiDomain = tritonConfig.tritonApiDomain; - caCertVersion = "2022-10-11"; in { # devshell docs: https://numtide.github.io/devshell/modules_schema.html @@ -65,7 +64,7 @@ in # see overlay.nix docker-compose_1 # shell scripts and utilities to set and unset triton environment variables - self.packages.${system}.triton-utils { inherit caCertVersion; } + self.packages.${system}.triton-utils self.packages.${system}.triton-docker-env # useful for working with JSON data bunyan-rs @@ -78,7 +77,7 @@ in # see: https://github.com/joyent/triton-docker-cli/issues/17 { name = "CURL_CA_BUNDLE"; - value = "${self.packages.${system}.triton-utils}/share/certs/cacert-${caCertVersion}.pem"; + value = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; } { name = "CONSUL_HTTP_ADDR";