lol
1{ lib, stdenv, fetchurl, makeWrapper, jdk11, nixosTests }:
2
3stdenv.mkDerivation rec {
4 pname = "metabase";
5 version = "0.49.11";
6
7 src = fetchurl {
8 url = "https://downloads.metabase.com/v${version}/metabase.jar";
9 hash = "sha256-sLQdIjj2bB4Kebwn2fi6mwz2zym/Sv5l42dWAz5DrAg=";
10 };
11
12 nativeBuildInputs = [ makeWrapper ];
13
14 dontUnpack = true;
15
16 installPhase = ''
17 runHook preInstall
18 makeWrapper ${jdk11}/bin/java $out/bin/metabase --add-flags "-jar $src"
19 runHook postInstall
20 '';
21
22 meta = with lib; {
23 description = "The easy, open source way for everyone in your company to ask questions and learn from data";
24 homepage = "https://metabase.com";
25 sourceProvenance = with sourceTypes; [ binaryBytecode ];
26 license = licenses.agpl3Only;
27 platforms = platforms.all;
28 maintainers = with maintainers; [ schneefux thoughtpolice mmahut ];
29 mainProgram = "metabase";
30 };
31 passthru.tests = {
32 inherit (nixosTests) metabase;
33 };
34}