Skip to content

Commit

Permalink
ci: fix template test
Browse files Browse the repository at this point in the history
  • Loading branch information
anpin committed Dec 2, 2024
1 parent 4d385d4 commit 7423222
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 85 deletions.
11 changes: 11 additions & 0 deletions lib/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ pkgs: let
arrow = prev.arrow.override {
preferWheel = true;
};
pyzmq = prev.pyzmq.overridePythonAttrs (old: {
nativeBuildInputs =
old.nativeBuildInputs
or []
++ [
pkgs.which
];
patchPhase = ''
export PATH="$PATH:${pkgs.cmake}/bin"
'';
});
};
pypkgs-build-requirements = {
pdm = ["pdm-backend"];
Expand Down
60 changes: 59 additions & 1 deletion modules/kernels/python/overrides.nix
Original file line number Diff line number Diff line change
@@ -1 +1,59 @@
final: prev: {}
pkgs: let
pypkgs-build-requirements = {
# pdm = ["pdm-backend"];
};
overlay = pkgs.poetry2nix.defaultPoetryOverrides.extend (final: prev:
(builtins.mapAttrs (
package: build-requirements:
(builtins.getAttr package prev).overridePythonAttrs (old: {
buildInputs =
(old.buildInputs or [])
++ (builtins.map (pkg:
if builtins.isString pkg
then builtins.getAttr pkg prev
else pkg)
build-requirements);
})
)
pypkgs-build-requirements)
// {
scikit-build-core = prev.scikit-build-core.overridePythonAttrs (old: rec {
version = "0.10.7";
src = prev.pkgs.fetchFromGitHub {
owner = "scikit-build";
repo = "scikit-build-core";
rev = "refs/tags/v${version}";
sha256 = "sha256-R6/Y9brIYBA1P3YeG8zGaoPcxWFUDqZlqbZpWu3MIIw=";
};
});
cython = prev.cython.overridePythonAttrs (old: rec {
version = "3.0.11-1";
src = prev.pkgs.fetchFromGitHub {
owner = "cython";
repo = "cython";
rev = "refs/tags/${version}";
sha256 = "sha256-P2k21uNC6X+R6a1dWAIspGnUc6JwAzRXUleVfZG+vqY=";
};
patches = [];
});
pyzmq = prev.pyzmq.overridePythonAttrs (old: {
buildInputs =
(old.buildInputs or [])
++ [
final.scikit-build-core
final.pyproject-metadata
final.pathspec
];
nativeBuildInputs =
old.nativeBuildInputs
or []
++ [
pkgs.which
];

patchPhase = ''
export PATH="$PATH:${pkgs.cmake}/bin"
'';
});
});
in [overlay]
104 changes: 22 additions & 82 deletions modules/kernels/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/kernels/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = ""
authors = []

[tool.poetry.dependencies]
python = "^3.9"
python = "^3.11"

[tool.poetry.dev-dependencies]
ipykernel = "*"
Expand Down
2 changes: 1 addition & 1 deletion modules/types/poetry.nix
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ in {
;

overrides =
if kernelName == "elm"
if kernelName == "elm" || kernelName == "python"
then import config.overrides config.nixpkgs
else if config.withDefaultOverrides == true
then config.nixpkgs.poetry2nix.overrides.withDefaults (import config.overrides)
Expand Down

0 comments on commit 7423222

Please sign in to comment.