mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 06:21:30 +03:00
pdm: add test for jupyterlab
This commit is contained in:
parent
deb4c98014
commit
63c9f51a43
@ -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;
|
||||
|
3
modules/dream2nix/WIP-python-pdm/tests/packages/jupyter-lab/.gitignore
vendored
Normal file
3
modules/dream2nix/WIP-python-pdm/tests/packages/jupyter-lab/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
__pypackages__
|
||||
.pdm-build
|
||||
.pdm-python
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
@ -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;
|
||||
};
|
||||
}
|
1512
modules/dream2nix/WIP-python-pdm/tests/packages/jupyter-lab/pdm.lock
Normal file
1512
modules/dream2nix/WIP-python-pdm/tests/packages/jupyter-lab/pdm.lock
Normal file
File diff suppressed because it is too large
Load Diff
@ -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"]
|
Loading…
Reference in New Issue
Block a user