6 # If jdk is null, require JAVA_HOME in runtime environment, else store
7 # JAVA_HOME=${jdk.home} into grails.
16 binpath = lib.makeBinPath (
23 ++ lib.optional (jdk != null) jdk
26 stdenv.mkDerivation rec {
31 url = "https://github.com/grails/grails-core/releases/download/v${version}/grails-${version}.zip";
32 sha256 = "sha256-5ZcYSKdwFTfqomk3AMNSc9icecJt2abhTGz7fDNkyo0=";
35 nativeBuildInputs = [ unzip ];
43 # Remove (for now) uneeded Windows .bat files
44 rm -f "$out"/bin/*.bat
46 sed -i -e '2iPATH=${binpath}:\$PATH' "$out"/bin/grails
48 + lib.optionalString (jdk != null) ''
49 # Inject JDK path into grails
50 sed -i -e '2iJAVA_HOME=${jdk.home}' "$out"/bin/grails
53 preferLocalBuild = true;
56 description = "Full stack, web application framework for the JVM";
57 mainProgram = "grails";
59 Grails is an Open Source, full stack, web application framework for the
60 JVM. It takes advantage of the Groovy programming language and convention
61 over configuration to provide a productive and stream-lined development
64 homepage = "https://grails.org/";
65 license = licenses.asl20;
66 sourceProvenance = with sourceTypes; [ binaryBytecode ];
67 platforms = platforms.linux;
68 maintainers = [ maintainers.bjornfor ];