From b47c4218bb6eeb52c177c7cb4a5025fea8889ed4 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 21 Mar 2020 04:45:00 -0500 Subject: clair: fix build on darwin --- pkgs/tools/admin/clair/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pkgs/tools/admin') diff --git a/pkgs/tools/admin/clair/default.nix b/pkgs/tools/admin/clair/default.nix index 3f4d00736ad9..a12b8abe1206 100644 --- a/pkgs/tools/admin/clair/default.nix +++ b/pkgs/tools/admin/clair/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, makeWrapper, rpm, xz }: +{ stdenv, buildGoModule, fetchFromGitHub, makeWrapper, rpm, xz, Security }: buildGoModule rec { pname = "clair"; @@ -13,14 +13,16 @@ buildGoModule rec { modSha256 = "0rgkrid58kji39nlmiii95r8shbzr6dwalj5m7qwxy5w1rcaljr5"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + nativeBuildInputs = [ makeWrapper ]; postInstall = '' wrapProgram $out/bin/clair \ - --prefix PATH : "${lib.makeBinPath [ rpm xz ]}" + --prefix PATH : "${stdenv.lib.makeBinPath [ rpm xz ]}" ''; - meta = with lib; { + meta = with stdenv.lib; { description = "Vulnerability Static Analysis for Containers"; homepage = "https://github.com/quay/clair"; license = licenses.asl20; -- cgit 1.4.1