treewide(java-users): clean callPackage overrides, by-name some

**This commit should cause no rebuilds.**

# Moving Java overrides out of all-packages

All usages of this pattern have been moved to
'let ... in' blocks.

Patterns I searched for:
* `jdk =`
* `jdk_headless =`
* `jre =`
* `jfx =`

The `jing` alias has been moved to aliases.nix, so
update the usage of `jing` in `xmloscopy` to
`jing-trang`.

cassandra was ignored because that derivation
involves code generation.

I ignored grails, because jdk is set to null by
default by an override in all-packages.nix. That
package would need a slightly larger refactor to
deal with.

Packages with a *-native variant were ignored because
those would need to be refactored.

jetbrains was ignored because that might be a special case?

I ignored virtualbox, because I did not want
to touch the usages of the pattern for other
dependencies.
This commit is contained in:
Tomodachi94
2025-09-25 03:46:35 +00:00
parent b56976b4b1
commit a4dd7db0dc
40 changed files with 131 additions and 190 deletions
@@ -1,57 +0,0 @@
{
lib,
stdenv,
fetchurl,
ant,
jdk,
makeWrapper,
stripJavaArchivesHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "java-cup";
version = "11b-20160615";
src = fetchurl {
url = "http://www2.cs.tum.edu/projects/cup/releases/java-cup-src-${finalAttrs.version}.tar.gz";
hash = "sha256-4OdzYG5FzhqorROD5jk9U+2dzyhh5D76gZT1Z+kdv/o=";
};
sourceRoot = ".";
patches = [ ./javacup-0.11b_beta20160615-build-xml-git.patch ];
nativeBuildInputs = [
ant
jdk
makeWrapper
stripJavaArchivesHook
];
buildPhase = ''
runHook preBuild
ant
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm644 dist/java-cup-11b.jar -t $out/share/java-cup
install -Dm644 dist/java-cup-11b-runtime.jar -t $out/share/java
makeWrapper ${jdk.jre}/bin/java $out/bin/javacup \
--add-flags "-jar $out/share/java-cup/java-cup-11b.jar"
runHook postInstall
'';
meta = {
description = "LALR parser generator for Java";
homepage = "http://www2.cs.tum.edu/projects/cup/";
license = lib.licenses.mit;
mainProgram = "javacup";
maintainers = [ lib.maintainers.romildo ];
platforms = lib.platforms.all;
};
})
@@ -1,38 +0,0 @@
--- javacup/build.xml.orig 2016-06-15 07:10:15.000000000 -0300
+++ javacup/build.xml 2016-07-17 08:46:46.632722844 -0300
@@ -21,26 +21,6 @@
<mkdir dir="${dist}" />
<loadfile property="cupversion" srcFile="version.txt" failonerror="false" />
<property name="cupversion" value="custombuild" unless:set="cupversion"/>
- <exec executable="git" outputproperty="gitversion">
- <arg value="log"/>
- <arg value="-1"/>
- <arg value="--format=%h"/>
- </exec>
- <exec executable="git" outputproperty="changed">
- <arg value="status"/>
- <arg value="--porcelain"/>
- <redirector>
- <outputfilterchain>
- <linecontainsregexp>
- <regexp pattern='^M.*'/>
- </linecontainsregexp>
- <tokenfilter>
- <replaceregex pattern=".*" replace="modifications based on "/>
- </tokenfilter>
- </outputfilterchain>
- </redirector>
- </exec>
- <property name="svnversion">${changed}${gitversion}</property>
</target>
<property environment="env" />
@@ -79,7 +59,7 @@
<copy todir="${java}"><fileset dir="${src}"></fileset></copy>
<replace file="${java}/java_cup/version.java"
token="+ version_str"
- value='+ "v0.11b ${cupversion} (GIT ${svnversion})"'>
+ value='+ "v0.11b ${cupversion}"'>
</replace>
<javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" debug="on" source="1.8" target="1.8">
<classpath refid="libraries"/>
@@ -1,25 +0,0 @@
{
lib,
stdenv,
fetchurl,
jdk,
}:
stdenv.mkDerivation rec {
pname = "libmatthew-java";
version = "0.8";
src = fetchurl {
url = "https://src.fedoraproject.org/repo/pkgs/libmatthew-java/libmatthew-java-${version}.tar.gz/8455b8751083ce25c99c2840609271f5/libmatthew-java-${version}.tar.gz";
sha256 = "1yldkhsdzm0a41a0i881bin2jklhp85y3ah245jd6fz3npcx7l85";
};
JAVA_HOME = jdk;
PREFIX = "\${out}";
buildInputs = [ jdk ];
meta = with lib; {
platforms = platforms.linux;
maintainers = [ maintainers.sander ];
license = licenses.mit;
};
}