diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-05-12 19:45:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-12 19:45:14 +0200 |
commit | a07fc872d2e0b549899363ae4b23ac3320e6ea22 (patch) | |
tree | d6ff0661796d8ae2d7b38bdad49a9c1839d91084 | |
parent | 6e42ddf7ba389e9774e307dfd3e3f6f7c14b27bc (diff) | |
parent | c6fe69b3c10cfeff52edb517741668abbeee8faf (diff) |
Merge pull request #310927 from lucasew/20240511-fix-backgroundremover
backgroundremover: fix build, add update script, update to 0.2.8
-rw-r--r-- | pkgs/by-name/ba/backgroundremover/package.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/by-name/ba/backgroundremover/package.nix b/pkgs/by-name/ba/backgroundremover/package.nix index e6303bb377b7b..67c2f2eaa6a87 100644 --- a/pkgs/by-name/ba/backgroundremover/package.nix +++ b/pkgs/by-name/ba/backgroundremover/package.nix @@ -3,20 +3,21 @@ , runCommand , fetchFromGitHub , fetchurl +, gitUpdater }: let p = python3.pkgs; self = p.buildPythonApplication rec { pname = "backgroundremover"; - version = "0.2.6"; + version = "0.2.8"; pyproject = true; src = fetchFromGitHub { owner = "nadermx"; repo = "backgroundremover"; rev = "v${version}"; - hash = "sha256-dDOo7NPwvdfV+ae2oMUytCGC+2HF6xUI7dyKk2we23w="; + hash = "sha256-LjVT4j0OzfbVSQgU0z/gzRTLm7N0RQRrfxtTugWwOxs="; }; models = runCommand "background-remover-models" {} '' @@ -31,7 +32,9 @@ let --replace 'os.path.expanduser(os.path.join("~", ".u2net", model_name + ".pth"))' "os.path.join(\"$models\", model_name + \".pth\")" ''; - nativeBuildInputs = [ p.setuptools p.wheel ]; + nativeBuildInputs = [ p.setuptools p.wheel p.pythonRelaxDepsHook ]; + + pythonRelaxDeps = [ "pillow" "torchvision" ]; propagatedBuildInputs = [ p.certifi @@ -76,6 +79,7 @@ let backgroundremover -i ${demoImage} -o $out ''; }; + updateScript = gitUpdater { rev-prefix = "v"; }; }; doCheck = false; # no tests |