nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchzip, jdk, makeWrapper, installShellFiles }:
2
3stdenv.mkDerivation rec {
4 pname = "spring-boot";
5 version = "2.1.9";
6
7 src = fetchzip {
8 url = "https://repo.spring.io/release/org/springframework/boot/${pname}-cli/${version}.RELEASE/${pname}-cli-${version}.RELEASE-bin.zip";
9 sha256 = "03iphh5l9w9sizksidkv217qnqx3nh1zpw6kdjnn40j3mlabfb7j";
10 };
11
12 nativeBuildInputs = [ makeWrapper installShellFiles ];
13
14 installPhase = ''
15 runHook preInstall
16 rm bin/spring.bat
17 installShellCompletion --bash shell-completion/bash/spring
18 installShellCompletion --zsh shell-completion/zsh/_spring
19 rm -r shell-completion
20 cp -r . $out
21 wrapProgram $out/bin/spring \
22 --prefix JAVA_HOME : ${jdk}
23 runHook postInstall
24 '';
25
26 meta = with stdenv.lib; {
27 description = ''
28 CLI which makes it easy to create spring-based applications
29 '';
30 longDescription = ''
31 Spring Boot makes it easy to create stand-alone, production-grade
32 Spring-based Applications that you can run. We take an opinionated view
33 of the Spring platform and third-party libraries, so that you can get
34 started with minimum fuss. Most Spring Boot applications need very
35 little Spring configuration.
36
37 You can use Spring Boot to create Java applications that can be started
38 by using java -jar or more traditional war deployments. We also provide
39 a command line tool that runs “spring scripts”.
40 '';
41 homepage = https://spring.io/projects/spring-boot;
42 license = licenses.asl20;
43 platforms = platforms.all;
44 maintainers = with maintainers; [ moaxcp ];
45 };
46}