Skip to content

Commit

Permalink
Patch for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed Sep 13, 2024
1 parent 007a2b5 commit 02d8367
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@
inherit (inputs.haskellNix) config;
};
inherit (nixpkgs) lib;

macOS-security =
# make `/usr/bin/security` available in `PATH`, which is needed for stack
# on darwin which calls this binary to find certificates
nixpkgs.writeScriptBin "security" ''exec /usr/bin/security "$@"'';
isDarwin = (system == "x86_64-darwin") || (system == "aarch64-darwin");
gitRevFlag =
if inputs.self ? rev
then [("--ghc-option=-D__GIT_REV__=\\\"" + inputs.self.rev + "\\\"")]
Expand Down Expand Up @@ -114,7 +118,7 @@
stylish-haskell = "0.14.6.0";
};
# and from nixpkgs or other inputs
shell.nativeBuildInputs = with nixpkgs; [gh jq yq-go actionlint shellcheck cabal-head];
shell.nativeBuildInputs = with nixpkgs; [gh jq yq-go actionlint shellcheck cabal-head] ++ (lib.optional isDarwin macOS-security);
# disable Hoogle until someone request it
shell.withHoogle = false;
# Skip cross compilers for the shell
Expand Down Expand Up @@ -159,9 +163,14 @@
# This define files included in the directory that will be passed to `H.getProjectBase` for this test:
filteredProjectBase = inputs.incl ./. mainnetConfigFiles;
in ''
export PATH=${macOS-security}/bin:$PATH
${exportCliPath}
cp -r ${filteredProjectBase}/* ..
'';
'' + (if isDarwin
then ''
export PATH=${macOS-security}/bin:$PATH
''
else '''');
})
{
packages.crypton-x509-system.postPatch = ''
Expand Down

0 comments on commit 02d8367

Please sign in to comment.