1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00
nixpkgs/pkgs/development/web/grails/default.nix

53 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, unzip
2015-01-01 23:39:06 +00:00
# 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
2015-01-01 23:39:06 +00:00
([ coreutils ncurses gnused gnugrep ] ++ stdenv.lib.optional (jdk != null) jdk);
in
stdenv.mkDerivation rec {
pname = "grails";
2020-05-24 21:50:37 +01:00
version = "4.1.0.M1";
src = fetchurl {
2017-08-25 07:25:02 +01:00
url = "https://github.com/grails/grails-core/releases/download/v${version}/grails-${version}.zip";
2020-05-24 21:50:37 +01:00
sha256 = "0l99x3g485qjpdd7ga553xpi1s6rq21p8v16qjzqwdhyld961qsr";
};
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
2015-01-01 23:39:06 +00:00
'' + stdenv.lib.optionalString (jdk != null) ''
# Inject JDK path into grails
2015-01-01 23:39:06 +00:00
sed -i -e '2iJAVA_HOME=${jdk.home}' "$out"/bin/grails
'';
preferLocalBuild = true;
meta = with 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.
'';
2020-04-05 01:36:14 +01:00
homepage = "https://grails.org/";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}