Skip to content

Commit

Permalink
Patch for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed Oct 29, 2024
1 parent a953f80 commit f747d10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
inherit (iohkNix.lib) prefixNamesWith;
removeRecurse = lib.filterAttrsRecursive (n: _: n != "recurseForDerivations");

macOS-security = pkgs:
# make `/usr/bin/security` available in `PATH`, which is needed for stack
# on darwin which calls this binary to find certificates
pkgs.writeScriptBin "security" ''exec /usr/bin/security "$@"'';

supportedSystems = import ./nix/supported-systems.nix;
defaultSystem = head supportedSystems;
customConfig = recursiveUpdate
Expand Down Expand Up @@ -145,6 +150,9 @@
inherit (pkgs.stdenv) hostPlatform;
project = pkgs.cardanoNodeProject;

macOS-security =
utils.writeScriptBin "security" ''exec /usr/bin/security "$@"'';

# This is used by `nix develop .` to open a devShell
devShells =
let
Expand Down Expand Up @@ -401,6 +409,7 @@
inherit (final) haskell-nix;
inherit (std) incl;
inherit CHaP;
macOS-security = macOS-security (final.pkgs);
}).appendModule [
customConfig.haskellNix
];
Expand Down
7 changes: 6 additions & 1 deletion nix/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{ haskell-nix
, incl
, CHaP
, macOS-security
}:
let

Expand Down Expand Up @@ -279,7 +280,11 @@ let
unset TMPDIR
export TMPDIR=$(mktemp -d)
export TMP=$TMPDIR
'';
'' + (if pkgs.stdenv.hostPlatform.isDarwin
then ''
export PATH=${macOS-security}/bin:$PATH
''
else '''');
packages.cardano-testnet.components.tests.cardano-testnet-golden.preCheck =
let
# This define files included in the directory that will be passed to `H.getProjectBase` for this test:
Expand Down

0 comments on commit f747d10

Please sign in to comment.