ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / tr / trlib / package.nix
bloba3770293dd026f5e923de620d24026521b9d81a9
2   blas,
3   cmake,
4   fetchFromGitHub,
5   fetchpatch,
6   lib,
7   pythonSupport ? false,
8   python3Packages,
9   stdenv,
12 stdenv.mkDerivation (finalAttrs: {
13   pname = "trlib";
14   version = "0.4";
16   src = fetchFromGitHub {
17     owner = "felixlen";
18     repo = "trlib";
19     rev = finalAttrs.version;
20     hash = "sha256-pD2MGsIQgMO4798Gp9oLprKhmV0lcjgtUHh1rvEjSIY=";
21   };
23   patches = [
24     # update use of distutils
25     # This PR was merged upstream, so the patch can be removed on next release
26     (fetchpatch {
27       name = "python312-support.patch";
28       url = "https://github.com/felixlen/trlib/pull/26/commits/6b72f3b2afebee4ae179bc760f93b16c60fd72d8.patch";
29       hash = "sha256-+6iiALFhMSiE44kpkDrhwrYt4miHlPkiffRZAgsM1Jo=";
30     })
31   ];
33   nativeBuildInputs = [ cmake ];
34   buildInputs =
35     [ blas ]
36     ++ lib.optionals pythonSupport [
37       python3Packages.cython
38       python3Packages.numpy
39     ];
41   cmakeFlags = [ (lib.cmakeBool "TRLIB_BUILD_PYTHON3" pythonSupport) ];
43   meta = {
44     description = "Trust Region Subproblem Solver Library";
45     homepage = "https://github.com/felixlen/trlib";
46     license = lib.licenses.mit;
47     maintainers = with lib.maintainers; [ nim65s ];
48   };