leiningen: 2.9.10 -> 2.10.0

This commit is contained in:
Thiago Kenji Okada 2023-01-07 14:05:07 +00:00
parent 980a070e8d
commit 0e94cfb693

View File

@ -3,16 +3,17 @@
stdenv.mkDerivation rec {
pname = "leiningen";
version = "2.9.10";
version = "2.10.0";
src = fetchurl {
url = "https://raw.github.com/technomancy/leiningen/${version}/bin/lein-pkg";
sha256 = "0ckzivinbgg6gw1nss544hy160yixvd3k6pqyyxqanyzsq9lvf6v";
url = "https://codeberg.org/leiningen/leiningen/raw/tag/${version}/bin/lein-pkg";
hash = "sha256-sXV86UHky/Fcv2Sbe09BM2XmEtqJLSKEHsFyg5G7Zq8=";
};
# Check https://codeberg.org/leiningen/leiningen/releases to get the URL for the new version
jarsrc = fetchurl {
url = "https://github.com/technomancy/leiningen/releases/download/${version}/${pname}-${version}-standalone.jar";
sha256 = "1ja9q8lav83h5qhayjgc39f6yyvk1n5f6gfwznn561xm007m6a52";
url = "https://codeberg.org/attachments/43cebda5-a7c2-405b-b641-5143a00051b5";
hash = "sha256-0nKZutNAdawoZNC9BVn4NcbixHbAsKKDvL21dP2tuzQ=";
};
JARNAME = "${pname}-${version}-standalone.jar";
@ -26,12 +27,18 @@ stdenv.mkDerivation rec {
# never be picked up by set-java-classpath.sh
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share
cp -v $src $out/bin/lein
cp -v $jarsrc $out/share/$JARNAME
runHook postInstall
'';
fixupPhase = ''
runHook preFixup
chmod +x $out/bin/lein
patchShebangs $out/bin/lein
substituteInPlace $out/bin/lein \
@ -40,6 +47,8 @@ stdenv.mkDerivation rec {
--prefix PATH ":" "${lib.makeBinPath [ rlwrap coreutils ]}" \
--set LEIN_GPG ${gnupg}/bin/gpg \
--set JAVA_CMD ${jdk}/bin/java
runHook postFixup
'';
meta = {
@ -47,7 +56,7 @@ stdenv.mkDerivation rec {
description = "Project automation for Clojure";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.epl10;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
platforms = jdk.meta.platforms;
maintainers = with lib.maintainers; [ ];
mainProgram = "lein";
};