Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] build-support/gradle: init #235058

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
biz.aQute.bnd:biz.aQute.bnd.embedded-repo:6.4.0=classpath
biz.aQute.bnd:biz.aQute.bnd.gradle:6.4.0=classpath
biz.aQute.bnd:biz.aQute.bnd.util:6.4.0=classpath
biz.aQute.bnd:biz.aQute.bndlib:6.4.0=classpath
biz.aQute.bnd:biz.aQute.repository:6.4.0=classpath
biz.aQute.bnd:biz.aQute.resolve:6.4.0=classpath
com.athaydes.osgi-run:com.athaydes.osgi-run.gradle.plugin:1.6.0=classpath
com.formdev:flatlaf:1.0=classpath
com.googlecode.javaewah:JavaEWAH:1.1.13=classpath
com.thoughtworks.xstream:xstream:1.4.19=classpath
commons-beanutils:commons-beanutils:1.9.4=classpath
commons-logging:commons-logging:1.2=classpath
edu.sc.seis.launch4j:edu.sc.seis.launch4j.gradle.plugin:2.5.4=classpath
edu.sc.seis.launch4j:launch4j:2.5.4=classpath
gradle.plugin.com.athaydes.gradle.osgi:osgi-run-core:1.6.0=classpath
io.github.x-stream:mxparser:1.2.2=classpath
net.sf.launch4j:launch4j:3.14=classpath
org.ajoberstar.grgit:grgit-core:5.0.0=classpath
org.ajoberstar.grgit:grgit-gradle:5.0.0=classpath
org.ajoberstar.grgit:org.ajoberstar.grgit.gradle.plugin:5.0.0=classpath
org.eclipse.jgit:org.eclipse.jgit:6.0.0.202111291000-r=classpath
org.osgi:org.osgi.dto:1.0.0=classpath
org.osgi:org.osgi.framework:1.8.0=classpath
org.osgi:org.osgi.resource:1.0.0=classpath
org.osgi:org.osgi.service.coordinator:1.0.2=classpath
org.osgi:org.osgi.service.log:1.3.0=classpath
org.osgi:org.osgi.service.repository:1.1.0=classpath
org.osgi:org.osgi.service.resolver:1.1.1=classpath
org.osgi:org.osgi.util.function:1.2.0=classpath
org.osgi:org.osgi.util.promise:1.2.0=classpath
org.osgi:org.osgi.util.tracker:1.5.4=classpath
org.osgi:osgi.annotation:8.0.1=classpath
org.slf4j:slf4j-api:1.7.30=classpath
xmlpull:xmlpull:1.1.3.1=classpath
empty=
69 changes: 6 additions & 63 deletions pkgs/applications/file-managers/mucommander/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, gradle_7
, perl
, makeWrapper
, writeText
, jdk
, gsettings-desktop-schemas
}:
Expand All @@ -23,72 +20,18 @@ let
# there is no .git anyway
substituteInPlace build.gradle \
--replace "git = grgit.open(dir: project.rootDir)" "" \
--replace "id 'org.ajoberstar.grgit' version '3.1.1'" "" \
--replace "revision = git.head().id" "revision = '${version}'"
'';

# fake build to pre-download deps into fixed-output derivation
deps = stdenv.mkDerivation {
pname = "mucommander-deps";
inherit version src postPatch;
nativeBuildInputs = [ gradle_7 perl ];
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d)
gradle --no-daemon tgz
'';
# perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar)
# reproducible by sorting
installPhase = ''
find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \
| LC_ALL=C sort \
| perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \
| sh
# copy maven-metadata.xml for commons-codec
# thankfully there is only one xml
cp $GRADLE_USER_HOME/caches/modules-2/resources-2.1/*/*/maven-metadata.xml $out/commons-codec/commons-codec/maven-metadata.xml
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-T4UhEzkaYh237+ZsoQTv1RgqcAKY4dPc/3x+dEie4A8=";
};

