From 716ccf81479cd5ee9830a4531470e5be6f7f31d6 Mon Sep 17 00:00:00 2001 From: Pogobanane Date: Wed, 1 Feb 2023 20:15:41 +0100 Subject: [PATCH] sops-install-secrets: disable unittest for darwin because $unittest is undefined on darwin and breaks the build/test --- pkgs/sops-install-secrets/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/sops-install-secrets/default.nix b/pkgs/sops-install-secrets/default.nix index cc79bef..358f931 100644 --- a/pkgs/sops-install-secrets/default.nix +++ b/pkgs/sops-install-secrets/default.nix @@ -15,10 +15,13 @@ buildGoModule { inherit pkgs; }; - outputs = [ "out" "unittest" ]; + outputs = [ "out" ] ++ + pkgs.lib.lists.optionals (pkgs.stdenv.isLinux) [ "unittest" ]; postInstall = '' go test -c ./pkgs/sops-install-secrets + '' + pkgs.lib.optionalString (pkgs.stdenv.isLinux) '' + # *.test is only tested on linux. $unittest does not exist on darwin. install -D ./sops-install-secrets.test $unittest/bin/sops-install-secrets.test # newer versions of nixpkgs no longer require this step if command -v remove-references-to; then