libxnd: unstable-2019-08-01 -> 0.2.0-unstable-2023-11-17 (#337914)

This commit is contained in:
Peder Bergebakken Sundt
2024-09-08 00:26:52 +02:00
committed by GitHub
2 changed files with 15 additions and 23 deletions
+15 -14
View File
@@ -1,18 +1,19 @@
{ lib
, stdenv
, fetchFromGitHub
, libndtypes
{
lib,
stdenv,
fetchFromGitHub,
libndtypes,
}:
stdenv.mkDerivation {
pname = "libxnd";
version = "unstable-2019-08-01";
version = "0.2.0-unstable-2023-11-17";
src = fetchFromGitHub {
owner = "xnd-project";
repo = "xnd";
rev = "6f305cd40d90b4f3fc2fe51ae144b433d186a6cc";
sha256 = "1n31d64qwlc7m3qkzbafhp0dgrvgvkdx89ykj63kll7r1n3yk59y";
repo = "libxnd";
rev = "e1a06d9f6175f4f4e1da369b7e907ad6b2952c00";
hash = "sha256-RWt2Nx0tfMghQES2SM+0jbAU7IunuuTORhBe2tvqVTY=";
};
buildInputs = [ libndtypes ];
@@ -20,12 +21,12 @@ stdenv.mkDerivation {
# 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"
# 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
@@ -20,15 +20,6 @@ buildPythonPackage {
buildInputs = [ libndtypes ];
patches = [
# python311 fixes which are on main. remove on update
(fetchpatch {
name = "python311.patch";
url = "https://github.com/xnd-project/xnd/commit/e1a06d9f6175f4f4e1da369b7e907ad6b2952c00.patch";
hash = "sha256-xzrap+FL5be13bVdsJ3zeV7t57ZC4iyhuZhuLsOzHyE=";
})
];
postPatch = ''
substituteInPlace setup.py \
--replace 'include_dirs = ["libxnd", "ndtypes/python/ndtypes"] + INCLUDES' \