-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
60 lines (56 loc) · 1.51 KB
/
Copy pathflake.nix
File metadata and controls
60 lines (56 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
description = "Reproducible development shell for x2mdx";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
python = pkgs.python312;
pythonPackages = pkgs.python312Packages;
pythonEnv = python.withPackages (
ps: with ps; [
jinja2
protobuf
pyyaml
pytest
]
);
x2mdx = pythonPackages.buildPythonApplication {
pname = "x2mdx";
version = "0.1.0";
pyproject = true;
src = ./.;
nativeBuildInputs = with pythonPackages; [
setuptools
wheel
];
propagatedBuildInputs = with pythonPackages; [
jinja2
protobuf
pyyaml
];
doCheck = false;
};
in
{
packages.default = x2mdx;
apps.default = flake-utils.lib.mkApp { drv = x2mdx; };
devShells.default = pkgs.mkShell {
packages = [
pkgs.git
pkgs.nodejs_22
pythonEnv
x2mdx
];
shellHook = ''
export PYTHONPATH="$PWD/src''${PYTHONPATH:+:$PYTHONPATH}"
echo "x2mdx dev shell ready: node $(node -v), python $(python --version 2>&1)"
'';
};
}
);
}