Unverified Commit 2946b531 authored by Austin Horstman's avatar Austin Horstman Committed by GitHub
Browse files

nufmt: 0-unstable-2025-12-29 -> 0-unstable-2026-03-26 (#503731)

parents 45da0b7f 45c295e4
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -7,29 +7,29 @@
}:
rustPlatform.buildRustPackage {
  pname = "nufmt";
  version = "0-unstable-2025-12-29";
  version = "0-unstable-2026-03-26";

  src = fetchFromGitHub {
    owner = "nushell";
    repo = "nufmt";
    rev = "c03e166babe7b77f1a80a7916ab1e8e2437bba06";
    hash = "sha256-VZiRmo9/jxAFCSr2bHrf89qb6o1Obwt2+O3NrIrokZo=";
    rev = "074930a23bc89a5f720a0d46ac2853f3153817c2";
    hash = "sha256-XqiUPAVM6OuyNo9HbBKW+OKQrE7QbSjDRtyfmIYQRxs=";
  };

  nativeBuildInputs = [
    rustPlatform.bindgenHook
  ];

  cargoHash = "sha256-BpKhgF3LUQRL1mNCR5Iq4/Q+eRaOf+JgQCuUfloRhzk=";
  cargoHash = "sha256-heHFiW1/2qV6BJH7Y0ObSV1sPfVaU0m2KLbASdzca8s=";

  # NOTE: Patch follows similar intention upstream https://github.com/nushell/nufmt/commit/35962223fbd4c1a924b4ccfb8c7ad81fe2863b86
  # NOTE: Patch follows similar intention upstream https://github.com/nushell/nufmt/commit/074930a23bc89a5f720a0d46ac2853f3153817c2
  postPatch = ''
    substituteInPlace tests/main.rs --replace-fail \
      'const TEST_BINARY: &str = "target/debug/nufmt";' \
      'const TEST_BINARY: &str = "target/${stdenv.hostPlatform.rust.rustcTarget}/release/nufmt";'
    substituteInPlace tests/ground_truth.rs --replace-fail \
      'const TEST_BINARY: &str = "target/debug/nufmt";' \
      'const TEST_BINARY: &str = "target/${stdenv.hostPlatform.rust.rustcTarget}/release/nufmt";'
      '        let path = PathBuf::from(target_dir).join("debug").join(exe_name);' \
      '        let path = PathBuf::from(target_dir).join("${stdenv.hostPlatform.rust.rustcTarget}/release").join(exe_name);'
    substituteInPlace tests/ground_truth.rs --replace-fail \
      '    let default_path = PathBuf::from("target").join("debug").join(exe_name);' \
      '    let default_path = PathBuf::from("target").join("${stdenv.hostPlatform.rust.rustcTarget}/release").join(exe_name);'
  '';

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