Unverified Commit 652b96d5 authored by h7x4's avatar h7x4 Committed by GitHub
Browse files

atuin-desktop: init at 0.1.3 (#448901)

parents d66bf8d6 a75588c6
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -7164,6 +7164,12 @@
    githubId = 15128988;
    name = "Maksim Dzabraev";
  };
  dzervas = {
    name = "Dimitris Zervas";
    email = "dzervas@dzervas.gr";
    github = "dzervas";
    githubId = 1029195;
  };
  dzmitry-lahoda = {
    email = "dzmitry@lahoda.pro";
    github = "dzmitry-lahoda";
@@ -21460,6 +21466,12 @@
    github = "randomdude16671";
    githubId = 210965013;
  };
  randoneering = {
    name = "randoneering";
    email = "justin@randoneering.tech";
    github = "randoneering";
    githubId = 127273550;
  };
  rane = {
    name = "Rane";
    email = "rane+git@junkyard.systems";
+89 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  rustPlatform,
  wrapGAppsHook4,
  nix-update-script,

  cargo-tauri,
  nodejs,
  pkg-config,
  pnpm,

  glib-networking,
  libappindicator-gtk3,
  openssl,
  webkitgtk_4_1,
}:
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "atuin-desktop";
  version = "0.1.3";

  src = fetchFromGitHub {
    owner = "atuinsh";
    repo = "desktop";
    tag = "v${finalAttrs.version}";
    hash = "sha256-woYWWDJ2JeyghlRh5IKhPfDy4WmcAGlBJgjBPg1hHq8=";
  };

  cargoRoot = "backend";
  buildAndTestSubdir = finalAttrs.cargoRoot;
  cargoHash = "sha256-tyN9gM8U8kOl62Z0N/plcpTOCbOPuT0kkLI/EKLv/mQ=";

  pnpmDeps = pnpm.fetchDeps {
    inherit (finalAttrs) pname version src;
    fetcherVersion = 2;
    hash = "sha256-y+WZF30R/+nvAVr50SWmMN5kfVb1kYiylAd1IBftoVA=";
  };

  nativeBuildInputs = [
    cargo-tauri.hook
    pnpm.configHook

    nodejs
    pkg-config
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook4 ];

  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
    glib-networking
    libappindicator-gtk3
    openssl
    webkitgtk_4_1
  ];

  env = {
    # Used upstream: https://github.com/atuinsh/desktop/blob/2f9a90963c4a6299bf35d8a49b0a2ffb8a28ee32/.envrc.
    NODE_OPTIONS = "--max-old-space-size=5120";
  };

  # Otherwise tauri will look for a private key we don't have.
  tauriConf = builtins.toJSON { bundle.createUpdaterArtifacts = false; };
  passAsFile = [ "tauriConf" ];
  preBuild = ''
    npm rebuild ts-tiny-activerecord
    tauriBuildFlags+=(
      "--config"
      "$tauriConfPath"
    )
  '';

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Local-first, executable runbook editor";
    homepage = "https://atuin.sh";
    downloadPage = "https://github.com/atuinsh/desktop";
    changelog = "https://github.com/atuinsh/desktop/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [
      adda
      dzervas
      randoneering
    ];
    mainProgram = "atuin-desktop";
    platforms = with lib.platforms; windows ++ darwin ++ linux;
    broken = stdenv.hostPlatform.isDarwin;
  };
})