nixpkgs/pkgs/by-name/sp/spring-boot-cli/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

64 lines
2.2 KiB
Nix

{ lib, stdenv, fetchzip, jdk, makeWrapper, installShellFiles, coreutils, testers, gitUpdater }:
stdenv.mkDerivation (finalAttrs: {
pname = "spring-boot-cli";
version = "3.3.4";
src = fetchzip {
url = "mirror://maven/org/springframework/boot/spring-boot-cli/${finalAttrs.version}/spring-boot-cli-${finalAttrs.version}-bin.zip";
hash = "sha256-7/pYGj3GpdLjrFGq9QnlfHhYMs8DjMbmDloDsQu2BZY=";
};
nativeBuildInputs = [ makeWrapper installShellFiles ];
installPhase = ''
runHook preInstall
rm bin/spring.bat
installShellCompletion --bash shell-completion/bash/spring
installShellCompletion --zsh shell-completion/zsh/_spring
rm -r shell-completion
cp -r . $out
wrapProgram $out/bin/spring \
--set JAVA_HOME ${jdk} \
--set PATH /bin:${coreutils}/bin:${jdk}/bin
runHook postInstall
'';
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "${lib.getExe finalAttrs.finalPackage} --version";
version = "v${finalAttrs.version}";
};
updateScript = gitUpdater {
url = "https://github.com/spring-projects/spring-boot";
ignoredVersions = ".*-(RC|M).*";
rev-prefix = "v";
};
};
meta = with lib; {
description = ''
CLI which makes it easy to create spring-based applications
'';
longDescription = ''
Spring Boot makes it easy to create stand-alone, production-grade
Spring-based Applications that you can run. We take an opinionated view
of the Spring platform and third-party libraries, so that you can get
started with minimum fuss. Most Spring Boot applications need very
little Spring configuration.
You can use Spring Boot to create Java applications that can be started
by using java -jar or more traditional war deployments. We also provide
a command line tool that runs spring scripts.
'';
homepage = "https://spring.io/projects/spring-boot";
changelog = "https://github.com/spring-projects/spring-boot/releases/tag/v${finalAttrs.version}";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
mainProgram = "spring";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ moaxcp ];
};
})