Unverified Commit 5c14ab6e authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

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

parents 552295bf 36ca2a6c
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
{
  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";
  };
}
+0 −33
Original line number Diff line number Diff line

{
  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];
  };
}
+0 −2
Original line number Diff line number Diff line
@@ -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 {