blob: 6c1444949ca6d69b0f3ca8ba36cdda0ee1a091b3 (
plain) (
blame)
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
|
{ stdenv, mylibs, composerEnv, fetchurl, gearmand, callPackage, php73, php73base, config_file ? "/var/lib/status_engine/ui.yml" }:
let
# FIXME: present in php73.buildPecl in latest nixpkgs-unstable
gearman = (callPackage <nixpkgs/pkgs/build-support/build-pecl.nix> { php = php73base; }) rec {
version = "2.0.6";
pname = "gearman";
src = fetchurl {
url = "https://github.com/wcgallego/pecl-gearman/archive/${pname}-${version}.tar.gz";
sha256 = "0bliga4j41xkvdfh6bqi6k8x6mfxbi5sl9gix97axs7w0ncyfprz";
};
configureFlags = [ "--with-gearman=${gearmand}" ];
nativeBuildInputs = [ gearmand ];
};
in
(composerEnv.override {
php = php73.withExtensions(e: php73.enabledExtensions ++ (with php73.extensions; [gearman redis mbstring bcmath json iconv]));
}).buildPackage (mylibs.fetchedGithub ./worker.json //
import ./worker_php_packages.nix { inherit composerEnv fetchurl; } // rec {
postInstall = ''
ln -s ${config_file} $out/etc/config.yml
'';
preInstall = ''
cp ${./worker_composer.lock} $out/composer.lock
'';
})
|