depot/third_party/nixpkgs/pkgs/by-name/so/sourcery/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

50 lines
1.2 KiB
Nix

{
lib,
stdenv,
python3Packages,
fetchPypi,
autoPatchelfHook,
zlib,
}:
let
platformInfos = {
"x86_64-linux" = {
platform = "manylinux1_x86_64";
hash = "sha256-IJFuMtrddHciuHGeiCuv4hgco9E3GJveegL7dBmVmAw=";
};
"x86_64-darwin" = {
platform = "macosx_10_9_universal2";
hash = "sha256-eTD8NnmDTMSB0dt5skPOlWbnW6AexxEkKZ9ABc+kUas=";
};
};
platformInfo = platformInfos.${stdenv.system} or (throw "Unsupported platform ${stdenv.system}");
in
python3Packages.buildPythonApplication rec {
pname = "sourcery";
version = "1.19.0";
format = "wheel";
src = fetchPypi {
inherit pname version format;
inherit (platformInfo) platform hash;
};
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = [ zlib ];
meta = {
changelog = "https://sourcery.ai/changelog/";
description = "AI-powered code review and pair programming tool for Python";
downloadPage = "https://pypi.org/project/sourcery/";
homepage = "https://sourcery.ai";
license = lib.licenses.unfree;
mainProgram = "sourcery";
maintainers = with lib.maintainers; [ tomasajt ];
platforms = [
"x86_64-linux"
"x86_64-darwin"
];
};
}