diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 92f1ecef0269..321fe670f142 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5354,6 +5354,11 @@ githubId = 16950437; name = "cwyc"; }; + cybardev = { + name = "Sheikh"; + github = "cybardev"; + githubId = 50134239; + }; cybershadow = { name = "Vladimir Panteleev"; email = "nixpkgs@cy.md"; @@ -20516,6 +20521,11 @@ githubId = 39039420; name = "Quinn Dougherty"; }; + QuiNzX = { + name = "QuiNz-"; + github = "QuiNzX"; + githubId = 76129478; + }; quodlibetor = { email = "quodlibetor@gmail.com"; github = "quodlibetor"; diff --git a/pkgs/by-name/py/pyrefly/package.nix b/pkgs/by-name/py/pyrefly/package.nix new file mode 100644 index 000000000000..2b30b5e125b3 --- /dev/null +++ b/pkgs/by-name/py/pyrefly/package.nix @@ -0,0 +1,51 @@ +{ + lib, + python3, + fetchPypi, + versionCheckHook, + nix-update-script, + rustPlatform, + maturin, +}: +python3.pkgs.buildPythonApplication rec { + pname = "pyrefly"; + version = "0.17.1"; + pyproject = true; + + # fetch from PyPI instead of GitHub, since source repo does not have Cargo.lock + src = fetchPypi { + inherit pname version; + hash = "sha256-w4ivRtmApXiXQT95GI4vvYBop7yxdbbkpW+YTyFtgXM="; + }; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit src; + hash = "sha256-Op5ueVkzZTiJ1zeBGVi8oeLcfSzXMYfk5zEg4OGyA5g="; + }; + + build-system = [ maturin ]; + + nativeBuildInputs = with rustPlatform; [ + cargoSetupHook + maturinBuildHook + ]; + + nativeCheckInputs = [ versionCheckHook ]; + + # requires unstable rust features + env.RUSTC_BOOTSTRAP = 1; + + 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 + ]; + }; +}