biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / by-name / an / antares / package.nix
blobc433cab7ebcc629ee88a39efbd297287b8ab214f
2   fetchFromGitHub,
3   lib,
4   buildNpmPackage,
5   electron,
6   nodejs,
7 }:
9 buildNpmPackage rec {
10   pname = "antares";
11   version = "0.7.28";
13   src = fetchFromGitHub {
14     owner = "antares-sql";
15     repo = "antares";
16     rev = "v${version}";
17     hash = "sha256-nEI1G0A1c+xjALbIcItzh4CFxAeQPOD8h+Bs0aYnEfU=";
18   };
20   npmDepsHash = "sha256-lSkZTa2zt8BeucOih8XjQ7QW/tg34umIRe4a4DDBW34=";
22   patches = [
23     # In version 0.7.28, package-lock is not updated properly so this patch update it to be able to build the package
24     # This patch will probably be removed in the next version
25     ./npm-lock.patch
26   ];
28   buildInputs = [ nodejs ];
30   npmBuildScript = "compile";
32   installPhase = ''
33     runHook preInstall
34     npmInstallHook
35     cp -rf dist/* $out/lib/node_modules/antares
36     find -name "*.ts" | xargs rm -f
37     makeWrapper ${lib.getExe electron} $out/bin/antares \
38       --add-flags $out/lib/node_modules/antares/main.js
39     runHook postInstall
40   '';
42   npmFlags = [ "--legacy-peer-deps" ];
43   env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
44   env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
46   meta = with lib; {
47     description = "Modern, fast and productivity driven SQL client with a focus in UX";
48     homepage = "https://github.com/antares-sql/antares";
49     license = licenses.mit;
50     maintainers = with maintainers; [ eymeric ];
51   };