about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/birch/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/birch/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/birch/default.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/birch/default.nix b/nixpkgs/pkgs/development/python-modules/birch/default.nix
new file mode 100644
index 000000000000..3afd6d3df06a
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/birch/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, setuptools
+, strct
+, pytestCheckHook
+, pyyaml
+}:
+
+buildPythonPackage rec {
+  pname = "birch";
+  version = "0.0.35";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "shaypal5";
+    repo = "birch";
+    rev = "v${version}";
+    hash = "sha256-KdQZzQJvJ+logpcLQfaqqEEZJ/9VmNTQX/a4v0oBC98=";
+  };
+
+  postPatch = ''
+    substituteInPlace pytest.ini \
+      --replace  \
+        "--cov" \
+        "#--cov"
+  '';
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    strct
+  ];
+
+  pythonImportsCheck = [
+    "birch"
+    "birch.casters"
+    "birch.exceptions"
+    "birch.paths"
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+    pyyaml
+  ];
+
+  preCheck = ''
+    export HOME="$(mktemp -d)"
+  '';
+
+
+  meta = with lib; {
+    description = "Simple hierarchical configuration for Python packages";
+    homepage = "https://github.com/shaypal5/birch";
+    license = licenses.mit;
+    maintainers = with maintainers; [ pbsds ];
+  };
+}