mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-20 10:36:25 +00:00
f3fd89af54
Many thangs to the hard work and generous availability of: git@github.com:Misterio77/nix-config.git
17 lines
369 B
Nix
17 lines
369 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"
|
|
'')
|
|
{ };
|
|
|
|
type = (pkgs.formats.json { }).type;
|
|
};
|
|
}
|