about summary refs log tree commit diff
path: root/pkgs/development/python2-modules/attrs
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2022-07-28 17:59:55 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2022-08-05 23:22:35 +0200
commit67dece3b2c0639f2c006f0b81d8113dcf6e2bb1e (patch)
tree56249c4af00ee4f626770cc4c512d5bb1de3dc82 /pkgs/development/python2-modules/attrs
parent8e1888fb91c40dc7988584ef4b12ad528faca24a (diff)
python310Packages.attrs: 21.4.0 -> 22.1.0
Diffstat (limited to 'pkgs/development/python2-modules/attrs')
-rw-r--r--pkgs/development/python2-modules/attrs/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/python2-modules/attrs/default.nix b/pkgs/development/python2-modules/attrs/default.nix
new file mode 100644
index 0000000000000..4b10f4203e8ba
--- /dev/null
+++ b/pkgs/development/python2-modules/attrs/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, callPackage
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "attrs";
+  version = "21.4.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-YmuoI0IR25joad92IwoTfExAoS1yRFxF1fW3FvB24v0=";
+  };
+
+  outputs = [
+    "out"
+    "testout"
+  ];
+
+  postInstall = ''
+    # Install tests as the tests output.
+    mkdir $testout
+    cp -R tests $testout/tests
+  '';
+
+  pythonImportsCheck = [
+    "attr"
+  ];
+
+  # pytest depends on attrs, so we can't do this out-of-the-box.
+  # Instead, we do this as a passthru.tests test.
+  doCheck = false;
+
+  passthru.tests = {
+    pytest = callPackage ./tests.nix { };
+  };
+
+  meta = with lib; {
+    description = "Python attributes without boilerplate";
+    homepage = "https://github.com/hynek/attrs";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+  };
+}