Unverified Commit 3f03580b authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

distant: fix on aarch64-linux, modernize (#386217)

parents 5290d344 74949275
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -6,21 +6,27 @@
  pkg-config,
  openssl,
  zlib,
  writableTmpDirAsHomeHook,
  versionCheckHook,
  nix-update-script,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "distant";
  version = "0.20.0";

  src = fetchFromGitHub {
    owner = "chipsenkbeil";
    repo = "distant";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-DcnleJUAeYg3GSLZljC3gO9ihiFz04dzT/ddMnypr48=";
  };

  # error: linker `aarch64-linux-gnu-gcc` not found
  postPatch = ''
    rm .cargo/config.toml
  '';

  useFetchCargoVendor = true;
  cargoHash = "sha256-HEyPfkusgk8JEYAzIS8Zj5EU0MK4wt4amlsJqBEG/Kc=";

@@ -37,9 +43,9 @@ rustPlatform.buildRustPackage rec {
    OPENSSL_NO_VENDOR = true;
  };

  preCheck = ''
    export HOME=$(mktemp -d)
  '';
  nativeCheckInputs = [
    writableTmpDirAsHomeHook
  ];

  checkFlags =
    [
@@ -72,11 +78,11 @@ rustPlatform.buildRustPackage rec {
  meta = {
    description = "Library and tooling that supports remote filesystem and process operations";
    homepage = "https://github.com/chipsenkbeil/distant";
    changelog = "https://github.com/chipsenkbeil/distant/blob/${version}/CHANGELOG.md";
    changelog = "https://github.com/chipsenkbeil/distant/blob/${finalAttrs.version}/CHANGELOG.md";
    # From the README:
    # "This project is licensed under either of Apache License, Version 2.0, MIT license at your option."
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ GaetanLepage ];
    mainProgram = "distant";
  };
}
})