haproxy: use finalAttrs
pattern
This commit is contained in:
parent
b5416bf837
commit
48284913a2
1 changed files with 24 additions and 17 deletions
|
@ -1,21 +1,28 @@
|
||||||
{ useLua ? true
|
{ useLua ? true
|
||||||
, usePcre ? true
|
, usePcre ? true
|
||||||
, withPrometheusExporter ? true
|
, withPrometheusExporter ? true
|
||||||
, stdenv, lib, fetchurl, nixosTests
|
, stdenv
|
||||||
, openssl, zlib, libxcrypt
|
, lib
|
||||||
, lua5_3 ? null, pcre ? null, systemd ? null
|
, fetchurl
|
||||||
|
, nixosTests
|
||||||
|
, openssl
|
||||||
|
, zlib
|
||||||
|
, libxcrypt
|
||||||
|
, lua5_3 ? null
|
||||||
|
, pcre ? null
|
||||||
|
, systemd ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert useLua -> lua5_3 != null;
|
assert useLua -> lua5_3 != null;
|
||||||
assert usePcre -> pcre != null;
|
assert usePcre -> pcre != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "haproxy";
|
pname = "haproxy";
|
||||||
version = "2.8.1";
|
version = "2.8.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.haproxy.org/download/${lib.versions.majorMinor version}/src/${pname}-${version}.tar.gz";
|
url = "https://www.haproxy.org/download/${lib.versions.majorMinor finalAttrs.version}/src/haproxy-${finalAttrs.version}.tar.gz";
|
||||||
sha256 = "sha256-SFVS/NnV1fQarQRvEx/Ap+hJvvJaNJoEB1CvDG/FaAc=";
|
hash = "sha256-SFVS/NnV1fQarQRvEx/Ap+hJvvJaNJoEB1CvDG/FaAc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ openssl zlib libxcrypt ]
|
buildInputs = [ openssl zlib libxcrypt ]
|
||||||
|
@ -26,10 +33,10 @@ stdenv.mkDerivation rec {
|
||||||
# TODO: make it work on bsd as well
|
# TODO: make it work on bsd as well
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=${placeholder "out"}"
|
"PREFIX=${placeholder "out"}"
|
||||||
("TARGET=" + (if stdenv.isSunOS then "solaris"
|
("TARGET=" + (if stdenv.isSunOS then "solaris"
|
||||||
else if stdenv.isLinux then "linux-glibc"
|
else if stdenv.isLinux then "linux-glibc"
|
||||||
else if stdenv.isDarwin then "osx"
|
else if stdenv.isDarwin then "osx"
|
||||||
else "generic"))
|
else "generic"))
|
||||||
];
|
];
|
||||||
|
|
||||||
buildFlags = [
|
buildFlags = [
|
||||||
|
@ -54,8 +61,11 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
passthru.tests.haproxy = nixosTests.haproxy;
|
passthru.tests.haproxy = nixosTests.haproxy;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
|
changelog = "https://www.haproxy.org/download/${lib.versions.majorMinor finalAttrs.version}/src/CHANGELOG";
|
||||||
description = "Reliable, high performance TCP/HTTP load balancer";
|
description = "Reliable, high performance TCP/HTTP load balancer";
|
||||||
|
homepage = "https://haproxy.org";
|
||||||
|
license = with lib.licenses; [ gpl2Plus lgpl21Only ];
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
HAProxy is a free, very fast and reliable solution offering high
|
HAProxy is a free, very fast and reliable solution offering high
|
||||||
availability, load balancing, and proxying for TCP and HTTP-based
|
availability, load balancing, and proxying for TCP and HTTP-based
|
||||||
|
@ -64,10 +74,7 @@ stdenv.mkDerivation rec {
|
||||||
tens of thousands of connections is clearly realistic with todays
|
tens of thousands of connections is clearly realistic with todays
|
||||||
hardware.
|
hardware.
|
||||||
'';
|
'';
|
||||||
homepage = "https://haproxy.org";
|
maintainers = with lib.maintainers; [ ];
|
||||||
changelog = "https://www.haproxy.org/download/${lib.versions.majorMinor version}/src/CHANGELOG";
|
platforms = with lib.platforms; linux ++ darwin;
|
||||||
license = with licenses; [ gpl2Plus lgpl21Only ];
|
|
||||||
maintainers = with maintainers; [ ];
|
|
||||||
platforms = with platforms; linux ++ darwin;
|
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue