iosevka: 32.4.0 -> 32.5.0 (#378549)
[NixPkgs.git] / pkgs / development / web / grails / default.nix
blob0e2678281b8e1225bdcab4c2cc946d1932ff7729
2   lib,
3   stdenv,
4   fetchurl,
5   unzip,
6   # If jdk is null, require JAVA_HOME in runtime environment, else store
7   # JAVA_HOME=${jdk.home} into grails.
8   jdk ? null,
9   coreutils,
10   ncurses,
11   gnused,
12   gnugrep, # for purity
15 let
16   binpath = lib.makeBinPath (
17     [
18       coreutils
19       ncurses
20       gnused
21       gnugrep
22     ]
23     ++ lib.optional (jdk != null) jdk
24   );
26 stdenv.mkDerivation rec {
27   pname = "grails";
28   version = "7.0.0-M1";
30   src = fetchurl {
31     url = "https://github.com/grails/grails-core/releases/download/v${version}/grails-${version}.zip";
32     sha256 = "sha256-5ZcYSKdwFTfqomk3AMNSc9icecJt2abhTGz7fDNkyo0=";
33   };
35   nativeBuildInputs = [ unzip ];
37   dontBuild = true;
39   installPhase =
40     ''
41       mkdir -p "$out"
42       cp -vr . "$out"
43       # Remove (for now) uneeded Windows .bat files
44       rm -f "$out"/bin/*.bat
45       # Improve purity
46       sed -i -e '2iPATH=${binpath}:\$PATH' "$out"/bin/grails
47     ''
48     + lib.optionalString (jdk != null) ''
49       # Inject JDK path into grails
50       sed -i -e '2iJAVA_HOME=${jdk.home}' "$out"/bin/grails
51     '';
53   preferLocalBuild = true;
55   meta = with lib; {
56     description = "Full stack, web application framework for the JVM";
57     mainProgram = "grails";
58     longDescription = ''
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
62       experience.
63     '';
64     homepage = "https://grails.org/";
65     license = licenses.asl20;
66     sourceProvenance = with sourceTypes; [ binaryBytecode ];
67     platforms = platforms.linux;
68     maintainers = [ maintainers.bjornfor ];
69   };