Skip to content

nix fmt broken #301

@makuru-org

Description

@makuru-org

nix fmt doesnt do anything and freezes, when used as a flake input, tested with multiple flakes.

Example flake:

{
  inputs = {
    naersk.url = "github:nix-community/naersk/master";
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    utils.url = "github:numtide/flake-utils";
  };

  outputs =
    {
      self,
      nixpkgs,
      utils,
      naersk,
    }:
    utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = import nixpkgs { inherit system; };
        naersk-lib = pkgs.callPackage naersk { };
      in
      {
        formatter = pkgs.nixfmt-tree;
        defaultPackage = naersk-lib.buildPackage {
          src = ./.;
          verston = "0.1.0";
          nativeBuildInputs = with pkgs; [
            which
            cmake
            kdePackages.wrapQtAppsHook
            kdePackages.qttools
          ];
          buildInputs = with pkgs; [ kdePackages.qtbase ];
        };
        devShell =
          with pkgs;
          mkShell {
            buildInputs = [
              cargo
              rustc
              rustfmt
              pre-commit
              rustPackages.clippy
              cmake
              kdePackages.full
            ];
            RUST_SRC_PATH = rustPlatform.rustLibSrc;
          };
      }
    );
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions