nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 58 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch2, 6 replaceVars, 7 cmake, 8 ninja, 9 zlib, 10 mklSupport ? true, 11 mkl, 12}: 13 14stdenv.mkDerivation (finalAttrs: { 15 pname = "FEBio"; 16 version = "4.8"; 17 18 src = fetchFromGitHub { 19 owner = "febiosoftware"; 20 repo = "FEBio"; 21 rev = "v${finalAttrs.version}"; 22 hash = "sha256-x2QYnMMiGd2x2jvBMLBK7zdJv3yzYHkJ6a+0xes6OOk="; 23 }; 24 25 patches = [ 26 # Fix library searching and installation 27 (replaceVars ./fix-cmake.patch { 28 so = stdenv.hostPlatform.extensions.sharedLibrary; 29 }) 30 31 # Fixed missing header include for strcpy 32 # https://github.com/febiosoftware/FEBio/pull/92 33 (fetchpatch2 { 34 url = "https://github.com/febiosoftware/FEBio/commit/ad9e80e2aa8737828855458a703822f578db2fd3.patch?full_index=1"; 35 hash = "sha256-/uLnJB/oAwLQnsZtJnUlaAEpyZVLG6o2riRwwMCH8rI="; 36 }) 37 ]; 38 39 cmakeFlags = lib.optionals mklSupport [ 40 (lib.cmakeBool "USE_MKL" true) 41 (lib.cmakeFeature "MKLROOT" "${mkl}") 42 ]; 43 44 nativeBuildInputs = [ 45 cmake 46 ninja 47 ]; 48 49 buildInputs = [ zlib ] ++ lib.optionals mklSupport [ mkl ]; 50 51 meta = { 52 description = "Software tool for nonlinear finite element analysis in biomechanics and biophysics"; 53 license = with lib.licenses; [ mit ]; 54 homepage = "https://febio.org/"; 55 platforms = lib.platforms.unix; 56 maintainers = with lib.maintainers; [ Scriptkiddi ]; 57 }; 58})