-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
34 lines (32 loc) · 1.23 KB
/
flake.nix
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
{
description = "opensearch php dev shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
flake-parts.url = "github:hercules-ci/flake-parts";
build-tools.url = "git+ssh://[email protected]/i-scrum/build-tools.git";
};
outputs = inputs@{ flake-parts, nixpkgs, build-tools, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed ;
perSystem = { config, pkgs, system, ... }:
let
osPHP = pkgs.php.withExtensions ({ enabled, all }: enabled ++ [ all.imagick all.memcached ]);
test-python-packages = ps: with ps; [
munch
pyyaml
requests
ruamel-yaml
lxml
];
test-python = pkgs.python311.withPackages test-python-packages;
isDarwin = pkgs.lib.hasSuffix "darwin" system;
darwin-packages = pkgs.lib.lists.optional isDarwin pkgs.darwin.iproute2mac;
build-docker = build-tools.packages.${system}.default;
in {
devShells.default = pkgs.mkShell {
name = "open search";
buildInputs = [ osPHP osPHP.packages.composer pkgs.subversion build-docker test-python ] ++ darwin-packages;
};
};
};
}