tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
cie-middleware-linux: convert to gradle setup hook
chayleaf
2 years ago
7b1a794b
d895bc00
+216
-46
2 changed files
expand all
collapse all
unified
split
pkgs
tools
security
cie-middleware-linux
default.nix
deps.json
+31
-46
pkgs/tools/security/cie-middleware-linux/default.nix
···
34
# Shared libraries needed by the Java application
35
libraries = lib.makeLibraryPath [ ghostscript ];
36
37
-
# Fixed-output derivation that fetches the Java dependencies
38
-
javaDeps = stdenv.mkDerivation {
39
-
pname = "cie-java-deps";
40
-
inherit src version;
41
-
42
-
nativeBuildInputs = [ gradle ];
43
-
44
-
buildPhase = ''
45
-
# Run the fetchDeps task
46
-
export GRADLE_USER_HOME=$(mktemp -d)
47
-
gradle --no-daemon -b cie-java/build.gradle fetchDeps
48
-
'';
49
-
50
-
installPhase = ''
51
-
# Build a tree compatible with the maven repository format
52
-
pushd "$GRADLE_USER_HOME/caches/modules-2/files-2.1"
53
-
find -type f | awk -F/ -v OFS=/ -v out="$out" '{
54
-
infile = $0
55
-
gsub(/\./, "/", $2)
56
-
system("install -m644 -D "infile" "out"/"$2"/"$3"/"$4"/"$6)
57
-
}'
58
-
popd
59
-
'';
60
-
61
-
outputHashAlgo = "sha256";
62
-
outputHashMode = "recursive";
63
-
outputHash = "sha256-fxrjo4iduXzTgMqmQGwdI1vLMA4EZLObsHyKGZ6b14I=";
64
-
};
65
-
66
in
67
68
stdenv.mkDerivation {
···
101
# libraries and the Java application builds.
102
preConfigure = "pushd libs";
103
104
-
postBuild = ''
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
105
popd
106
107
-
# Use the packages in javaDeps for both plugins and dependencies
108
-
localRepo="maven { url uri('${javaDeps}') }"
109
-
sed -i cie-java/settings.gradle -e "1i \
110
-
pluginManagement { repositories { $localRepo } }"
111
-
substituteInPlace cie-java/build.gradle \
112
-
--replace 'mavenCentral()' "$localRepo"
113
114
-
# Build the Java application
115
-
export GRADLE_USER_HOME=$(mktemp -d)
116
-
gradle standalone \
117
-
--no-daemon \
118
-
--offline \
119
-
--parallel \
120
-
--info -Dorg.gradle.java.home=${jre} \
121
-
--build-file cie-java/build.gradle
0
122
123
-
pushd libs/build
124
'';
125
126
postInstall = ''
···
144
install -Dm644 LICENSE "$out/share/licenses/cieid/LICENSE"
145
'';
146
147
-
passthru = { inherit javaDeps; };
148
149
meta = with lib; {
150
homepage = "https://github.com/M0Rf30/cie-middleware-linux";
···
34
# Shared libraries needed by the Java application
35
libraries = lib.makeLibraryPath [ ghostscript ];
36
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
37
in
38
39
stdenv.mkDerivation {
···
72
# libraries and the Java application builds.
73
preConfigure = "pushd libs";
74
75
+
mitmCache = gradle.fetchDeps {
76
+
inherit pname;
77
+
data = ./deps.json;
78
+
};
79
+
80
+
gradleFlags = [
81
+
"-Dorg.gradle.java.home=${jre}"
82
+
"--build-file" "cie-java/build.gradle"
83
+
];
84
+
85
+
gradleBuildTask = "standalone";
86
+
87
+
buildPhase = ''
88
+
runHook preBuild
89
+
90
+
ninjaBuildPhase
91
+
pushd ../..
92
+
gradleBuildPhase
93
popd
94
95
+
runHook postBuild
96
+
'';
0
0
0
0
97
98
+
doCheck = true;
99
+
100
+
checkPhase = ''
101
+
runHook preCheck
102
+
103
+
mesonCheckPhase
104
+
pushd ../..
105
+
gradleCheckPhase
106
+
popd
107
108
+
runHook postCheck
109
'';
110
111
postInstall = ''
···
129
install -Dm644 LICENSE "$out/share/licenses/cieid/LICENSE"
130
'';
131
132
+
preGradleUpdate = "cd ../..";
133
134
meta = with lib; {
135
homepage = "https://github.com/M0Rf30/cie-middleware-linux";
+185
pkgs/tools/security/cie-middleware-linux/deps.json
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{
2
+
"!comment": "This is a nixpkgs Gradle dependency lockfile. For more details, refer to the Gradle section in the nixpkgs manual.",
3
+
"!version": 1,
4
+
"https://plugins.gradle.org/m2": {
5
+
"com/diffplug/durian#durian-collect/1.2.0": {
6
+
"jar": "sha256-sZTAuIAhzBFsIcHcdvScLB/hda9by3TIume527+aSMw=",
7
+
"pom": "sha256-i7diCGoKT9KmRzu/kFx0R2OvodWaVjD3O7BLeHLAn/M="
8
+
},
9
+
"com/diffplug/durian#durian-core/1.2.0": {
10
+
"jar": "sha256-F+0KrLOjwWMjMyFou96thpTzKACytH1p1KTEmxFNXa4=",
11
+
"pom": "sha256-hwMg6QdVNxsBeW/oG6Ul/R3ui3A0b1VFUe7dQonwtmI="
12
+
},
13
+
"com/diffplug/durian#durian-io/1.2.0": {
14
+
"jar": "sha256-CV/R3HeIjAc/C+OaAYFW7lJnInmLCd6eKF7yE14W6sQ=",
15
+
"pom": "sha256-NQkZQkMk4nUKPdwvobzmqQrIziklaYpgqbTR1uSSL/4="
16
+
},
17
+
"com/diffplug/durian#durian-swt.os/4.2.2": {
18
+
"jar": "sha256-a1Mca0vlgaizLq2GHdwVwsk7IMZl+00z4DgUg8JERfQ=",
19
+
"module": "sha256-rVlQLGknZu48M0vkliigDctNka4aSPJjLitxUStDXPk=",
20
+
"pom": "sha256-GzxJFP1eLM4pZq1wdWY5ZBFFwdNCB3CTV4Py3yY2kIU="
21
+
},
22
+
"com/diffplug/spotless#com.diffplug.spotless.gradle.plugin/6.25.0": {
23
+
"pom": "sha256-9FyCsS+qzYWs1HTrppkyL6XeqIQIskfQ5L3pQSkIIjo="
24
+
},
25
+
"com/diffplug/spotless#spotless-lib-extra/2.45.0": {
26
+
"jar": "sha256-YCy7zTgo7pz7LjCn+bMDNcaScTB3FBTUzdKU0h/ly2c=",
27
+
"module": "sha256-9pnkNfTlzgPbYJpHaO6wNj1uB8ZfvPrx/GKcTnbuf7A=",
28
+
"pom": "sha256-5x2LkRDdSNLn9KVLi/uozlWpbmteu9T0OpJGZJz1b7A="
29
+
},
30
+
"com/diffplug/spotless#spotless-lib/2.45.0": {
31
+
"jar": "sha256-sllply4dmAKAyirlKRl+2bMWCq5ItQbPGTXwG9Exhmc=",
32
+
"module": "sha256-+x+8+TUAczrHWcp99E8P9mVTEze0LaAS4on/CINNiQ8=",
33
+
"pom": "sha256-WKd8IsQLIc8m29tCEwFu9HrM9bBwchfHkyqQ9D+PMNw="
34
+
},
35
+
"com/diffplug/spotless#spotless-plugin-gradle/6.25.0": {
36
+
"jar": "sha256-9euQikxdpGKZ51Q/qtoEAtLEt31Yx7Qy1Lblk0mygKM=",
37
+
"module": "sha256-RoHRe/PJIF2DeOynBcAAywzJjcx40DATy2iJjGvSx0Q=",
38
+
"pom": "sha256-q1ZuPYS2w/rHqPySXy279TzZdZywOvPAfQ3EN9OXqNo="
39
+
},
40
+
"com/googlecode/concurrent-trees#concurrent-trees/2.6.1": {
41
+
"jar": "sha256-BONySYTipcv1VgbPo3KlvT08XSohUzpwBOPN5Tl2H6U=",
42
+
"pom": "sha256-Q8K5sULnBV0fKlgn8QlEkl0idH2XVrMlDAeqtHU4qXE="
43
+
},
44
+
"com/googlecode/javaewah#JavaEWAH/1.2.3": {
45
+
"jar": "sha256-1lImlJcTxMYaeE9BxRFn57Axb5N2Q5jrup5DNrPZVMI=",
46
+
"pom": "sha256-5O1sZpYgNm+ZOSBln+CsfLyD11PbwNwOseUplzr5byM="
47
+
},
48
+
"com/squareup/okhttp3#okhttp/4.12.0": {
49
+
"jar": "sha256-sQUAgbFLt6On5VpNPvAbXc+rxFO0VzpPwBl2cZHV9OA=",
50
+
"module": "sha256-YH4iD/ghW5Kdgpu/VPMyiU8UWbTXlZea6vy8wc6lTPM=",
51
+
"pom": "sha256-fHNwQKlBlSLnxQzAJ0FqcP58dinlKyGZNa3mtBGcfTg="
52
+
},
53
+
"com/squareup/okio#okio-jvm/3.6.0": {
54
+
"jar": "sha256-Z1Q/Bzb8QirpJ+0OUEuYvF4mn9oNNQBXkzfLcT2ihBI=",
55
+
"module": "sha256-scIZnhwMyWnvYcu+SvLsr5sGQRvd4By69vyRNN/gToo=",
56
+
"pom": "sha256-YbTXxRWgiU/62SX9cFJiDBQlqGQz/TURO1+rDeiQpX8="
57
+
},
58
+
"com/squareup/okio#okio/3.6.0": {
59
+
"module": "sha256-akesUDZOZZhFlAH7hvm2z832N7mzowRbHMM8v0xAghg=",
60
+
"pom": "sha256-rrO3CiTBA+0MVFQfNfXFEdJ85gyuN2pZbX1lNpf4zJU="
61
+
},
62
+
"commons-codec#commons-codec/1.16.0": {
63
+
"jar": "sha256-VllfsgsLhbyR0NUD2tULt/G5r8Du1d/6bLslkpAASE0=",
64
+
"pom": "sha256-bLWVeBnfOTlW/TEaOgw/XuwevEm6Wy0J8/ROYWf6PnQ="
65
+
},
66
+
"dev/equo/ide#solstice/1.7.5": {
67
+
"jar": "sha256-BuFLxDrMMx2ra16iAfxnNk7RI/mCyF+lEx8IF+1lrk8=",
68
+
"module": "sha256-eYp7cGdyE27iijLt2GOx6fgWE6NJhAXXS+ilyb6/9U8=",
69
+
"pom": "sha256-20U7urXn2opDE5sNzTuuZykzIfKcTZH1p5XZ/2xS3d8="
70
+
},
71
+
"org/apache#apache/29": {
72
+
"pom": "sha256-PkkDcXSCC70N9jQgqXclWIY5iVTCoGKR+mH3J6w1s3c="
73
+
},
74
+
"org/apache/commons#commons-parent/58": {
75
+
"pom": "sha256-LUsS4YiZBjq9fHUni1+pejcp2Ah4zuy2pA2UbpwNVZA="
76
+
},
77
+
"org/eclipse/jgit#org.eclipse.jgit-parent/6.7.0.202309050840-r": {
78
+
"pom": "sha256-u56FQW2Y0HMfx2f41w6EaAQWAdZnKuItsqx5n3qjkR8="
79
+
},
80
+
"org/eclipse/jgit#org.eclipse.jgit/6.7.0.202309050840-r": {
81
+
"jar": "sha256-tWRHfQkiQaqrUMhKxd0aw3XAGCBE1+VlnTpgqQ4ugBo=",
82
+
"pom": "sha256-BNB83b8ZjfpuRIuan7lA94HAEq2T2eqCBv4KTTplwZI="
83
+
},
84
+
"org/eclipse/platform#org.eclipse.osgi/3.18.300": {
85
+
"jar": "sha256-urlD5Y7dFzCSOGctunpFrsni2svd24GKjPF3I+oT+iI=",
86
+
"pom": "sha256-4nl2N1mZxUJ/y8//PzvCD77a+tiqRRArN59cL5fI/rQ="
87
+
},
88
+
"org/jetbrains#annotations/13.0": {
89
+
"jar": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg=",
90
+
"pom": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
91
+
},
92
+
"org/jetbrains/kotlin#kotlin-stdlib-common/1.9.10": {
93
+
"jar": "sha256-zeM0G6GKK6JisLfPbFWyDJDo1DTkLJoT5qP3cNuWWog=",
94
+
"pom": "sha256-fUtwVHkQZ2s738iSWojztr+yRYLJeEVCgFVEzu9JCpI="
95
+
},
96
+
"org/jetbrains/kotlin#kotlin-stdlib-jdk7/1.8.21": {
97
+
"pom": "sha256-m7EH1dXjkwvFl38AekPNILfSTZGxweUo6m7g8kjxTTY="
98
+
},
99
+
"org/jetbrains/kotlin#kotlin-stdlib-jdk7/1.9.10": {
100
+
"jar": "sha256-rGNhv5rR7TgsIQPZcSxHzewWYjK0kD7VluiHawaBybc=",
101
+
"pom": "sha256-x/pnx5YTILidhaPKWaLhjCxlhQhFWV3K5LRq9pRe3NU="
102
+
},
103
+
"org/jetbrains/kotlin#kotlin-stdlib-jdk8/1.8.21": {
104
+
"pom": "sha256-ODnXKNfDCaXDaLAnC0S08ceHj/XKXTKpogT6o0kUWdg="
105
+
},
106
+
"org/jetbrains/kotlin#kotlin-stdlib-jdk8/1.9.10": {
107
+
"jar": "sha256-pMdNlNZM4avlN2D+A4ndlB9vxVjQ2rNeR8CFoR7IDyg=",
108
+
"pom": "sha256-X0uU3TBlp3ZMN/oV3irW2B9A1Z+Msz8X0YHGOE+3py4="
109
+
},
110
+
"org/jetbrains/kotlin#kotlin-stdlib/1.8.21": {
111
+
"pom": "sha256-/gzZ4yGT5FMzP9Kx9XfmYvtavGkHECu5Z4F7wTEoD9c="
112
+
},
113
+
"org/jetbrains/kotlin#kotlin-stdlib/1.9.10": {
114
+
"jar": "sha256-VemJxRK4CQd5n4VDCfO8d4LFs9E5MkQtA3nVxHJxFQQ=",
115
+
"pom": "sha256-fin79z/fceBnnT3ufmgP1XNGT6AWRKT1irgZ0sCI09I="
116
+
},
117
+
"org/junit#junit-bom/5.9.3": {
118
+
"module": "sha256-tAH9JZAeWCpSSqU0PEs54ovFbiSWHBBpvytLv87ka5M=",
119
+
"pom": "sha256-TQMpzZ5y8kIOXKFXJMv+b/puX9KIg2FRYnEZD9w0Ltc="
120
+
},
121
+
"org/slf4j#slf4j-api/1.7.36": {
122
+
"jar": "sha256-0+9XXj5JeWeNwBvx3M5RAhSTtNEft/G+itmCh3wWocA=",
123
+
"pom": "sha256-+wRqnCKUN5KLsRwtJ8i113PriiXmDL0lPZhSEN7cJoQ="
124
+
},
125
+
"org/slf4j#slf4j-parent/1.7.36": {
126
+
"pom": "sha256-uziNN/vN083mTDzt4hg4aTIY3EUfBAQMXfNgp47X6BI="
127
+
},
128
+
"org/sonatype/oss#oss-parent/5": {
129
+
"pom": "sha256-FnjUEgpYXYpjATGu7ExSTZKDmFg7fqthbufVqH9SDT0="
130
+
},
131
+
"org/sonatype/oss#oss-parent/7": {
132
+
"pom": "sha256-tR+IZ8kranIkmVV/w6H96ne9+e9XRyL+kM5DailVlFQ="
133
+
},
134
+
"org/tukaani#xz/1.9": {
135
+
"jar": "sha256-IRswbPxE+Plt86Cj3a91uoxSie7XfWDXL4ibuFX1NeU=",
136
+
"pom": "sha256-CTvhsDMxvOKTLWglw36YJy12Ieap6fuTKJoAJRi43Vo="
137
+
}
138
+
},
139
+
"https://repo.maven.apache.org/maven2": {
140
+
"com/google/code/gson#gson-parent/2.10.1": {
141
+
"pom": "sha256-QkjgiCQmxhUYI4XWCGw+8yYudplXGJ4pMGKAuFSCuDM="
142
+
},
143
+
"com/google/code/gson#gson/2.10.1": {
144
+
"jar": "sha256-QkHBSncnw0/uplB+yAExij1KkPBw5FJWgQefuU7kxZM=",
145
+
"pom": "sha256-0rEVY09cCF20ucn/wmWOieIx/b++IkISGhzZXU2Ujdc="
146
+
},
147
+
"commons-io#commons-io/2.15.1": {
148
+
"jar": "sha256-pYrxLuG2jP0uuwwnyu8WTwhDgaAOyBpIzCdf1+pU4VQ=",
149
+
"pom": "sha256-Fxoa+CtnWetXQLO4gJrKgBE96vEVMDby9ERZAd/T+R0="
150
+
},
151
+
"commons-logging#commons-logging/1.3.0": {
152
+
"jar": "sha256-ZtPJgEcLmbDFEdrT38CueyZewfsUTpa8AlOooXX9NNk=",
153
+
"pom": "sha256-je/afOtIiP/k1OYyeJVqGjxRS3W4Nj1nFqG9Zv6WLH8="
154
+
},
155
+
"net/java/dev/jna#jna/5.14.0": {
156
+
"jar": "sha256-NO0eHyf6iWvKUNvE6ZzzcylnzsOHp6DV40hsCWc/6MY=",
157
+
"pom": "sha256-4E4llRUB3yWtx7Hc22xTNzyUiXuE0+FJISknY+4Hrj0="
158
+
},
159
+
"org/apache#apache/31": {
160
+
"pom": "sha256-VV0MnqppwEKv+SSSe5OB6PgXQTbTVe6tRFIkRS5ikcw="
161
+
},
162
+
"org/apache/commons#commons-parent/65": {
163
+
"pom": "sha256-bPNJX8LmrJE6K38uA/tZCPs/Ip+wbTNY3EVnjVrz424="
164
+
},
165
+
"org/apache/pdfbox#fontbox/3.0.2": {
166
+
"jar": "sha256-ds8EEOkD49txQDKvu0WNWiO5IlO5/fiAA18J6orTraw=",
167
+
"pom": "sha256-hthT5W8q+Yb6c1s/kH6jh6KXNCLH0F8TwDasuRNal90="
168
+
},
169
+
"org/apache/pdfbox#pdfbox-io/3.0.2": {
170
+
"jar": "sha256-nW535C437zaC53aBEpwxRRXog9UKvB3aljguejHnDjg=",
171
+
"pom": "sha256-yD3gYR+UMN4W2dakjfXJEPgrkfHgU1xB9Woy9iYwz0c="
172
+
},
173
+
"org/apache/pdfbox#pdfbox-parent/3.0.2": {
174
+
"pom": "sha256-kN6rEjTjkUu8B07Ax3Y7+kFHgICziISpOwtVVxnWY0g="
175
+
},
176
+
"org/apache/pdfbox#pdfbox/3.0.2": {
177
+
"jar": "sha256-yv4sysEB6ao63z9+p23/AuWIWislWLdfr/l0dvBIfuI=",
178
+
"pom": "sha256-wMNAwn6AF2V+Y81PaJUG8U03Y10NFebRpAjysZFGax8="
179
+
},
180
+
"org/junit#junit-bom/5.10.1": {
181
+
"module": "sha256-IbCvz//i7LN3D16wCuehn+rulOdx+jkYFzhQ2ueAZ7c=",
182
+
"pom": "sha256-IcSwKG9LIAaVd/9LIJeKhcEArIpGtvHIZy+6qzN7w/I="
183
+
}
184
+
}
185
+
}