2018-08-11 21:01:45 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libndtypes
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libxnd-${version}";
|
2018-11-27 21:53:46 +00:00
|
|
|
version = "unstable-2018-11-27";
|
2018-08-11 21:01:45 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "plures";
|
|
|
|
repo = "xnd";
|
2018-11-27 21:53:46 +00:00
|
|
|
rev = "8a9f3bd1d01d872828b40bc9dbd0bc0184524da3";
|
|
|
|
sha256 = "10jh2kqvhpzwy50adayh9az7z2lm16yxy4flrh99alzzbqdyls44";
|
2018-08-11 21:01:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libndtypes ];
|
|
|
|
|
2018-09-12 20:03:02 +01:00
|
|
|
# Override linker with cc (symlink to either gcc or clang)
|
|
|
|
# Library expects to use cc for linking
|
2018-11-27 21:53:46 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2018-08-11 21:01:45 +01:00
|
|
|
|
|
|
|
meta = {
|
2018-11-27 21:53:46 +00:00
|
|
|
description = "C library for managing typed memory blocks and Python container module";
|
2018-08-11 21:01:45 +01:00
|
|
|
homepage = https://xnd.io/;
|
|
|
|
license = lib.licenses.bsdOriginal;
|
|
|
|
maintainers = with lib.maintainers; [ costrouc ];
|
|
|
|
};
|
|
|
|
}
|