gradle = gradle_7;
in
stdenv.mkDerivation rec {
gradle.buildPackage {
pname = "mucommander";
inherit version src postPatch;
nativeBuildInputs = [ gradle_7 perl makeWrapper ];

# Point to our local deps repo
gradleInit = writeText "init.gradle" ''
logger.lifecycle 'Replacing Maven repositories with ${deps}...'
gradle.projectsLoaded {
rootProject.allprojects {
buildscript {
repositories {
clear()
maven { url '${deps}' }
}
}
repositories {
clear()
maven { url '${deps}' }
}
}
}
settingsEvaluated { settings ->
settings.pluginManagement {
repositories {
maven { url '${deps}' }
}
}
}
'';

buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d)

gradle --offline --init-script ${gradleInit} --no-daemon tgz
'';
nativeBuildInputs = [ makeWrapper ];
gradleOpts.buildSubcommand = "tgz";
gradleOpts.lockfileTree = ./lockfiles;
gradleOpts.depsHash = "sha256-LJzowmiR7hcwtYx4W70qymWH76ZlLcsc57D0RaA5wOw=";

installPhase = ''
mkdir -p $out/share/mucommander
Expand Down
69 changes: 69 additions & 0 deletions pkgs/applications/file-managers/mucommander/gradle.lockfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
ch.qos.logback:logback-classic:1.2.3=__osgiRuntime__2,__osgiRuntime__21,__osgiRuntime__41,__osgiRuntime__42,__osgiRuntime__43,__osgiRuntime__44,__osgiRuntime__46,__osgiRuntime__47,__osgiRuntime__48,__osgiRuntime__49,osgiRuntime
ch.qos.logback:logback-core:1.2.3=__osgiRuntime__2,__osgiRuntime__21,__osgiRuntime__41,__osgiRuntime__42,__osgiRuntime__43,__osgiRuntime__44,__osgiRuntime__46,__osgiRuntime__47,__osgiRuntime__48,__osgiRuntime__49,osgiRuntime
com.athaydes.osgiaas:osgiaas-cli-api:0.7=__osgiRuntime__1
com.athaydes.osgiaas:osgiaas-cli-core:0.7=__osgiRuntime__1
com.athaydes.osgiaas:osgiaas-common:0.7=__osgiRuntime__1
com.beust:jcommander:1.82=compileClasspath,comprise
com.dropbox.core:dropbox-core-sdk:5.2.0=__osgiRuntime__20,osgiRuntime
com.fasterxml.jackson.core:jackson-annotations:2.10.0=__osgiRuntime__38,__osgiRuntime__39,osgiRuntime
com.fasterxml.jackson.core:jackson-core:2.10.0=__osgiRuntime__38,__osgiRuntime__39,osgiRuntime
com.fasterxml.jackson.core:jackson-core:2.7.9=__osgiRuntime__20
com.fasterxml.jackson.core:jackson-databind:2.10.0=__osgiRuntime__38,__osgiRuntime__39,osgiRuntime
com.formdev:flatlaf:2.6=compileClasspath,comprise
com.github.junrar:junrar:7.5.4=__osgiRuntime__18,osgiRuntime
com.googlecode.json-simple:json-simple:1.1.1=__osgiRuntime__38,osgiRuntime
com.googlecode.plist:dd-plist:1.23=__osgiRuntime__46,osgiRuntime
com.jamesmurty.utils:java-xmlbuilder:1.1=__osgiRuntime__37,osgiRuntime
com.jcraft:jsch:0.1.55=__osgiRuntime__17,osgiRuntime
com.jcraft:jzlib:1.1.3=__osgiRuntime__17,osgiRuntime
com.sun.activation:javax.activation:1.2.0=compileClasspath,comprise
commons-codec:commons-codec:1.9=__osgiRuntime__37,__osgiRuntime__38,__osgiRuntime__39,osgiRuntime
commons-collections:commons-collections:3.2.2=__osgiRuntime__11,__osgiRuntime__12,__osgiRuntime__13,__osgiRuntime__14,__osgiRuntime__15,__osgiRuntime__16,__osgiRuntime__17,__osgiRuntime__18,__osgiRuntime__19,__osgiRuntime__2,__osgiRuntime__20,__osgiRuntime__21,__osgiRuntime__22,__osgiRuntime__23,__osgiRuntime__24,__osgiRuntime__25,__osgiRuntime__26,__osgiRuntime__27,__osgiRuntime__28,__osgiRuntime__29,__osgiRuntime__3,__osgiRuntime__30,__osgiRuntime__31,__osgiRuntime__32,__osgiRuntime__33,__osgiRuntime__34,__osgiRuntime__35,__osgiRuntime__36,__osgiRuntime__37,__osgiRuntime__38,__osgiRuntime__39,__osgiRuntime__40,__osgiRuntime__41,__osgiRuntime__42,__osgiRuntime__43,__osgiRuntime__44,__osgiRuntime__45,__osgiRuntime__46,__osgiRuntime__47,__osgiRuntime__48,__osgiRuntime__49,__osgiRuntime__6,osgiRuntime
commons-logging:commons-logging:1.2=__osgiRuntime__18,__osgiRuntime__37,__osgiRuntime__38,__osgiRuntime__39,osgiRuntime
commons-net:commons-net:3.8.0=__osgiRuntime__16,osgiRuntime
eu.agno3.jcifs:jcifs-ng:2.1.7=__osgiRuntime__23,osgiRuntime
javax.activation:activation:1.1.1=__osgiRuntime__37,osgiRuntime
javax.jws:javax.jws-api:1.1=__osgiRuntime__24,osgiRuntime
javax.xml.bind:jaxb-api:2.2.9=__osgiRuntime__24,osgiRuntime
javax.xml.soap:javax.xml.soap-api:1.3.5=__osgiRuntime__24,osgiRuntime
javax.xml.ws:jaxws-api:2.2.12=__osgiRuntime__24,osgiRuntime
javax.xml:jaxrpc-api:1.1=__osgiRuntime__37,osgiRuntime
jline:jline:2.14.2=__osgiRuntime__1
junit:junit:4.10=__osgiRuntime__38,osgiRuntime
log4j:log4j:1.2.17=__osgiRuntime__10,osgiRuntime
net.iharder:base64:2.3.8=__osgiRuntime__37,osgiRuntime
net.java.dev.jets3t:jets3t:0.9.4=__osgiRuntime__37,osgiRuntime
net.sf.launch4j:launch4j:3.14=launch4jBin
net.sf.sevenzipjbinding:sevenzipjbinding:16.02-2.01=__osgiRuntime__18,__osgiRuntime__26,__osgiRuntime__27,__osgiRuntime__28,osgiRuntime
org.apache.commons:commons-compress:1.20=__osgiRuntime__30,__osgiRuntime__36,osgiRuntime
org.apache.commons:commons-vfs2:2.3=__osgiRuntime__18,osgiRuntime
org.apache.felix:org.apache.felix.framework:7.0.5=compileClasspath,comprise
org.apache.felix:org.apache.felix.main:7.0.5=compileClasspath,comprise
org.apache.felix:org.apache.felix.scr:2.0.12=__osgiRuntime__0
org.apache.felix:org.apache.felix.shell:1.4.3=__osgiRuntime__1
org.apache.httpcomponents:httpclient:4.5=__osgiRuntime__37,__osgiRuntime__38,__osgiRuntime__39,osgiRuntime
org.apache.httpcomponents:httpcore:4.4.1=__osgiRuntime__37,__osgiRuntime__38,__osgiRuntime__39,osgiRuntime
org.bouncycastle:bcprov-jdk15on:1.52=__osgiRuntime__37
org.bouncycastle:bcprov-jdk15on:1.69=__osgiRuntime__23,osgiRuntime
org.checkerframework:checker-qual:3.24.0=__osgiRuntime__10,osgiRuntime
org.codehaus.jackson:jackson-core-asl:1.9.13=__osgiRuntime__37,osgiRuntime
org.codehaus.jackson:jackson-mapper-asl:1.9.13=__osgiRuntime__37,osgiRuntime
org.codehaus.mojo:animal-sniffer-annotations:1.9=compileClasspath,comprise
org.exbin.bined:bined-core:0.2.0=__osgiRuntime__44,osgiRuntime
org.exbin.bined:bined-swing:0.2.0=__osgiRuntime__44,osgiRuntime
org.glassfish:javax.xml.soap:10.0-b28=__osgiRuntime__37,osgiRuntime
org.hamcrest:hamcrest-core:1.1=__osgiRuntime__38,osgiRuntime
org.jetbrains.intellij.deps:trove4j:1.0.20200330=__osgiRuntime__10,osgiRuntime
org.jetbrains:annotations:23.0.0=__osgiRuntime__10,osgiRuntime
org.jmdns:jmdns:3.5.5=__osgiRuntime__2,__osgiRuntime__21,__osgiRuntime__41,__osgiRuntime__42,__osgiRuntime__43,__osgiRuntime__44,__osgiRuntime__46,__osgiRuntime__47,__osgiRuntime__48,__osgiRuntime__49,osgiRuntime
org.osgi:osgi.core:8.0.0=__osgiRuntime__10,__osgiRuntime__11,__osgiRuntime__12,__osgiRuntime__13,__osgiRuntime__14,__osgiRuntime__15,__osgiRuntime__16,__osgiRuntime__17,__osgiRuntime__18,__osgiRuntime__19,__osgiRuntime__2,__osgiRuntime__20,__osgiRuntime__21,__osgiRuntime__22,__osgiRuntime__23,__osgiRuntime__24,__osgiRuntime__25,__osgiRuntime__26,__osgiRuntime__27,__osgiRuntime__28,__osgiRuntime__29,__osgiRuntime__3,__osgiRuntime__30,__osgiRuntime__31,__osgiRuntime__32,__osgiRuntime__33,__osgiRuntime__34,__osgiRuntime__35,__osgiRuntime__36,__osgiRuntime__37,__osgiRuntime__38,__osgiRuntime__39,__osgiRuntime__4,__osgiRuntime__40,__osgiRuntime__41,__osgiRuntime__42,__osgiRuntime__43,__osgiRuntime__44,__osgiRuntime__45,__osgiRuntime__46,__osgiRuntime__47,__osgiRuntime__48,__osgiRuntime__49,__osgiRuntime__5,__osgiRuntime__6,__osgiRuntime__7,__osgiRuntime__8,__osgiRuntime__9,osgiRuntime
org.ovirt.engine.api:sdk:4.4.5=__osgiRuntime__38,__osgiRuntime__39,osgiRuntime
org.slf4j:slf4j-api:1.7.36=__osgiRuntime__10,__osgiRuntime__11,__osgiRuntime__12,__osgiRuntime__13,__osgiRuntime__14,__osgiRuntime__15,__osgiRuntime__16,__osgiRuntime__17,__osgiRuntime__18,__osgiRuntime__19,__osgiRuntime__2,__osgiRuntime__20,__osgiRuntime__21,__osgiRuntime__22,__osgiRuntime__23,__osgiRuntime__24,__osgiRuntime__25,__osgiRuntime__26,__osgiRuntime__27,__osgiRuntime__28,__osgiRuntime__29,__osgiRuntime__3,__osgiRuntime__30,__osgiRuntime__31,__osgiRuntime__32,__osgiRuntime__33,__osgiRuntime__34,__osgiRuntime__35,__osgiRuntime__36,__osgiRuntime__37,__osgiRuntime__38,__osgiRuntime__39,__osgiRuntime__4,__osgiRuntime__40,__osgiRuntime__41,__osgiRuntime__42,__osgiRuntime__43,__osgiRuntime__44,__osgiRuntime__45,__osgiRuntime__46,__osgiRuntime__47,__osgiRuntime__48,__osgiRuntime__49,__osgiRuntime__5,__osgiRuntime__6,__osgiRuntime__7,__osgiRuntime__8,__osgiRuntime__9,osgiRuntime
org.tukaani:xz:1.9=__osgiRuntime__33,__osgiRuntime__36,osgiRuntime
org.violetlib:jnr:11=compileClasspath,comprise
org.violetlib:vappearances:3=compileClasspath,comprise
org.violetlib:vaqua:10=compileClasspath,comprise
empty=annotationProcessor,archives,default,osgiMain,runtimeClasspath,systemLib,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
empty=classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
org.osgi:osgi.core:8.0.0=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:1.7.36=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
empty=annotationProcessor,archives,baseline,comprise,testAnnotationProcessor
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
biz.aQute.bnd:biz.aQute.bnd.embedded-repo:6.4.0=classpath
biz.aQute.bnd:biz.aQute.bnd.gradle:6.4.0=classpath
biz.aQute.bnd:biz.aQute.bnd.util:6.4.0=classpath
biz.aQute.bnd:biz.aQute.bndlib:6.4.0=classpath
biz.aQute.bnd:biz.aQute.repository:6.4.0=classpath
biz.aQute.bnd:biz.aQute.resolve:6.4.0=classpath
com.athaydes.osgi-run:com.athaydes.osgi-run.gradle.plugin:1.6.0=classpath
com.formdev:flatlaf:1.0=classpath
com.googlecode.javaewah:JavaEWAH:1.1.13=classpath
com.thoughtworks.xstream:xstream:1.4.19=classpath
commons-beanutils:commons-beanutils:1.9.4=classpath
commons-logging:commons-logging:1.2=classpath
edu.sc.seis.launch4j:edu.sc.seis.launch4j.gradle.plugin:2.5.4=classpath
edu.sc.seis.launch4j:launch4j:2.5.4=classpath
gradle.plugin.com.athaydes.gradle.osgi:osgi-run-core:1.6.0=classpath
io.github.x-stream:mxparser:1.2.2=classpath
net.sf.launch4j:launch4j:3.14=classpath
org.ajoberstar.grgit:grgit-core:5.0.0=classpath
org.ajoberstar.grgit:grgit-gradle:5.0.0=classpath
org.ajoberstar.grgit:org.ajoberstar.grgit.gradle.plugin:5.0.0=classpath
org.eclipse.jgit:org.eclipse.jgit:6.0.0.202111291000-r=classpath
org.osgi:org.osgi.dto:1.0.0=classpath
org.osgi:org.osgi.framework:1.8.0=classpath
org.osgi:org.osgi.resource:1.0.0=classpath
org.osgi:org.osgi.service.coordinator:1.0.2=classpath
org.osgi:org.osgi.service.log:1.3.0=classpath
org.osgi:org.osgi.service.repository:1.1.0=classpath
org.osgi:org.osgi.service.resolver:1.1.1=classpath
org.osgi:org.osgi.util.function:1.2.0=classpath
org.osgi:org.osgi.util.promise:1.2.0=classpath
org.osgi:org.osgi.util.tracker:1.5.4=classpath
org.osgi:osgi.annotation:8.0.1=classpath
org.slf4j:slf4j-api:1.7.30=classpath
xmlpull:xmlpull:1.1.3.1=classpath
empty=
Loading