commonsLang: use finalAttrs pattern

This commit is contained in:
Pol Dellaiera 2023-09-02 22:11:56 +02:00
parent bec48d00a8
commit 9c171512d9
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA

View File

@ -1,26 +1,31 @@
{ lib, stdenv, fetchurl }:
{ lib
, stdenv
, fetchurl
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
version = "3.13.0";
pname = "commons-lang";
src = fetchurl {
url = "mirror://apache/commons/lang/binaries/commons-lang3-${version}-bin.tar.gz";
sha256 = "sha256-yDEbe1wqyfxuJe2DK55YnNLKLh7JcsHAgp2OohWBwWU=";
url = "mirror://apache/commons/lang/binaries/commons-lang3-${finalAttrs.version}-bin.tar.gz";
hash = "sha256-yDEbe1wqyfxuJe2DK55YnNLKLh7JcsHAgp2OohWBwWU=";
};
installPhase = ''
tar xf ${src}
runHook preInstall
tar xf ${finalAttrs.src}
mkdir -p $out/share/java
cp *.jar $out/share/java/
runHook postInstall
'';
meta = {
homepage = "https://commons.apache.org/proper/commons-lang";
description = "Provides additional methods to manipulate standard Java library classes";
homepage = "https://commons.apache.org/proper/commons-lang";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ copumpkin ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
platforms = with lib.platforms; unix;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
};
}
})