pdm: add test for jupyterlab

This commit is contained in:
DavHau 2024-03-11 21:12:41 +07:00 committed by mergify[bot]
parent deb4c98014
commit 63c9f51a43
6 changed files with 1595 additions and 2 deletions

View File

@ -76,6 +76,7 @@ in {
curl
jq
mkShell
pdm
runCommand
stdenvNoCC
stdenv
@ -102,10 +103,16 @@ in {
(lib.attrValues config.groups.default.packages);
};
public.devShell = let
interpreter = config.deps.python.withPackages (ps: config.mkDerivation.propagatedBuildInputs);
interpreter = config.deps.python.withPackages (
ps:
config.mkDerivation.propagatedBuildInputs
);
in
config.deps.mkShell {
packages = [interpreter];
packages = [
config.deps.pdm
interpreter
];
};
groups = let
groupNames = lib.attrNames groups_with_deps;

View File

@ -0,0 +1,3 @@
__pypackages__
.pdm-build
.pdm-python

View File

@ -0,0 +1,22 @@
{
config,
dream2nix,
lib,
...
}: {
imports = [
dream2nix.modules.dream2nix.WIP-python-pdm
];
# select python 3.10
deps = {nixpkgs, ...}: {
python = nixpkgs.python310;
};
pdm.lockfile = ./pdm.lock;
pdm.pyproject = ./pyproject.toml;
mkDerivation = {
src = ./.;
buildInputs = [
config.deps.python.pkgs.pdm-backend
];
};
}

View File

@ -0,0 +1,33 @@
{
description = "My flake with dream2nix packages";
inputs = {
dream2nix.url = "github:nix-community/dream2nix";
nixpkgs.follows = "dream2nix/nixpkgs";
};
outputs = inputs @ {
self,
dream2nix,
nixpkgs,
...
}: let
system = "x86_64-linux";
in {
# All packages defined in ./packages/<name> are automatically added to the flake outputs
# e.g., 'packages/hello/default.nix' becomes '.#packages.hello'
packages.${system}.default = dream2nix.lib.evalModules {
packageSets.nixpkgs = inputs.dream2nix.inputs.nixpkgs.legacyPackages.${system};
modules = [
./default.nix
{
paths.projectRoot = ./.;
# can be changed to ".git" or "flake.nix" to get rid of .project-root
paths.projectRootFile = "flake.nix";
paths.package = ./.;
}
];
};
devShell.${system} = self.packages.${system}.default.devShell;
};
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@
[project]
name = "my-project"
version = "0.1.0"
description = ""
requires-python = ">=3.10"
license = {text = "MIT"}
dependencies = [
"jupyterlab>=4.1.4",
]
[tool.pdm.options]
add = ["--no-sync", "--no-self"]
update = ["--no-sync", "--no-self"]
remove = ["--no-sync", "--no-self"]