Merge pull request #294619 from TomaSajt/jameica
jameica: make deterministic and clean up
This commit is contained in:
commit
49845b5bb4
@ -1,4 +1,17 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, makeDesktopItem, makeWrapper, wrapGAppsHook, ant, jdk, jre, gtk2, glib, xorg, Cocoa }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, makeDesktopItem
|
||||||
|
, makeWrapper
|
||||||
|
, wrapGAppsHook
|
||||||
|
, ant
|
||||||
|
, jdk
|
||||||
|
, jre
|
||||||
|
, gtk2
|
||||||
|
, glib
|
||||||
|
, libXtst
|
||||||
|
, Cocoa
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
_version = "2.10.4";
|
_version = "2.10.4";
|
||||||
@ -26,10 +39,6 @@ stdenv.mkDerivation rec {
|
|||||||
pname = "jameica";
|
pname = "jameica";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
nativeBuildInputs = [ ant jdk wrapGAppsHook makeWrapper ];
|
|
||||||
buildInputs = lib.optionals stdenv.isLinux [ gtk2 glib xorg.libXtst ]
|
|
||||||
++ lib.optional stdenv.isDarwin Cocoa;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "willuhn";
|
owner = "willuhn";
|
||||||
repo = "jameica";
|
repo = "jameica";
|
||||||
@ -37,15 +46,29 @@ stdenv.mkDerivation rec {
|
|||||||
hash = "sha256-MSVSd5DyVL+dcfTDv1M99hxickPwT2Pt6QGNsu6DGZI=";
|
hash = "sha256-MSVSd5DyVL+dcfTDv1M99hxickPwT2Pt6QGNsu6DGZI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# Fix jar timestamps for reproducibility
|
||||||
|
substituteInPlace build/build.xml \
|
||||||
|
--replace-fail '<jar ' '<jar modificationtime="0" '
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ ant jdk wrapGAppsHook makeWrapper ];
|
||||||
|
buildInputs = lib.optionals stdenv.isLinux [ gtk2 glib libXtst ]
|
||||||
|
++ lib.optional stdenv.isDarwin Cocoa;
|
||||||
|
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
|
|
||||||
# there is also a build.gradle, but it only seems to be used to vendor 3rd party libraries
|
# there is also a build.gradle, but it only seems to be used to vendor 3rd party libraries
|
||||||
# and is not able to build the application itself
|
# and is not able to build the application itself
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
(cd build; ant -Dsystem.version=${version} init compile jar)
|
runHook preBuild
|
||||||
|
ant -f build -Dsystem.version=${version} init compile jar
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/libexec $out/lib $out/bin $out/share/{applications,jameica-${version},java}/
|
mkdir -p $out/libexec $out/lib $out/bin $out/share/{applications,jameica-${version},java}/
|
||||||
|
|
||||||
# copy libraries except SWT
|
# copy libraries except SWT
|
||||||
@ -57,6 +80,8 @@ stdenv.mkDerivation rec {
|
|||||||
install -Dm644 plugin.xml $out/share/java/
|
install -Dm644 plugin.xml $out/share/java/
|
||||||
install -Dm644 build/jameica-icon.png $out/share/pixmaps/jameica.png
|
install -Dm644 build/jameica-icon.png $out/share/pixmaps/jameica.png
|
||||||
cp ${desktopItem}/share/applications/* $out/share/applications/
|
cp ${desktopItem}/share/applications/* $out/share/applications/
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user