questdb: use finalAttrs
pattern
This commit is contained in:
parent
8946d2e0b5
commit
63cef72d95
1 changed files with 19 additions and 14 deletions
|
@ -1,18 +1,23 @@
|
||||||
{ fetchurl, jdk17_headless, lib, makeWrapper, stdenv }:
|
{
|
||||||
|
fetchurl,
|
||||||
|
jdk17_headless,
|
||||||
|
lib,
|
||||||
|
makeBinaryWrapper,
|
||||||
|
stdenv
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
jre = jdk17_headless;
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "questdb";
|
pname = "questdb";
|
||||||
version = "7.3";
|
version = "7.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/questdb/questdb/releases/download/${version}/questdb-${version}-no-jre-bin.tar.gz";
|
url = "https://github.com/questdb/questdb/releases/download/${finalAttrs.version}/questdb-${finalAttrs.version}-no-jre-bin.tar.gz";
|
||||||
sha256 = "sha256-teZ9oJ5aUPs0aTUxyK9UmpFRclHZVLEVl0jlWbrbiBs=";
|
hash = "sha256-teZ9oJ5aUPs0aTUxyK9UmpFRclHZVLEVl0jlWbrbiBs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [
|
||||||
|
makeBinaryWrapper
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
@ -22,16 +27,16 @@ stdenv.mkDerivation rec {
|
||||||
cp questdb.jar $out/share/java
|
cp questdb.jar $out/share/java
|
||||||
|
|
||||||
ln -s $out/share/java/questdb.jar $out/bin
|
ln -s $out/share/java/questdb.jar $out/bin
|
||||||
wrapProgram $out/bin/questdb.sh --set JAVA_HOME "${jre}"
|
wrapProgram $out/bin/questdb.sh --set JAVA_HOME "${jdk17_headless}"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "high-performance, open-source SQL database for applications in financial services, IoT, machine learning, DevOps and observability";
|
description = "high-performance, open-source SQL database for applications in financial services, IoT, machine learning, DevOps and observability";
|
||||||
homepage = "https://questdb.io/";
|
homepage = "https://questdb.io/";
|
||||||
license = licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
maintainers = [ maintainers.jacfal ];
|
maintainers = [ lib.maintainers.jacfal ];
|
||||||
platforms = platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue