From a13d17ed81566f4978aea2f93e21f09d280a527f Mon Sep 17 00:00:00 2001 From: lokthare Date: Mon, 6 Jul 2026 15:53:20 +0200 Subject: [PATCH] Change nix formatter (#206) the files were formatted with alejandra. the nix community has set a standard for the format and release a new tool. Reviewed-on: https://codeberg.org/ArkHost/HelixNotes/pulls/206 --- flake.nix | 114 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 60 insertions(+), 54 deletions(-) diff --git a/flake.nix b/flake.nix index 4c5f182..c6b430c 100644 --- a/flake.nix +++ b/flake.nix @@ -6,71 +6,77 @@ flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs {inherit system;}; + outputs = + { + self, + nixpkgs, + flake-utils, + }: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { inherit system; }; - cargoToml = builtins.fromTOML (builtins.readFile ./src-tauri/Cargo.toml); - pname = cargoToml.package.name; - version = cargoToml.package.version; - in { - packages.default = pkgs.rustPlatform.buildRustPackage { - inherit pname version; - src = ./.; - - cargoHash = "sha256-oPShWgL5DjucCmQgqKbIBaxRwqyWnae52+Hj/YVIqbE="; - - pnpmDeps = pkgs.fetchPnpmDeps { + cargoToml = builtins.fromTOML (builtins.readFile ./src-tauri/Cargo.toml); + pname = cargoToml.package.name; + version = cargoToml.package.version; + in + { + packages.default = pkgs.rustPlatform.buildRustPackage { inherit pname version; src = ./.; - fetcherVersion = 3; - hash = "sha256-0TFLZY9zmRFNHPFJEiU2U8zMqSSPkeCl4bhORAbcdZY="; - }; - nativeBuildInputs = with pkgs; [ - cargo-tauri.hook + cargoHash = "sha256-oPShWgL5DjucCmQgqKbIBaxRwqyWnae52+Hj/YVIqbE="; - pnpmConfigHook - pnpm - nodejs + pnpmDeps = pkgs.fetchPnpmDeps { + inherit pname version; + src = ./.; + fetcherVersion = 3; + hash = "sha256-0TFLZY9zmRFNHPFJEiU2U8zMqSSPkeCl4bhORAbcdZY="; + }; - pkg-config - jq - moreutils - wrapGAppsHook3 - ]; + nativeBuildInputs = with pkgs; [ + cargo-tauri.hook - buildInputs = with pkgs; - lib.optionals stdenv.hostPlatform.isLinux [ - webkitgtk_4_1 - libayatana-appindicator + pnpmConfigHook + pnpm + nodejs + + pkg-config + jq + moreutils + wrapGAppsHook3 ]; - cargoRoot = "src-tauri"; - buildAndTestSubdir = self.packages.${system}.default.cargoRoot; + buildInputs = + with pkgs; + lib.optionals stdenv.hostPlatform.isLinux [ + webkitgtk_4_1 + libayatana-appindicator + ]; - # Deactivate the upstream update mechanism - postPatch = '' - jq ' - .bundle.createUpdaterArtifacts = false | - .plugins.updater = {"active": false, "pubkey": "", "endpoints": []} - ' \ - src-tauri/tauri.conf.json | sponge src-tauri/tauri.conf.json - ''; + cargoRoot = "src-tauri"; + buildAndTestSubdir = self.packages.${system}.default.cargoRoot; - meta = with pkgs.lib; { - description = "HelixNotes desktop application"; - homepage = "https://helixnotes.com/"; - license = licenses.agpl3Plus; - platforms = platforms.linux ++ platforms.darwin; - mainProgram = "helixnotes"; + # Deactivate the upstream update mechanism + postPatch = '' + jq ' + .bundle.createUpdaterArtifacts = false | + .plugins.updater = {"active": false, "pubkey": "", "endpoints": []} + ' \ + src-tauri/tauri.conf.json | sponge src-tauri/tauri.conf.json + ''; + + meta = with pkgs.lib; { + description = "HelixNotes desktop application"; + homepage = "https://helixnotes.com/"; + license = licenses.agpl3Plus; + platforms = platforms.linux ++ platforms.darwin; + mainProgram = "helixnotes"; + }; }; - }; - formatter = pkgs.alejandra; - }); + formatter = pkgs.nixfmt; + } + ); }