about summary refs log tree commit diff
path: root/pkgs/applications/networking/gopher
diff options
context:
space:
mode:
authorEt7f3 <elie.brami@epita.fr>2022-10-07 02:07:45 +0200
committerEt7f3 <elie.brami@epita.fr>2022-10-07 02:07:45 +0200
commitef86d3bf4488472a4ed53bf065b10906ac46ff14 (patch)
tree92da060bc3b7bdf9929054546aaab4d570fdff33 /pkgs/applications/networking/gopher
parent5d533d4aafa1668442ceb1c2a475b37536647213 (diff)
geomyidae: fix on darwin
Diffstat (limited to 'pkgs/applications/networking/gopher')
-rw-r--r--pkgs/applications/networking/gopher/geomyidae/default.nix2
-rw-r--r--pkgs/applications/networking/gopher/geomyidae/modification-time.patch13
2 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/applications/networking/gopher/geomyidae/default.nix b/pkgs/applications/networking/gopher/geomyidae/default.nix
index 197cdaca00c4d..25f99ac2075c3 100644
--- a/pkgs/applications/networking/gopher/geomyidae/default.nix
+++ b/pkgs/applications/networking/gopher/geomyidae/default.nix
@@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ libressl ];
 
+  patches = lib.optionals stdenv.isDarwin [ ./modification-time.patch ];
+
   makeFlags = [ "PREFIX=${placeholder "out"}" ];
 
   meta = with lib; {
diff --git a/pkgs/applications/networking/gopher/geomyidae/modification-time.patch b/pkgs/applications/networking/gopher/geomyidae/modification-time.patch
new file mode 100644
index 0000000000000..145d2239b3e9d
--- /dev/null
+++ b/pkgs/applications/networking/gopher/geomyidae/modification-time.patch
@@ -0,0 +1,13 @@
+diff --git a/geomyidae-v0.51/handlr.c b/geomyidae-v0.51/handlr.c
+index 0c230d32519..9fc043fa3c9 100644
+--- a/handlr.c
++++ b/handlr.c
+@@ -71,7 +71,7 @@ handledir(int sock, char *path, char *port, char *base, char *args,
+ 					*type->type,
+ 					dirent[i]->d_name,
+ 					humansize(st.st_size),
+-					humantime(&(st.st_mtim.tv_sec)),
++					humantime(&(st.st_mtimespec.tv_sec)),
+ 					e, ohost, port);
+ 			free(file);
+ 			free(dirent[i]);