protege: init at 5.6.4

+160
+43
pkgs/by-name/pr/protege/enforce-plugin-versions.patch
··· 1 + diff --git a/pom.xml b/pom.xml 2 + index 839bed04..4cb5f392 100644 3 + --- a/pom.xml 4 + +++ b/pom.xml 5 + @@ -358,6 +358,30 @@ 6 + <release>11</release> 7 + </configuration> 8 + </plugin> 9 + + 10 + + <plugin> 11 + + <groupId>org.apache.maven.plugins</groupId> 12 + + <artifactId>maven-install-plugin</artifactId> 13 + + <version>3.1.1</version> 14 + + </plugin> 15 + + 16 + + <plugin> 17 + + <groupId>org.apache.maven.plugins</groupId> 18 + + <artifactId>maven-site-plugin</artifactId> 19 + + <version>3.12.1</version> 20 + + </plugin> 21 + + 22 + + <plugin> 23 + + <groupId>org.apache.maven.plugins</groupId> 24 + + <artifactId>maven-deploy-plugin</artifactId> 25 + + <version>3.1.1</version> 26 + + </plugin> 27 + + 28 + + <plugin> 29 + + <groupId>org.apache.maven.plugins</groupId> 30 + + <artifactId>maven-jar-plugin</artifactId> 31 + + <version>3.3.0</version> 32 + + </plugin> 33 + 34 + <plugin> 35 + <groupId>org.apache.maven.plugins</groupId> 36 + @@ -476,6 +494,7 @@ 37 + <requireMavenVersion> 38 + <version>3.6.3</version> 39 + </requireMavenVersion> 40 + + <requirePluginVersions/> 41 + </rules> 42 + </configuration> 43 + </execution>
+93
pkgs/by-name/pr/protege/package.nix
··· 1 + { lib 2 + , fetchFromGitHub 3 + , copyDesktopItems 4 + , iconConvTools 5 + , makeDesktopItem 6 + , makeWrapper 7 + , jdk11 8 + , maven 9 + }: 10 + 11 + let 12 + mvn = maven.override { jdk = jdk11; }; 13 + in 14 + mvn.buildMavenPackage rec { 15 + pname = "protege"; 16 + version = "5.6.4"; 17 + 18 + src = fetchFromGitHub { 19 + owner = "protegeproject"; 20 + repo = "protege"; 21 + rev = version; 22 + hash = "sha256-Q3MHa7nCeF31n7JPltcemFBc/sJwGA9Ev0ymjQhY/U0="; 23 + }; 24 + 25 + mvnHash = "sha256-kemP2gDv1CYuaoK0fwzBxdLTusarPasf2jCDQj/HPYE="; 26 + 27 + patches = [ 28 + # Pin built-in Maven plugins to avoid checksum variations on Maven updates 29 + ./enforce-plugin-versions.patch 30 + # Avoid building platform-dependent builds which embed their own JREs 31 + ./platform-independent-only.patch 32 + ]; 33 + 34 + nativeBuildInputs = [ 35 + copyDesktopItems 36 + iconConvTools 37 + jdk11 38 + makeWrapper 39 + ]; 40 + 41 + installPhase = '' 42 + runHook preInstall 43 + 44 + mkdir -p $out/bin $out/share/protege 45 + 46 + # Copy the application directory whole into the output, as it is used by the 47 + # launcher script as a reference point to look for default configuration 48 + mv protege-desktop/target/protege-${version}-platform-independent/Protege-${version} $out/Protege 49 + 50 + # Place a wrapper for the launcher script into a default /bin location 51 + makeWrapper $out/Protege/run.sh $out/bin/protege \ 52 + --set JAVA_HOME ${jdk11.home} 53 + 54 + # Link all jars from within the standard /share/protege directory 55 + ln -s -t $out/share/protege $out/Protege/bundles/* 56 + 57 + # Generate and copy icons to where they can be found 58 + icoFileToHiColorTheme $out/Protege/app/Protege.ico protege $out 59 + 60 + runHook postInstall 61 + ''; 62 + 63 + desktopItems = [ 64 + (makeDesktopItem { 65 + name = pname; 66 + desktopName = "Protege Desktop"; 67 + genericName = "Ontology Editor"; 68 + icon = "protege"; 69 + comment = meta.description; 70 + categories = [ "Development" ]; 71 + exec = "protege"; 72 + }) 73 + ]; 74 + 75 + meta = { 76 + homepage = "https://protege.stanford.edu/"; 77 + downloadPage = "https://protege.stanford.edu/software.php#desktop-protege"; 78 + description = "A free and open-source OWL 2 ontology editor"; 79 + longDescription = '' 80 + Protégé Desktop is a feature rich ontology editing environment with full 81 + support for the OWL 2 Web Ontology Language, and direct in-memory 82 + connections to description logic reasoners. 83 + ''; 84 + maintainers = with lib.maintainers; [ nessdoor ]; 85 + license = with lib.licenses; [ bsd2 ]; 86 + # TODO Protege is able to run on Darwin as well, but I (@nessdoor) had no 87 + # way of testing it nor any experience in packaging Darwin apps, so I 88 + # will leave the task to someone who has the right tools and knowledge. 89 + platforms = lib.platforms.unix; 90 + mainProgram = "protege"; 91 + sourceProvenance = with lib.sourceTypes; [ fromSource binaryBytecode ]; 92 + }; 93 + }
+24
pkgs/by-name/pr/protege/platform-independent-only.patch
··· 1 + diff --git a/protege-desktop/pom.xml b/protege-desktop/pom.xml 2 + index 2f599708..60059308 100644 3 + --- a/protege-desktop/pom.xml 4 + +++ b/protege-desktop/pom.xml 5 + @@ -110,9 +110,6 @@ 6 + </archiverConfig> 7 + <descriptors> 8 + <descriptor>src/main/assembly/protege-platform-independent.xml</descriptor> 9 + - <descriptor>src/main/assembly/protege-os-x.xml</descriptor> 10 + - <descriptor>src/main/assembly/protege-win.xml</descriptor> 11 + - <descriptor>src/main/assembly/protege-linux.xml</descriptor> 12 + </descriptors> 13 + </configuration> 14 + </execution> 15 + @@ -165,9 +162,6 @@ 16 + </archiverConfig> 17 + <descriptors> 18 + <descriptor>src/main/assembly/protege-platform-independent.xml</descriptor> 19 + - <descriptor>src/main/assembly/protege-os-x.xml</descriptor> 20 + - <descriptor>src/main/assembly/protege-win.xml</descriptor> 21 + - <descriptor>src/main/assembly/protege-linux.xml</descriptor> 22 + </descriptors> 23 + </configuration> 24 + </execution>