diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2014-01-18 14:35:07 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2014-01-18 14:46:20 +0100 |
commit | 0a58b512cb696b2482cbac4fd3a20b43ae31c1bc (patch) | |
tree | 7ae35a255ac57b66696c3db743f6ed9a4dab7431 /pkgs/build-support | |
parent | 284833649192072959a335367374fc0a6ec667df (diff) | |
parent | 9c1d3bfa9f7d7b95eb20d0f729e3b3c9d7abcd4b (diff) |
Merge master into stdenv-updates
Conflicts (simple): pkgs/development/compilers/gcc/4.8/default.nix pkgs/development/compilers/llvm/default.nix pkgs/development/libraries/gmp/5.1.1.nix pkgs/development/libraries/gmp/5.1.3.nix pkgs/development/libraries/gmp/5.1.x.nix pkgs/top-level/all-packages.nix
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/release/ant-build.nix | 14 | ||||
-rw-r--r-- | pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh | 35 | ||||
-rw-r--r-- | pkgs/build-support/setup-hooks/set-java-classpath.sh | 13 | ||||
-rw-r--r-- | pkgs/build-support/vm/default.nix | 40 |
4 files changed, 81 insertions, 21 deletions
diff --git a/pkgs/build-support/release/ant-build.nix b/pkgs/build-support/release/ant-build.nix index 0cabdf2f7e79c..1ca3c65d3f256 100644 --- a/pkgs/build-support/release/ant-build.nix +++ b/pkgs/build-support/release/ant-build.nix @@ -8,7 +8,7 @@ , antProperties ? [] , antBuildInputs ? [] , buildfile ? "build.xml" -, ant ? pkgs.apacheAntOpenJDK +, ant ? pkgs.ant , jre ? pkgs.openjdk , hydraAntLogger ? pkgs.hydraAntLogger , ... } @ args: @@ -31,7 +31,7 @@ stdenv.mkDerivation ( antSetupPhase = with stdenv.lib; '' if test "$hydraAntLogger" != "" ; then - export ANT_ARGS="-logger org.hydra.ant.HydraLogger -lib `ls $hydraAntLogger/lib/java/*.jar | head -1`" + export ANT_ARGS="-logger org.hydra.ant.HydraLogger -lib `ls $hydraAntLogger/share/java/*.jar | head -1`" fi for abi in ${concatStringsSep " " (map (f: "`find ${f} -name '*.jar'`") antBuildInputs)}; do export ANT_ARGS="$ANT_ARGS -lib $abi" @@ -39,20 +39,20 @@ stdenv.mkDerivation ( ''; installPhase = '' - mkdir -p $out/lib/java + mkdir -p $out/share/java ${ if jars == [] then '' - find . -name "*.jar" | xargs -I{} cp -v {} $out/lib/java + find . -name "*.jar" | xargs -I{} cp -v {} $out/share/java '' else stdenv.lib.concatMapStrings (j: '' - cp -v ${j} $out/lib/java + cp -v ${j} $out/share/java '') jars } - for j in $out/lib/java/*.jar ; do + for j in $out/share/java/*.jar ; do echo file jar $j >> $out/nix-support/hydra-build-products done ''; generateWrappersPhase = let - cp = w: "-cp '${lib.optionalString (w ? classPath) w.classPath}${lib.optionalString (w ? mainClass) ":$out/lib/java/*"}'"; + cp = w: "-cp '${lib.optionalString (w ? classPath) w.classPath}${lib.optionalString (w ? mainClass) ":$out/share/java/*"}'"; in '' header "Generating jar wrappers" diff --git a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh new file mode 100644 index 0000000000000..5962bf0390692 --- /dev/null +++ b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh @@ -0,0 +1,35 @@ +# On Mac OS X, binaries refer to dynamic library dependencies using +# either relative paths (e.g. "libicudata.dylib", searched relative to +# $DYLD_LIBRARY_PATH) or absolute paths +# (e.g. "/nix/store/.../lib/libicudata.dylib"). In Nix, the latter is +# preferred since it allows programs to just work. When linking +# against a library (e.g. "-licudata"), the linker uses the install +# name embedded in the dylib (which can be shown using "otool -D"). +# Most packages create dylibs with absolute install names, but some do +# not. This setup hook fixes dylibs by setting their install names to +# their absolute path (using "install_name_tool -id"). It also +# rewrites references in other dylibs to absolute paths. + +fixDarwinDylibNames() { + local flags=() + local old_id + + for fn in "$@"; do + flags+=(-change "$(basename "$fn")" "$fn") + done + + for fn in "$@"; do + if [ -L "$fn" ]; then continue; fi + echo "$fn: fixing dylib" + install_name_tool -id "$fn" "${flags[@]}" "$fn" + done +} + +fixDarwinDylibNamesIn() { + local dir="$1" + fixDarwinDylibNames $(find "$dir" -name "*.dylib") +} + +postFixup() { + fixDarwinDylibNamesIn "$prefix" +} diff --git a/pkgs/build-support/setup-hooks/set-java-classpath.sh b/pkgs/build-support/setup-hooks/set-java-classpath.sh new file mode 100644 index 0000000000000..76e8e42ca268b --- /dev/null +++ b/pkgs/build-support/setup-hooks/set-java-classpath.sh @@ -0,0 +1,13 @@ +# This setup hook adds every JAR in the share/java subdirectories of +# the build inputs to $CLASSPATH. + +export CLASSPATH + +addPkgToClassPath () { + local jar + for jar in $1/share/java/*.jar; do + export CLASSPATH=''${CLASSPATH}''${CLASSPATH:+:}''${jar} + done +} + +envHooks=(''${envHooks[@]} addPkgToClassPath) diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 4c97da91fd1f6..df5f728174cc6 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -290,7 +290,7 @@ rec { args = ["-e" (vmRunCommand qemuCommandLinux)]; origArgs = attrs.args; origBuilder = attrs.builder; - QEMU_OPTS = "-m ${toString (attrs.memSize or 512)}"; + QEMU_OPTS = "${attrs.QEMU_OPTS or ""} -m ${toString (attrs.memSize or 512)}"; }); @@ -766,10 +766,22 @@ rec { url = mirror://fedora/linux/releases/8/Everything/i386/os/repodata/primary.xml.gz; sha256 = "0kwf0jcp63pygpvgvwl4w58pph24xbcy6db6fnq2f3ly5myhz53n"; }; - urlPrefix = mirror://fedora/linux/releases/8/Everything/i386/os; + urlPrefix = http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/8/Everything/i386/os; packages = commonFedoraPackages; }; + fedora8x86_64 = { + name = "fedora-8-x86_64"; + fullName = "Fedora 8 (x86_64)"; + packagesList = fetchurl { + url = mirror://fedora/linux/releases/8/Everything/x86_64/os/repodata/primary.xml.gz; + sha256 = "11bfmpy3nz82zzmj5lfravvzlw514v4718adi4b06ps9zv3zpy8r"; + }; + urlPrefix = http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/8/Everything/x86_64/os; + packages = commonFedoraPackages; + archs = ["noarch" "x86_64"]; + }; + fedora9i386 = { name = "fedora-9-i386"; fullName = "Fedora 9 (i386)"; @@ -1024,26 +1036,26 @@ rec { packages = commonOpenSUSEPackages; }; - centos64i386 = { - name = "centos-6.4-i386"; - fullName = "CentOS 6.4 (i386)"; + centos65i386 = { + name = "centos-6.5-i386"; + fullName = "CentOS 6.5 (i386)"; packagesList = fetchurl { - url = http://mirror.centos.org/centos/6.4/os/i386/repodata/87aa4c4e19f9a3ec93e3d820f1ea6b6ece8810cb45f117a16354465e57a1b50d-primary.xml.gz; - sha256 = "03dml5bmwijlcfhigwa5rc88ikkfdgmg286qwf9yr8zr3574ral7"; + url = http://mirror.centos.org/centos/6.5/os/i386/repodata/a89f27cc7d3cea431f3bd605a1e9309c32d5d409abc1b51a7b5c71c05f18a0c2-primary.xml.gz; + sha256 = "1hm031gw0wawgcdbbhdb17adaclw63ls21fn7cgl7siwgp62g7x8"; }; - urlPrefix = http://mirror.centos.org/centos/6.4/os/i386/ ; + urlPrefix = http://mirror.centos.org/centos/6.5/os/i386/ ; archs = ["noarch" "i386"]; packages = commonCentOSPackages; }; - centos64x86_64 = { - name = "centos-6.4-x86_64"; - fullName = "CentOS 6.4 (x86_64)"; + centos65x86_64 = { + name = "centos-6.5-x86_64"; + fullName = "CentOS 6.5 (x86_64)"; packagesList = fetchurl { - url = http://mirror.centos.org/centos/6.4/os/x86_64/repodata/4d4030b92f010f466eb4f004312b9f532b9e85e60c5e6421e8b429c180ac1efe-primary.xml.gz; - sha256 = "1zhymj0c2adlx0hn8phcws2rwaskkwmk217hnip4c3q15ywk0h2d"; + url = http://mirror.centos.org/centos/6.5/os/x86_64/repodata/3353e378f5cb4bb6c3b3dd2ca266c6d68a1e29c36cf99f76aea3d8e158626024-primary.xml.gz; + sha256 = "0930c9cf3n53mrv9zybcqclix2nnqrka4b6xng1vcjybymwf6lrk"; }; - urlPrefix = http://mirror.centos.org/centos/6.4/os/x86_64/ ; + urlPrefix = http://mirror.centos.org/centos/6.5/os/x86_64/ ; archs = ["noarch" "x86_64"]; packages = commonCentOSPackages; }; |