mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 14:47:06 +00:00
8660a33046
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 binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 3.3.3 with grep in /nix/store/frwxcwdrb1krnp6pz6cijgnr95wf4qcy-grails-3.3.3 - found 3.3.3 in filename of file in /nix/store/frwxcwdrb1krnp6pz6cijgnr95wf4qcy-grails-3.3.3 - directory tree listing: https://gist.github.com/2469271cf9e5770d815f84baf8ff7bc7
53 lines
1.5 KiB
Nix
53 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.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/grails/grails-core/releases/download/v${version}/grails-${version}.zip";
|
|
sha256 = "087bd1vjpg0wghqbkyldmzma7ziqi7hf745chfr31x8cn5ys0jji";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|