diff options
author | bb010g <me@bb010g.com> | 2019-04-18 20:50:47 -0700 |
---|---|---|
committer | Doron Behar <doron.behar@gmail.com> | 2021-10-27 13:21:27 +0300 |
commit | a1ed62e586a5c9c09d1f39c78282395becd8e7a9 (patch) | |
tree | fb34679928a9067340bfd2a615ef4a908bebf5d3 | |
parent | 29fedf210f6eb7aae585946e36654e50be52e317 (diff) |
releaseTools.antBuild: remove
The sole consumer in Nixpkgs of `releaseTools.antBuild` is `pkgs/development/libraries/junit`, which has been broken since 2015-09-08. The sole consumer in Nixpkgs of `junit` is `pkgs/development/libraries/junixsocket`, which hasn't built due to `junit` since 2015-09-08. All three are removed due to their obvious lack of use. All other packages in Nixpkgs depending on junit consume `pkgs/development/java-modules/junit`, which is not broken. Any downstreams that have kept using these `junit` or `junixsocket` packages since 2015-09-08 have basically already vendored the packages via patching them, so no aliases are provided.
-rw-r--r-- | pkgs/build-support/release/ant-build.nix | 123 | ||||
-rw-r--r-- | pkgs/build-support/release/default.nix | 4 | ||||
-rw-r--r-- | pkgs/build-support/release/functions.sh | 23 | ||||
-rw-r--r-- | pkgs/development/libraries/java/junit/default.nix | 28 | ||||
-rw-r--r-- | pkgs/development/libraries/java/junixsocket/darwin.patch | 20 | ||||
-rw-r--r-- | pkgs/development/libraries/java/junixsocket/default.nix | 42 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
7 files changed, 0 insertions, 244 deletions
diff --git a/pkgs/build-support/release/ant-build.nix b/pkgs/build-support/release/ant-build.nix deleted file mode 100644 index 6b59241e01edb..0000000000000 --- a/pkgs/build-support/release/ant-build.nix +++ /dev/null @@ -1,123 +0,0 @@ -{ src -, pkgs -, lib -, stdenv ? pkgs.stdenv -, name -, antTargets ? [] -, jars ? [] -, jarWrappers ? [] -, antProperties ? [] -, antBuildInputs ? [] -, buildfile ? "build.xml" -, ant ? pkgs.ant -, jre ? pkgs.jdk -, hydraAntLogger ? pkgs.hydraAntLogger -, zip ? pkgs.zip -, unzip ? pkgs.unzip -, ... } @ args: - -let - antFlags = "-f ${buildfile} " + lib.concatMapStrings ({name, value}: "-D${name}=${value} " ) antProperties ; -in -stdenv.mkDerivation ( - - { - inherit jre ant; - showBuildStats = true; - - postPhases = - ["generateWrappersPhase" "finalPhase"]; - - prePhases = - ["antSetupPhase"]; - - antSetupPhase = with lib; '' - if test "$hydraAntLogger" != "" ; then - 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" - done - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out/share/java - ${ if jars == [] then '' - find . -name "*.jar" | xargs -I{} cp -v {} $out/share/java - '' else lib.concatMapStrings (j: '' - cp -v ${j} $out/share/java - '') jars } - - . ${./functions.sh} - for j in $out/share/java/*.jar ; do - canonicalizeJar $j - echo file jar $j >> $out/nix-support/hydra-build-products - done - - runHook postInstall - ''; - - generateWrappersPhase = - let - cp = w: "-cp '${lib.optionalString (w ? classPath) w.classPath}${lib.optionalString (w ? mainClass) ":$out/share/java/*"}'"; - in - '' - header "Generating jar wrappers" - '' + (lib.concatMapStrings (w: '' - - mkdir -p $out/bin - cat >> $out/bin/${w.name} <<EOF - #!${pkgs.runtimeShell} - export JAVA_HOME=$jre - $jre/bin/java ${cp w} ${if w ? mainClass then w.mainClass else "-jar ${w.jar}"} \$@ - EOF - - chmod a+x $out/bin/${w.name} || exit 1 - '') jarWrappers) + '' - closeNest - ''; - - buildPhase = '' - runHook preBuild - '' + (if antTargets == [] then '' - header "Building default ant target" - ant ${antFlags} - closeNest - '' else lib.concatMapStrings (t: '' - header "Building '${t}' target" - ant ${antFlags} ${t} - closeNest - '') antTargets) + '' - runHook postBuild - ''; - - finalPhase = - '' - # Propagate the release name of the source tarball. This is - # to get nice package names in channels. - if test -e $origSrc/nix-support/hydra-release-name; then - cp $origSrc/nix-support/hydra-release-name $out/nix-support/hydra-release-name - fi - ''; - } - - // removeAttrs args ["antProperties" "buildInputs" "pkgs" "lib" "jarWrappers"] // - - { - name = name + (if src ? version then "-" + src.version else ""); - - nativeBuildInputs = [ unzip ]; - buildInputs = [ant jre zip] ++ lib.optional (args ? buildInputs) args.buildInputs ; - - postHook = '' - mkdir -p $out/nix-support - echo "$system" > $out/nix-support/system - . ${./functions.sh} - - origSrc=$src - src=$(findTarball $src) - ''; - } -) diff --git a/pkgs/build-support/release/default.nix b/pkgs/build-support/release/default.nix index 83f755b2becec..d593ec81197e4 100644 --- a/pkgs/build-support/release/default.nix +++ b/pkgs/build-support/release/default.nix @@ -14,10 +14,6 @@ rec { { inherit stdenv; } // args); - antBuild = args: import ./ant-build.nix ( - { inherit lib pkgs; - } // args); - mvnBuild = args: import ./maven-build.nix ( { inherit stdenv; } // args); diff --git a/pkgs/build-support/release/functions.sh b/pkgs/build-support/release/functions.sh index 120d196854274..0c4b81edf822e 100644 --- a/pkgs/build-support/release/functions.sh +++ b/pkgs/build-support/release/functions.sh @@ -11,29 +11,6 @@ findTarball() { fi } -canonicalizeJarManifest() { - local input=$1 - # http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#Notes_on_Manifest_and_Signature_Files - (head -n 1 $input && tail -n +2 $input | sort | grep -v '^\s*$') > $input-tmp - mv $input-tmp $input -} - -# Post-process a jar file to contain canonical timestamps and metadata ordering -canonicalizeJar() { - local input=$1 - local outer=$(pwd) - unzip -qq $input -d $input-tmp - canonicalizeJarManifest $input-tmp/META-INF/MANIFEST.MF - # Set all timestamps to Jan 1 1980, which is the earliest date the zip format supports... - find $input-tmp -exec touch -t 198001010000.00 {} + - rm $input - pushd $input-tmp - zip -q -r -o -X $outer/tmp-out.jar . 2> /dev/null - popd - rm -rf $input-tmp - mv $outer/tmp-out.jar $input -} - propagateImageName() { mkdir -p $out/nix-support cat "$diskImage"/nix-support/full-name > $out/nix-support/full-name diff --git a/pkgs/development/libraries/java/junit/default.nix b/pkgs/development/libraries/java/junit/default.nix deleted file mode 100644 index 5a10798517729..0000000000000 --- a/pkgs/development/libraries/java/junit/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, antBuild, fetchgit, perl }: - -let - version = "4.11"; -in antBuild { - name = "junit-${version}"; - - # I think this is only used to generate the docs, and will likely disappear - # with the next release of junit since its build system completely changes. - buildInputs = [perl]; - - src = fetchgit { - url = "https://github.com/junit-team/junit.git"; - sha256 = "1cn5dhs6vpbfbcmnm2vb1212n0kblv8cxrvnwmksjxd6bzlkac1k"; - rev = "c2e4d911fadfbd64444fb285342a8f1b72336169"; - }; - - antProperties = [ - { name = "version"; value = version; } - ]; - - meta = { - homepage = "http://www.junit.org/"; - description = "A framework for repeatable tests in Java"; - license = lib.licenses.epl10; - broken = true; - }; -} diff --git a/pkgs/development/libraries/java/junixsocket/darwin.patch b/pkgs/development/libraries/java/junixsocket/darwin.patch deleted file mode 100644 index 97fd42d0b81b7..0000000000000 --- a/pkgs/development/libraries/java/junixsocket/darwin.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -rc junixsocket-1.3/src/main/org/newsclub/net/unix/NativeUnixSocket.java junixsocket-1.3-new/src/main/org/newsclub/net/unix/NativeUnixSocket.java -*** junixsocket-1.3/src/main/org/newsclub/net/unix/NativeUnixSocket.java Tue Jul 20 14:59:41 2010 ---- junixsocket-1.3-new/src/main/org/newsclub/net/unix/NativeUnixSocket.java Sun May 27 22:26:15 2012 -*************** -*** 43,49 **** - String prefix = "lib"; - String suffix = ".so"; - String os = osName.replaceAll("[^A-Za-z0-9]", "").toLowerCase(); -! if ("macosx".equals(os)) { - suffix = ".dylib"; - } else if ("linux".equals(os) || "freebsd".equals(os) - || "sunos".equals(os)) { ---- 43,49 ---- - String prefix = "lib"; - String suffix = ".so"; - String os = osName.replaceAll("[^A-Za-z0-9]", "").toLowerCase(); -! if ("macosx".equals(os) || "darwin".equals(os)) { - suffix = ".dylib"; - } else if ("linux".equals(os) || "freebsd".equals(os) - || "sunos".equals(os)) { diff --git a/pkgs/development/libraries/java/junixsocket/default.nix b/pkgs/development/libraries/java/junixsocket/default.nix deleted file mode 100644 index 0484f4c59ba6f..0000000000000 --- a/pkgs/development/libraries/java/junixsocket/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, stdenv, fetchurl, ant, jdk, junit }: - -stdenv.mkDerivation rec { - name = "junixsocket-1.3"; - - src = fetchurl { - url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/junixsocket/${name}-src.tar.bz2"; - sha256 = "0c6p8vmiv5nk8i6g1hgivnl3mpb2k3lhjjz0ss9dlirisfrxf1ym"; - }; - - patches = [ ./darwin.patch ]; - - buildInputs = [ ant jdk junit ]; - - preConfigure = - '' - substituteInPlace src/main/org/newsclub/net/unix/NativeUnixSocketConfig.java \ - --replace /opt/newsclub/lib-native $out/lib - ''; - - buildPhase = "ant"; - - ANT_ARGS = - # Note that our OpenJDK on Darwin is currently 32-bit, so we have to build a 32-bit dylib. - (if stdenv.is64bit then [ "-Dskip32=true" ] else [ "-Dskip64=true" ]) - ++ [ "-Dgcc=${stdenv.cc.targetPrefix}cc" "-Dant.build.javac.source=1.6" ] - ++ lib.optional stdenv.isDarwin "-DisMac=true"; - - installPhase = - '' - mkdir -p $out/share/java $out/lib - cp -v dist/*.jar $out/share/java - cp -v lib-native/*.so lib-native/*.dylib $out/lib/ - ''; - - meta = { - description = "A Java/JNI library for using Unix Domain Sockets from Java"; - homepage = "https://github.com/kohlschutter/junixsocket"; - license = lib.licenses.asl20; - platforms = lib.platforms.linux ++ lib.platforms.darwin; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 66e0023475a32..fc6a4f361c20b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20159,10 +20159,6 @@ with pkgs; jflex = callPackage ../development/libraries/java/jflex { }; - junit = callPackage ../development/libraries/java/junit { antBuild = releaseTools.antBuild; }; - - junixsocket = callPackage ../development/libraries/java/junixsocket { }; - lombok = callPackage ../development/libraries/java/lombok { }; lucene = callPackage ../development/libraries/java/lucene { }; |