diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-06-16 15:23:20 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-06-16 16:16:00 +0200 |
commit | a97118c489a59d723538292214efaa10dfcb96df (patch) | |
tree | 853ec20d2af94dc8d3325fa3b781dd535cd72c86 /pkgs/status_engine/worker.nix | |
parent | b1b8a5623d22a7ee4301afe4e7b9d368ef7ded8f (diff) | |
download | Nix-a97118c489a59d723538292214efaa10dfcb96df.tar.gz Nix-a97118c489a59d723538292214efaa10dfcb96df.tar.zst Nix-a97118c489a59d723538292214efaa10dfcb96df.zip |
Add status engine website
Diffstat (limited to 'pkgs/status_engine/worker.nix')
-rw-r--r-- | pkgs/status_engine/worker.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/status_engine/worker.nix b/pkgs/status_engine/worker.nix new file mode 100644 index 0000000..6c14449 --- /dev/null +++ b/pkgs/status_engine/worker.nix | |||
@@ -0,0 +1,25 @@ | |||
1 | { stdenv, mylibs, composerEnv, fetchurl, gearmand, callPackage, php73, php73base, config_file ? "/var/lib/status_engine/ui.yml" }: | ||
2 | let | ||
3 | # FIXME: present in php73.buildPecl in latest nixpkgs-unstable | ||
4 | gearman = (callPackage <nixpkgs/pkgs/build-support/build-pecl.nix> { php = php73base; }) rec { | ||
5 | version = "2.0.6"; | ||
6 | pname = "gearman"; | ||
7 | src = fetchurl { | ||
8 | url = "https://github.com/wcgallego/pecl-gearman/archive/${pname}-${version}.tar.gz"; | ||
9 | sha256 = "0bliga4j41xkvdfh6bqi6k8x6mfxbi5sl9gix97axs7w0ncyfprz"; | ||
10 | }; | ||
11 | configureFlags = [ "--with-gearman=${gearmand}" ]; | ||
12 | nativeBuildInputs = [ gearmand ]; | ||
13 | }; | ||
14 | in | ||
15 | (composerEnv.override { | ||
16 | php = php73.withExtensions(e: php73.enabledExtensions ++ (with php73.extensions; [gearman redis mbstring bcmath json iconv])); | ||
17 | }).buildPackage (mylibs.fetchedGithub ./worker.json // | ||
18 | import ./worker_php_packages.nix { inherit composerEnv fetchurl; } // rec { | ||
19 | postInstall = '' | ||
20 | ln -s ${config_file} $out/etc/config.yml | ||
21 | ''; | ||
22 | preInstall = '' | ||
23 | cp ${./worker_composer.lock} $out/composer.lock | ||
24 | ''; | ||
25 | }) | ||