mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 03:34:58 +00:00
![stuebinm](/assets/img/avatar_default.png)
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl, jdk, runtimeShell }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "polylith";
|
|
version = "0.2.19";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/polyfy/polylith/releases/download/v${version}/poly-${version}.jar";
|
|
sha256 = "sha256-tJV3kkB7dydnrJ0Es7DoOtCS+TwJG3SMONB2dsyHxx4=";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
passAsFile = [ "polyWrapper" ];
|
|
polyWrapper = ''
|
|
#!${runtimeShell}
|
|
ARGS=""
|
|
while [ "$1" != "" ] ; do
|
|
ARGS="$ARGS $1"
|
|
shift
|
|
done
|
|
exec "${jdk}/bin/java" "-jar" "${src}" $ARGS
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
cp "$polyWrapperPath" $out/bin/poly
|
|
chmod a+x $out/bin/poly
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/poly help | fgrep -q '${version}'
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A tool used to develop Polylith based architectures in Clojure";
|
|
mainProgram = "poly";
|
|
homepage = "https://github.com/polyfy/polylith";
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
license = licenses.epl10;
|
|
maintainers = with maintainers; [ ericdallo jlesquembre ];
|
|
platforms = jdk.meta.platforms;
|
|
};
|
|
}
|