commit 3856f7ab12eb8d380b49803e1506ca6a13257d0f
parent 634b224064e1049b9a31bd0fd227ec185ecd74d8
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Sun, 22 Nov 2020 19:04:21 +0300
Add thinplatespline
Diffstat:
3 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -880,6 +880,20 @@
"url": "https://github.com/LBeaudoux/tatoebatools/archive/da5613145db5080c89ff5a49d13e9d92c0017b2d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
+ "thinplatespline": {
+ "branch": "master",
+ "builtin": false,
+ "date": "2013-01-23T09:17:04Z",
+ "description": "Python library for thin plate spline calculations",
+ "homepage": "https://github.com/wladich/thinplatespline",
+ "owner": "wladich",
+ "repo": "thinplatespline",
+ "rev": "55fecd22c7160577b925e03169e74bd488a41cf3",
+ "sha256": "0xj00z0glaz4hgijdd47ck3xj4p1hf0n46i48v7ajr6lxlxn4pmp",
+ "type": "tarball",
+ "url": "https://github.com/wladich/thinplatespline/archive/55fecd22c7160577b925e03169e74bd488a41cf3.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
"tilesets-cli": {
"branch": "master",
"builtin": false,
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -127,6 +127,7 @@ lib.makeScope newScope (
pymbtiles = callPackage ./development/python-modules/pymbtiles { };
python-hfst = callPackage ./development/python-modules/python-hfst { };
s2sphere = callPackage ./development/python-modules/s2sphere { };
+ thinplatespline = callPackage ./development/python-modules/thinplatespline { };
### TOOLS
diff --git a/pkgs/development/python-modules/thinplatespline/default.nix b/pkgs/development/python-modules/thinplatespline/default.nix
@@ -0,0 +1,24 @@
+{ lib, python3Packages, sources }:
+
+python3Packages.buildPythonPackage {
+ pname = "thinplatespline";
+ version = lib.substring 0 10 sources.thinplatespline.date;
+
+ src = sources.thinplatespline;
+
+ postPatch = ''
+ 2to3 -n -w tps/*.py
+ substituteInPlace tps/__init__.py --replace "_tps" "._tps"
+ '';
+
+ doCheck = false;
+
+ pythonImportsCheck = [ "tps" ];
+
+ meta = with lib; {
+ inherit (sources.thinplatespline) description homepage;
+ license = licenses.mit;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}