]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - pkgs/status_engine/worker.nix
Small adjustments for naemon and web server
[perso/Immae/Config/Nix.git] / pkgs / status_engine / worker.nix
1 { stdenv, mylibs, composerEnv, fetchurl, gearmand, callPackage, php73, config_file ? "/var/lib/status_engine/ui.yml" }:
2 let
3 gearman = php73.buildPecl rec {
4 version = "2.0.6";
5 pname = "gearman";
6 src = fetchurl {
7 url = "https://github.com/wcgallego/pecl-gearman/archive/${pname}-${version}.tar.gz";
8 sha256 = "0bliga4j41xkvdfh6bqi6k8x6mfxbi5sl9gix97axs7w0ncyfprz";
9 };
10 configureFlags = [ "--with-gearman=${gearmand}" ];
11 nativeBuildInputs = [ gearmand ];
12 };
13 in
14 (composerEnv.override {
15 php = php73.withExtensions({ enabled, all }: enabled ++ (with all; [gearman redis mbstring bcmath json iconv]));
16 }).buildPackage (mylibs.fetchedGithub ./worker.json //
17 import ./worker_php_packages.nix { inherit composerEnv fetchurl; } // rec {
18 postInstall = ''
19 ln -s ${config_file} $out/etc/config.yml
20 '';
21 preInstall = ''
22 cp ${./worker_composer.lock} $out/composer.lock
23 '';
24 })