summaryrefslogtreecommitdiff
path: root/pkgs/by-name/nu/nufmt/package.nix
blob: 33cafd6898651be3f45d753da005342626e6e0ab (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  lib,
  fetchFromGitHub,
  rustPlatform,
  nix-update-script,
}:

rustPlatform.buildRustPackage {
  pname = "nufmt";
  version = "0-unstable-2025-04-09";

  src = fetchFromGitHub {
    owner = "nushell";
    repo = "nufmt";
    rev = "8a29b3a1e3b8009c0c2430d5158ac3ddb7f9e023";
    hash = "sha256-aUaM/haZZOagG8/e4eUFsZJ1bhwAaS7fwNoCFUFYEAg=";
  };

  nativeBuildInputs = [
    rustPlatform.bindgenHook
  ];

  useFetchCargoVendor = true;
  cargoHash = "sha256-zS4g/uMh1eOoPo/RZfanL6afCEU5cnyzHrIqkvuQVrg=";

  passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

  meta = {
    description = "Nushell formatter";
    homepage = "https://github.com/nushell/nufmt";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      iogamaster
      khaneliman
    ];
    mainProgram = "nufmt";
  };
}