nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 python3Packages,
5 fetchPypi,
6 autoPatchelfHook,
7 zlib,
8}:
9
10let
11 platformInfos = {
12 "x86_64-linux" = {
13 platform = "manylinux1_x86_64";
14 hash = "sha256-tnRFcgMgHGcWtTGPFZZPkE9IKDfvejLmvvD2iwPbbLY=";
15 };
16 "x86_64-darwin" = {
17 platform = "macosx_10_9_universal2";
18 hash = "sha256-6dbLiFUku0F+UiFV6P6nXpR6dezSntriVJyTfFaIgP0=";
19 };
20 };
21
22 inherit (stdenv.hostPlatform) system;
23 platformInfo = platformInfos.${system} or (throw "Unsupported platform ${system}");
24in
25python3Packages.buildPythonApplication (finalAttrs: {
26 pname = "sourcery";
27 version = "1.37.0";
28 format = "wheel";
29
30 src = fetchPypi {
31 inherit (finalAttrs) pname version;
32 format = "wheel";
33 inherit (platformInfo) platform hash;
34 };
35
36 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
37
38 buildInputs = [ zlib ];
39
40 meta = {
41 changelog = "https://sourcery.ai/changelog/";
42 description = "AI-powered code review and pair programming tool for Python";
43 downloadPage = "https://pypi.org/project/sourcery/";
44 homepage = "https://sourcery.ai";
45 license = lib.licenses.unfree;
46 mainProgram = "sourcery";
47 maintainers = with lib.maintainers; [ tomasajt ];
48 platforms = [
49 "x86_64-linux"
50 "x86_64-darwin"
51 ];
52 };
53})