···46 - `postgresqlEnableTCP`: set to `1` to enable TCP listening. Flaky; not recommended.
47 - `postgresqlStartCommands`: defaults to `pg_ctl start`.
4800000049## TCP and the Nix sandbox {#sec-postgresqlTestHook-tcp}
5051`postgresqlEnableTCP` relies on network sandboxing, which is not available on macOS and some custom Nix installations, resulting in flaky tests.
···46 - `postgresqlEnableTCP`: set to `1` to enable TCP listening. Flaky; not recommended.
47 - `postgresqlStartCommands`: defaults to `pg_ctl start`.
4849+## Hooks {#sec-postgresqlTestHook-hooks}
50+51+A number of additional hooks are ran in postgresqlTestHook
52+53+ - `postgresqlTestSetupPost`: ran after postgresql has been set up.
54+55## TCP and the Nix sandbox {#sec-postgresqlTestHook-tcp}
5657`postgresqlEnableTCP` relies on network sandboxing, which is not available on macOS and some custom Nix installations, resulting in flaky tests.
+7-2
lib/attrsets.nix
···480481482 /* Like `mapAttrs`, except that it recursively applies itself to
483- attribute sets. Also, the first argument of the argument
484- function is a *list* of the names of the containing attributes.
00000485486 Example:
487 mapAttrsRecursive (path: value: concatStringsSep "-" (path ++ [value]))
···480481482 /* Like `mapAttrs`, except that it recursively applies itself to
483+ the *leaf* attributes of a potentially-nested attribute set:
484+ the second argument of the function will never be an attrset.
485+ Also, the first argument of the argument function is a *list*
486+ of the attribute names that form the path to the leaf attribute.
487+488+ For a function that gives you control over what counts as a leaf,
489+ see `mapAttrsRecursiveCond`.
490491 Example:
492 mapAttrsRecursive (path: value: concatStringsSep "-" (path ++ [value]))
···1{ lib
2, fetchFromGitHub
3-, buildGoPackage
04}:
5-# upstream is pretty stale, but it still works, so until they merge module
6-# support we have to use gopath: see sgreben/jp#29
7-buildGoPackage rec {
8 pname = "json-plot";
9 version = "1.1.12";
10···15 hash = "sha256-WWARAh/CF3lGli3VLRzAGaCA8xQyryPi8WcuwvdInjk=";
16 };
1718- goPackagePath = "github.com/sgreben/jp";
00000000001920 meta = with lib; {
21 description = "Dead simple terminal plots from JSON (or CSV) data. Bar charts, line charts, scatter plots, histograms and heatmaps are supported.";
···1{ lib
2, fetchFromGitHub
3+, fetchpatch
4+, buildGoModule
5}:
6+buildGoModule rec {
007 pname = "json-plot";
8 version = "1.1.12";
9···14 hash = "sha256-WWARAh/CF3lGli3VLRzAGaCA8xQyryPi8WcuwvdInjk=";
15 };
1617+ vendorHash = "sha256-EPrlaUHAGATNFv3qgWKGmJdu9EHsV/0DJKEvQck+fWc=";
18+19+ patches = [
20+ # Add Go Modules support
21+ (fetchpatch {
22+ url = "https://github.com/sgreben/jp/commit/9516fb4d7c5b011071b4063ea8e8e9667e57a777.patch";
23+ hash = "sha256-Vz5HnStrCpMN1L7dne7JDX5F57up3EBPPf/9hN9opRc=";
24+ })
25+ ];
26+27+ ldflags = [ "-s" "-w" ];
2829 meta = with lib; {
30 description = "Dead simple terminal plots from JSON (or CSV) data. Bar charts, line charts, scatter plots, histograms and heatmaps are supported.";