nixpkgs/pkgs/development/web/grails/default.nix
R. RyanTM ec93a51187 grails: 3.3.5 -> 3.3.6
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/grails/versions.

These checks were done:

- built on NixOS
- Warning: no invocation of /nix/store/sp0w4frknlgjhmw18j8rsj5sgaf95zhm-grails-3.3.6/bin/grails had a zero exit code or showed the expected version
- 0 of 1 passed binary check by having a zero exit code.
- 0 of 1 passed binary check by having the new version present in output.
- found 3.3.6 with grep in /nix/store/sp0w4frknlgjhmw18j8rsj5sgaf95zhm-grails-3.3.6
- directory tree listing: https://gist.github.com/8278e7c1c9d28a8983fdaf23975bb930
- du listing: https://gist.github.com/10a146e1e865583f68e892f13c310026
2018-06-20 11:02:05 +02:00

52 lines
1.5 KiB
Nix

{ stdenv, fetchurl, unzip
# If jdk is null, require JAVA_HOME in runtime environment, else store
# JAVA_HOME=${jdk.home} into grails.
, jdk ? null
, coreutils, ncurses, gnused, gnugrep # for purity
}:
let
binpath = stdenv.lib.makeBinPath
([ coreutils ncurses gnused gnugrep ] ++ stdenv.lib.optional (jdk != null) jdk);
in
stdenv.mkDerivation rec {
name = "grails-${version}";
version = "3.3.6";
src = fetchurl {
url = "https://github.com/grails/grails-core/releases/download/v${version}/grails-${version}.zip";
sha256 = "0q3rbz47lp2zh2794aycf85vnic77dg3sclrqbizfpdijma87iy7";
};
buildInputs = [ unzip ];
dontBuild = true;
installPhase = ''
mkdir -p "$out"
cp -vr . "$out"
# Remove (for now) uneeded Windows .bat files
rm -f "$out"/bin/*.bat
# Improve purity
sed -i -e '2iPATH=${binpath}:\$PATH' "$out"/bin/grails
'' + stdenv.lib.optionalString (jdk != null) ''
# Inject JDK path into grails
sed -i -e '2iJAVA_HOME=${jdk.home}' "$out"/bin/grails
'';
preferLocalBuild = true;
meta = with stdenv.lib; {
description = "Full stack, web application framework for the JVM";
longDescription = ''
Grails is an Open Source, full stack, web application framework for the
JVM. It takes advantage of the Groovy programming language and convention
over configuration to provide a productive and stream-lined development
experience.
'';
homepage = https://grails.org/;
license = licenses.asl20;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}