From d6d127668df3dd9c52f4aa07ef6d4755aa45ba5d Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 13 Apr 2022 21:51:50 +0300 Subject: [PATCH] cmdstan: 2.17.1 -> 2.29.2 --- .../development/compilers/cmdstan/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/cmdstan/default.nix b/pkgs/development/compilers/cmdstan/default.nix index a41f836e10c..40fdcb29013 100644 --- a/pkgs/development/compilers/cmdstan/default.nix +++ b/pkgs/development/compilers/cmdstan/default.nix @@ -2,11 +2,12 @@ stdenv.mkDerivation rec { pname = "cmdstan"; - version = "2.17.1"; + version = "2.29.2"; + # includes stanc binaries needed to build cmdstand src = fetchurl { url = "https://github.com/stan-dev/cmdstan/releases/download/v${version}/cmdstan-${version}.tar.gz"; - sha256 = "1vq1cnrkvrvbfl40j6ajc60jdrjcxag1fi6kff5pqmadfdz9564j"; + sha256 = "sha256-VntTH6c//fcGyqF+szROHftB6GmTyvi6QIdf+RAzUVM="; }; buildFlags = [ "build" ]; @@ -14,7 +15,16 @@ stdenv.mkDerivation rec { doCheck = true; checkInputs = [ python3 ]; - checkPhase = "python ./runCmdStanTests.py src/test/interface"; # see #5368 + + postPatch = '' + substituteInPlace stan/lib/stan_math/make/libraries \ + --replace "/usr/bin/env bash" "bash" + patchShebangs . + ''; + + checkPhase = '' + ./runCmdStanTests.py -j$NIX_BUILD_CORES src/test/interface + ''; installPhase = '' mkdir -p $out/opt $out/bin @@ -28,6 +38,9 @@ stdenv.mkDerivation rec { chmod a+x $out/bin/stan ''; + # Hack to ensure that patchelf --shrink-rpath get rids of a $TMPDIR reference. + preFixup = "rm -rf $(pwd)"; + meta = { description = "Command-line interface to Stan"; longDescription = ''