Merge pull request #48421 from Ekleog/gppro-18.09.14

global-platform-pro: 0.3.10-rc11 -> 18.09.14
This commit is contained in:
Jörg Thalheim 2018-10-19 10:41:23 +01:00 committed by GitHub
commit 1a9e5388b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,50 +3,20 @@
# TODO: This is quite a bit of duplicated logic with gephi. Factor it out?
stdenv.mkDerivation rec {
pname = "global-platform-pro";
version = "0.3.10-rc11"; # Waiting for release https://github.com/martinpaljak/GlobalPlatformPro/issues/128
describeVersion = "v0.3.10-rc11-0-g8923747"; # git describe --tags --always --long --dirty
version = "18.09.14";
GPPRO_VERSION = "18.09.14-0-gb439b52"; # git describe --tags --always --long --dirty
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "martinpaljak";
repo = "GlobalPlatformPro";
rev = "v${version}";
sha256 = "0rk81x2y7vx1caxm6wa59fjrfxmjn7s8yxaxm764p8m2qxk3m4y2";
rev = "${version}";
sha256 = "1vws6cbgm3mrwc2xz9j1y262vw21x3hjc9m7rqc4hn3m7gjpwsvg";
};
# This patch hardcodes the return of a git command the build system tries to
# run. As `fetchFromGitHub` doesn't fetch a full-fledged git repository,
# this command can only fail at build-time. As a consequence, we include the
# `describeVersion` variable defined above here.
#
# See upstream issue https://github.com/martinpaljak/GlobalPlatformPro/issues/129
patches = [ (writeText "${name}-version.patch" ''
diff --git a/pom.xml b/pom.xml
index 1e5a82d..1aa01fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,14 +121,10 @@
</execution>
</executions>
<configuration>
- <executable>git</executable>
+ <executable>echo</executable>
<outputFile>target/generated-resources/pro/javacard/gp/pro_version.txt</outputFile>
<arguments>
- <argument>describe</argument>
- <argument>--tags</argument>
- <argument>--always</argument>
- <argument>--long</argument>
- <argument>--dirty</argument>
+ <argument>${describeVersion}</argument>
</arguments>
</configuration>
</plugin>
'') ];
deps = stdenv.mkDerivation {
name = "${name}-deps";
inherit src patches;
inherit src;
nativeBuildInputs = [ jdk maven ];
installPhase = ''
# Download the dependencies
@ -62,7 +32,7 @@ stdenv.mkDerivation rec {
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "15bbi7z9v601all9vr2azh8nk8rpz2vd91yvvw8id6birnbhn3if";
outputHash = "1qwgvz6l5wia8q5824c9f3iwyapfskljhqf1z09fw6jjj1jy3b15";
};
nativeBuildInputs = [ jdk maven makeWrapper ];
@ -75,7 +45,6 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p "$out/lib/java" "$out/share/java"
cp -R target/apidocs "$out/doc"
cp target/gp.jar "$out/share/java"
makeWrapper "${jre_headless}/bin/java" "$out/bin/gp" \
--add-flags "-jar '$out/share/java/gp.jar'" \