From d02070251ba23429ba2514d71f30eebece187b7f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 16 Apr 2026 19:15:46 +0200 Subject: bump vidhar --- overlays/smartprom/default.nix | 43 +++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'overlays/smartprom/default.nix') diff --git a/overlays/smartprom/default.nix b/overlays/smartprom/default.nix index 35e94608..eaeb080d 100644 --- a/overlays/smartprom/default.nix +++ b/overlays/smartprom/default.nix @@ -1,23 +1,28 @@ -{ prev, sources, ... }: +{ prev, final, sources, flakeInputs, ... }: { - smartprom = - with prev.poetry2nix; - mkPoetryApplication { - inherit (sources.smartprom) pname version; - projectDir = cleanPythonSources { - src = prev.runCommand "sources" {} '' - mkdir $out - cp -r ${sources.smartprom.src}/. $out + smartprom = let + project = flakeInputs.pyproject-nix.lib.project.loadRequirementsTxt { + projectRoot = sources.smartprom.src; + }; + python = final.python3; + in python.pkgs.buildPythonApplication { + pname = "smartprom"; + version = "2.3.0"; - mkdir $out/smartprom - mv $out/megaraid.py $out/smartprom - mv $out/smartprom.py $out/smartprom/__main__.py - sed -ri 's/import megaraid/from . import megaraid/' $out/smartprom/__main__.py - echo >> $out/smartprom/__init__.py + src = prev.runCommand "sources" {} '' + mkdir $out + cp -r ${sources.smartprom.src}/. $out - cp ${./pyproject.toml} $out/pyproject.toml - cp ${./poetry.lock} $out/poetry.lock - ''; - }; - }; + mkdir $out/smartprom + mv $out/megaraid.py $out/smartprom + mv $out/smartprom.py $out/smartprom/__main__.py + sed -ri 's/import megaraid/from . import megaraid/' $out/smartprom/__main__.py + echo >> $out/smartprom/__init__.py + + cp ${./pyproject.toml} $out/pyproject.toml + ''; + + pyproject = true; + propagatedBuildInputs = (project.renderers.withPackages { inherit python; }) python.pkgs; + }; } -- cgit v1.2.3