about summary refs log tree commit diff
path: root/pkgs/by-name/mi
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-10-17 15:54:32 +0200
committerGitHub <noreply@github.com>2023-10-17 15:54:32 +0200
commit90ec9bb4d7aef98b511aef1d0f1ae39c269c9e7d (patch)
tree02974eac8e8c68e9611c517d1e487b1cc4e387c2 /pkgs/by-name/mi
parent9fe4ef2f252b32c069bffef86ddae4262380954a (diff)
parent1f691cc04b9bfe6c43a602ee4c719e739446080c (diff)
Merge pull request #253004 from soispha/master
migra: init at 3.0.1647431138
Diffstat (limited to 'pkgs/by-name/mi')
-rw-r--r--pkgs/by-name/mi/migra/package.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/by-name/mi/migra/package.nix b/pkgs/by-name/mi/migra/package.nix
new file mode 100644
index 0000000000000..8fd3ef6332edc
--- /dev/null
+++ b/pkgs/by-name/mi/migra/package.nix
@@ -0,0 +1,59 @@
+{ lib
+, python3
+, fetchFromGitHub
+, postgresql
+, postgresqlTestHook
+,
+}:
+python3.pkgs.buildPythonApplication rec {
+  pname = "migra";
+  version = "3.0.1647431138";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "djrobstep";
+    repo = pname;
+    rev = version;
+    hash = "sha256-LSCJA5Ym1LuV3EZl6gnl9jTHGc8A1LXmR1fj0ZZc+po=";
+  };
+
+  nativeBuildInputs = [
+    python3.pkgs.poetry-core
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    schemainspect
+    six
+    sqlbag
+  ];
+
+  nativeCheckInputs = with python3.pkgs; [
+    pytestCheckHook
+    postgresql
+    postgresqlTestHook
+  ];
+  preCheck = ''
+    export PGUSER="nixbld";
+  '';
+  disabledTests = [
+    # These all fail with "List argument must consist only of tuples or dictionaries":
+    # See this issue: https://github.com/djrobstep/migra/issues/232
+    "test_excludeschema"
+    "test_fixtures"
+    "test_rls"
+    "test_singleschema"
+  ];
+
+  pytestFlagsArray = [
+    "-x"
+    "-svv"
+    "tests"
+  ];
+
+  meta = with lib; {
+    description = "Like diff but for PostgreSQL schemas";
+    homepage = "https://github.com/djrobstep/migra";
+    license = with licenses; [ unlicense ];
+    maintainers = with maintainers; [ soispha ];
+  };
+}