nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 60 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools, 7 attrs, 8 twisted, 9 autobahn, 10 treq, 11 nixosTests, 12 pytestCheckHook, 13}: 14 15buildPythonPackage (finalAttrs: { 16 pname = "magic-wormhole-mailbox-server"; 17 version = "0.6.0"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "magic-wormhole"; 22 repo = "magic-wormhole-mailbox-server"; 23 tag = finalAttrs.version; 24 hash = "sha256-Ckwkvw4pMEGUTarfzg1GOodHMwM5hVix2bPCZTI6hxU="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ 30 attrs 31 autobahn 32 twisted 33 ] 34 ++ autobahn.optional-dependencies.twisted 35 ++ twisted.optional-dependencies.tls; 36 37 pythonImportsCheck = [ "wormhole_mailbox_server" ]; 38 39 nativeCheckInputs = [ 40 pytestCheckHook 41 treq 42 ]; 43 44 disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ 45 # these tests fail in Darwin's sandbox 46 "src/wormhole_mailbox_server/test/test_web.py" 47 ]; 48 49 passthru.tests = { 50 inherit (nixosTests) magic-wormhole-mailbox-server; 51 }; 52 53 meta = { 54 description = "Securely transfer data between computers"; 55 homepage = "https://github.com/magic-wormhole/magic-wormhole-mailbox-server"; 56 changelog = "https://github.com/magic-wormhole/magic-wormhole-mailbox-server/blob/${finalAttrs.src.rev}/NEWS.md"; 57 license = lib.licenses.mit; 58 maintainers = [ lib.maintainers.mjoerg ]; 59 }; 60})