Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, libndtypes 5}: 6 7stdenv.mkDerivation { 8 pname = "libxnd"; 9 version = "unstable-2019-08-01"; 10 11 src = fetchFromGitHub { 12 owner = "xnd-project"; 13 repo = "xnd"; 14 rev = "6f305cd40d90b4f3fc2fe51ae144b433d186a6cc"; 15 sha256 = "1n31d64qwlc7m3qkzbafhp0dgrvgvkdx89ykj63kll7r1n3yk59y"; 16 }; 17 18 buildInputs = [ libndtypes ]; 19 20 # Override linker with cc (symlink to either gcc or clang) 21 # Library expects to use cc for linking 22 configureFlags = [ 23 # Override linker with cc (symlink to either gcc or clang) 24 # Library expects to use cc for linking 25 "LD=${stdenv.cc.targetPrefix}cc" 26 # needed for tests 27 "--with-includes=${libndtypes}/include" 28 "--with-libs=${libndtypes}/lib" 29 ]; 30 31 # other packages which depend on libxnd seem to expect overflow.h, but 32 # it doesn't seem to be included in the installed headers. for now this 33 # works, but the generic name of the header could produce problems 34 # with collisions down the line. 35 postInstall = '' 36 cp libxnd/overflow.h $out/include/overflow.h 37 ''; 38 39 doCheck = true; 40 41 meta = { 42 description = "C library for managing typed memory blocks and Python container module"; 43 homepage = "https://xnd.io/"; 44 license = lib.licenses.bsdOriginal; 45 maintainers = with lib.maintainers; [ costrouc ]; 46 }; 47}