depot/third_party/nixpkgs/pkgs/development/libraries/libxnd/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

48 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
libndtypes,
}:
stdenv.mkDerivation {
pname = "libxnd";
version = "0.2.0-unstable-2023-11-17";
src = fetchFromGitHub {
owner = "xnd-project";
repo = "libxnd";
rev = "e1a06d9f6175f4f4e1da369b7e907ad6b2952c00";
hash = "sha256-RWt2Nx0tfMghQES2SM+0jbAU7IunuuTORhBe2tvqVTY=";
};
buildInputs = [ libndtypes ];
# Override linker with cc (symlink to either gcc or clang)
# Library expects to use cc for linking
configureFlags = [
# Override linker with cc (symlink to either gcc or clang)
# Library expects to use cc for linking
"LD=${stdenv.cc.targetPrefix}cc"
# needed for tests
"--with-includes=${libndtypes}/include"
"--with-libs=${libndtypes}/lib"
];
# other packages which depend on libxnd seem to expect overflow.h, but
# it doesn't seem to be included in the installed headers. for now this
# works, but the generic name of the header could produce problems
# with collisions down the line.
postInstall = ''
cp libxnd/overflow.h $out/include/overflow.h
'';
doCheck = true;
meta = {
description = "C library for managing typed memory blocks and Python container module";
homepage = "https://xnd.io/";
license = lib.licenses.bsdOriginal;
maintainers = with lib.maintainers; [ costrouc ];
};
}