Skip to content

Commit

Permalink
cppcolormap: init at 1.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneSerge committed Apr 12, 2023
1 parent 9350053 commit b0274d7
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
2 changes: 2 additions & 0 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ in

callPackage = final.lib.callPackageWith (final // final.some-pkgs);

cppcolormap = final.callPackage ./pkgs/cppcolormap.nix { };

alpaca-cpp = final.callPackage ./pkgs/alpaca-cpp.nix { };
llama-cpp = final.some-pkgs.callPackage ./pkgs/llama.cpp { };

Expand Down
59 changes: 59 additions & 0 deletions pkgs/cppcolormap.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, xtensor
, enablePython ? false
, python3Packages
, catch2_3
}:

stdenv.mkDerivation rec {
pname = "cppcolormap";
version = "1.4.4";

src = fetchFromGitHub {
owner = "tdegeus";
repo = pname;
rev = "v${version}";
hash = "sha256-YVVWeR7K1t3uOzCFes2zu+c0I1Tb1S1wh/Rmzi60Dp0=";
};

nativeBuildInputs = [
cmake
] ++ lib.optionals enablePython [
python3Packages.python
];

buildInputs = [
xtensor
catch2_3
] ++ lib.optionals enablePython [
python3Packages.pybind11
];

propagatedBuildInputs = with python3Packages; lib.optionals enablePython [
numpy
(xtensor-python.overridePythonAttrs (_: {
format = "other";
}))
];

cmakeFlags = [
"-DBUILD_TESTS=ON"
] ++ lib.optionals enablePython [
"-DBUILD_PYTHON=ON"
];

doCheck = true;

SETUPTOOLS_SCM_PRETEND_VERSION = version;

meta = with lib; {
description = "Library with colormaps for C++";
homepage = "https://github.com/tdegeus/cppcolormap";
platforms = lib.platforms.unix;
license = licenses.gpl3Only;
maintainers = with maintainers; [ ];
};
}
5 changes: 5 additions & 0 deletions python-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@

albumentations = python-final.callPackage ./pkgs/albumentations { };

cppcolormap = python-final.toPythonModule (pkgs.some-pkgs.cppcolormap.override {
enablePython = true;
});

cppimport = python-final.callPackage ./pkgs/cppimport.nix { };


faiss = python-final.toPythonModule (pkgs.faiss.override {
pythonSupport = true;
pythonPackages = python-final;
Expand Down

0 comments on commit b0274d7

Please sign in to comment.