Unverified Commit 758c5b51 authored by Marcus Ramberg's avatar Marcus Ramberg Committed by GitHub
Browse files

antares: 0.7.28 -> 0.7.29 (#349806)

parents 05b9e0a0 4fec5df9
Loading
Loading
Loading
Loading
+20133 −9482

File changed.

Preview size limit exceeded, changes collapsed.

+27 −4
Original line number Diff line number Diff line
@@ -4,29 +4,34 @@
  buildNpmPackage,
  electron,
  nodejs,
  makeDesktopItem,
  copyDesktopItems,
}:

buildNpmPackage rec {
  pname = "antares";
  version = "0.7.28";
  version = "0.7.29";

  src = fetchFromGitHub {
    owner = "antares-sql";
    repo = "antares";
    rev = "v${version}";
    hash = "sha256-nEI1G0A1c+xjALbIcItzh4CFxAeQPOD8h+Bs0aYnEfU=";
    hash = "sha256-3zgr3Eefx3WDUW9/1NOaneUbFy3GTnJ3tGgivtW1K/g=";
  };

  npmDepsHash = "sha256-lSkZTa2zt8BeucOih8XjQ7QW/tg34umIRe4a4DDBW34=";
  npmDepsHash = "sha256-WJ5HVVa4rEOsvr52L/OGk+vlxRiKLJTxWmUnpN1FnbY=";

  patches = [
    # In version 0.7.28, package-lock is not updated properly so this patch update it to be able to build the package
    # Since version 0.7.28, package-lock is not updated properly so this patch update it to be able to build the package
    # This patch will probably be removed in the next version
    # If it does not build without it, you just need to do a npm update in the antares project and copy the patch
    ./npm-lock.patch
  ];

  buildInputs = [ nodejs ];

  nativeBuildInputs = [ copyDesktopItems ];

  npmBuildScript = "compile";

  installPhase = ''
@@ -37,12 +42,30 @@ buildNpmPackage rec {
    makeWrapper ${lib.getExe electron} $out/bin/antares \
      --add-flags $out/lib/node_modules/antares/main.js
    runHook postInstall

    # Install icon files
    mkdir -pv $out/share/icon/
    cp assets/icon.ico $out/share/icon/antares.ico
  '';

  npmFlags = [ "--legacy-peer-deps" ];
  env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
  env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";

  desktopItems = [
    (makeDesktopItem {
      name = pname;
      desktopName = "Antares SQL";
      exec = pname;
      icon = pname;
      terminal = false;
      type = "Application";
      startupWMClass = pname;
      comment = "A modern, fast and productivity driven SQL client with a focus in UX";
      categories = [ "Development" ];
    })
  ];

  meta = with lib; {
    description = "Modern, fast and productivity driven SQL client with a focus in UX";
    homepage = "https://github.com/antares-sql/antares";