2024-03-25 13:04:12 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-05-18 12:58:38 +00:00
|
|
|
stdenv,
|
2024-03-25 13:04:12 +00:00
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
2024-10-31 15:09:43 +00:00
|
|
|
apple-sdk_11,
|
2024-10-15 14:06:06 +00:00
|
|
|
llvmPackages,
|
2024-10-14 21:18:12 +00:00
|
|
|
nix-update-script,
|
2024-03-25 13:04:12 +00:00
|
|
|
...
|
|
|
|
}:
|
2024-10-31 15:09:43 +00:00
|
|
|
rustPlatform.buildRustPackage {
|
2024-03-25 13:04:12 +00:00
|
|
|
pname = "nufmt";
|
2024-10-22 14:33:44 +00:00
|
|
|
version = "0-unstable-2024-10-20";
|
2024-03-25 13:04:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nushell";
|
|
|
|
repo = "nufmt";
|
2024-10-22 14:33:44 +00:00
|
|
|
rev = "decc88ef8e11a14081c2dd86c6ea0c94d6d2861d";
|
|
|
|
hash = "sha256-AurQGIZDYOkMMyAEXP01QziISQcSME3GFtvqjCDoeiw=";
|
2024-03-25 13:04:12 +00:00
|
|
|
};
|
|
|
|
|
2024-10-31 15:09:43 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
apple-sdk_11
|
|
|
|
];
|
2024-05-18 12:58:38 +00:00
|
|
|
|
2024-11-07 09:43:39 +00:00
|
|
|
env.LIBCLANG_PATH = lib.optionalString stdenv.cc.isClang "${lib.getLib llvmPackages.libclang}/lib";
|
2024-10-15 14:06:06 +00:00
|
|
|
|
2024-10-22 14:33:44 +00:00
|
|
|
cargoHash = "sha256-5DS6pTYGOQ4qay6+YiUstInRX17n3RViNxKXtFZ6J3k=";
|
2024-10-15 14:06:06 +00:00
|
|
|
|
2024-10-14 21:18:12 +00:00
|
|
|
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
|
2024-03-25 13:04:12 +00:00
|
|
|
|
2024-10-14 17:31:26 +00:00
|
|
|
meta = {
|
2024-03-25 13:04:12 +00:00
|
|
|
description = "Nushell formatter";
|
|
|
|
homepage = "https://github.com/nushell/nufmt";
|
2024-10-14 17:31:26 +00:00
|
|
|
license = lib.licenses.mit;
|
2024-10-15 14:10:36 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
iogamaster
|
|
|
|
khaneliman
|
|
|
|
];
|
2024-10-14 17:30:54 +00:00
|
|
|
mainProgram = "nufmt";
|
2024-03-25 13:04:12 +00:00
|
|
|
};
|
|
|
|
}
|