Unverified Commit 04c98cf2 authored by Chan Siu Man's avatar Chan Siu Man
Browse files

nickel: 1.10.0 -> 1.11.0

This commit bumps version and fixes tests for nickel 1.11.0.

Nickel depends on `git` for testing, e.g., [init_git](https://github.com/tweag/nickel/blob/1.11.0/package/tests/util.rs#L141-L152).

Without `git`, tests fail with:
```
       > failures:
       >     different_specs_different_ids
       >     fetch_if_spec_changes
       >     no_fetch_if_exact_match
````

Previously at `1.10.0`, `nickel/package.nix` modifies `checkFlags` to
skip git related tests.

This commit fixes `nickel` tests by adding `gitMinimal` to
`nativeBuildInputs` instead.
parent 98b397fb
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
  rustPlatform,
  fetchFromGitHub,
  python3,
  gitMinimal,
  versionCheckHook,
  pkg-config,
  nixVersions,
@@ -13,17 +14,17 @@

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "nickel";
  version = "1.10.0";
  version = "1.11.0";

  src = fetchFromGitHub {
    owner = "tweag";
    repo = "nickel";
    tag = finalAttrs.version;
    hash = "sha256-CnEGC4SnLRfAPl3WTv83xertH2ulG5onseZpq3vxfwc=";
    hash = "sha256-I7cLVrkJhB3aJeE/A3tpFEUj0AkvcONSXD8NtnE5eQ0=";
  };

  useFetchCargoVendor = true;
  cargoHash = "sha256-CyO+W4332fJmeF2CL+9CCdPuion8MrxzkPotLA7my3U=";
  cargoHash = "sha256-DzSfwBVeRT/GAXWyZKZjlDvj95bQzrkqIgZZ2EZw7eQ=";

  cargoBuildFlags = [
    "-p nickel-lang-cli"
@@ -33,6 +34,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
  nativeBuildInputs =
    [
      python3
      gitMinimal
    ]
    ++ lib.optionals enableNixImport [
      pkg-config
@@ -68,13 +70,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
    "--exclude=py-nickel"
  ];

  checkFlags = [
    # https://github.com/tweag/nickel/blob/1.10.0/git/tests/main.rs#L60
    # fails because src is not a git repo
    # `cmd.current_dir(repo.path()).output()` errors with `NotFound`
    "--skip=fetch_targets"
  ];

  postInstall = ''
    mkdir -p $nls/bin
    mv $out/bin/nls $nls/bin/nls