2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ant
|
|
|
|
, jdk8
|
|
|
|
, jre8
|
|
|
|
, makeWrapper
|
2024-04-21 15:54:59 +00:00
|
|
|
, stripJavaArchivesHook
|
2024-01-13 08:15:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
let
|
|
|
|
jdk = jdk8;
|
|
|
|
jre = jre8;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ili2c";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "5.1.1"; # There are newer versions, but they use gradle
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
ant
|
|
|
|
jdk
|
|
|
|
makeWrapper
|
2024-04-21 15:54:59 +00:00
|
|
|
stripJavaArchivesHook
|
2024-01-13 08:15:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "claeis";
|
2024-01-13 08:15:51 +00:00
|
|
|
repo = "ili2c";
|
|
|
|
rev = "ili2c-${finalAttrs.version}";
|
|
|
|
hash = "sha256-FHhx+f253+UdbFjd2fOlUY1tpQ6pA2aVu9CBSwUVoKQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
patches = [
|
|
|
|
# avoids modifying Version.properties file because that would insert the current timestamp into the file
|
|
|
|
./dont-use-build-timestamp.patch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
ant jar
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm644 build/jar/ili2c.jar -t $out/share/ili2c
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/ili2c \
|
|
|
|
--add-flags "-jar $out/share/ili2c/ili2c.jar"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "INTERLIS Compiler";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Checks the syntactical correctness of an INTERLIS data model.
|
|
|
|
'';
|
|
|
|
homepage = "https://www.interlis.ch/downloads/ili2c";
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
fromSource
|
2024-01-13 08:15:51 +00:00
|
|
|
binaryBytecode # source bundles dependencies as jars
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with maintainers; teams.geospatial.members ++ [ das-g ];
|
2024-06-05 15:53:02 +00:00
|
|
|
platforms = platforms.unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "ili2c";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-01-13 08:15:51 +00:00
|
|
|
})
|