File tree Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 1414 openssl ,
1515 readline ,
1616 runtimeShell ,
17+ versionCheckHook ,
1718} :
1819
1920stdenv . mkDerivation ( finalAttrs : {
2021 pname = "nmh" ;
21- version = "1.7.1 " ;
22+ version = "1.8 " ;
2223 src = fetchFromSavannah {
2324 repo = "nmh" ;
2425 rev = finalAttrs . version ;
25- hash = "sha256-sBftXl4hWs4bKw5weHkif1KIJBpheU/RCePx0WXuv9o =" ;
26+ hash = "sha256-ShAdinvBA7guVBhjqTelBRiUzyo5KqHcawlQS9kXtqs =" ;
2627 } ;
2728
29+ patches = [ ./reproducible-build-date.patch ] ;
30+
2831 postPatch = ''
29- substituteInPlace config/config.c --replace /bin/cat ${ coreutils } /bin/cat
3032 substituteInPlace \
3133 sbr/arglist.c \
3234 uip/mhbuildsbr.c \
3335 uip/whatnowsbr.c \
3436 uip/slocal.c \
35- --replace '"/bin/sh"' '"${ runtimeShell } "'
37+ --replace-fail '"/bin/sh"' '"${ runtimeShell } "'
3638 # the "cleanup" pseudo-test makes diagnosing test failures a pain
3739 ln -s -f ${ stdenv } /bin/true test/cleanup
3840 '' ;
@@ -57,6 +59,13 @@ stdenv.mkDerivation (finalAttrs: {
5759 doCheck = true ;
5860 enableParallelBuilding = true ;
5961
62+ nativeInstallCheckInputs = [
63+ versionCheckHook
64+ ] ;
65+ doInstallCheck = true ;
66+ versionCheckProgram = "${ placeholder "out" } /bin/install-mh" ;
67+ versionCheckProgramArg = "-version" ;
68+
6069 meta = {
6170 description = "New MH Mail Handling System" ;
6271 homepage = "https://nmh.nongnu.org/" ;
Original file line number Diff line number Diff line change 1+ Index: config/version.sh
2+ ===================================================================
3+ --- a/config/version.sh
4+ +++ b/config/version.sh
5+ @@ -11,9 +11,9 @@
6+ git=" `git -C $srcdir describe --long --dirty`"
7+ else
8+ git=
9+ fi
10+ - date="`TZ=GMT0 date +'%Y-%m-%d %T'` +0000"
11+ + date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
12+
13+ cat <<E
14+ char *version_str = "nmh-$version$git built $date on $host";
15+ char *version_num = "nmh-$version";
You can’t perform that action at this time.
0 commit comments