···48 trap "rm -rf $tmpPath" EXIT
4950 # Perform the checkout.
51+ if test "$NIX_PREFETCH_SVN_LEAVE_DOT_SVN" != 1
52+ then
53+ command="export"
54+ else
55+ command="checkout"
56+ fi
57+58+ echo p | svn "$command" --quiet -r "$rev" "$url" "$tmpFile" >&2
5960 # Compute the hash.
61 hash=$(nix-hash --type $hashType $hashFormat $tmpFile)
+7-1
pkgs/build-support/release/source-tarball.nix
···16 then ""
17 else if src ? rev then "pre${toString src.rev}" else "";
1800000019in
2021stdenv.mkDerivation (
···71 {
72 name = name + "-" + version + versionSuffix;
7374- buildInputs = buildInputs ++ [autoconf automake libtool];
7576 postHook = ''
77 ensureDir $out/nix-support
···16 then ""
17 else if src ? rev then "pre${toString src.rev}" else "";
1819+ # By default, provide all the GNU Build System as input.
20+ bootstrapBuildInputs =
21+ if (args ? bootstrapBuildInputs)
22+ then args.bootstrapBuildInputs
23+ else [ autoconf automake libtool ];
24+25in
2627stdenv.mkDerivation (
···77 {
78 name = name + "-" + version + versionSuffix;
7980+ buildInputs = buildInputs ++ bootstrapBuildInputs;
8182 postHook = ''
83 ensureDir $out/nix-support
···1+source $stdenv/setup
2+3+4+export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
5+mkdir $NIX_FIXINC_DUMMY
6+7+8+# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
9+# Thing.
10+export CPP="gcc -E"
11+12+13+if test "$noSysDirs" = "1"; then
14+15+ # Figure out what extra flags to pass to the gcc compilers being
16+ # generated to make sure that they use our glibc.
17+ if test -e $NIX_GCC/nix-support/orig-glibc; then
18+ glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
19+20+ # Ugh. Copied from gcc-wrapper/builder.sh. We can't just
21+ # source in $NIX_GCC/nix-support/add-flags, since that would
22+ # cause *this* GCC to be linked against the *previous* GCC.
23+ # Need some more modularity there.
24+ extraCFlags="-B$glibc/lib -isystem $glibc/include"
25+ extraLDFlags="-B$glibc/lib -L$glibc/lib -Wl,-s \
26+ -Wl,-dynamic-linker,$glibc/lib/ld-linux.so.2"
27+28+ # Oh, what a hack. I should be shot for this. In stage 1, we
29+ # should link against the previous GCC, but not afterwards.
30+ # Otherwise we retain a dependency. However, ld-wrapper,
31+ # which adds the linker flags for the previous GCC, is also
32+ # used in stage 2/3. We can prevent it from adding them by
33+ # NIX_GLIBC_FLAGS_SET, but then gcc-wrapper will also not add
34+ # them, thereby causing stage 1 to fail. So we use a trick to
35+ # only set the flags in gcc-wrapper.
36+ hook=$(pwd)/ld-wrapper-hook
37+ echo "NIX_GLIBC_FLAGS_SET=1" > $hook
38+ export NIX_LD_WRAPPER_START_HOOK=$hook
39+40+ # Use *real* header files, otherwise a limits.h is generated
41+ # that does not include Glibc's limits.h (notably missing
42+ # SSIZE_MAX, which breaks the build).
43+ export NIX_FIXINC_DUMMY=$glibc/include
44+ fi
45+46+ export NIX_EXTRA_CFLAGS=$extraCFlags
47+ export NIX_EXTRA_LDFLAGS=$extraLDFlags
48+ export CFLAGS=$extraCFlags
49+ export CXXFLAGS=$extraCFlags
50+ export LDFLAGS=$extraLDFlags
51+fi
52+53+54+preConfigure() {
55+56+ # Determine the frontends to build.
57+ langs="c"
58+ if test -n "$langCC"; then
59+ langs="$langs,c++"
60+ fi
61+ if test -n "$langF77"; then
62+ langs="$langs,f95"
63+ fi
64+65+ # Perform the build in a different directory.
66+ mkdir ../build
67+ cd ../build
68+69+ configureScript=../$sourceRoot/configure
70+ configureFlags="--enable-languages=$langs --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-multilib --with-gxx-include-dir=${STDCXX_INCDIR} --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin10 --target=x86_64-apple-darwin10"
71+}
72+73+74+postInstall() {
75+ # Remove precompiled headers for now. They are very big and
76+ # probably not very useful yet.
77+ find $out/include -name "*.gch" -exec rm -rf {} \; -prune
78+79+ # Remove `fixincl' to prevent a retained dependency on the
80+ # previous gcc.
81+ rm -rf $out/libexec/gcc/*/*/install-tools
82+}
83+84+postUnpack() {
85+ mv $libstdcxx/libstdcxx $sourceRoot/
86+}
87+88+STDCXX_INCDIR="$out/include/c++/4.2.1"
89+90+genericBuild
91+92+93+echo '-------------------------------------------------------------------------------------------------------------------------'
94+echo 'libstdcxx-16'
95+echo '-------------------------------------------------------------------------------------------------------------------------'
96+97+cd ..
98+pwd
99+100+preConfigure() {
101+ # Perform the build in a different directory.
102+ mkdir ../build_libstdcxx
103+ cd ../build_libstdcxx
104+105+ ln -s ../build/gcc gcc
106+107+ configureScript=../$sourceRoot/libstdcxx/configure
108+ configureFlags="--disable-libstdcxx-pch --disable-libstdcxx-debug --disable-multilib --with-gxx-include-dir=${STDCXX_INCDIR}"
109+}
110+111+unpackPhase () {
112+ echo '-'
113+}
114+115+postInstall() {
116+ echo '-'
117+ echo "cp -v ${STDCXX_INCDIR}/*/bits/* ${STDCXX_INCDIR}/bits/"
118+ cp -v ${STDCXX_INCDIR}/*/bits/* ${STDCXX_INCDIR}/bits/
119+}
120+121+patchPhase() {
122+ echo '-'
123+}
124+125+genericBuild
126+127+ln -s $out/lib/x86_64 $out/lib64
···1-{stdenv, fetchurl, neon, zlib}:
2-3-stdenv.mkDerivation rec {
4- name = "davfs2-1.4.1";
5-6- src = fetchurl {
7- url = "http://www.very-clever.com/download/nongnu/davfs2/${name}.tar.gz";
8- sha256 = "0fqq331rd3ylzfhdsbbj0b2znn3d0js0kxcv3w54dl9g2cs8fqhn";
9- };
10-11- buildInputs = [ neon zlib ];
12- patches = [ ./davfs2-install.patch ];
13-14- meta = {
15- description = "Web Distributed Authoring and Versioning (WebDAV), an extension to the HTTP-protocol, allows authoring of resources on a remote web server. davfs2 provides the ability to access such resources like a typical filesystem, allowing for use by standard applications with no built-in support for WebDAV.";
16-17- license = "GPLv3+";
18- homepage = http://savannah.nongnu.org/projects/davfs2;
19- };
20-}
···1+{ stdenv, fetchurl, neon, zlib }:
2+3+stdenv.mkDerivation rec {
4+ name = "davfs2-1.4.5";
5+6+ src = fetchurl {
7+ url = "mirror://savannah/davfs2/${name}.tar.gz";
8+ sha256 = "1pkl2braggp2qg4c68dwfv399l9jz7cvi7gkm4xbj6mgvl0cxw18";
9+ };
10+11+ buildInputs = [ neon zlib ];
12+13+ patches = [ ./davfs2-install.patch ];
14+15+ meta = {
16+ longDescription = "Web Distributed Authoring and Versioning (WebDAV), an extension to the HTTP-protocol, allows authoring of resources on a remote web server. davfs2 provides the ability to access such resources like a typical filesystem, allowing for use by standard applications with no built-in support for WebDAV.";
17+18+ license = "GPLv3+";
19+ homepage = http://savannah.nongnu.org/projects/davfs2;
20+ };
21+}
···1213 buildInputs = [pcre];
1415- doCheck = if stdenv.system == "i686-darwin" then false else true;
1617 # On Mac OS X, force use of mkdir -p, since Grep's fallback
18 # (./install-sh) is broken.
···1213 buildInputs = [pcre];
1415+ doCheck = if stdenv.isDarwin then false else true;
1617 # On Mac OS X, force use of mkdir -p, since Grep's fallback
18 # (./install-sh) is broken.