diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/http/angie')
-rw-r--r-- | nixpkgs/pkgs/servers/http/angie/console-light.nix | 48 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/http/angie/default.nix | 47 |
2 files changed, 95 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/http/angie/console-light.nix b/nixpkgs/pkgs/servers/http/angie/console-light.nix new file mode 100644 index 000000000000..c4772205a5c7 --- /dev/null +++ b/nixpkgs/pkgs/servers/http/angie/console-light.nix @@ -0,0 +1,48 @@ +{ lib +, stdenv +, fetchurl +, gzip +, brotli +}: + +stdenv.mkDerivation rec { + version = "1.2.1"; + pname = "angie-console-light"; + + src = fetchurl { + url = "https://download.angie.software/files/${pname}/${pname}-${version}.tar.gz"; + hash = "sha256-bwnVwhcPyEXGzvpXj2bC1WUGtNbBlHpqZibApKtESq8="; + }; + + outputs = [ "out" "doc" ]; + + nativeBuildInputs = [ brotli ]; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/angie-console-light + mv ./html $out/share/angie-console-light + + mkdir -p $doc/share/doc/angie-console-light + mv ./LICENSE $doc/share/doc/angie-console-light + + # Create static gzip and brotli files + find -L $out -type f -regextype posix-extended -iregex '.*\.(html|js|txt)' \ + -exec gzip --best --keep --force {} ';' \ + -exec brotli --best --keep --no-copy-stat {} ';' + + runHook postInstall + ''; + + meta = { + description = "Console Light is a lightweight, real-time activity monitoring interface."; + homepage = "https://angie.software/en/console/"; + license = lib.licenses.asl20; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ izorkin ]; + }; +} diff --git a/nixpkgs/pkgs/servers/http/angie/default.nix b/nixpkgs/pkgs/servers/http/angie/default.nix new file mode 100644 index 000000000000..233298053b2e --- /dev/null +++ b/nixpkgs/pkgs/servers/http/angie/default.nix @@ -0,0 +1,47 @@ +{ callPackage +, runCommand +, lib +, fetchurl +, nixosTests +, withQuic ? false +, fetchpatch +, ... +}@args: + +callPackage ../nginx/generic.nix args rec { + version = "1.4.1"; + pname = if withQuic then "angieQuic" else "angie"; + + src = fetchurl { + url = "https://download.angie.software/files/angie-${version}.tar.gz"; + hash = "sha256-g6PyuyulnltnZJWiZ01iYG1k6Lz5nO+gneb8M4q3WHo="; + }; + + configureFlags = lib.optional withQuic [ + "--with-http_v3_module" + ]; + + preInstall = '' + if [[ -e man/angie.8 ]]; then + installManPage man/angie.8 + fi + ''; + + postInstall = '' + ln -s $out/bin/nginx $out/bin/angie + ''; + + passthru.tests = { + angie = nixosTests.nginx-variants.angie; + angie-api = nixosTests.angie-api; + angie-http3 = nixosTests.nginx-http3.angieQuic; + }; + + meta = { + description = "Angie is an efficient, powerful, and scalable web server that was forked from nginx"; + homepage = "https://angie.software/en/"; + license = lib.licenses.bsd2; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ izorkin ]; + }; +} |