about summary refs log tree commit diff
path: root/pkgs/development/tools/database/pyrseas/default.nix
blob: cf93f114e7db58d7d03aeee0f9c72c9c72b00ab5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib, python3Packages, fetchFromGitHub }:

let
  pgdbconn = python3Packages.buildPythonPackage rec {
    pname = "pgdbconn";
    version = "0.8.0";

    src = fetchFromGitHub {
      owner = "perseas";
      repo = "pgdbconn";
      rev = "v${version}";
      sha256 = "09r4idk5kmqi3yig7ip61r6js8blnmac5n4q32cdcbp1rcwzdn6z";
    };

    # The tests are impure (they try to access a PostgreSQL server)
    doCheck = false;

    propagatedBuildInputs = with python3Packages; [ psycopg2 pytest ];
  };
in

python3Packages.buildPythonApplication rec {
  pname = "pyrseas";
  version = "0.9.1";

  src = fetchFromGitHub {
    owner = "perseas";
    repo = "Pyrseas";
    rev = version;
    sha256 = "sha256-+MxnxvbLMxK1Ak+qKpKe3GHbzzC+XHO0eR7rl4ON9H4=";
  };

  propagatedBuildInputs = with python3Packages; [
    psycopg2
    pytest
    pyyaml
    pgdbconn
  ];

  # The tests are impure (they try to access a PostgreSQL server)
  doCheck = false;

  meta = {
    description = "A declarative language to describe PostgreSQL databases";
    homepage = "https://perseas.github.io/";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ pmeunier ];
  };
}