Merge pull request #74716 from jluttine/init-testing-common-database-2.0.3

authored by Sandro and committed by GitHub ff7ba7a2 2c0b4eca

+62
+21
pkgs/development/python-modules/testing-common-database/default.nix
··· 1 + { lib, buildPythonPackage, fetchPypi }: 2 + 3 + buildPythonPackage rec { 4 + pname = "testing.common.database"; 5 + version = "2.0.3"; 6 + 7 + src = fetchPypi { 8 + inherit pname version; 9 + sha256 = "0wvdv0frl7xib05sixjv9m6jywaa2wdhdhsqqdfk45akk2r80pcn"; 10 + }; 11 + 12 + # There are no unit tests 13 + doCheck = false; 14 + 15 + meta = with lib; { 16 + description = "utilities for testing.* packages"; 17 + homepage = "https://github.com/tk0miya/testing.common.database"; 18 + license = licenses.asl20; 19 + maintainers = with maintainers; [ jluttine ]; 20 + }; 21 + }
+37
pkgs/development/python-modules/testing-postgresql/default.nix
··· 1 + { lib, buildPythonPackage, fetchFromGitHub, postgresql, testing-common-database 2 + , pg8000, pytestCheckHook, psycopg2, sqlalchemy }: 3 + 4 + buildPythonPackage rec { 5 + pname = "testing.postgresql"; 6 + # Version 1.3.0 isn't working so let's use the latest commit from GitHub 7 + version = "unstable-2017-10-31"; 8 + 9 + src = fetchFromGitHub { 10 + owner = "tk0miya"; 11 + repo = pname; 12 + rev = "c81ded434d00ec8424de0f9e1f4063c778c6aaa8"; 13 + sha256 = "1asqsi38di768i1sc1qm1k068dj0906ds6lnx7xcbxws0s25m2q3"; 14 + }; 15 + 16 + # Add PostgreSQL to search path 17 + prePatch = '' 18 + substituteInPlace src/testing/postgresql.py \ 19 + --replace "/usr/local/pgsql" "${postgresql}" 20 + ''; 21 + 22 + propagatedBuildInputs = [ testing-common-database pg8000 ]; 23 + 24 + # Fix tests for Darwin build. See: 25 + # https://github.com/NixOS/nixpkgs/pull/74716#issuecomment-598546916 26 + __darwinAllowLocalNetworking = true; 27 + 28 + checkInputs = [ pytestCheckHook psycopg2 sqlalchemy ]; 29 + 30 + meta = with lib; { 31 + description = "Use temporary postgresql instance in testing"; 32 + homepage = "https://github.com/tk0miya/testing.postgresql"; 33 + license = licenses.asl20; 34 + platforms = platforms.linux; 35 + maintainers = with maintainers; [ jluttine ]; 36 + }; 37 + }
+4
pkgs/top-level/python-packages.nix
··· 7611 7611 7612 7612 textfsm = callPackage ../development/python-modules/textfsm { }; 7613 7613 7614 + testing-common-database = callPackage ../development/python-modules/testing-common-database { }; 7615 + 7616 + testing-postgresql = callPackage ../development/python-modules/testing-postgresql { }; 7617 + 7614 7618 testpath = callPackage ../development/python-modules/testpath { }; 7615 7619 7616 7620 testrepository = callPackage ../development/python-modules/testrepository { };