mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-14 16:36:24 +00:00
17 lines
371 B
Nix
17 lines
371 B
Nix
{ pkgs }:
|
|
{
|
|
gzipJson = _: {
|
|
generate = name: value: pkgs.callPackage
|
|
({ runCommand, gzip }: runCommand name
|
|
{
|
|
nativeBuildInputs = [ gzip ];
|
|
value = builtins.toJSON value;
|
|
passAsFile = [ "value" ];
|
|
} ''
|
|
gzip "$valuePath" -c > "$out"
|
|
'')
|
|
{ };
|
|
|
|
inherit ((pkgs.formats.json { })) type;
|
|
};
|
|
}
|