Merge pull request #282666 from wegank/ebtks-refactor
ebtks: fix build on darwin, refactor
This commit is contained in:
commit
8007117f79
5 changed files with 25 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper,
|
||||
perlPackages,
|
||||
libminc, EBTKS }:
|
||||
libminc, ebtks }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "N3";
|
||||
|
@ -13,11 +13,16 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "06hci7gzhy8p34ggvx7gah2k9yxpwhgmq1cgw8pcd1r82g4rg6kd";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/VolumeHist/DHistogram.cc \
|
||||
--replace "register " ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper ];
|
||||
buildInputs = [ libminc EBTKS ];
|
||||
buildInputs = [ libminc ebtks ];
|
||||
propagatedBuildInputs = with perlPackages; [ perl MNI-Perllib GetoptTabular ];
|
||||
|
||||
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" "-DEBTKS_DIR=${EBTKS}/lib/" ];
|
||||
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" "-DEBTKS_DIR=${ebtks}/lib/" ];
|
||||
|
||||
postFixup = ''
|
||||
for p in $out/bin/*; do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper,
|
||||
perlPackages,
|
||||
libminc, EBTKS }:
|
||||
libminc, ebtks }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "inormalize";
|
||||
|
@ -15,11 +15,16 @@ stdenv.mkDerivation rec {
|
|||
|
||||
patches = [ ./lgmask-interp.patch ./nu_correct_norm-interp.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace inormalize.cc \
|
||||
--replace "clamp" "::clamp"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper ];
|
||||
buildInputs = [ libminc EBTKS ];
|
||||
buildInputs = [ libminc ebtks ];
|
||||
propagatedBuildInputs = with perlPackages; [ perl GetoptTabular MNI-Perllib ];
|
||||
|
||||
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" "-DEBTKS_DIR=${EBTKS}/lib/" ];
|
||||
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" "-DEBTKS_DIR=${ebtks}/lib/" ];
|
||||
|
||||
postFixup = ''
|
||||
for p in $out/bin/*; do
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, libminc }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "EBTKS";
|
||||
stdenv.mkDerivation {
|
||||
pname = "ebtks";
|
||||
version = "unstable-2017-09-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "BIC-MNI";
|
||||
repo = pname;
|
||||
repo = "EBTKS";
|
||||
rev = "67e4e197d8a32d6462c9bdc7af44d64ebde4fb5c";
|
||||
sha256 = "1a1qw6i47fs1izx60l1ysabpmyx9j5sjnbdv8b47wi2xcc9i3hpq";
|
||||
};
|
||||
|
@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
|
|||
postPatch = ''
|
||||
substituteInPlace templates/EBTKS/SimpleArray.h \
|
||||
--replace "#define FINITE(x) finite(x)" "#define FINITE(x) isfinite(x)"
|
||||
''
|
||||
# error: ISO C++17 does not allow 'register' storage class specifier
|
||||
+ ''
|
||||
find . -type f -exec sed -i -e 's/register //g' {} +
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
@ -23,7 +27,7 @@ stdenv.mkDerivation rec {
|
|||
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/BIC-MNI/${pname}";
|
||||
homepage = "https://github.com/BIC-MNI/EBTKS";
|
||||
description = "Library for working with MINC files";
|
||||
maintainers = with maintainers; [ bcdarwin ];
|
||||
platforms = platforms.unix;
|
|
@ -229,6 +229,7 @@ mapAliases ({
|
|||
|
||||
### E ###
|
||||
|
||||
EBTKS = ebtks; # Added 2024-01-21
|
||||
ec2_ami_tools = ec2-ami-tools; # Added 2021-10-08
|
||||
ec2_api_tools = ec2-api-tools; # Added 2021-10-08
|
||||
ec2-utils = amazon-ec2-utils; # Added 2022-02-01
|
||||
|
|
|
@ -5207,8 +5207,6 @@ with pkgs;
|
|||
|
||||
easyocr = with python3.pkgs; toPythonApplication easyocr;
|
||||
|
||||
EBTKS = callPackage ../development/libraries/science/biology/EBTKS { };
|
||||
|
||||
ecasound = callPackage ../applications/audio/ecasound { };
|
||||
|
||||
edac-utils = callPackage ../os-specific/linux/edac-utils { };
|
||||
|
|
Loading…
Reference in a new issue