nur-packages

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

package.nix (1143B)


      1 {
      2   lib,
      3   fetchFromGitHub,
      4   python3Packages,
      5   whitebox-tools,
      6 }:
      7 
      8 python3Packages.buildPythonPackage (finalAttrs: {
      9   pname = "whitebox";
     10   version = "2.3.6";
     11   pyproject = true;
     12 
     13   __structuredAttrs = true;
     14 
     15   src = fetchFromGitHub {
     16     owner = "opengeos";
     17     repo = "whitebox-python";
     18     tag = "v${finalAttrs.version}";
     19     hash = "sha256-xft1wbwrPOFd52QEtDyXvMZnYJDm8bSAODLQ9FEOFxQ=";
     20   };
     21 
     22   postPatch = ''
     23     substituteInPlace whitebox/whitebox_tools.py whitebox/download_wbt.py \
     24       --replace-fail 'if os.environ.get("WBT_PATH", None) is not None:' 'if True:'
     25     substituteInPlace whitebox/whitebox_tools.py \
     26       --replace-fail 'self.exe_path = path.dirname(path.abspath(__file__))' \
     27                      'self.exe_path = "${lib.getBin whitebox-tools}/bin"'
     28   '';
     29 
     30   build-system = with python3Packages; [ setuptools ];
     31 
     32   dependencies = with python3Packages; [ click ];
     33 
     34   pythonImportsCheck = [ "whitebox" ];
     35 
     36   meta = {
     37     description = "WhiteboxTools Python Frontend";
     38     homepage = "https://github.com/opengeos/whitebox-python";
     39     license = lib.licenses.mit;
     40     maintainers = [ lib.maintainers.sikmir ];
     41   };
     42 })