10 , testing-common-database
13 buildPythonPackage rec {
14 pname = "testing-postgresql";
15 # Version 1.3.0 isn't working so let's use the latest commit from GitHub
16 version = "unstable-2017-10-31";
17 format = "setuptools";
19 disabled = pythonOlder "3.7";
21 src = fetchFromGitHub {
23 repo = "testing.postgresql";
24 rev = "c81ded434d00ec8424de0f9e1f4063c778c6aaa8";
25 hash = "sha256-A4tahAaa98X66ZYa3QxIQDZkwAwVB6ZDRObEhkbUWKs=";
28 propagatedBuildInputs = [
29 testing-common-database
39 # Add PostgreSQL to search path
41 substituteInPlace src/testing/postgresql.py \
42 --replace "/usr/local/pgsql" "${postgresql}"
46 substituteInPlace setup.py \
47 --replace "pg8000 >= 1.10" "pg8000"
50 pythonImportsCheck = [
54 # Fix tests for Darwin build. See:
55 # https://github.com/NixOS/nixpkgs/pull/74716#issuecomment-598546916
56 __darwinAllowLocalNetworking = true;
59 description = "Use temporary postgresql instance in testing";
60 homepage = "https://github.com/tk0miya/testing.postgresql";
61 license = licenses.asl20;
62 platforms = platforms.linux;
63 maintainers = with maintainers; [ jluttine ];