-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
97 lines (95 loc) · 3.43 KB
/
flake.nix
File metadata and controls
97 lines (95 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
description = "WordPress Cache Benchmarks";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
dev.url = ./dev;
finefile = {
url = "github:john-shaffer/finefile";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
snapcache = {
url = "github:staticweb-io/snapcache";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs:
inputs.flake-utils.lib.eachDefaultSystem (
system:
with import inputs.nixpkgs { inherit system; };
let
# Fetch zips but take a stable hash of its contents, not the zip itself.
# Sometimes zip files change.
fetchStableZip =
{ url, hash }:
let
unpacked = pkgs.fetchzip {
inherit url hash;
recursiveHash = true;
stripRoot = false;
};
in
pkgs.runCommand ((lib.nameFromURL url ".zip") + ".zip") { buildInputs = [ pkgs.zip ]; } ''
cd ${unpacked}
zip -r $out .
'';
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
fd
inputs.finefile.packages.${system}.default
jsonfmt
just
nixfmt-rfc-style
omnix
parallel
siege
];
inputsFrom = [ inputs.dev.devShells.${system}.default ];
shellHook = ''
echo
echo -e "Run '\033[1mjust <recipe>\033[0m' to get started"
just --list
'';
};
packages = {
atec-cache-apcu = fetchStableZip {
url = "https://downloads.wordpress.org/plugin/atec-cache-apcu.2.3.58.zip";
hash = "sha256-EQ3O1bdThNVC1t6aDY4pjzhenglXk3dw1NwcoKkl+/4=";
};
eac-object-cache = fetchStableZip {
url = "https://downloads.wordpress.org/plugin/eacobjectcache.2.1.2.zip";
hash = "sha256-R5LtZ8cbLYOlB8ZSjpABiHAnEKoHknGSqdKprFlWNeY=";
};
docket-cache = fetchStableZip {
url = "https://downloads.wordpress.org/plugin/docket-cache.24.07.07.zip";
hash = "sha256-E3WGcVSadDbFM51hdGm6vDr2QcsiyAVsi+JZOtPgFQQ=";
};
litespeed-cache = fetchStableZip {
url = "https://downloads.wordpress.org/plugin/litespeed-cache.7.6.2.zip";
hash = "sha256-AduSCRqawoBvb0kVBDiM90mZ9naLhUcbPt3kcHoqlKU=";
};
redis-cache = fetchStableZip {
url = "https://downloads.wordpress.org/plugin/redis-cache.2.7.0.zip";
hash = "sha256-+BlAD31TBABJOeFvF7j7uelFO8nYfIkoKyhtIk38KpE=";
};
snapcache = inputs.snapcache.packages.${system}.pluginWpOrg;
sqlite-object-cache = fetchStableZip {
url = "https://downloads.wordpress.org/plugin/sqlite-object-cache.1.6.0.zip";
hash = "sha256-u12SnmEb+ZA7TJL37clnsfzRteB3bHmy6j1217/X1NE=";
};
woocommerce = fetchStableZip {
url = "https://downloads.wordpress.org/plugin/woocommerce.10.3.6.zip";
hash = "sha256-LVPiSTKAim2F+8S80ir0zjDbxN2g8KrZLWblm5LqzSw=";
};
wp-redis = fetchStableZip {
url = "https://downloads.wordpress.org/plugin/wp-redis.1.4.6.zip";
hash = "sha256-bB2xEF+w7o6mb1OzBPJPfnR1EFNNBfT/MkV6l0MrtA8=";
};
};
}
);
}