1 { lib, stdenv, fetchurl, unzip
2 # If jdk is null, require JAVA_HOME in runtime environment, else store
3 # JAVA_HOME=${jdk.home} into grails.
5 , coreutils, ncurses, gnused, gnugrep # for purity
9 binpath = lib.makeBinPath
10 ([ coreutils ncurses gnused gnugrep ] ++ lib.optional (jdk != null) jdk);
12 stdenv.mkDerivation rec {
17 url = "https://github.com/grails/grails-core/releases/download/v${version}/grails-${version}.zip";
18 sha256 = "0l99x3g485qjpdd7ga553xpi1s6rq21p8v16qjzqwdhyld961qsr";
21 nativeBuildInputs = [ unzip ];
28 # Remove (for now) uneeded Windows .bat files
29 rm -f "$out"/bin/*.bat
31 sed -i -e '2iPATH=${binpath}:\$PATH' "$out"/bin/grails
32 '' + lib.optionalString (jdk != null) ''
33 # Inject JDK path into grails
34 sed -i -e '2iJAVA_HOME=${jdk.home}' "$out"/bin/grails
37 preferLocalBuild = true;
40 description = "Full stack, web application framework for the JVM";
42 Grails is an Open Source, full stack, web application framework for the
43 JVM. It takes advantage of the Groovy programming language and convention
44 over configuration to provide a productive and stream-lined development
47 homepage = "https://grails.org/";
48 license = licenses.asl20;
49 platforms = platforms.linux;
50 maintainers = [ maintainers.bjornfor ];