]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - pkgs/status_engine/worker.nix
Add myuids flake
[perso/Immae/Config/Nix.git] / pkgs / status_engine / worker.nix
CommitLineData
2053ddac 1{ stdenv, mylibs, composerEnv, fetchurl, gearmand, callPackage, php73, config_file ? "/var/lib/status_engine/ui.yml" }:
a97118c4 2let
2053ddac 3 gearman = php73.buildPecl rec {
a97118c4
IB
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 };
13in
14(composerEnv.override {
2053ddac 15 php = php73.withExtensions({ enabled, all }: enabled ++ (with all; [gearman redis mbstring bcmath json iconv]));
a97118c4
IB
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})