use security_tool in x509-system

This commit is contained in:
Jude Taylor 2015-06-30 16:11:16 -07:00
parent 7851df4454
commit ac3acae7a5

View File

@ -209,12 +209,14 @@ self: super: {
# Prevents needing to add security_tool as a build tool to all of x509-system's
# dependencies.
# TODO: use pkgs.darwin.security_tool once we can build it
x509-system = let security_tool = "/usr";
in overrideCabal super.x509-system (drv: {
patchPhase = (drv.patchPhase or "") + pkgs.stdenv.lib.optionalString pkgs.stdenv.isDarwin ''
substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security
'';
});
x509-system = if pkgs.stdenv.isDarwin && !pkgs.stdenv.cc.nativeLibc
then let inherit (pkgs.darwin) security_tool;
in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: {
patchPhase = (drv.patchPhase or "") + ''
substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security
'';
})
else super.x509-system;
double-conversion = if !pkgs.stdenv.isDarwin
then super.double-conversion