nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 48 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 makeWrapper, 6 jre_headless, 7 nixosTests, 8}: 9 10let 11 jre = jre_headless; 12in 13stdenv.mkDerivation (finalAttrs: { 14 pname = "metabase"; 15 version = "0.54.1"; 16 17 src = fetchurl { 18 url = "https://downloads.metabase.com/v${finalAttrs.version}/metabase.jar"; 19 hash = "sha256-gHLugoL3wCvlCzN2fNJtCt+1iSW+kKPzWPpqqHAn/D0="; 20 }; 21 22 nativeBuildInputs = [ makeWrapper ]; 23 24 dontUnpack = true; 25 26 installPhase = '' 27 runHook preInstall 28 makeWrapper ${lib.getExe jre} $out/bin/metabase --add-flags "-jar $src" 29 runHook postInstall 30 ''; 31 32 meta = with lib; { 33 description = "Business Intelligence and Embedded Analytics tool"; 34 homepage = "https://metabase.com"; 35 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 36 license = licenses.agpl3Only; 37 platforms = platforms.all; 38 maintainers = with maintainers; [ 39 schneefux 40 thoughtpolice 41 mmahut 42 ]; 43 mainProgram = "metabase"; 44 }; 45 passthru.tests = { 46 inherit (nixosTests) metabase; 47 }; 48})