Skip to content

Commit

Permalink
x509-system: use /usr/bin/security on macOS. (#974)
Browse files Browse the repository at this point in the history
This mirrors the workaround in nixpkgs for haskellPackages.

ref: NixOS/nixpkgs#47676
  • Loading branch information
Drew Hess committed Dec 16, 2020
1 parent 5e48a60 commit c9dde4d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
24 changes: 21 additions & 3 deletions overlays/darwin.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
final: prev: {

}
final: prev:
{
haskell-nix = prev.haskell-nix // ({
defaultModules = prev.haskell-nix.defaultModules ++ [
({ pkgs, buildModules, config, lib, ... }:
{
packages = { } // pkgs.lib.optionalAttrs (pkgs.stdenv.hostPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc)
{
# Workaround for broken nixpkgs darwin.security_tool in
# Mojave. This mirrors the workaround in nixpkgs
# haskellPackages.
#
# ref:
# https://github.com/NixOS/nixpkgs/pull/47676
# https://github.com/NixOS/nixpkgs/issues/45042
x509-system.components.library.preBuild = "substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security";
};
})
];
});
}
2 changes: 2 additions & 0 deletions overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let
bootstrap = import ./bootstrap.nix;
ghc = import ./ghc.nix;
ghc-packages = import ./ghc-packages.nix;
darwin = import ./darwin.nix;
windows = import ./windows.nix;
armv6l-linux = import ./armv6l-linux.nix;
musl = import ./musl.nix;
Expand Down Expand Up @@ -42,6 +43,7 @@ let
bootstrap
ghc
ghc-packages
darwin
windows
armv6l-linux
musl
Expand Down

0 comments on commit c9dde4d

Please sign in to comment.