From b658196c6c00f02878e8e5c4c55c8cc871314e83 Mon Sep 17 00:00:00 2001 From: Marko Durkovic Date: Thu, 23 Oct 2014 12:03:01 +0200 Subject: cygwin: libiconv and gettext for x86_64 --- pkgs/development/libraries/gettext/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'pkgs/development/libraries/gettext') diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 8f6277ca2e9..15f11f8a133 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -12,11 +12,13 @@ stdenv.mkDerivation (rec { configureFlags = [ "--disable-csharp" "--with-xz" ] ++ (stdenv.lib.optionals stdenv.isCygwin - [ # We have a static libiconv, so we can only build the static lib. - "--disable-shared" "--enable-static" - + [ "--disable-java" + "--disable-native-java" # Share the cache among the various `configure' runs. "--config-cache" + "--with-included-gettext" + "--with-included-glib" + "--with-included-libcroco" ]); # On cross building, gettext supposes that the wchar.h from libc @@ -28,6 +30,8 @@ stdenv.mkDerivation (rec { echo gl_cv_func_wcwidth_works=yes > cachefile configureFlags="$configureFlags --cache-file=`pwd`/cachefile" fi + '' + stdenv.lib.optionalString stdenv.isCygwin '' + sed -i -e "s/\(am_libgettextlib_la_OBJECTS = \)error.lo/\\1/" gettext-tools/gnulib-lib/Makefile.in ''; buildInputs = [ xz ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; -- cgit 1.4.1 From fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Thu, 11 Jun 2015 17:58:26 -0700 Subject: pure darwin stdenv --- pkgs/development/compilers/llvm/3.6/default.nix | 2 +- .../development/interpreters/perl/5.16/default.nix | 11 + .../development/interpreters/perl/5.20/default.nix | 11 + .../interpreters/python/2.7/default.nix | 4 + pkgs/development/libraries/gettext/default.nix | 7 +- pkgs/development/libraries/icu/default.nix | 5 + pkgs/development/libraries/libedit/default.nix | 2 +- pkgs/development/libraries/zlib/default.nix | 7 + pkgs/development/tools/misc/binutils/default.nix | 6 +- pkgs/os-specific/darwin/adv_cmds/locale.nix | 29 ++ pkgs/os-specific/darwin/binutils/default.nix | 39 +++ pkgs/stdenv/darwin/default.nix | 364 +++++++++++++++------ pkgs/stdenv/darwin/make-bootstrap-tools.nix | 10 +- pkgs/stdenv/default.nix | 2 +- pkgs/stdenv/generic/default.nix | 27 +- pkgs/tools/archivers/gnutar/default.nix | 6 + pkgs/tools/archivers/sharutils/default.nix | 2 +- pkgs/tools/text/gawk/default.nix | 11 +- pkgs/top-level/all-packages.nix | 24 +- 19 files changed, 436 insertions(+), 133 deletions(-) create mode 100644 pkgs/os-specific/darwin/adv_cmds/locale.nix create mode 100644 pkgs/os-specific/darwin/binutils/default.nix (limited to 'pkgs/development/libraries/gettext') diff --git a/pkgs/development/compilers/llvm/3.6/default.nix b/pkgs/development/compilers/llvm/3.6/default.nix index 3321e38949f..d95ffe47326 100644 --- a/pkgs/development/compilers/llvm/3.6/default.nix +++ b/pkgs/development/compilers/llvm/3.6/default.nix @@ -1,6 +1,6 @@ { pkgs, newScope, stdenv, isl, fetchurl, overrideCC, wrapCC }: let - callPackage = newScope (self // { inherit isl version fetch; }); + callPackage = newScope (self // { inherit stdenv isl version fetch; }); version = "3.6.1"; diff --git a/pkgs/development/interpreters/perl/5.16/default.nix b/pkgs/development/interpreters/perl/5.16/default.nix index 9ed3aa54f51..568025edfd4 100644 --- a/pkgs/development/interpreters/perl/5.16/default.nix +++ b/pkgs/development/interpreters/perl/5.16/default.nix @@ -24,6 +24,17 @@ stdenv.mkDerivation rec { ++ lib.optional stdenv.isSunOS ./ld-shared.patch ++ lib.optional stdenv.isDarwin [ ./cpp-precomp.patch ./no-libutil.patch ] ; + # There's an annoying bug on sandboxed Darwin in Perl's Cwd.pm where it looks for pwd + # in /bin/pwd and /usr/bin/pwd and then falls back on just "pwd" if it can't get them + # while at the same time erasing the PATH environment variable so it unconditionally + # fails. The code in question is guarded by a check for Mac OS, but the patch below + # doesn't have any runtime effect on other platforms. + postPatch = '' + pwd="$(type -P pwd)" + substituteInPlace dist/Cwd/Cwd.pm \ + --replace "pwd_cmd = 'pwd'" "pwd_cmd = '$pwd'" + ''; + # Build a thread-safe Perl with a dynamic libperls.o. We need the # "installstyle" option to ensure that modules are put under # $out/lib/perl5 - this is the general default, but because $out diff --git a/pkgs/development/interpreters/perl/5.20/default.nix b/pkgs/development/interpreters/perl/5.20/default.nix index 0ad955d0363..bfdb09e779a 100644 --- a/pkgs/development/interpreters/perl/5.20/default.nix +++ b/pkgs/development/interpreters/perl/5.20/default.nix @@ -35,6 +35,17 @@ stdenv.mkDerivation rec { ++ optional stdenv.isSunOS ./ld-shared.patch ++ stdenv.lib.optional stdenv.isDarwin [ ./cpp-precomp.patch ./no-libutil.patch ] ; + # There's an annoying bug on sandboxed Darwin in Perl's Cwd.pm where it looks for pwd + # in /bin/pwd and /usr/bin/pwd and then falls back on just "pwd" if it can't get them + # while at the same time erasing the PATH environment variable so it unconditionally + # fails. The code in question is guarded by a check for Mac OS, but the patch below + # doesn't have any runtime effect on other platforms. + postPatch = '' + pwd="$(type -P pwd)" + substituteInPlace dist/PathTools/Cwd.pm \ + --replace "pwd_cmd = 'pwd'" "pwd_cmd = '$pwd'" + ''; + # Build a thread-safe Perl with a dynamic libperls.o. We need the # "installstyle" option to ensure that modules are put under # $out/lib/perl5 - this is the general default, but because $out diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix index 4ad4679bd6e..9e1f0e61744 100644 --- a/pkgs/development/interpreters/python/2.7/default.nix +++ b/pkgs/development/interpreters/python/2.7/default.nix @@ -62,6 +62,8 @@ let for i in Lib/plat-*/regen; do substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/ done + '' + optionalString stdenv.isDarwin '' + substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' ''; configureFlags = [ @@ -72,6 +74,8 @@ let "--with-system-ffi" "--with-system-expat" "ac_cv_func_bind_textdomain_codeset=yes" + ] ++ optionals stdenv.isDarwin [ + "--disable-toolbox-glue" ]; postConfigure = if stdenv.isCygwin then '' diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 15f11f8a133..f86a15cb0d6 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -19,7 +19,12 @@ stdenv.mkDerivation (rec { "--with-included-gettext" "--with-included-glib" "--with-included-libcroco" - ]); + ]) + # avoid retaining reference to CF during stdenv bootstrap + ++ (stdenv.lib.optionals stdenv.isDarwin [ + "gt_cv_func_CFPreferencesCopyAppValue=no" + "gt_cv_func_CFLocaleCopyCurrent=no" + ]); # On cross building, gettext supposes that the wchar.h from libc # does not fulfill gettext needs, so it tries to work with its diff --git a/pkgs/development/libraries/icu/default.nix b/pkgs/development/libraries/icu/default.nix index e95cb7ad097..909f4e936a9 100644 --- a/pkgs/development/libraries/icu/default.nix +++ b/pkgs/development/libraries/icu/default.nix @@ -32,6 +32,11 @@ stdenv.mkDerivation { configureFlags = "--disable-debug" + stdenv.lib.optionalString stdenv.isDarwin " --enable-rpath"; + # remove dependency on bootstrap-tools in early stdenv build + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc + ''; + enableParallelBuilding = true; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/libedit/default.nix b/pkgs/development/libraries/libedit/default.nix index dc2f5842b28..5adef716eb0 100644 --- a/pkgs/development/libraries/libedit/default.nix +++ b/pkgs/development/libraries/libedit/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ] else null; postInstall = '' - sed -i ${stdenv.lib.optionalString (stdenv.isDarwin && stdenv.cc.nativeTools) "''"} s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc + sed -i s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc ''; configureFlags = [ "--enable-widec" ]; diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 419a2584ca8..93474d14344 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -13,6 +13,13 @@ stdenv.mkDerivation (rec { sha256 = "039agw5rqvqny92cpkrfn243x2gd4xn13hs3xi6isk55d2vqqr9n"; }; + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace configure \ + --replace '/usr/bin/libtool' 'ar' \ + --replace 'AR="libtool"' 'AR="ar"' \ + --replace 'ARFLAGS="-o"' 'ARFLAGS="-r"' + ''; + configureFlags = if static then "" else "--shared"; preConfigure = '' diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index f740c60c487..4b2a55c1d90 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -2,8 +2,6 @@ , cross ? null, gold ? true, bison ? null }: -assert !stdenv.isDarwin; - let basename = "binutils-2.23.1"; in with { inherit (stdenv.lib) optional optionals optionalString; }; @@ -56,7 +54,9 @@ stdenv.mkDerivation rec { # As binutils takes part in the stdenv building, we don't want references # to the bootstrap-tools libgcc (as uses to happen on arm/mips) - NIX_CFLAGS_COMPILE = "-static-libgcc"; + NIX_CFLAGS_COMPILE = if stdenv.isDarwin + then "-Wno-string-plus-int -Wno-deprecated-declarations" + else "-static-libgcc"; configureFlags = [ "--enable-shared" "--enable-deterministic-archives" ] diff --git a/pkgs/os-specific/darwin/adv_cmds/locale.nix b/pkgs/os-specific/darwin/adv_cmds/locale.nix new file mode 100644 index 00000000000..92de8a242e2 --- /dev/null +++ b/pkgs/os-specific/darwin/adv_cmds/locale.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "locale-${version}"; + version = "153"; + + src = fetchurl { + url = "http://opensource.apple.com/tarballs/adv_cmds/adv_cmds-${version}.tar.gz"; + sha256 = "174v6a4zkcm2pafzgdm6kvs48z5f911zl7k49hv7kjq6gm58w99v"; + }; + + buildPhase = '' + cd locale + c++ -Os -Wall -o locale locale.cc + ''; + + installPhase = '' + mkdir -p $out/bin $out/share/man/man1 + + cp locale $out/bin/locale + cp locale.1 $out/share/man/man1 + ''; + + + meta = { + platforms = stdenv.lib.platforms.darwin; + maintainers = with stdenv.lib.maintainers; [ gridaphobe ]; + }; +} diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix new file mode 100644 index 00000000000..abe4aa67b14 --- /dev/null +++ b/pkgs/os-specific/darwin/binutils/default.nix @@ -0,0 +1,39 @@ +{ stdenv, binutils-raw, cctools }: + +stdenv.mkDerivation { + name = "cctools-binutils-darwin"; + buildCommand = '' + mkdir -p $out/bin $out/include + + ln -s ${binutils-raw}/bin/c++filt $out/bin/c++filt + + # We specifically need: + # - ld: binutils doesn't provide it on darwin + # - as: as above + # - ar: the binutils one prodices .a files that the cctools ld doesn't like + # - ranlib: for compatibility with ar + # - dsymutil: soon going away once it goes into LLVM (this one is fake anyway) + # - otool: we use it for some of our name mangling + # - install_name_tool: we use it to rewrite stuff in our bootstrap tools + # - strip: the binutils one seems to break mach-o files + # - lipo: gcc build assumes it exists + # - nm: the gnu one doesn't understand many new load commands + for i in ar ranlib as dsymutil install_name_tool ld strip otool lipo nm strings size; do + ln -sf "${cctools}/bin/$i" "$out/bin/$i" + done + + for i in ${binutils-raw}/include/*.h; do + ln -s "$i" "$out/include/$(basename $i)" + done + + for i in ${cctools}/include/*; do + ln -s "$i" "$out/include/$(basename $i)" + done + + # FIXME: this will give us incorrect man pages for bits of cctools + ln -s ${binutils-raw}/share $out/share + ln -s ${binutils-raw}/lib $out/lib + + ln -s ${cctools}/libexec $out/libexec + ''; +} diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index ac396ecdf12..d4b17a7909c 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -4,144 +4,294 @@ , config ? {} }: -rec { +let + fetch = { file, sha256 }: import { + url = "https://dl.dropboxusercontent.com/u/2857322/${file}"; + inherit sha256; + executable = true; + }; + + bootstrapFiles = { + sh = fetch { file = "sh"; sha256 = "1qakpg37vl61jnkplz13m3g1csqr85cg8ybp6jwiv6apmg26isnm"; }; + bzip2 = fetch { file = "bzip2"; sha256 = "1gxa67255q9v00j1vn1mzyrnbwys2g1102cx02vpcyvvrl4vqxr0"; }; + mkdir = fetch { file = "mkdir"; sha256 = "1yfl8w65ksji7fggrbvqxw8lp0gm02qilk11n9axj2jxay53ngvg"; }; + cpio = fetch { file = "cpio"; sha256 = "0nssyg19smgcblwq1mfcw4djbd85md84d2f093qcqkbigdjg484b"; }; + }; + tarball = fetch { file = "bootstrap-tools.9.cpio.bz2"; sha256 = "0fd79k7gy3z3sba5w4f4lnrcpiwff31vw02480x1pdry8bbgbf2j"; }; +in rec { allPackages = import ../../top-level/all-packages.nix; - bootstrapTools = derivation { - inherit system; + commonPreHook = '' + export NIX_ENFORCE_PURITY=1 + export NIX_IGNORE_LD_THROUGH_GCC=1 + stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" + export MACOSX_DEPLOYMENT_TARGET=10.7 + export SDKROOT= + export CMAKE_OSX_ARCHITECTURES=x86_64 + ''; + + # libSystem and its transitive dependencies. Get used to this; it's a recurring theme in darwin land + libSystemClosure = [ + "/usr/lib/libSystem.dylib" + "/usr/lib/libSystem.B.dylib" + "/usr/lib/libobjc.A.dylib" + "/usr/lib/libobjc.dylib" + "/usr/lib/libauto.dylib" + "/usr/lib/libc++abi.dylib" + "/usr/lib/libc++.1.dylib" + "/usr/lib/libDiagnosticMessagesClient.dylib" + "/usr/lib/system" + ]; - name = "trivial-bootstrap-tools"; - builder = "/bin/sh"; - args = [ ./trivial-bootstrap.sh ]; + # The one dependency of /bin/sh :( + binShClosure = [ "/usr/lib/libncurses.5.4.dylib" ]; - mkdir = "/bin/mkdir"; - ln = "/bin/ln"; + bootstrapTools = derivation rec { + inherit system tarball; + + name = "bootstrap-tools"; + builder = bootstrapFiles.sh; # Not a filename! Attribute 'sh' on bootstrapFiles + args = [ ./unpack-bootstrap-tools.sh ]; + + inherit (bootstrapFiles) mkdir bzip2 cpio; + + __impureHostDeps = binShClosure ++ libSystemClosure; }; - # The simplest stdenv possible to run fetchadc and get the Apple command-line tools - stage0 = rec { - fetchurl = import ../../build-support/fetchurl { - inherit stdenv; - curl = bootstrapTools; - }; + stageFun = step: last: {shell ? "${bootstrapTools}/bin/sh", + overrides ? (pkgs: {}), + extraPreHook ? "", + extraBuildInputs ? with last.pkgs; [ xz darwin.CF libcxx ], + extraInitialPath ? [], + allowedRequisites ? null}: + let + thisStdenv = import ../generic { + inherit system config shell extraBuildInputs allowedRequisites; + + name = "stdenv-darwin-boot-${toString step}"; + + cc = if isNull last then "/no-such-path" else import ../../build-support/cc-wrapper { + inherit shell; + inherit (last) stdenv; + inherit (last.pkgs.darwin) dyld; + + nativeTools = true; + nativePrefix = bootstrapTools; + nativeLibc = false; + libc = last.pkgs.darwin.Libsystem; + cc = { name = "clang-9.9.9"; outPath = bootstrapTools; }; + }; + + preHook = stage0.stdenv.lib.optionalString (shell == "${bootstrapTools}/bin/sh") '' + # Don't patch #!/interpreter because it leads to retained + # dependencies on the bootstrapTools in the final stdenv. + dontPatchShebangs=1 + '' + '' + ${commonPreHook} + ${extraPreHook} + ''; + initialPath = extraInitialPath ++ [ bootstrapTools ]; + fetchurlBoot = import ../../build-support/fetchurl { + stdenv = stage0.stdenv; + curl = bootstrapTools; + }; + + # The stdenvs themselves don't use mkDerivation, so I need to specify this here + __stdenvImpureHostDeps = binShClosure ++ libSystemClosure; + __extraImpureHostDeps = binShClosure ++ libSystemClosure; + + extraAttrs = { inherit platform; }; + overrides = pkgs: (overrides pkgs) // { fetchurl = thisStdenv.fetchurlBoot; }; + }; + + thisPkgs = allPackages { + inherit system platform; + bootStdenv = thisStdenv; + }; + in { stdenv = thisStdenv; pkgs = thisPkgs; }; + + stage0 = stageFun 0 null { + overrides = orig: with stage0; rec { + darwin = orig.darwin // { + Libsystem = stdenv.mkDerivation { + name = "bootstrap-Libsystem"; + buildCommand = '' + mkdir -p $out + ln -s ${bootstrapTools}/lib $out/lib + ln -s ${bootstrapTools}/include-Libsystem $out/include + ''; + }; + dyld = bootstrapTools; + }; + + libcxx = stdenv.mkDerivation { + name = "bootstrap-libcxx"; + phases = [ "installPhase" "fixupPhase" ]; + installPhase = '' + mkdir -p $out/lib $out/include + ln -s ${bootstrapTools}/lib/libc++.dylib $out/lib/libc++.dylib + ln -s ${bootstrapTools}/include/c++ $out/include/c++ + ''; + setupHook = ../../development/compilers/llvm/3.5/libc++/setup-hook.sh; + }; + + libcxxabi = stdenv.mkDerivation { + name = "bootstrap-libcxxabi"; + buildCommand = '' + mkdir -p $out/lib + ln -s ${bootstrapTools}/lib/libc++abi.dylib $out/lib/libc++abi.dylib + ''; + }; - stdenv = import ../generic { - inherit system config; - name = "stdenv-darwin-boot-0"; - shell = "/bin/bash"; - initialPath = [ bootstrapTools ]; - fetchurlBoot = fetchurl; - cc = "/no-such-path"; }; + + extraBuildInputs = []; }; - buildTools = import ../../os-specific/darwin/command-line-tools { - inherit (stage0) stdenv fetchurl; - xar = bootstrapTools; - gzip = bootstrapTools; - cpio = bootstrapTools; + persistent0 = _: {}; + + stage1 = with stage0; stageFun 1 stage0 { + extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\""; + extraBuildInputs = [ pkgs.libcxx ]; + + allowedRequisites = + [ bootstrapTools ] ++ (with pkgs; [ libcxx libcxxabi ]) ++ [ pkgs.darwin.Libsystem ]; + + overrides = persistent0; }; - preHook = '' - export NIX_IGNORE_LD_THROUGH_GCC=1 - export NIX_DONT_SET_RPATH=1 - export NIX_NO_SELF_RPATH=1 - dontFixLibtool=1 - stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" - xargsFlags=" " - export MACOSX_DEPLOYMENT_TARGET=10.7 - # Use the 10.9 SDK if we're running on 10.9, and 10.10 if we're - # running on 10.10. We need to use the 10.10 headers for functions - # like readlinkat() that are dynamically detected by configure - # scripts. Very impure, obviously. - export SDKROOT=$(/usr/bin/xcrun --sdk macosx"$(/usr/bin/sw_vers -productVersion | /usr/bin/cut -d. -f1,2)" --show-sdk-path 2> /dev/null || echo /) - export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$SDKROOT/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations" - export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib" - export CMAKE_OSX_ARCHITECTURES=x86_64 - ''; + persistent1 = orig: with stage1.pkgs; { + inherit + zlib patchutils m4 scons flex perl bison unifdef unzip openssl icu python + libxml2 gettext sharutils gmp libarchive ncurses pkg-config libedit groff + openssh sqlite sed serf openldap db cyrus-sasl expat apr-util subversion xz + findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils; - # A stdenv that wraps the Apple command-line tools and our other trivial symlinked bootstrap tools - stage1 = rec { - nativePrefix = "${buildTools.tools}/Library/Developer/CommandLineTools/usr"; - - stdenv = import ../generic { - name = "stdenv-darwin-boot-1"; - - inherit system config; - inherit (stage0.stdenv) shell fetchurlBoot; - - initialPath = stage0.stdenv.initialPath ++ [ nativePrefix ]; - - preHook = preHook + "\n" + '' - export NIX_LDFLAGS_AFTER+=" -L/usr/lib" - export NIX_ENFORCE_PURITY= - export NIX_CFLAGS_COMPILE+=" -isystem ${nativePrefix}/include/c++/v1 -stdlib=libc++" - export NIX_CFLAGS_LINK+=" -stdlib=libc++ -Wl,-rpath,${nativePrefix}/lib" - ''; - - cc = import ../../build-support/cc-wrapper { - nativeTools = true; - nativePrefix = nativePrefix; - nativeLibc = true; - stdenv = stage0.stdenv; - shell = "/bin/bash"; - cc = { - name = "clang-9.9.9"; - cc = "/usr"; - outPath = nativePrefix; - }; - isClang = true; - }; + darwin = orig.darwin // { + inherit (darwin) + dyld Libsystem xnu configd libdispatch libclosure launchd; }; - pkgs = allPackages { - inherit system platform; - bootStdenv = stdenv; + }; + + stage2 = with stage1; stageFun 2 stage1 { + allowedRequisites = + [ bootstrapTools ] ++ + (with pkgs; [ xz libcxx libcxxabi icu ]) ++ + (with pkgs.darwin; [ dyld Libsystem CF ]); + + overrides = persistent1; + }; + + persistent2 = orig: with stage2.pkgs; { + inherit + patchutils m4 scons flex perl bison unifdef unzip openssl python + gettext sharutils libarchive pkg-config groff bash subversion + openssh sqlite sed serf openldap db cyrus-sasl expat apr-util + findfreetype libssh curl cmake autoconf automake libtool cpio + libcxx libcxxabi; + + darwin = orig.darwin // { + inherit (darwin) + dyld Libsystem xnu configd libdispatch libclosure launchd libiconv; }; }; - stage2 = rec { - stdenv = import ../generic { - name = "stdenv-darwin-boot-2"; + stage3 = with stage2; stageFun 3 stage2 { + shell = "${pkgs.bash}/bin/bash"; + + # We have a valid shell here (this one has no bootstrap-tools runtime deps) so stageFun + # enables patchShebangs above. Unfortunately, patchShebangs ignores our $SHELL setting + # and instead goes by $PATH, which happens to contain bootstrapTools. So it goes and + # patches our shebangs back to point at bootstrapTools. This makes sure bash comes first. + extraInitialPath = [ pkgs.bash ]; - inherit system config; - inherit (stage1.stdenv) shell fetchurlBoot preHook cc; + allowedRequisites = + [ bootstrapTools ] ++ + (with pkgs; [ icu bash libcxx libcxxabi ]) ++ + (with pkgs.darwin; [ dyld Libsystem ]); - initialPath = [ stage1.pkgs.xz ] ++ stage1.stdenv.initialPath; + overrides = persistent2; + }; + + persistent3 = orig: with stage3.pkgs; { + inherit + gnumake gzip gnused bzip2 gawk ed xz patch bash + libcxxabi libcxx ncurses libffi zlib llvm gmp pcre gnugrep + coreutils findutils diffutils patchutils; + + llvmPackages = orig.llvmPackages // { + inherit (llvmPackages) llvm clang-unwrapped; }; - pkgs = allPackages { - inherit system platform; - bootStdenv = stdenv; + + darwin = orig.darwin // { + inherit (darwin) dyld Libsystem libiconv; }; }; - # Use stage1 to build a whole set of actual tools so we don't have to rely on the Apple prebuilt ones or - # the ugly symlinked bootstrap tools anymore. - stage3 = with stage2; import ../generic { - name = "stdenv-darwin-boot-3"; + stage4 = with stage3; stageFun 4 stage3 { + shell = "${pkgs.bash}/bin/bash"; + extraInitialPath = [ pkgs.bash ]; + overrides = persistent3; + }; + + persistent4 = orig: with stage4.pkgs; { + inherit + gnumake gzip gnused bzip2 gawk ed xz patch bash + libcxxabi libcxx ncurses libffi zlib icu llvm gmp pcre gnugrep + coreutils findutils diffutils patchutils binutils binutils-raw; + + llvmPackages = orig.llvmPackages // { + inherit (llvmPackages) llvm clang-unwrapped; + }; + darwin = orig.darwin // { + inherit (darwin) dyld Libsystem cctools CF libiconv; + }; + }; + + stage5 = with stage4; import ../generic rec { inherit system config; inherit (stdenv) fetchurlBoot; - initialPath = (import ../common-path.nix) { inherit pkgs; }; + name = "stdenv-darwin"; + + preHook = commonPreHook; - preHook = preHook + "\n" + '' - export NIX_ENFORCE_PURITY=1 - ''; + __stdenvImpureHostDeps = binShClosure ++ libSystemClosure; + __extraImpureHostDeps = binShClosure ++ libSystemClosure; + + initialPath = import ../common-path.nix { inherit pkgs; }; + shell = "${pkgs.bash}/bin/bash"; cc = import ../../build-support/cc-wrapper { - inherit stdenv; - nativeTools = false; - nativeLibc = true; - binutils = pkgs.darwin.cctools; - cc = pkgs.llvmPackages.clang-unwrapped; - coreutils = pkgs.coreutils; - shell = "${pkgs.bash}/bin/bash"; - extraPackages = [ pkgs.libcxx ]; - isClang = true; + inherit stdenv shell; + nativeTools = false; + nativeLibc = false; + inherit (pkgs) coreutils binutils; + inherit (pkgs.darwin) dyld; + cc = pkgs.llvmPackages.clang-unwrapped; + libc = pkgs.darwin.Libsystem; }; - shell = "${pkgs.bash}/bin/bash"; - }; + extraBuildInputs = with pkgs; [ darwin.CF libcxx ]; + + extraAttrs = { + inherit platform bootstrapTools; + libc = pkgs.darwin.Libsystem; + shellPackage = pkgs.bash; + }; + + allowedRequisites = (with pkgs; [ + xz libcxx libcxxabi icu gmp gnumake findutils bzip2 llvm zlib libffi + coreutils ed diffutils gnutar gzip ncurses gnused bash gawk + gnugrep llvmPackages.clang-unwrapped patch pcre binutils-raw binutils gettext + ]) ++ (with pkgs.darwin; [ + dyld Libsystem CF cctools libiconv + ]); - stdenvDarwin = stage3; + overrides = orig: persistent4 orig // { + clang = cc; + inherit cc; + }; + }; } diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 636410fdd78..433638dd1bd 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -63,13 +63,15 @@ rec { cp -d ${gnugrep.pcre}/lib/libpcre*.dylib $out/lib cp -d ${libiconv}/lib/libiconv*.dylib $out/lib + cp -d ${gettext}/lib/libintl*.dylib $out/lib + chmod +x $out/lib/libintl*.dylib # Copy what we need of clang - cp -d ${llvmPackages.clang}/bin/clang $out/bin - cp -d ${llvmPackages.clang}/bin/clang++ $out/bin - cp -d ${llvmPackages.clang}/bin/clang-3.5 $out/bin + cp -d ${llvmPackages.clang-unwrapped}/bin/clang $out/bin + cp -d ${llvmPackages.clang-unwrapped}/bin/clang++ $out/bin + cp -d ${llvmPackages.clang-unwrapped}/bin/clang-3.6 $out/bin - cp -rL ${llvmPackages.clang}/lib/clang $out/lib + cp -rL ${llvmPackages.clang-unwrapped}/lib/clang $out/lib cp -d ${libcxx}/lib/libc++*.dylib $out/lib cp -d ${libcxxabi}/lib/libc++abi*.dylib $out/lib diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index 545a3d748eb..28ba8001471 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -37,7 +37,7 @@ rec { stdenvLinux = (import ./linux { inherit system allPackages platform config lib; }).stdenvLinux; # Darwin standard environment. - stdenvDarwin = (import ./darwin { inherit system allPackages platform config;}).stdenvDarwin; + stdenvDarwin = (import ./darwin { inherit system allPackages platform config;}).stage5; # Select the appropriate stdenv for the platform `system'. stdenv = diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 863acc31a61..67adaf42a8d 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -10,6 +10,8 @@ let lib = import ../../../lib; in lib.makeOverridable ( , setupScript ? ./setup.sh , extraBuildInputs ? [] +, __stdenvImpureHostDeps ? [] +, __extraImpureHostDeps ? [] }: let @@ -131,7 +133,19 @@ let lib.addPassthru (derivation ( (removeAttrs attrs ["meta" "passthru" "crossAttrs" "pos"]) - // + // (let + buildInputs = attrs.buildInputs or []; + nativeBuildInputs = attrs.nativeBuildInputs or []; + propagatedBuildInputs = attrs.propagatedBuildInputs or []; + propagatedNativeBuildInputs = attrs.propagatedNativeBuildInputs or []; + crossConfig = attrs.crossConfig or null; + + __impureHostDeps = attrs.__impureHostDeps or []; + __propagatedImpureHostDeps = attrs.__propagatedImpureHostDeps or []; + + computedImpureHostDeps = lib.concatMap (input: input.__propagatedImpureHostDeps or []) (extraBuildInputs ++ buildInputs ++ nativeBuildInputs); + computedPropagatedImpureHostDeps = lib.concatMap (input: input.__propagatedImpureHostDeps or []) (propagatedBuildInputs ++ propagatedNativeBuildInputs); + in { builder = attrs.realBuilder or shell; args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; @@ -147,7 +161,15 @@ let nativeBuildInputs = nativeBuildInputs ++ (if crossConfig == null then buildInputs else []); propagatedNativeBuildInputs = propagatedNativeBuildInputs ++ (if crossConfig == null then propagatedBuildInputs else []); - })) ( + + __impureHostDeps = lib.unique (lib.sort (x: y: x < y) (computedImpureHostDeps ++ computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ __extraImpureHostDeps ++ [ + "/dev/zero" + "/dev/random" + "/dev/urandom" + "/bin/sh" + ])); + __propagatedImpureHostDeps = lib.unique (lib.sort (x: y: x < y) (computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps)); + }))) ( { # The meta attribute is passed in the resulting attribute set, # but it's not part of the actual derivation, i.e., it's not @@ -171,6 +193,7 @@ let (if isNull allowedRequisites then {} else { allowedRequisites = allowedRequisites ++ defaultNativeBuildInputs; }) // { inherit system name; + __impureHostDeps = __stdenvImpureHostDeps; builder = shell; diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 00be3967768..71b43bf2de9 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -11,6 +11,12 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optional stdenv.isDarwin ./gnutar-1.28-darwin.patch; + # avoid retaining reference to CF during stdenv bootstrap + configureFlags = stdenv.lib.optionals stdenv.isDarwin [ + "gt_cv_func_CFPreferencesCopyAppValue=no" + "gt_cv_func_CFLocaleCopyCurrent=no" + ]; + # gnutar tries to call into gettext between `fork` and `exec`, # which is not safe on darwin. # see http://article.gmane.org/gmane.os.macosx.fink.devel/21882 diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix index 146f9bea87a..bfeda5085b6 100644 --- a/pkgs/tools/archivers/sharutils/default.nix +++ b/pkgs/tools/archivers/sharutils/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { '' # Fix for building on Glibc 2.16. Won't be needed once the # gnulib in sharutils is updated. - sed -i ${stdenv.lib.optionalString ((stdenv.isFreeBSD || stdenv.isOpenBSD || stdenv.isDarwin) && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h + sed -i ${stdenv.lib.optionalString ((stdenv.isFreeBSD || stdenv.isOpenBSD) && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h ''; # GNU Gettext is needed on non-GNU platforms. diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index c6eb7ba1101..001a50458e2 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, libsigsegv, readline, readlineSupport ? false }: +{ stdenv, fetchurl, libsigsegv, readline, readlineSupport ? false +, locale ? null }: stdenv.mkDerivation rec { name = "gawk-4.1.3"; @@ -8,10 +9,14 @@ stdenv.mkDerivation rec { sha256 = "09d6pmx6h3i2glafm0jd1v1iyrs03vcyv2rkz12jisii3vlmbkz3"; }; - doCheck = !stdenv.isCygwin; # XXX: `test-dup2' segfaults on Cygwin 6.1 + doCheck = !( + stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1 + || stdenv.isDarwin # XXX: `locale' segfaults + ); buildInputs = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") libsigsegv - ++ stdenv.lib.optional readlineSupport readline; + ++ stdenv.lib.optional readlineSupport readline + ++ stdenv.lib.optional stdenv.isDarwin locale; configureFlags = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") "--with-libsigsegv-prefix=${libsigsegv}" ++ stdenv.lib.optional readlineSupport "--with-readline=${readline}" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1e2dd6ad220..e903f6395b9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1512,7 +1512,7 @@ let garmintools = callPackage ../development/libraries/garmintools {}; - gawk = callPackage ../tools/text/gawk { }; + gawk = callPackage ../tools/text/gawk { inherit (darwin) locale; }; gawkInteractive = appendToName "interactive" (gawk.override { readlineSupport = true; }); @@ -4670,12 +4670,13 @@ let nativePrefix = stdenv.cc.nativePrefix or ""; cc = baseCC; libc = libc; + dyld = if stdenv.isDarwin then darwin.dyld else null; isGNU = baseCC.isGNU or false; isClang = baseCC.isClang or false; inherit stdenv binutils coreutils zlib; }; - wrapCC = wrapCCWith (makeOverridable (import ../build-support/cc-wrapper)) glibc; + wrapCC = wrapCCWith (makeOverridable (import ../build-support/cc-wrapper)) stdenv.cc.libc; # legacy version, used for gnat bootstrapping wrapGCC-old = baseGCC: (makeOverridable (import ../build-support/gcc-wrapper-old)) { nativeTools = stdenv.cc.nativeTools or false; @@ -5182,11 +5183,9 @@ let bin_replace_string = callPackage ../development/tools/misc/bin_replace_string { }; - binutils = if stdenv.isDarwin - then import ../build-support/native-darwin-cctools-wrapper {inherit stdenv;} - else callPackage ../development/tools/misc/binutils { - inherit noSysDirs; - }; + binutils = if stdenv.isDarwin then darwin.binutils else binutils-raw; + + binutils-raw = callPackage ../development/tools/misc/binutils { inherit noSysDirs; }; binutils_nogold = lowPrio (callPackage ../development/tools/misc/binutils { inherit noSysDirs; @@ -6942,7 +6941,10 @@ let # glibc provides libiconv so systems with glibc don't need to build libiconv # separately, but we also provide libiconvReal, which will always be a # standalone libiconv, just in case you want it - libiconv = if stdenv.isGlibc then stdenv.cc.libc else libiconvReal; + libiconv = + if stdenv.isGlibc then stdenv.cc.libc + else if stdenv.isDarwin then darwin.libiconv + else libiconvReal; libiconvReal = callPackage ../development/libraries/libiconv { fetchurl = fetchurlBoot; @@ -9279,7 +9281,7 @@ let xctoolchain = xcode.toolchain; }; - cctools = (callPackage ../os-specific/darwin/cctools/port.nix {}).native; + cctools = (callPackage ../os-specific/darwin/cctools/port.nix { inherit libobjc; }).native; maloader = callPackage ../os-specific/darwin/maloader { inherit opencflite; @@ -9294,8 +9296,12 @@ let ps = callPackage ../os-specific/darwin/adv_cmds/ps.nix {}; + locale = callPackage ../os-specific/darwin/adv_cmds/locale.nix {}; + security_tool = callPackage ../os-specific/darwin/security-tool { inherit osx_private_sdk; }; + binutils = callPackage ../os-specific/darwin/binutils { inherit cctools; }; + cmdline_sdk = cmdline.sdk; cmdline_tools = cmdline.tools; -- cgit 1.4.1 From 35664f45691fd8063a129db03ba82ad10441d9fc Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 10 Jul 2015 10:33:40 -0700 Subject: gettext: 0.19.4 -> 0.19.5 --- pkgs/development/libraries/gettext/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries/gettext') diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index f86a15cb0d6..45139ede5a2 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, libiconv, xz }: stdenv.mkDerivation (rec { - name = "gettext-0.19.4"; + name = "gettext-0.19.5"; src = fetchurl { url = "mirror://gnu/gettext/${name}.tar.gz"; - sha256 = "0gvz86m4cs8bdf3mwmwsyx6lrq4ydfxgadrgd9jlx32z3bnz3jca"; + sha256 = "0fppvj4l9maa9q1swvhnv96hsqxx90vcjbdyjhqpir3ll55q2n0j"; }; LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else ""; -- cgit 1.4.1 From 4877451d2ef6f60b461055efe020b159ca90bddc Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Wed, 15 Jul 2015 12:28:51 -0700 Subject: gettext: 0.19.5 -> 0.19.5.1 --- pkgs/development/libraries/gettext/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries/gettext') diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 45139ede5a2..4b6fd2008e8 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, libiconv, xz }: stdenv.mkDerivation (rec { - name = "gettext-0.19.5"; + name = "gettext-0.19.5.1"; src = fetchurl { url = "mirror://gnu/gettext/${name}.tar.gz"; - sha256 = "0fppvj4l9maa9q1swvhnv96hsqxx90vcjbdyjhqpir3ll55q2n0j"; + sha256 = "0cbp498ckjwj7qr8b9pmkry8hkhldgkvg5yix8hi9c8z1hxxb651"; }; LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else ""; -- cgit 1.4.1 From af6ebe817b5522e863b3384fbf34faa1e987525f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 26 Jul 2015 23:27:15 +0200 Subject: Remove unused gettext versions --- pkgs/development/libraries/gettext/0.17.nix | 53 ----------------------------- pkgs/development/libraries/gettext/0.18.nix | 11 ------ pkgs/top-level/all-packages.nix | 12 ++----- 3 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 pkgs/development/libraries/gettext/0.17.nix delete mode 100644 pkgs/development/libraries/gettext/0.18.nix (limited to 'pkgs/development/libraries/gettext') diff --git a/pkgs/development/libraries/gettext/0.17.nix b/pkgs/development/libraries/gettext/0.17.nix deleted file mode 100644 index 3ea70bea80b..00000000000 --- a/pkgs/development/libraries/gettext/0.17.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ stdenv, fetchurl, libiconv }: - -stdenv.mkDerivation rec { - name = "gettext-0.17"; - - src = fetchurl { - url = "mirror://gnu/gettext/${name}.tar.gz"; - sha256 = "1fipjpaxxwifdw6cbr7mkxp1yvy643i38nhlh7124bqnisxki5i0"; - }; - - configureFlags = "--disable-csharp"; - - # On cross building, gettext supposes that the wchar.h from libc - # does not fulfill gettext needs, so it tries to work with its - # own wchar.h file, which does not cope well with the system's - # wchar.h and stddef.h (gcc-4.3 - glibc-2.9) - preConfigure = '' - if test -n "$crossConfig"; then - echo gl_cv_func_wcwidth_works=yes > cachefile - configureFlags="$configureFlags --cache-file=`pwd`/cachefile" - fi - ''; - - buildInputs = stdenv.lib.optional (!stdenv.isLinux) libiconv; - - meta = { - description = "GNU gettext, a well integrated set of translation tools and documentation"; - - longDescription = '' - Usually, programs are written and documented in English, and use - English at execution time for interacting with users. Using a common - language is quite handy for communication between developers, - maintainers and users from all countries. On the other hand, most - people are less comfortable with English than with their own native - language, and would rather be using their mother tongue for day to - day's work, as far as possible. Many would simply love seeing their - computer screen showing a lot less of English, and far more of their - own language. - - GNU `gettext' is an important step for the GNU Translation Project, as - it is an asset on which we may build many other steps. This package - offers to programmers, translators, and even users, a well integrated - set of tools and documentation. Specifically, the GNU `gettext' - utilities are a set of tools that provides a framework to help other - GNU packages produce multi-lingual messages. - ''; - - homepage = http://www.gnu.org/software/gettext/; - - maintainers = [ ]; - branch = "0.17"; - }; -} \ No newline at end of file diff --git a/pkgs/development/libraries/gettext/0.18.nix b/pkgs/development/libraries/gettext/0.18.nix deleted file mode 100644 index bb1a0519e7b..00000000000 --- a/pkgs/development/libraries/gettext/0.18.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ stdenv, fetchurl, gettext }: - -stdenv.lib.overrideDerivation gettext (attrs: rec { - name = "gettext-0.18.2"; - - src = fetchurl { - url = "mirror://gnu/gettext/${name}.tar.gz"; - sha256 = "516a6370b3b3f46e2fc5a5e222ff5ecd76f3089bc956a7587a6e4f89de17714c"; - }; - -}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e8f37de6240..97dfe27bb7d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6253,15 +6253,9 @@ let getdata = callPackage ../development/libraries/getdata { }; - gettext = gettext_0_19; + gettext = callPackage ../development/libraries/gettext { }; - gettext_0_17 = callPackage ../development/libraries/gettext/0.17.nix { }; - gettext_0_18 = callPackage ../development/libraries/gettext/0.18.nix { }; - gettext_0_19 = callPackage ../development/libraries/gettext { }; - - gettextWithExpat = gettext: callPackage ../development/libraries/gettext/expat.nix { - inherit gettext; - }; + gettextWithExpat = callPackage ../development/libraries/gettext/expat.nix { }; gd = callPackage ../development/libraries/gd { }; @@ -6482,7 +6476,7 @@ let }; gtk3 = callPackage ../development/libraries/gtk+/3.x.nix { - gettext = gettextWithExpat gettext_0_19; + gettext = gettextWithExpat; }; gtk = pkgs.gtk2; -- cgit 1.4.1 From e1f78bf677e10c6870b416148eef1b2755498097 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 27 Jul 2015 00:25:53 +0200 Subject: More docs/manpages in separate outputs --- pkgs/applications/audio/flac/default.nix | 2 ++ pkgs/development/interpreters/perl/5.20/default.nix | 2 ++ pkgs/development/interpreters/perl/5.22/default.nix | 2 ++ pkgs/development/libraries/SDL/default.nix | 2 ++ pkgs/development/libraries/gettext/default.nix | 2 ++ pkgs/development/libraries/gnutls/generic.nix | 2 ++ pkgs/development/libraries/libogg/default.nix | 2 ++ pkgs/development/libraries/libtiff/default.nix | 2 ++ pkgs/development/libraries/libvorbis/default.nix | 2 ++ pkgs/development/libraries/libxslt/default.nix | 2 ++ pkgs/development/libraries/openldap/default.nix | 2 ++ pkgs/development/libraries/openssl/default.nix | 2 ++ pkgs/development/libraries/pcre/default.nix | 2 ++ pkgs/servers/x11/xorg/overrides.nix | 17 ++++++++++++++++- pkgs/shells/bash/default.nix | 2 ++ 15 files changed, 44 insertions(+), 1 deletion(-) (limited to 'pkgs/development/libraries/gettext') diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix index 5dd70673521..18fb48a17ba 100644 --- a/pkgs/applications/audio/flac/default.nix +++ b/pkgs/applications/audio/flac/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c"; }; + outputs = [ "out" "doc" ]; + buildInputs = [ libogg ]; #doCheck = true; # takes lots of time diff --git a/pkgs/development/interpreters/perl/5.20/default.nix b/pkgs/development/interpreters/perl/5.20/default.nix index e8eb3a70e37..141484814ea 100644 --- a/pkgs/development/interpreters/perl/5.20/default.nix +++ b/pkgs/development/interpreters/perl/5.20/default.nix @@ -28,6 +28,8 @@ stdenv.mkDerivation rec { sha256 = "17cvplgpxbm1hshxlkra2fldn4da1iap1lsnb04hdm8ply93k95i"; }; + outputs = [ "out" "man" ]; + patches = [ # Do not look in /usr etc. for dependencies. ./no-sys-dirs.patch diff --git a/pkgs/development/interpreters/perl/5.22/default.nix b/pkgs/development/interpreters/perl/5.22/default.nix index f9068de1c2c..e0be8610fb7 100644 --- a/pkgs/development/interpreters/perl/5.22/default.nix +++ b/pkgs/development/interpreters/perl/5.22/default.nix @@ -28,6 +28,8 @@ stdenv.mkDerivation rec { sha256 = "0g5bl8sdpzx9gx2g5jq3py4bj07z2ylk7s1qn0fvsss2yl3hhs8c"; }; + outputs = [ "out" "man" ]; + patches = [ # Do not look in /usr etc. for dependencies. ./no-sys-dirs.patch diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix index a62fc837dd0..1fae5d42ab7 100644 --- a/pkgs/development/libraries/SDL/default.nix +++ b/pkgs/development/libraries/SDL/default.nix @@ -26,6 +26,8 @@ stdenv.mkDerivation rec { sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn"; }; + outputs = [ "out" "man" ]; + nativeBuildInputs = [ pkgconfig ]; # Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated. diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 4b6fd2008e8..a56795a4c15 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation (rec { sha256 = "0cbp498ckjwj7qr8b9pmkry8hkhldgkvg5yix8hi9c8z1hxxb651"; }; + outputs = [ "out" "doc" ]; + LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else ""; configureFlags = [ "--disable-csharp" "--with-xz" ] diff --git a/pkgs/development/libraries/gnutls/generic.nix b/pkgs/development/libraries/gnutls/generic.nix index 07760933935..afe77bf6e39 100644 --- a/pkgs/development/libraries/gnutls/generic.nix +++ b/pkgs/development/libraries/gnutls/generic.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { inherit src patches; + outputs = [ "out" "man" ]; + configureFlags = # FIXME: perhaps use $SSL_CERT_FILE instead optional stdenv.isLinux "--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt" diff --git a/pkgs/development/libraries/libogg/default.nix b/pkgs/development/libraries/libogg/default.nix index 57b8b2fc66e..4e017840472 100644 --- a/pkgs/development/libraries/libogg/default.nix +++ b/pkgs/development/libraries/libogg/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "16z74q422jmprhyvy7c9x909li8cqzmvzyr8cgbm52xcsp6pqs1z"; }; + outputs = [ "out" "doc" ]; + meta = with stdenv.lib; { homepage = http://xiph.org/ogg/; license = licenses.bsd3; diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix index 739148cb9a6..25f6cf5b6b7 100644 --- a/pkgs/development/libraries/libtiff/default.nix +++ b/pkgs/development/libraries/libtiff/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { sha256 = "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa"; }; + outputs = [ "out" "doc" "man" ]; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ zlib libjpeg xz ]; #TODO: opengl support (bogus configure detection) diff --git a/pkgs/development/libraries/libvorbis/default.nix b/pkgs/development/libraries/libvorbis/default.nix index cff6cbe8616..d58607ea298 100644 --- a/pkgs/development/libraries/libvorbis/default.nix +++ b/pkgs/development/libraries/libvorbis/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "1lg1n3a6r41492r7in0fpvzc7909mc5ir9z0gd3qh2pz4yalmyal"; }; + outputs = [ "out" "doc" ]; + nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ libogg ]; diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index fda24776480..3579e99ec7a 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"; }; + outputs = [ "out" "doc" ]; + buildInputs = [ libxml2 ]; propagatedBuildInputs = [ findXMLCatalogs ]; diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index e5b7ce10719..6bc9b977363 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0vkzfd1pmin6xsv8lb1nabfxma8n1q00khr6nfifqkxlm2s6p197"; }; + outputs = [ "out" "man" ]; + nativeBuildInputs = [ autoconf ]; buildInputs = [ openssl cyrus_sasl db groff ]; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index b9224dad110..ca3e7999f9b 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { sha1 = "9d1977cc89242cd11471269ece2ed4650947c046"; }; + outputs = [ "out" "man" ]; + patches = optional stdenv.isCygwin ./1.0.1-cygwin64.patch ++ optional (stdenv.isDarwin || (stdenv ? cross && stdenv.cross.libc == "libSystem")) ./darwin-arch.patch; diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 71f0df40ec2..a34f3e5e132 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { sha256 = "17bqykp604p7376wj3q2nmjdhrb6v1ny8q08zdwi7qvc02l9wrsi"; }; + outputs = [ "out" "doc" "man" ]; + configureFlags = '' --enable-jit ${if unicodeSupport then "--enable-unicode-properties" else ""} diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 336ae652628..afd864eafac 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -73,6 +73,7 @@ in libxcb = attrs : attrs // { nativeBuildInputs = [ args.python ]; configureFlags = "--enable-xkb"; + outputs = [ "out" "doc" "man" ]; }; xcbproto = attrs : attrs // { @@ -97,6 +98,7 @@ in rm -rf $out/share/doc ''; CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -"; + outputs = [ "out" "man" ]; }; libXfont = attrs: attrs // { @@ -107,7 +109,6 @@ in ]; }; - libXxf86vm = attrs: attrs // { preConfigure = setMalloc0ReturnsNullCrossCompiling; }; @@ -126,6 +127,7 @@ in ''; propagatedBuildInputs = [ xorg.libSM ]; CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -"; + outputs = [ "out" "doc" "man" ]; }; # See https://bugs.freedesktop.org/show_bug.cgi?id=47792 @@ -420,4 +422,17 @@ in xwd = attrs: attrs // { buildInputs = with xorg; attrs.buildInputs ++ [libXt libxkbfile]; }; + + kbproto = attrs: attrs // { + outputs = [ "out" "doc" ]; + }; + + xextproto = attrs: attrs // { + outputs = [ "out" "doc" ]; + }; + + xproto = attrs: attrs // { + outputs = [ "out" "doc" ]; + }; + } diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix index 014a3ad4a2c..ea65e1f63c8 100644 --- a/pkgs/shells/bash/default.nix +++ b/pkgs/shells/bash/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { inherit sha256; }; + outputs = [ "out" "doc" ]; + NIX_CFLAGS_COMPILE = '' -DSYS_BASHRC="/etc/bashrc" -DSYS_BASH_LOGOUT="/etc/bash_logout" -- cgit 1.4.1 From 090f27859ce2ae85396585bdb8b0056c1b1839b6 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Fri, 11 Sep 2015 13:29:28 +0000 Subject: gettext: 0.19.5.1 -> 0.19.6 (close #9799) --- pkgs/development/libraries/gettext/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries/gettext') diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index a56795a4c15..874c767046b 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, libiconv, xz }: stdenv.mkDerivation (rec { - name = "gettext-0.19.5.1"; + name = "gettext-0.19.6"; src = fetchurl { url = "mirror://gnu/gettext/${name}.tar.gz"; - sha256 = "0cbp498ckjwj7qr8b9pmkry8hkhldgkvg5yix8hi9c8z1hxxb651"; + sha256 = "0pb9vp4ifymvdmc31ks3xxcnfqgzj8shll39czmk8c1splclqjzd"; }; outputs = [ "out" "doc" ]; -- cgit 1.4.1