liquibase: Use finalAttrs for recursive fixpoint (#343106)

This commit is contained in:
h7x4 2024-09-30 22:57:02 +02:00 committed by GitHub
commit 6504312207
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,22 +23,18 @@ let
];
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "liquibase";
version = "4.29.2";
src = fetchurl {
url = "https://github.com/liquibase/liquibase/releases/download/v${version}/${pname}-${version}.tar.gz";
url = "https://github.com/liquibase/liquibase/releases/download/v${finalAttrs.version}/liquibase-${finalAttrs.version}.tar.gz";
hash = "sha256-HQF6IGqVqzB2pS9mBnnC2AufIXSULLBxXjXVOTHiDuk=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
unpackPhase = ''
tar xfz ${src}
'';
installPhase =
let addJars = dir: ''
for jar in ${dir}/*.jar; do
@ -53,12 +49,12 @@ stdenv.mkDerivation rec {
mkdir -p $out/internal/lib
mv ./internal/lib/*.jar $out/internal/lib/
mkdir -p $out/share/doc/${pname}-${version}
mkdir -p $out/share/doc/liquibase-${finalAttrs.version}
mv LICENSE.txt \
README.txt \
ABOUT.txt \
changelog.txt \
$out/share/doc/${pname}-${version}
$out/share/doc/liquibase-${finalAttrs.version}
mkdir -p $out/bin
# theres a lot of escaping, but Im not sure how to improve that
@ -89,10 +85,10 @@ stdenv.mkDerivation rec {
description = "Version Control for your database";
mainProgram = "liquibase";
homepage = "https://www.liquibase.org/";
changelog = "https://raw.githubusercontent.com/liquibase/liquibase/v${version}/changelog.txt";
changelog = "https://raw.githubusercontent.com/liquibase/liquibase/v${finalAttrs.version}/changelog.txt";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
maintainers = with maintainers; [ jsoo1 ];
platforms = with platforms; unix;
};
}
})