nufmt: modernize; add update script; unstable-2023-09-25 -> 0-unstable-2024-10-15 (#348627)

This commit is contained in:
Pol Dellaiera 2024-10-15 19:17:42 +02:00 committed by GitHub
commit 5c14ab6ee3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 45 additions and 35 deletions

View File

@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
darwin,
llvmPackages,
nix-update-script,
...
}:
rustPlatform.buildRustPackage rec {
pname = "nufmt";
version = "0-unstable-2024-10-15";
src = fetchFromGitHub {
owner = "nushell";
repo = "nufmt";
rev = "37b473be178fd752b5bf421f8b20f48209e9c2ec";
hash = "sha256-BrVWw6oklG70UomKDv5IBvoFIjtpajHKV37fh4fnK3E=";
};
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks;
[
IOKit
]
);
env.LIBCLANG_PATH = lib.optionalString stdenv.cc.isClang "${llvmPackages.libclang.lib}/lib";
cargoHash = "sha256-eKQJanQ9ax5thc2DuO0yIgovor+i5Soylw58I2Y5cHw=";
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";
};
}

View File

@ -1,33 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
darwin,
...
}:
rustPlatform.buildRustPackage rec {
pname = "nufmt";
version = "unstable-2023-09-25";
src = fetchFromGitHub {
owner = "nushell";
repo = "nufmt";
rev = "796ee834c1e31ead4c5479bf2827a4339c5d61d1";
hash = "sha256-BwKLl8eMCrqVt9PA5SHAXxu3ypP2ePcSuljKL+wSkvw=";
};
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
IOKit
]);
cargoHash = "sha256-16Z20opeZpoa7h258um+grL3ktPmY4P0M/tqMTr5hYc=";
meta = with lib; {
description = "Nushell formatter";
homepage = "https://github.com/nushell/nufmt";
license = licenses.mit;
maintainers = with maintainers; [iogamaster];
};
}

View File

@ -38639,8 +38639,6 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
nufmt = callPackage ../development/tools/nufmt { };
bottom = darwin.apple_sdk_11_0.callPackage ../tools/system/bottom { };
cagebreak = callPackage ../applications/window-managers/cagebreak {