diff options
| author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2023-06-22 18:41:16 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2023-06-23 18:02:15 +0000 |
| commit | 77acc364c4c2c14def881001373bb6c369416b7e (patch) | |
| tree | fc3b4f5bad7bd99c5c3d4e8705c0bba22f4b4e81 | |
| parent | dictdDBs.wordnet: fix reproducibility with faketime (diff) | |
| download | nixpkgs-77acc364c4c2c14def881001373bb6c369416b7e.tar.gz | |
dictDBCollector: fix reproducibility with faketime
(cherry picked from commit 7a1cb0b40e0aa8c2a00702db66dd7273bc1b8028)
| -rw-r--r-- | pkgs/servers/dict/dictd-db-collector.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/servers/dict/dictd-db-collector.nix b/pkgs/servers/dict/dictd-db-collector.nix index a0ad507c4664..793cbf66a46d 100644 --- a/pkgs/servers/dict/dictd-db-collector.nix +++ b/pkgs/servers/dict/dictd-db-collector.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, dict }: +{ stdenv, lib, dict, libfaketime }: ({ dictlist, allowList ? [ "127.0.0.1" ], denyList ? [ ] }: /* @@ -56,7 +56,8 @@ let ln -s "$i".dict.dz else cp "$i".dict . - dictzip "$base".dict + source_date=$(date --utc --date=@$SOURCE_DATE_EPOCH "+%F %T") + faketime -f "$source_date" dictzip "$base".dict fi ln -s "$i".index . dictfmt_index2word --locale $locale < "$base".index > "$base".word || true @@ -76,6 +77,7 @@ in stdenv.mkDerivation { name = "dictd-dbs"; + nativeBuildInputs = [ libfaketime ]; buildInputs = [ dict ]; dontUnpack = true; |
