Merge pull request #244908 from TomaSajt/sourcery

sourcery: init at 1.15.0
This commit is contained in:
superherointj 2024-04-16 19:06:00 -03:00 committed by GitHub
commit fab10c0888
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 94 additions and 0 deletions

View File

@ -3712,6 +3712,8 @@ let
meta.license = lib.licenses.lgpl3Only;
};
sourcery.sourcery = callPackage ./sourcery.sourcery { };
spywhere.guides = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "guides";

View File

@ -0,0 +1,42 @@
{
lib,
stdenv,
vscode-utils,
autoPatchelfHook,
libxcrypt-legacy,
}:
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "sourcery";
publisher = "sourcery";
version = "1.16.0";
hash = "sha256-SHgS2C+ElTJW4v90Wg0QcsSL2FoSz+SxZQpgq2J4JiU=";
};
postPatch = ''
pushd sourcery_binaries/install
rm -r win ${if stdenv.isLinux then "mac" else "linux"}
popd
'';
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = [
stdenv.cc.cc.lib
libxcrypt-legacy
];
meta = {
changelog = "https://sourcery.ai/changelog/";
description = "A VSCode extension for Sourcery, an AI-powered code review and pair programming tool for Python";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=sourcery.sourcery";
homepage = "https://github.com/sourcery-ai/sourcery-vscode";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ tomasajt ];
platforms = [
"x86_64-linux"
"x86_64-darwin"
];
};
}

View File

@ -0,0 +1,50 @@
{
lib,
stdenv,
python3Packages,
fetchPypi,
autoPatchelfHook,
libxcrypt-legacy,
}:
let
platformInfos = {
"x86_64-linux" = {
platform = "manylinux1_x86_64";
hash = "sha256-gr5z8VYkuCqgmcnyA01/Ez6aX9NrKR4MgA0Bc6IHnfs=";
};
"x86_64-darwin" = {
platform = "macosx_10_9_universal2";
hash = "sha256-5LsxeozPgInUC1QAxDSlr8NIfmRSl5BN+g9/ZYAxiRE=";
};
};
platformInfo = platformInfos.${stdenv.system} or (throw "Unsupported platform ${stdenv.system}");
in
python3Packages.buildPythonApplication rec {
pname = "sourcery";
version = "1.16.0";
format = "wheel";
src = fetchPypi {
inherit pname version format;
inherit (platformInfo) platform hash;
};
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = [ libxcrypt-legacy ];
meta = {
changelog = "https://sourcery.ai/changelog/";
description = "An 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"
];
};
}