openmpi: make build reproducible

fix:
* build and configure time stamps
* build and configure user
This commit is contained in:
Markus Kowalewski 2019-04-04 14:51:33 +02:00 committed by Bjørn Forsman
parent c281e68e9f
commit 2e363860c6
1 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,13 @@ in stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
patchShebangs ./ patchShebangs ./
# Ensure build is reproducible
ts=`date -d @$SOURCE_DATE_EPOCH`
sed -i 's/OPAL_CONFIGURE_USER=.*/OPAL_CONFIGURE_USER="nixbld"/' configure
sed -i 's/OPAL_CONFIGURE_HOST=.*/OPAL_CONFIGURE_HOST="localhost"/' configure
sed -i "s/OPAL_CONFIGURE_DATE=.*/OPAL_CONFIGURE_DATE=\"$ts\"/" configure
find -name "Makefile.in" -exec sed -i "s/\`date\`/$ts/" \{} \;
''; '';
buildInputs = with stdenv; [ gfortran zlib ] buildInputs = with stdenv; [ gfortran zlib ]