1 { lib, stdenv, fetchFromGitHub, makeWrapper, jdk, jre }:
4 pname = "remnants-of-the-precursors";
7 src = fetchFromGitHub {
10 rev = "e3726fc22c2c44316306c50c79779e3da1c4c140";
11 sha256 = "sha256-oMA8LRpBoBX7t4G+HuRz0a8g+UEwYO7Ya0Qq4j8AWec=";
14 nativeBuildInputs = [ jdk makeWrapper ];
16 # By default, the game tries to write to the java class path. If that fails
17 # (and it always does, since they are in the read-only nix store), it won't
19 patches = [ ./0001-store-config-and-saves-in-XDG_CONFIG_HOME.patch ];
24 javac -d "$out/share/" -sourcepath src src/rotp/Rotp.java
32 # We need the assets, but don't want the source files.
33 find "src/rotp" -type f -name '*java' -exec rm "{}" \;
34 cp -r src/rotp/* "$out/share/rotp/"
37 makeWrapper ${jre}/bin/java $out/bin/rotp \
38 --add-flags "-cp $out/share rotp.Rotp"
44 description = ''Open-source modernization of the 1993 classic "Master of Orion", written in Java'';
45 homepage = "https://www.remnantsoftheprecursors.com/";
47 # See LICENSE file in source repo for more details.
48 license = with licenses; [
49 # All java files created by Ray Fowler:
52 # All Java files in the src/rotp/apachemath folder:
55 # The /src/rotp/model/planet/PlanetHeightMap.java file:
57 # This file is a Java-rewrite of the "Planet Generator" code (originally in C)
58 # available from the following site:
60 # http://hjemmesider.diku.dk/~torbenm/Planet
62 # That page includes the following statement: "Both the program itself and
63 # maps created by the program are free for use, modification and reproduction,
64 # both privately and for commercial purposes, as long as this does not limit
65 # what other people may do with the program and the images they produce with
69 url = "http://hjemmesider.diku.dk/~torbenm/Planet";
72 # All image files are copyright by Peter Penev.
74 # All sound files are copyright by Remi Agullo.
76 # Various *.txt files that contain a license notice are copyright by Jeff Colucci. This
77 # includes English text and any foreign language translations.
79 # The manual.pdf file is copyright by Tom Chick. This includes any foreign language
80 # translations of the manual contained in this repository
84 maintainers = with maintainers; [ jtrees ];
85 platforms = [ "x86_64-linux" ];