Skip to content

Commit

Permalink
Merge pull request NixOS#281300 from fabaff/ad-miner-fix
Browse files Browse the repository at this point in the history
ad-miner: 0.6.0 -> 1.0.0, python311Packages.neo4j: refactor
  • Loading branch information
fabaff authored Jan 17, 2024
2 parents ba49328 + 0838d4b commit 92b0aff
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
8 changes: 6 additions & 2 deletions pkgs/by-name/ad/ad-miner/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@

python3.pkgs.buildPythonApplication rec {
pname = "ad-miner";
version = "0.6.0";
version = "1.0.0";
pyproject = true;

src = fetchFromGitHub {
owner = "Mazars-Tech";
repo = "AD_Miner";
rev = "refs/tags/v${version}";
hash = "sha256-Iwg00vAnCs9FbEAmB54vNDLmxyZeCtZMl/VEFoYeEcM=";
hash = "sha256-HM7PR1i7/L3MuUaTBPcDblflCH40NmEYSCTJUB06Fjg=";
};

# ALl requirements are pinned
pythonRelaxDeps = true;

nativeBuildInputs = with python3.pkgs; [
poetry-core
pythonRelaxDepsHook
];

propagatedBuildInputs = with python3.pkgs; [
Expand Down
31 changes: 30 additions & 1 deletion pkgs/development/python-modules/neo4j/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, pandas
, pyarrow
, pythonOlder
, pytz
, setuptools
, tomlkit
}:

buildPythonPackage rec {
pname = "neo4j";
version = "5.16.0";
format = "setuptools";
pyproject = true;

disabled = pythonOlder "3.7";

Expand All @@ -20,11 +24,36 @@ buildPythonPackage rec {
hash = "sha256-ly/R2ufd5gEkUyfajpeMQblTiKipC9HFtxkWkh16zLo=";
};

postPatch = ''
# The dynamic versioning adds a postfix (.dev0) to the version
substituteInPlace pyproject.toml \
--replace '"tomlkit ~= 0.11.6"' '"tomlkit >= 0.11.6"' \
--replace 'dynamic = ["version", "readme"]' 'dynamic = ["readme"]' \
--replace '#readme = "README.rst"' 'version = "${version}"'
'';

nativeBuildInputs = [
setuptools
];

propagatedBuildInputs = [
pytz
tomlkit
];

passthru.optional-dependencies = {
numpy = [
numpy
];
pandas = [
numpy
pandas
];
pyarrow = [
pyarrow
];
};

# Missing dependencies
doCheck = false;

Expand Down

0 comments on commit 92b0aff

Please sign in to comment.