nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 callPackage,
5 fetchFromGitHub,
6 httpx,
7 sanic,
8 setuptools,
9 websockets,
10}:
11
12buildPythonPackage rec {
13 pname = "sanic-testing";
14 version = "24.6.0";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "sanic-org";
19 repo = "sanic-testing";
20 tag = "v${version}";
21 hash = "sha256-biUgxa0sINHAYzyKimVD8+/mPUq2dlnCl2BN+UeUaEo=";
22 };
23
24 outputs = [
25 "out"
26 "testsout"
27 ];
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 httpx
33 sanic
34 websockets
35 ];
36
37 postInstall = ''
38 mkdir $testsout
39 cp -R tests $testsout/tests
40 '';
41
42 # Check in passthru.tests.pytest to escape infinite recursion with sanic
43 doCheck = false;
44
45 doInstallCheck = false;
46
47 passthru.tests = {
48 pytest = callPackage ./tests.nix { };
49 };
50
51 meta = {
52 description = "Core testing clients for the Sanic web framework";
53 homepage = "https://github.com/sanic-org/sanic-testing";
54 changelog = "https://github.com/sanic-org/sanic-testing/releases/tag/v${version}";
55 license = lib.licenses.mit;
56 maintainers = [ ];
57 };
58}