pythonPackages.prox-tv: init at 3.3.0
This commit is contained in:
parent
0acac5cb45
commit
f85aff5a22
50
pkgs/development/python-modules/prox-tv/default.nix
Normal file
50
pkgs/development/python-modules/prox-tv/default.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ lib
|
||||
, blas
|
||||
, buildPythonPackage
|
||||
, cffi
|
||||
, fetchFromGitHub
|
||||
, liblapack
|
||||
, nose
|
||||
, numpy
|
||||
, openblas
|
||||
, useOpenblas ? true
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
pname = "prox-tv";
|
||||
version = "3.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "albarji";
|
||||
repo = "proxTV";
|
||||
rev = "e621585d5aaa7983fbee68583f7deae995d3bafb";
|
||||
sha256 = "0mlrjbb5rw78dgijkr3bspmsskk6jqs9y7xpsgs35i46dvb327q5";
|
||||
};
|
||||
|
||||
patches = lib.optional useOpenblas ./use-openblas.patch;
|
||||
|
||||
checkInputs = [
|
||||
nose
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
cffi
|
||||
];
|
||||
|
||||
buildInputs = (
|
||||
if useOpenblas then
|
||||
[ openblas ]
|
||||
else
|
||||
[ blas liblapack ]
|
||||
);
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = https://github.com/albarji/proxTV;
|
||||
description = "A toolbox for fast Total Variation proximity operators";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ multun ];
|
||||
};
|
||||
}
|
11
pkgs/development/python-modules/prox-tv/use-openblas.patch
Normal file
11
pkgs/development/python-modules/prox-tv/use-openblas.patch
Normal file
@ -0,0 +1,11 @@
|
||||
index f100b35..448bbaf 100644
|
||||
--- a/prox_tv/prox_tv_build.py
|
||||
+++ b/prox_tv/prox_tv_build.py
|
||||
@@ -109,6 +109,6 @@ ffi.set_source(
|
||||
define_macros=[('NOMATLAB', 1)],
|
||||
extra_compile_args=extra_compile_args,
|
||||
extra_link_args=extra_link_args,
|
||||
- libraries=['blas', 'lapack'],
|
||||
+ libraries=['openblas'],
|
||||
include_dirs=['/usr/include']
|
||||
)
|
@ -4529,6 +4529,12 @@ in {
|
||||
|
||||
precis-i18n = callPackage ../development/python-modules/precis-i18n { };
|
||||
|
||||
prox-tv = callPackage ../development/python-modules/prox-tv {
|
||||
# We need to use blas instead of openblas on darwin,
|
||||
# see https://github.com/NixOS/nixpkgs/pull/45013.
|
||||
useOpenblas = ! stdenv.isDarwin;
|
||||
};
|
||||
|
||||
pvlib = callPackage ../development/python-modules/pvlib { };
|
||||
|
||||
pybase64 = callPackage ../development/python-modules/pybase64 { };
|
||||
|
Loading…
Reference in New Issue
Block a user