File tree Expand file tree Collapse file tree 1 file changed +29
-26
lines changed Expand file tree Collapse file tree 1 file changed +29
-26
lines changed Original file line number Diff line number Diff line change 90
90
'' ;
91
91
92
92
# 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
+ } ;
119
122
120
123
in
121
124
{
You can’t perform that action at this time.
0 commit comments