{ prev, final, sources, flakeInputs, ... }: { 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"; src = prev.runCommand "sources" {} '' mkdir $out cp -r ${sources.smartprom.src}/. $out 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; }; }