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
This commit is contained in:
lokthare
2026-07-06 15:53:20 +02:00
committed by ArkHost
parent 95515cac9d
commit a13d17ed81
+60 -54
View File
@@ -6,71 +6,77 @@
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { outputs =
self, {
nixpkgs, self,
flake-utils, nixpkgs,
}: flake-utils,
flake-utils.lib.eachDefaultSystem (system: let }:
pkgs = import nixpkgs {inherit system;}; flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
cargoToml = builtins.fromTOML (builtins.readFile ./src-tauri/Cargo.toml); cargoToml = builtins.fromTOML (builtins.readFile ./src-tauri/Cargo.toml);
pname = cargoToml.package.name; pname = cargoToml.package.name;
version = cargoToml.package.version; version = cargoToml.package.version;
in { in
packages.default = pkgs.rustPlatform.buildRustPackage { {
inherit pname version; packages.default = pkgs.rustPlatform.buildRustPackage {
src = ./.;
cargoHash = "sha256-oPShWgL5DjucCmQgqKbIBaxRwqyWnae52+Hj/YVIqbE=";
pnpmDeps = pkgs.fetchPnpmDeps {
inherit pname version; inherit pname version;
src = ./.; src = ./.;
fetcherVersion = 3;
hash = "sha256-0TFLZY9zmRFNHPFJEiU2U8zMqSSPkeCl4bhORAbcdZY=";
};
nativeBuildInputs = with pkgs; [ cargoHash = "sha256-oPShWgL5DjucCmQgqKbIBaxRwqyWnae52+Hj/YVIqbE=";
cargo-tauri.hook
pnpmConfigHook pnpmDeps = pkgs.fetchPnpmDeps {
pnpm inherit pname version;
nodejs src = ./.;
fetcherVersion = 3;
hash = "sha256-0TFLZY9zmRFNHPFJEiU2U8zMqSSPkeCl4bhORAbcdZY=";
};
pkg-config nativeBuildInputs = with pkgs; [
jq cargo-tauri.hook
moreutils
wrapGAppsHook3
];
buildInputs = with pkgs; pnpmConfigHook
lib.optionals stdenv.hostPlatform.isLinux [ pnpm
webkitgtk_4_1 nodejs
libayatana-appindicator
pkg-config
jq
moreutils
wrapGAppsHook3
]; ];
cargoRoot = "src-tauri"; buildInputs =
buildAndTestSubdir = self.packages.${system}.default.cargoRoot; with pkgs;
lib.optionals stdenv.hostPlatform.isLinux [
webkitgtk_4_1
libayatana-appindicator
];
# Deactivate the upstream update mechanism cargoRoot = "src-tauri";
postPatch = '' buildAndTestSubdir = self.packages.${system}.default.cargoRoot;
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; { # Deactivate the upstream update mechanism
description = "HelixNotes desktop application"; postPatch = ''
homepage = "https://helixnotes.com/"; jq '
license = licenses.agpl3Plus; .bundle.createUpdaterArtifacts = false |
platforms = platforms.linux ++ platforms.darwin; .plugins.updater = {"active": false, "pubkey": "", "endpoints": []}
mainProgram = "helixnotes"; ' \
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;
}); }
);
} }