3
0
Fork 0
forked from mirrors/nixpkgs

dict-dbs: fmt

This commit is contained in:
Felix Buehler 2021-07-25 00:18:13 +02:00
parent ca9212b56c
commit 9b6c409fb4

View file

@ -1,5 +1,6 @@
{ stdenv, lib, dict }: { stdenv, lib, dict }:
({ dictlist, allowList ? [ "127.0.0.1" ], denyList ? [ ] }: ({ dictlist, allowList ? [ "127.0.0.1" ], denyList ? [ ] }:
/* /*
dictlist is a list of form dictlist is a list of form
[ { filename = /path/to/files/basename; [ { filename = /path/to/files/basename;
@ -14,8 +15,10 @@ let
link_arguments = map link_arguments = map
(x: '' "${x.filename}" '') (x: '' "${x.filename}" '')
dictlist; dictlist;
databases = lib.concatStrings (map (x : databases = lib.concatStrings (map
"${x.name} ${x.filename}\n") dictlist); (x:
"${x.name} ${x.filename}\n")
dictlist);
allow = lib.concatStrings (map (x: "allow ${x}\n") allowList); allow = lib.concatStrings (map (x: "allow ${x}\n") allowList);
deny = lib.concatStrings (map (x: "deny ${x}\n") denyList); deny = lib.concatStrings (map (x: "deny ${x}\n") denyList);
accessSection = " accessSection = "