tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
dictdDBs.wiktionary: fix reproducibility with faketime
Bjørn Forsman
2 years ago
fe5f8b9c
03afc9d8
+5
-4
1 changed file
expand all
collapse all
unified
split
pkgs
servers
dict
wiktionary
default.nix
+5
-4
pkgs/servers/dict/wiktionary/default.nix
···
1
1
-
{ lib, stdenv, fetchurl, python3, dict, glibcLocales }:
1
1
+
{ lib, stdenv, fetchurl, python3, dict, glibcLocales, libfaketime }:
2
2
3
3
stdenv.mkDerivation rec {
4
4
pname = "dict-db-wiktionary";
···
9
9
sha256 = "qsha26LL2513SDtriE/0zdPX1zlnpzk1KKk+R9dSdew=";
10
10
};
11
11
12
12
-
nativeBuildInputs = [ python3 dict glibcLocales ];
12
12
+
nativeBuildInputs = [ python3 dict glibcLocales libfaketime ];
13
13
14
14
dontUnpack = true;
15
15
···
17
17
mkdir -p $out/share/dictd/
18
18
cd $out/share/dictd
19
19
20
20
-
${python3.interpreter} -O ${./wiktionary2dict.py} "${src}"
21
21
-
dictzip wiktionary-en.dict
20
20
+
source_date=$(date --utc --date=@$SOURCE_DATE_EPOCH "+%F %T")
21
21
+
faketime -f "$source_date" ${python3.interpreter} -O ${./wiktionary2dict.py} "${src}"
22
22
+
faketime -f "$source_date" dictzip wiktionary-en.dict
22
23
echo en_US.UTF-8 > locale
23
24
'';
24
25