Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginxModules: add auth-a2aclr #134332

Merged
merged 2 commits into from
Jan 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
107 changes: 67 additions & 40 deletions pkgs/servers/http/nginx/modules.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchFromGitHub, lib, pkgs }:
{ fetchFromGitHub, fetchFromGitLab, lib, pkgs }:

let

Expand Down Expand Up @@ -33,6 +33,29 @@ in
inputs = [ pkgs.openssl ];
};

auth-a2aclr = {
src = fetchFromGitLab {
name = "auth-a2aclr";
owner = "arpa2";
repo = "nginx-auth-a2aclr";
rev = "bbabf9480bb2b40ac581551883a18dfa6522dd63";
sha256 = "sha256-h2LgMhreCgod+H/bNQzY9BvqG9ezkwikwWB3T6gHH04=";
};
inputs = [
(pkgs.arpa2common.overrideAttrs
(old: rec {
version = "0.7.1";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That version is two years old. Can't we use a newer one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The homepage https://gitlab.com/arpa2/nginx-auth-a2aclr says the requirements are:

  • source of liba2aclr 0.7.1 (ARPA2 Resource ACLs, part of libarpa2common)
  • source of nginx >=1.17

arpa2common has advanced quite a bit since, and I'm not sure if it's compatible anymore.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please check if newer versions still work?


src = fetchFromGitLab {
owner = "arpa2";
repo = "arpa2common";
rev = "v${version}";
sha256 = "sha256-8zVsAlGtmya9EK4OkGUMu2FKJRn2Q3bg2QWGjqcii64=";
};
}))
];
};

aws-auth = {
src = fetchFromGitHub {
name = "aws-auth";
Expand All @@ -50,30 +73,31 @@ in
repo = "ngx_brotli";
rev = "25f86f0bac1101b6512135eac5f93c49c63609e3";
sha256 = "02hfvfa6milj40qc2ikpb9f95sxqvxk4hly3x74kqhysbdi06hhv";
}; in pkgs.runCommand "ngx_brotli-src" {} ''
cp -a ${gitsrc} $out
substituteInPlace $out/filter/config \
--replace '$ngx_addon_dir/deps/brotli/c' ${lib.getDev pkgs.brotli}
'';
}; in
pkgs.runCommand "ngx_brotli-src" { } ''
cp -a ${gitsrc} $out
substituteInPlace $out/filter/config \
--replace '$ngx_addon_dir/deps/brotli/c' ${lib.getDev pkgs.brotli}
'';
inputs = [ pkgs.brotli ];
};

cache-purge = {
src = fetchFromGitHub {
name = "cache-purge";
owner = "nginx-modules";
repo = "ngx_cache_purge";
rev = "2.5.1";
owner = "nginx-modules";
repo = "ngx_cache_purge";
rev = "2.5.1";
sha256 = "0va4jz36mxj76nmq05n3fgnpdad30cslg7c10vnlhdmmic9vqncd";
};
};

coolkit = {
src = fetchFromGitHub {
name = "coolkit";
owner = "FRiCKLE";
repo = "ngx_coolkit";
rev = "0.2";
owner = "FRiCKLE";
repo = "ngx_coolkit";
rev = "0.2";
sha256 = "1idj0cqmfsdqawjcqpr1fsq670fdki51ksqk2lslfpcs3yrfjpqh";
};
};
Expand Down Expand Up @@ -138,13 +162,14 @@ in
};

ipscrub = {
src = fetchFromGitHub {
name = "ipscrub";
owner = "masonicboom";
repo = "ipscrub";
rev = "v1.0.1";
sha256 = "0qcx15c8wbsmyz2hkmyy5yd7qn1n84kx9amaxnfxkpqi05vzm1zz";
} + "/ipscrub";
src = fetchFromGitHub
{
fufexan marked this conversation as resolved.
Show resolved Hide resolved
name = "ipscrub";
owner = "masonicboom";
repo = "ipscrub";
rev = "v1.0.1";
sha256 = "0qcx15c8wbsmyz2hkmyy5yd7qn1n84kx9amaxnfxkpqi05vzm1zz";
} + "/ipscrub";
inputs = [ pkgs.libbsd ];
};

Expand All @@ -158,7 +183,7 @@ in
};
};

live ={
live = {
src = fetchFromGitHub {
name = "live";
owner = "arut";
Expand Down Expand Up @@ -225,7 +250,7 @@ in
};
};

mpeg-ts ={
mpeg-ts = {
src = fetchFromGitHub {
name = "mpeg-ts";
owner = "arut";
Expand All @@ -235,14 +260,15 @@ in
};
};

naxsi ={
src = fetchFromGitHub {
name = "naxsi";
owner = "nbs-system";
repo = "naxsi";
rev = "95ac520eed2ea04098a76305fd0ad7e9158840b7";
sha256 = "0b5pnqkgg18kbw5rf2ifiq7lsx5rqmpqsql6hx5ycxjzxj6acfb3";
} + "/naxsi_src";
naxsi = {
src = fetchFromGitHub
{
name = "naxsi";
owner = "nbs-system";
repo = "naxsi";
rev = "95ac520eed2ea04098a76305fd0ad7e9158840b7";
sha256 = "0b5pnqkgg18kbw5rf2ifiq7lsx5rqmpqsql6hx5ycxjzxj6acfb3";
} + "/naxsi_src";
};

opentracing = {
Expand All @@ -263,10 +289,10 @@ in
version = pkgs.psol.version;

moduleSrc = fetchFromGitHub {
name = "pagespeed";
owner = "pagespeed";
repo = "ngx_pagespeed";
rev = "v${version}-stable";
name = "pagespeed";
owner = "pagespeed";
repo = "ngx_pagespeed";
rev = "v${version}-stable";
sha256 = "0ry7vmkb2bx0sspl1kgjlrzzz6lbz07313ks2lr80rrdm2zb16wp";
};

Expand All @@ -275,16 +301,17 @@ in
{
meta = {
description = "PageSpeed module for Nginx";
homepage = "https://developers.google.com/speed/pagespeed/module/";
license = pkgs.lib.licenses.asl20;
homepage = "https://developers.google.com/speed/pagespeed/module/";
license = pkgs.lib.licenses.asl20;
};
}
''
cp -r "${moduleSrc}" "$out"
chmod -R +w "$out"
ln -s "${pkgs.psol}" "$out/psol"
'';
in {
in
{
src = ngx_pagespeed;
inputs = [ pkgs.zlib pkgs.libuuid ]; # psol deps
allowMemoryWriteExecute = true;
Expand All @@ -311,7 +338,7 @@ in
};
};

push-stream ={
push-stream = {
src = fetchFromGitHub {
name = "push-stream";
owner = "wandenberg";
Expand Down Expand Up @@ -375,9 +402,9 @@ in
slowfs-cache = {
src = fetchFromGitHub {
name = "slowfs-cache";
owner = "FRiCKLE";
repo = "ngx_slowfs_cache";
rev = "1.10";
owner = "FRiCKLE";
repo = "ngx_slowfs_cache";
rev = "1.10";
sha256 = "1gyza02pcws3zqm1phv3ag50db5gnapxyjwy8skjmvawz7p5bmxr";
};
};
Expand Down