mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
bash,
|
|
replaceVars,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
rust-jemalloc-sys,
|
|
}:
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "pyrefly";
|
|
version = "1.1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "facebook";
|
|
repo = "pyrefly";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-GHH+oG3oUEmGNEmtrmra321UIgRD04Eq1Ct0H7VsjxU=";
|
|
};
|
|
|
|
buildAndTestSubdir = "pyrefly";
|
|
|
|
cargoHash = "sha256-vOHcmYVKlsxueWjvCCDWwSfJt+2/71b5+NdQyW3jYH4=";
|
|
|
|
buildInputs = [ rust-jemalloc-sys ];
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
versionCheckProgramArg = "--version";
|
|
doInstallCheck = true;
|
|
|
|
patches = [
|
|
(replaceVars ./fix-shebang.patch { bash = lib.getExe bash; })
|
|
];
|
|
|
|
# redirect tests writing to /tmp
|
|
preCheck = ''
|
|
export TMPDIR=$(mktemp -d)
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Fast type checker and IDE for Python";
|
|
homepage = "https://github.com/facebook/pyrefly";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "pyrefly";
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
maintainers = with lib.maintainers; [
|
|
cybardev
|
|
QuiNzX
|
|
];
|
|
};
|
|
})
|