nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 37b3a73f3de861a19ef07d5a246985fb8d867f38
parent 35bf98922fb9336824c0fb6cf9641fda94cbca6f
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Wed,  4 Nov 2026 17:48:47 +0400

Add whitebox

Diffstat:
Apkgs/by-name/wh/whitebox/package.nix | 42++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+), 0 deletions(-)

diff --git a/pkgs/by-name/wh/whitebox/package.nix b/pkgs/by-name/wh/whitebox/package.nix @@ -0,0 +1,42 @@ +{ + lib, + fetchFromGitHub, + python3Packages, + whitebox-tools, +}: + +python3Packages.buildPythonPackage (finalAttrs: { + pname = "whitebox"; + version = "2.3.6"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "opengeos"; + repo = "whitebox-python"; + tag = "v${finalAttrs.version}"; + hash = "sha256-xft1wbwrPOFd52QEtDyXvMZnYJDm8bSAODLQ9FEOFxQ="; + }; + + postPatch = '' + substituteInPlace whitebox/whitebox_tools.py whitebox/download_wbt.py \ + --replace-fail 'if os.environ.get("WBT_PATH", None) is not None:' 'if True:' + substituteInPlace whitebox/whitebox_tools.py \ + --replace-fail 'self.exe_path = path.dirname(path.abspath(__file__))' \ + 'self.exe_path = "${lib.getBin whitebox-tools}/bin"' + ''; + + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ click ]; + + pythonImportsCheck = [ "whitebox" ]; + + meta = { + description = "WhiteboxTools Python Frontend"; + homepage = "https://github.com/opengeos/whitebox-python"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.sikmir ]; + }; +})