From 85ae0cb070628bcb98e63e6166fd6f52045f385a Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 12 Jun 2015 10:54:02 +0200 Subject: ghc: move gcc-clang-wrapper.sh script into the ghc directory tree since it's the only user of that script --- .../haskell-modules/gcc-clang-wrapper.sh | 46 ---------------------- 1 file changed, 46 deletions(-) delete mode 100755 pkgs/development/haskell-modules/gcc-clang-wrapper.sh (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/gcc-clang-wrapper.sh b/pkgs/development/haskell-modules/gcc-clang-wrapper.sh deleted file mode 100755 index d081be231a1c..000000000000 --- a/pkgs/development/haskell-modules/gcc-clang-wrapper.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -inPreprocessorMode () { - hasE=0 - hasU=0 - hasT=0 - for arg in "$@" - do - if [ 'x-E' = "x$arg" ]; then hasE=1; fi - if [ 'x-undef' = "x$arg" ]; then hasU=1; fi - if [ 'x-traditional' = "x$arg" ]; then hasT=1; fi - done - [ "$hasE$hasU$hasT" = '111' ] -} - -extraClangArgs="-Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs" - -adjustPreprocessorLanguage () { - newArgs='' - while [ $# -gt 0 ] - do - newArgs="$newArgs $1" - if [ "$1" = '-x' ] - then - shift - if [ $# -gt 0 ] - then - if [ "$1" = 'c' ] - then - newArgs="$newArgs assembler-with-cpp" - else - newArgs="$newArgs $1" - fi - fi - fi - shift - done - echo $newArgs -} - -if inPreprocessorMode "$@" -then - exec clang $extraClangArgs `adjustPreprocessorLanguage "$@"` -else - exec clang $extraClangArgs "${@/-nodefaultlibs/}" -fi -- cgit 1.4.1 From a4fbe26ec808c139c1cba8676095645dcbdde5f7 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Sat, 20 Jun 2015 15:29:42 -0700 Subject: darwin purity: haskell-hfsevents --- .../haskell-modules/configuration-common.nix | 6 +- pkgs/os-specific/darwin/apple-sdk/default.nix | 150 +++++++++++++++++++++ pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 119 ++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 4 files changed, 276 insertions(+), 1 deletion(-) create mode 100644 pkgs/os-specific/darwin/apple-sdk/default.nix create mode 100644 pkgs/os-specific/darwin/apple-sdk/frameworks.nix (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 751e0fb4825b..32098b0c7dbe 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -192,7 +192,11 @@ self: super: { # cabal2nix likes to generate dependencies on hinotify when hfsevents is really required # on darwin: https://github.com/NixOS/cabal2nix/issues/146 - hinotify = if pkgs.stdenv.isDarwin then super.hfsevents else super.hinotify; + hinotify = if pkgs.stdenv.isDarwin then self.hfsevents else super.hinotify; + + hfsevents = if pkgs.stdenv.isDarwin + then addBuildTool super.hfsevents pkgs.darwin.apple_sdk.frameworks.CoreServices + else super.hfsevents; # FSEvents API is very buggy and tests are unreliable. See # http://openradar.appspot.com/10207999 and similar issues diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix new file mode 100644 index 000000000000..520158b30add --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -0,0 +1,150 @@ +{ stdenv, fetchurl, xar, gzip, cpio }: + +let + # I'd rather not "export" this, since they're somewhat monolithic and encourage bad habits. + # Also, the include directory inside here should be captured (almost?) entirely by our more + # precise Apple package structure, so with any luck it's unnecessary. + sdk = stdenv.mkDerivation rec { + version = "10.9"; + name = "MacOS_SDK-${version}"; + + src = fetchurl { + url = "http://swcdn.apple.com/content/downloads/27/02/031-06182/xxog8vxu8i6af781ivf4uhy6yt1lslex34/DevSDK_OSX109.pkg"; + sha256 = "16b7aplha5573yl1d44nl2yxzp0w2hafihbyh7930wrcvba69iy4"; + }; + + buildInputs = [ xar gzip cpio ]; + + phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; + + unpackPhase = '' + xar -x -f $src + ''; + + installPhase = '' + start="$(pwd)" + mkdir -p $out + cd $out + cat $start/Payload | gzip -d | cpio -idm + + mv usr/* . + rmdir usr + + mv System/* . + rmdir System + + cd Library/Frameworks/QuartzCore.framework/Versions/A/Headers + for file in CI*.h; do + rm $file + ln -s ../Frameworks/CoreImage.framework/Versions/A/Headers/$file + done + ''; + + meta = with stdenv.lib; { + description = "Apple SDK ${version}"; + maintainers = with maintainers; [ copumpkin ]; + platforms = platforms.darwin; + }; + }; + + framework = name: deps: stdenv.mkDerivation { + name = "apple-framework-${name}"; + + phases = [ "installPhase" "fixupPhase" ]; + + installPhase = '' + linkFramework() { + local path="$1" + local dest="$out/Library/Frameworks/$path" + local name="$(basename "$path" .framework)" + local current="$(readlink "/System/Library/Frameworks/$path/Versions/Current")" + + mkdir -p "$dest" + pushd "$dest" >/dev/null + + ln -s "${sdk}/Library/Frameworks/$path/Versions/$current/Headers" + ln -s -L "/System/Library/Frameworks/$path/Versions/$current/$name" + ln -s -L "/System/Library/Frameworks/$path/Versions/$current/Resources" + + if [ -f "/System/Library/Frameworks/$path/module.map" ]; then + ln -s "/System/Library/Frameworks/$path/module.map" + fi + + pushd "${sdk}/Library/Frameworks/$path/Versions/$current" >/dev/null + local children=$(echo Frameworks/*.framework) + popd >/dev/null + + for child in $children; do + childpath="$path/Versions/$current/$child" + linkFramework "$childpath" + done + + if [ -d "$dest/Versions/$current" ]; then + mv $dest/Versions/$current/* . + fi + + popd >/dev/null + } + + linkFramework "${name}.framework" + ''; + + propagatedBuildInputs = deps; + + # Not going to bother being more precise than this... + __propagatedImpureHostDeps = [ "/System/Library/Frameworks/${name}.framework/Versions" ]; + + meta = with stdenv.lib; { + description = "Apple SDK framework ${name}"; + maintainers = with maintainers; [ copumpkin ]; + platforms = platforms.darwin; + }; + }; +in rec { + libs = { + xpc = stdenv.mkDerivation { + name = "apple-lib-xpc"; + phases = [ "installPhase" "fixupPhase" ]; + + installPhase = '' + mkdir -p $out/include + pushd $out/include >/dev/null + ln -s "${sdk}/include/xpc" + popd >/dev/null + ''; + }; + + Xplugin = stdenv.mkDerivation { + name = "apple-lib-Xplugin"; + phases = [ "installPhase" "fixupPhase" ]; + + # Not enough + __propagatedImpureHostDeps = [ "/usr/lib/libXplugin.1.dylib" ]; + + propagatedBuildInputs = with frameworks; [ + OpenGL ApplicationServices Carbon IOKit CoreFoundation CoreGraphics CoreServices CoreText + ]; + + installPhase = '' + mkdir -p $out/include $out/lib + ln -s "${sdk}/include/Xplugin.h" $out/include/Xplugin.h + ln -s "/usr/lib/libXplugin.1.dylib" $out/lib/libXplugin.dylib + ''; + }; + + utmp = stdenv.mkDerivation { + name = "apple-lib-utmp"; + phases = [ "installPhase" "fixupPhase" ]; + + installPhase = '' + mkdir -p $out/include + pushd $out/include >/dev/null + ln -s "${sdk}/include/utmp.h" + ln -s "${sdk}/include/utmpx.h" + popd >/dev/null + ''; + }; + }; + + frameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix { inherit frameworks libs; }); +} diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix new file mode 100644 index 000000000000..60ed091a1e41 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -0,0 +1,119 @@ +# Current as of 10.9 +# Epic weird knot-tying happening here. +# TODO: clean up the process for generating this and include it + +{ frameworks, libs }: + +with frameworks; with libs; { + AGL = [ Carbon OpenGL ]; + AVFoundation = [ ApplicationServices CoreGraphics ]; + AVKit = []; + Accounts = []; + AddressBook = [ Carbon CoreFoundation ]; + AppKit = [ QuartzCore ]; + AppKitScripting = []; + AppleScriptKit = []; + AppleScriptObjC = []; + AppleShareClientCore = [ CoreServices ]; + AudioToolbox = [ AudioUnit CoreAudio CoreFoundation CoreMIDI ]; + AudioUnit = [ Carbon CoreAudio CoreFoundation ]; + AudioVideoBridging = [ Foundation ]; + Automator = []; + CFNetwork = [ CoreFoundation ]; + CalendarStore = []; + Cocoa = []; + Collaboration = []; + CoreAudio = [ CoreFoundation IOKit ]; + CoreAudioKit = [ AudioUnit ]; + CoreData = []; + CoreFoundation = []; + CoreGraphics = [ CoreFoundation IOKit IOSurface ]; + CoreLocation = []; + CoreMIDI = [ CoreFoundation ]; + CoreMIDIServer = []; + CoreMedia = [ ApplicationServices AudioToolbox CoreAudio CoreFoundation CoreGraphics CoreVideo ]; + CoreMediaIO = [ CoreFoundation CoreMedia ]; + CoreText = [ CoreFoundation CoreGraphics ]; + CoreVideo = [ ApplicationServices CoreFoundation CoreGraphics IOSurface OpenGL ]; + CoreWLAN = []; + DVComponentGlue = [ CoreServices QuickTime ]; + DVDPlayback = []; + DirectoryService = [ CoreFoundation ]; + DiscRecording = [ CoreFoundation CoreServices IOKit ]; + DiscRecordingUI = []; + DiskArbitration = [ CoreFoundation IOKit ]; + DrawSprocket = [ Carbon ]; + EventKit = []; + ExceptionHandling = []; + FWAUserLib = []; + ForceFeedback = [ CoreFoundation IOKit ]; + Foundation = [ CoreFoundation Security ApplicationServices AppKit ]; + GLKit = [ CoreFoundation ]; + GLUT = [ GL OpenGL ]; + GSS = []; + GameController = []; + GameKit = [ Foundation ]; + ICADevices = [ Carbon CoreFoundation IOBluetooth ]; + IMServicePlugIn = []; + IOBluetoothUI = [ IOBluetooth ]; + IOKit = [ CoreFoundation ]; + IOSurface = [ CoreFoundation IOKit xpc ]; + ImageCaptureCore = []; + ImageIO = [ CoreFoundation CoreGraphics ]; + InputMethodKit = [ Carbon ]; + InstallerPlugins = []; + InstantMessage = []; + JavaFrameEmbedding = []; + JavaScriptCore = [ CoreFoundation ]; + Kerberos = []; + Kernel = [ CoreFoundation IOKit ]; + LDAP = []; + LatentSemanticMapping = [ Carbon CoreFoundation ]; + MapKit = []; + MediaAccessibility = [ CoreFoundation CoreGraphics CoreText QuartzCore ]; + MediaToolbox = [ AudioToolbox CoreFoundation CoreMedia ]; + NetFS = [ CoreFoundation ]; + OSAKit = [ Carbon ]; + OpenAL = []; + OpenCL = [ CL IOSurface OpenGL ]; + OpenGL = []; + PCSC = []; + PreferencePanes = []; + PubSub = []; + Python = [ ApplicationServices ]; + QTKit = [ QuickTime ]; + QuickLook = [ ApplicationServices CoreFoundation ]; + QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ]; + Ruby = []; + RubyCocoa = []; + SceneKit = []; + ScreenSaver = []; + Scripting = []; + ScriptingBridge = []; + Security = [ CoreFoundation ]; + SecurityFoundation = []; + SecurityInterface = [ Security ]; + ServiceManagement = [ CoreFoundation Security ]; + Social = []; + SpriteKit = []; + StoreKit = []; + SyncServices = []; + SystemConfiguration = [ CoreFoundation Security ]; + TWAIN = [ Carbon ]; + Tcl = []; + Tk = [ ApplicationServices Carbon X11 ]; + VideoDecodeAcceleration = [ CoreFoundation CoreVideo ]; + VideoToolbox = [ CoreFoundation CoreMedia CoreVideo ]; + WebKit = [ ApplicationServices Carbon JavaScriptCore OpenGL X11 ]; + + # Umbrellas + Accelerate = [ CoreGraphics ]; + ApplicationServices = [ CoreFoundation CoreServices CoreText ImageIO ]; + Carbon = [ ApplicationServices CoreFoundation CoreServices IOKit Security ]; + CoreServices = [ CFNetwork CoreFoundation DiskArbitration Security ]; + IOBluetooth = [ IOKit ]; + JavaVM = []; + OpenDirectory = [ CoreFoundation Foundation ]; + Quartz = [ QuickLook ]; + QuartzCore = [ ApplicationServices CoreFoundation CoreVideo ]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2cd659a5e75f..8daac14761f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9235,6 +9235,8 @@ let cmdline_sdk = cmdline.sdk; cmdline_tools = cmdline.tools; + apple_sdk = callPackage ../os-specific/darwin/apple-sdk {}; + libobjc = apple-source-releases.objc4; }; -- cgit 1.4.1 From 3af62f18f2e78ae312486862e20959086e10f5ce Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Sun, 21 Jun 2015 00:57:41 -0700 Subject: darwin purity: haskell-system-fileio --- pkgs/development/haskell-modules/configuration-common.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 32098b0c7dbe..0ea34e55cb89 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -194,6 +194,7 @@ self: super: { # on darwin: https://github.com/NixOS/cabal2nix/issues/146 hinotify = if pkgs.stdenv.isDarwin then self.hfsevents else super.hinotify; + # hfsevents needs CoreServices in scope hfsevents = if pkgs.stdenv.isDarwin then addBuildTool super.hfsevents pkgs.darwin.apple_sdk.frameworks.CoreServices else super.hfsevents; @@ -202,6 +203,9 @@ self: super: { # http://openradar.appspot.com/10207999 and similar issues fsnotify = if pkgs.stdenv.isDarwin then dontCheck super.fsnotify else super.fsnotify; + # the system-fileio tests use canonicalizePath, which fails in the sandbox + system-fileio = if pkgs.stdenv.isDarwin then dontCheck super.system-fileio else super.system-fileio; + # 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 -- cgit 1.4.1 From c779fe98043ee2123fa36187837423469d0cbc50 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Sun, 21 Jun 2015 00:57:50 -0700 Subject: darwin purity: haskell-double-conversion --- pkgs/development/haskell-modules/configuration-common.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 0ea34e55cb89..bc9cfe8173b6 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -216,6 +216,15 @@ self: super: { ''; }); + double-conversion = if !pkgs.stdenv.isDarwin + then super.double-conversion + else overrideCabal super.double-conversion (drv: + { + patchPhase = '' + substituteInPlace double-conversion.cabal --replace stdc++ c++ + ''; + }); + # Does not compile: "fatal error: ieee-flpt.h: No such file or directory" base_4_8_0_0 = markBroken super.base_4_8_0_0; -- cgit 1.4.1 From 3dd96b1a2ca5c7ac8ce9e1613852aa9ded43e6c1 Mon Sep 17 00:00:00 2001 From: Richard Wallace Date: Sat, 20 Jun 2015 22:33:08 -0700 Subject: hoogle files are generated correctly with ghc 7.10.1, hipbot builds correctly. --- pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix | 7 ------- 1 file changed, 7 deletions(-) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix index f2e0fb056e71..92417e5e6813 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix @@ -44,10 +44,6 @@ self: super: { # Don't use jailbreak built with Cabal 1.22.x because of https://github.com/peti/jailbreak-cabal/issues/9. jailbreak-cabal = pkgs.haskell.packages.ghc784.jailbreak-cabal; - # GHC 7.10.x's Haddock binary cannot generate hoogle files. - # https://ghc.haskell.org/trac/ghc/ticket/9921 - mkDerivation = drv: super.mkDerivation (drv // { doHoogle = false; }); - idris = let idris' = overrideCabal super.idris (drv: { # "idris" binary cannot find Idris library otherwise while building. @@ -231,9 +227,6 @@ self: super: { seqid-streams_0_1_0 = markBroken super.seqid-streams_0_1_0; vector_0_10_9_3 = markBroken super.vector_0_10_9_3; - # https://github.com/purefn/hipbot/issues/1 - hipbot = dontDistribute super.hipbot; - # https://github.com/HugoDaniel/RFC3339/issues/14 timerep = dontCheck super.timerep; -- cgit 1.4.1 From ac3acae7a5a2884fda5751fbd62a8a56580de4b8 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Tue, 30 Jun 2015 16:11:16 -0700 Subject: use security_tool in x509-system --- pkgs/development/haskell-modules/configuration-common.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index c70fb5c0bc77..ad9f0b2c54af 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -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 -- cgit 1.4.1 From 066412c7b0bd175ae2d22e97745e01f38454ce53 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Sun, 5 Jul 2015 01:41:56 -0700 Subject: clean up propagated stuff for x509-system --- pkgs/development/haskell-modules/configuration-common.nix | 4 +++- pkgs/os-specific/darwin/apple-sdk/impure-deps.nix | 8 ++++++++ pkgs/os-specific/darwin/security-tool/default.nix | 9 +++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index ad9f0b2c54af..3586fd0a2324 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -208,13 +208,15 @@ 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 = 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 ''; + __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [ + "/System/Library/Keychains" + ]; }) else super.x509-system; diff --git a/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix b/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix index 0d2f2728406a..54a6dcfaeaf7 100644 --- a/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix +++ b/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix @@ -16,6 +16,12 @@ rec { "/usr/lib/libpam.2.dylib" "/usr/lib/libxar.1.dylib" ]; + GSS = [ + "/System/Library/Frameworks/GSS.framework" + ]; + Kerberos = [ + "/System/Library/Frameworks/Kerberos.framework" + ]; CoreServices = [ "/System/Library/Frameworks/CoreServices.framework" "/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore" @@ -76,6 +82,8 @@ rec { "/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv" "/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore" "/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage" + "/System/Library/PrivateFrameworks/Heimdal.framework/Heimdal" + "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/Current" "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal" "/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices" "/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling" diff --git a/pkgs/os-specific/darwin/security-tool/default.nix b/pkgs/os-specific/darwin/security-tool/default.nix index e1e51e6a7c9e..866d006238df 100644 --- a/pkgs/os-specific/darwin/security-tool/default.nix +++ b/pkgs/os-specific/darwin/security-tool/default.nix @@ -1,4 +1,4 @@ -{ CoreServices, Foundation, PCSC, Security, apple_sdk, fetchurl, gnustep-make, libobjc, libsecurity_apple_csp, libsecurity_apple_cspdl, libsecurity_apple_file_dl, libsecurity_apple_x509_cl, libsecurity_apple_x509_tp, libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_cdsa_utils, libsecurity_cssm, libsecurity_filedb, libsecurity_keychain, libsecurity_mds, libsecurity_pkcs12, libsecurity_sd_cspdl, libsecurity_utilities, libsecurityd, osx_private_sdk, stdenv }: +{ CoreServices, Foundation, PCSC, Security, GSS, Kerberos, makeWrapper, apple_sdk, fetchurl, gnustep-make, libobjc, libsecurity_apple_csp, libsecurity_apple_cspdl, libsecurity_apple_file_dl, libsecurity_apple_x509_cl, libsecurity_apple_x509_tp, libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_cdsa_utils, libsecurity_cssm, libsecurity_filedb, libsecurity_keychain, libsecurity_mds, libsecurity_pkcs12, libsecurity_sd_cspdl, libsecurity_utilities, libsecurityd, osx_private_sdk, stdenv }: stdenv.mkDerivation rec { version = "55115"; @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { "security_INSTALL_DIR=\$(out)/bin" ]; - propagatedBuildInputs = [ Security PCSC Foundation ]; + propagatedBuildInputs = [ GSS Kerberos Security PCSC Foundation ]; buildInputs = [ gnustep-make @@ -62,6 +62,7 @@ stdenv.mkDerivation rec { libsecurity_sd_cspdl libsecurity_filedb libsecurityd + makeWrapper ]; NIX_CFLAGS_COMPILE = [ @@ -70,6 +71,10 @@ stdenv.mkDerivation rec { "-Wno-deprecated-declarations" ]; + postInstall = '' + wrapProgram $out/bin/security --set DYLD_INSERT_LIBRARIES /usr/lib/libsqlite3.dylib + ''; + meta = with stdenv.lib; { description = "Command line interface to Mac OS X keychains and Security framework"; maintainers = with maintainers; [ -- cgit 1.4.1 From 5f308b50e4b4536406ab38a1f19de3d9a8681c17 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Sat, 11 Jul 2015 16:04:27 -0700 Subject: add system keychains to security-tool's propagated inputs --- pkgs/development/haskell-modules/configuration-common.nix | 3 --- pkgs/os-specific/darwin/security-tool/default.nix | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 3586fd0a2324..232ea3630e4e 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -214,9 +214,6 @@ self: super: { patchPhase = (drv.patchPhase or "") + '' substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security ''; - __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [ - "/System/Library/Keychains" - ]; }) else super.x509-system; diff --git a/pkgs/os-specific/darwin/security-tool/default.nix b/pkgs/os-specific/darwin/security-tool/default.nix index 866d006238df..7cff4fc3eef4 100644 --- a/pkgs/os-specific/darwin/security-tool/default.nix +++ b/pkgs/os-specific/darwin/security-tool/default.nix @@ -41,6 +41,8 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ GSS Kerberos Security PCSC Foundation ]; + __propagatedImpureHostDeps = [ "/System/Library/Keychains" ]; + buildInputs = [ gnustep-make libsecurity_asn1 -- cgit 1.4.1 From 682dc3ee70c7a24b0eac93189bf66a2eb331f0a0 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Sat, 11 Jul 2015 16:04:36 -0700 Subject: link yesod-bin with cocoa --- pkgs/development/haskell-modules/configuration-common.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 232ea3630e4e..75e47e7ce77f 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -897,6 +897,10 @@ self: super: { wai-session = markBroken super.wai-session; serversession-frontend-wai = dontDistribute super.serversession-frontend-wai; + yesod-bin = if pkgs.stdenv.isDarwin + then addBuildDepend super.yesod-bin pkgs.darwin.apple_sdk.frameworks.Cocoa + else super.yesod-bin; + # https://github.com/commercialhaskell/stack/issues/408 # https://github.com/commercialhaskell/stack/issues/409 stack = overrideCabal super.stack (drv: { preCheck = "export HOME=$TMPDIR"; doCheck = false; }); -- cgit 1.4.1