2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
python3Packages,
|
|
|
|
fetchPypi,
|
|
|
|
autoPatchelfHook,
|
2024-06-20 14:57:18 +00:00
|
|
|
zlib,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
platformInfos = {
|
|
|
|
"x86_64-linux" = {
|
|
|
|
platform = "manylinux1_x86_64";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-IJFuMtrddHciuHGeiCuv4hgco9E3GJveegL7dBmVmAw=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
"x86_64-darwin" = {
|
|
|
|
platform = "macosx_10_9_universal2";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-eTD8NnmDTMSB0dt5skPOlWbnW6AexxEkKZ9ABc+kUas=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
platformInfo = platformInfos.${stdenv.system} or (throw "Unsupported platform ${stdenv.system}");
|
|
|
|
in
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "sourcery";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "1.19.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
format = "wheel";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version format;
|
|
|
|
inherit (platformInfo) platform hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
buildInputs = [ zlib ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://sourcery.ai/changelog/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "AI-powered code review and pair programming tool for Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|