Skip to content

Commit 116ca6b

Browse files
committed
gpsd: set rundir deterministically for reproducible builds
1 parent 0c58dc3 commit 116ca6b

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

pkgs/by-name/gp/gpsd/package.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ stdenv.mkDerivation rec {
8484

8585
patches = [
8686
./sconstruct-env-fixes.patch
87+
./sconstrict-rundir-fixes.patch
8788

8889
# fix build with Python 3.12
8990
(fetchpatch {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff -Naur gpsd-3.25.orig/SConscript gpsd-3.25/SConscript
2+
--- gpsd-3.25.orig/SConscript 2025-03-29 13:33:34
3+
+++ gpsd-3.25/SConscript 2025-03-29 13:34:24
4+
@@ -15,6 +15,7 @@
5+
import os
6+
import pickle
7+
import re
8+
+import platform
9+
# replacement for functions from the commands module, which is deprecated.
10+
import subprocess
11+
import sys
12+
@@ -399,7 +400,7 @@
13+
def_group = "dialout"
14+
15+
# darwin and BSDs do not have /run, maybe others.
16+
-if os.path.exists("/run"):
17+
+if "BSD" in os.uname().sysname or platform.system() == "Darwin":
18+
rundir = "/run"
19+
else:
20+
rundir = "/var/run"
21+

0 commit comments

Comments
 (0)