Skip to content

Commit b0d4509

Browse files
authored
backgroundremover: 0.2.8 -> 0.2.9 (NixOS#387604)
2 parents 29028bc + 3bd1681 commit b0d4509

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

pkgs/by-name/ba/backgroundremover/package.nix

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@ let
1111
p = python3.pkgs;
1212
self = p.buildPythonApplication rec {
1313
pname = "backgroundremover";
14-
version = "0.2.8";
14+
version = "0.2.9";
1515
pyproject = true;
1616

17+
build-system = [
18+
p.setuptools
19+
];
20+
1721
src = fetchFromGitHub {
1822
owner = "nadermx";
1923
repo = "backgroundremover";
2024
rev = "v${version}";
21-
hash = "sha256-LjVT4j0OzfbVSQgU0z/gzRTLm7N0RQRrfxtTugWwOxs=";
25+
hash = "sha256-tQ8J3xamOzPPSbFMxIDYKv1TzK1AVwF/DWXdZlrlYvM=";
2226
};
2327

2428
models = runCommand "background-remover-models" { } ''
@@ -29,21 +33,21 @@ let
2933
'';
3034

3135
postPatch = ''
36+
rm -rf *dist
3237
substituteInPlace backgroundremover/bg.py backgroundremover/u2net/detect.py \
3338
--replace-fail 'os.path.expanduser(os.path.join("~", ".u2net", model_name + ".pth"))' "os.path.join(\"$models\", model_name + \".pth\")"
34-
'';
3539
36-
nativeBuildInputs = [
37-
p.setuptools
38-
p.wheel
39-
];
40+
substituteInPlace backgroundremover/bg.py \
41+
--replace-fail 'import moviepy.editor' 'import moviepy'
42+
'';
4043

4144
pythonRelaxDeps = [
4245
"pillow"
4346
"torchvision"
47+
"moviepy"
4448
];
4549

46-
propagatedBuildInputs = [
50+
dependencies = [
4751
p.certifi
4852
p.charset-normalizer
4953
p.ffmpeg-python
@@ -95,13 +99,13 @@ let
9599

96100
doCheck = false; # no tests
97101

98-
meta = with lib; {
102+
meta = {
99103
mainProgram = "backgroundremover";
100104
description = "Command line tool to remove background from image and video, made by nadermx to power";
101105
homepage = "https://BackgroundRemoverAI.com";
102106
downloadPage = "https://github.com/nadermx/backgroundremover/releases";
103-
license = licenses.mit;
104-
maintainers = [ maintainers.lucasew ];
107+
license = lib.licenses.mit;
108+
maintainers = [ lib.maintainers.lucasew ];
105109
};
106110
};
107111
in

0 commit comments

Comments
 (0)