diff --git a/pkgs/by-name/di/distant/package.nix b/pkgs/by-name/di/distant/package.nix index b6e1d8452b0f..23a9a02d7863 100644 --- a/pkgs/by-name/di/distant/package.nix +++ b/pkgs/by-name/di/distant/package.nix @@ -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"; }; -} +})