From 0e1c67be7dbc4cbde9a21f21af6eac5bb2eb1a7d Mon Sep 17 00:00:00 2001 From: Aadi Bajpai Date: Fri, 24 Dec 2021 14:42:02 -0600 Subject: [PATCH 1/4] maintainers: add aadibajpai --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b6d058c59307..4b33d3d10ef3 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -119,6 +119,12 @@ githubId = 241628; name = "Adam Russell"; }; + aadibajpai = { + email = "hello@aadibajpai.com"; + github = "aadibajpai"; + githubId = 27063113; + name = "Aadi Bajpai"; + }; aanderse = { email = "aaron@fosslib.net"; matrix = "@aanderse:nixos.dev"; From 6ba4cef7682f113ec6020b5f5058260348ffca1f Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sat, 25 Dec 2021 11:33:27 +0700 Subject: [PATCH 2/4] python3Packages.pebble: disable tests on darwin --- pkgs/development/python-modules/pebble/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pebble/default.nix b/pkgs/development/python-modules/pebble/default.nix index 68aa1ba97075..daf4a0458670 100644 --- a/pkgs/development/python-modules/pebble/default.nix +++ b/pkgs/development/python-modules/pebble/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, isPy27, fetchPypi, pytestCheckHook }: +{ lib, stdenv, buildPythonPackage, isPy27, fetchPypi, pytestCheckHook }: buildPythonPackage rec { pname = "pebble"; @@ -11,6 +11,8 @@ buildPythonPackage rec { sha256 = "0a595f7mrf89xlck9b2x83bqybc9zd9jxkl0sa5cf19vax18rg8h"; }; + doCheck = !stdenv.isDarwin; + checkInputs = [ pytestCheckHook ]; From 305cfd9872a541d4127a80dc7314aa150aaed76c Mon Sep 17 00:00:00 2001 From: Aadi Bajpai Date: Sat, 25 Dec 2021 00:23:40 -0600 Subject: [PATCH 3/4] python3Packages.pytest-raisin: init at 0.3 --- .../python-modules/pytest-raisin/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-raisin/default.nix diff --git a/pkgs/development/python-modules/pytest-raisin/default.nix b/pkgs/development/python-modules/pytest-raisin/default.nix new file mode 100644 index 000000000000..7412928062d7 --- /dev/null +++ b/pkgs/development/python-modules/pytest-raisin/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flit-core +, pytest +}: + +buildPythonPackage rec { + pname = "pytest-raisin"; + version = "0.3"; + format = "flit"; + + src = fetchFromGitHub { + owner = "wimglenn"; + repo = "pytest-raisin"; + rev = "v${version}"; + sha256 = "73cOrsqlE04m6X3a6VwtRzfi24oqkdO3HjKQH61bU88="; + }; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + pytest + ]; + + # tests cause circular pytest-raisin already registered with pytest error + doCheck = false; + + meta = with lib; { + description = "Plugin enabling the use of exception instances with pytest.raises context"; + homepage = "https://github.com/wimglenn/pytest-raisin"; + license = licenses.mit; + maintainers = with maintainers; [ aadibajpai ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 71230bce63de..4a74a321e772 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7605,6 +7605,8 @@ in { pytest-raisesregexp = callPackage ../development/python-modules/pytest-raisesregexp { }; + pytest-raisin = callPackage ../development/python-modules/pytest-raisin { }; + pytest-randomly = callPackage ../development/python-modules/pytest-randomly { }; pytest-random-order = callPackage ../development/python-modules/pytest-random-order { }; From 3ef3aaf76d94a6a7acf64d586785e4b76372613f Mon Sep 17 00:00:00 2001 From: Aadi Bajpai Date: Fri, 24 Dec 2021 10:47:18 -0600 Subject: [PATCH 4/4] python3Packages.aocd: init at 1.1.1 --- .../python-modules/aocd/default.nix | 58 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/aocd/default.nix diff --git a/pkgs/development/python-modules/aocd/default.nix b/pkgs/development/python-modules/aocd/default.nix new file mode 100644 index 000000000000..ca9768569ee1 --- /dev/null +++ b/pkgs/development/python-modules/aocd/default.nix @@ -0,0 +1,58 @@ +{ lib, stdenv, buildPythonPackage, fetchFromGitHub, requests +, pytestCheckHook, tzlocal, pytest-mock, pytest-freezegun, pytest-raisin +, pytest-socket, requests-mock, pebble, python-dateutil, termcolor +, beautifulsoup4, setuptools +}: + +buildPythonPackage rec { + pname = "aocd"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "wimglenn"; + repo = "advent-of-code-data"; + rev = "v${version}"; + sha256 = "sha256-wdg6XUkjnAc9yAP7DP0UT6SlQHfj/ymhqzIGNM3fco4="; + }; + + propagatedBuildInputs = [ + python-dateutil + requests + termcolor + beautifulsoup4 + pebble + tzlocal + setuptools + ]; + + # Too many failing tests + preCheck = "rm pytest.ini"; + + disabledTests = [ + "test_results" + "test_results_xmas" + "test_run_error" + "test_run_and_autosubmit" + "test_run_and_no_autosubmit" + "test_load_input_from_file" + ]; + + checkInputs = [ + pytestCheckHook + pytest-mock + pytest-freezegun + pytest-raisin + pytest-socket + requests-mock + ]; + + pythonImportsCheck = [ "aocd" ]; + + meta = with lib; { + homepage = "https://github.com/wimglenn/advent-of-code-data"; + description = "Get your Advent of Code data with a single import statement"; + license = licenses.mit; + maintainers = with maintainers; [ aadibajpai ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d03597255424..bfa353d1ff98 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -186,6 +186,8 @@ with pkgs; antsimulator = callPackage ../games/antsimulator { }; + aocd = with pythonPackages; toPythonApplication aocd; + astrolog = callPackage ../applications/science/astronomy/astrolog { }; atkinson-hyperlegible = callPackage ../data/fonts/atkinson-hyperlegible { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4a74a321e772..3a9c8baa060c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -535,6 +535,8 @@ in { inherit (pkgs) graphviz; }; + aocd = callPackage ../development/python-modules/aocd { }; + apache-airflow = callPackage ../development/python-modules/apache-airflow { }; apcaccess = callPackage ../development/python-modules/apcaccess { };