Skip to content

Commit bc28db0

Browse files
authored
fix: version in flake.nix (#30)
1 parent 651e7e2 commit bc28db0

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

flake.nix

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -90,32 +90,35 @@
9090
'';
9191

9292
# Setup for Python package - using simpler buildPythonApplication approach
93-
pythonPackage = pkgs.python311Packages.buildPythonApplication {
94-
pname = "mcp-nixos";
95-
version = "0.5.1"; # Should match the version in pyproject.toml
96-
97-
src = ./.;
98-
99-
format = "pyproject";
100-
101-
nativeBuildInputs = with pkgs.python311Packages; [
102-
hatchling
103-
];
104-
105-
propagatedBuildInputs = with pkgs.python311Packages; [
106-
mcp
107-
requests
108-
python-dotenv
109-
beautifulsoup4
110-
psutil
111-
];
112-
113-
# Disable runtime dependency checks since the available versions in nixpkgs
114-
# may not match exactly what's specified in pyproject.toml
115-
pythonImportsCheck = [];
116-
doCheck = false;
117-
dontCheckRuntimeDeps = true;
118-
};
93+
pythonPackage = let
94+
pyproject = nixpkgs.lib.importTOML ./pyproject.toml;
95+
in
96+
pkgs.python311Packages.buildPythonApplication {
97+
pname = pyproject.project.name;
98+
inherit (pyproject.project) version;
99+
100+
src = ./.;
101+
102+
format = "pyproject";
103+
104+
nativeBuildInputs = with pkgs.python311Packages; [
105+
hatchling
106+
];
107+
108+
propagatedBuildInputs = with pkgs.python311Packages; [
109+
mcp
110+
requests
111+
python-dotenv
112+
beautifulsoup4
113+
psutil
114+
];
115+
116+
# Disable runtime dependency checks since the available versions in nixpkgs
117+
# may not match exactly what's specified in pyproject.toml
118+
pythonImportsCheck = [];
119+
doCheck = false;
120+
dontCheckRuntimeDeps = true;
121+
};
119122

120123
in
121124
{

0 commit comments

Comments
 (0)