uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
59
pkgs/servers/varnish/default.nix
Normal file
59
pkgs/servers/varnish/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, pcre, pcre2, jemalloc, libxslt, groff, ncurses, pkg-config, readline, libedit
|
||||
, coreutils, python3, makeWrapper }:
|
||||
|
||||
let
|
||||
common = { version, sha256, extraNativeBuildInputs ? [] }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "varnish";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://varnish-cache.org/_downloads/${pname}-${version}.tgz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
passthru.python = python3;
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [ pkg-config docutils sphinx ];
|
||||
buildInputs = [
|
||||
libxslt groff ncurses readline libedit makeWrapper python3
|
||||
]
|
||||
++ lib.optional (lib.versionOlder version "7") pcre
|
||||
++ lib.optional (lib.versionAtLeast version "7") pcre2
|
||||
++ lib.optional stdenv.hostPlatform.isLinux jemalloc;
|
||||
|
||||
buildFlags = [ "localstatedir=/var/spool" ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace bin/varnishtest/vtc_main.c --replace /bin/rm "${coreutils}/bin/rm"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram "$out/sbin/varnishd" --prefix PATH : "${lib.makeBinPath [ stdenv.cc ]}"
|
||||
'';
|
||||
|
||||
# https://github.com/varnishcache/varnish-cache/issues/1875
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-fexcess-precision=standard";
|
||||
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "Web application accelerator also known as a caching HTTP reverse proxy";
|
||||
homepage = "https://www.varnish-cache.org";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
varnish60 = common {
|
||||
version = "6.0.10";
|
||||
sha256 = "1sr60wg5mzjb14y75cga836f19sbmmpgh13mwc4alyg3irsbz1bb";
|
||||
};
|
||||
varnish71 = common {
|
||||
version = "7.1.0";
|
||||
sha256 = "1flyqr212jamqpwafdil170vc966r1mbb7n3ngjn8xk6hn3bhjpm";
|
||||
};
|
||||
}
|
||||
33
pkgs/servers/varnish/digest.nix
Normal file
33
pkgs/servers/varnish/digest.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, varnish, libmhash, docutils, coreutils, version, sha256 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "${varnish.name}-digest";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "varnish";
|
||||
repo = "libvmod-digest";
|
||||
rev = version;
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config docutils ];
|
||||
buildInputs = [ varnish libmhash ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace autogen.sh --replace "''${dataroot}/aclocal" "${varnish.dev}/share/aclocal"
|
||||
substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
|
||||
'';
|
||||
|
||||
configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Digest and HMAC vmod";
|
||||
homepage = "https://github.com/varnish/libvmod-digest";
|
||||
inherit (varnish.meta) license platforms maintainers;
|
||||
};
|
||||
}
|
||||
26
pkgs/servers/varnish/dynamic.nix
Normal file
26
pkgs/servers/varnish/dynamic.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook269, pkg-config, varnish, docutils, version, sha256 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "${varnish.name}-dynamic";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nigoroll";
|
||||
repo = "libvmod-dynamic";
|
||||
rev = "v${version}";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config docutils autoreconfHook269 varnish.python ];
|
||||
buildInputs = [ varnish ];
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
|
||||
'';
|
||||
configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Dynamic director similar to the DNS director from Varnish 3";
|
||||
homepage = "https://github.com/nigoroll/libvmod-dynamic";
|
||||
inherit (varnish.meta) license platforms maintainers;
|
||||
};
|
||||
}
|
||||
48
pkgs/servers/varnish/modules.nix
Normal file
48
pkgs/servers/varnish/modules.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, varnish, docutils, removeReferencesTo }:
|
||||
let
|
||||
common = { version, sha256, extraNativeBuildInputs ? [] }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "${varnish.name}-modules";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "varnish";
|
||||
repo = "varnish-modules";
|
||||
rev = version;
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
docutils
|
||||
pkg-config
|
||||
removeReferencesTo
|
||||
varnish.python # use same python version as varnish server
|
||||
];
|
||||
|
||||
buildInputs = [ varnish ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace bootstrap --replace "''${dataroot}/aclocal" "${varnish.dev}/share/aclocal"
|
||||
substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
|
||||
'';
|
||||
|
||||
postInstall = "find $out -type f -exec remove-references-to -t ${varnish.dev} '{}' +"; # varnish.dev captured only as __FILE__ in assert messages
|
||||
|
||||
meta = with lib; {
|
||||
description = "Collection of Varnish Cache modules (vmods) by Varnish Software";
|
||||
homepage = "https://github.com/varnish/varnish-modules";
|
||||
inherit (varnish.meta) license platforms maintainers;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
modules15 = common {
|
||||
version = "0.15.1";
|
||||
sha256 = "1lwgjhgr5yw0d17kbqwlaj5pkn70wvaqqjpa1i0n459nx5cf5pqj";
|
||||
};
|
||||
modules19 = common {
|
||||
version = "0.19.0";
|
||||
sha256 = "0qq5g6bbd1a1ml1wk8jj9z39a899jzqbf7aizr3pvyz0f4kz8mis";
|
||||
};
|
||||
}
|
||||
30
pkgs/servers/varnish/packages.nix
Normal file
30
pkgs/servers/varnish/packages.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ callPackages, callPackage, varnish60, varnish71, fetchFromGitHub }: {
|
||||
varnish60Packages = rec {
|
||||
varnish = varnish60;
|
||||
modules = (callPackages ./modules.nix { inherit varnish; }).modules15;
|
||||
digest = callPackage ./digest.nix {
|
||||
inherit varnish;
|
||||
version = "libvmod-digest-1.0.2";
|
||||
sha256 = "0jwkqqalydn0pwfdhirl5zjhbc3hldvhh09hxrahibr72fgmgpbx";
|
||||
};
|
||||
dynamic = callPackage ./dynamic.nix {
|
||||
inherit varnish;
|
||||
version = "0.4";
|
||||
sha256 = "1n94slrm6vn3hpymfkla03gw9603jajclg84bjhwb8kxsk3rxpmk";
|
||||
};
|
||||
};
|
||||
varnish71Packages = rec {
|
||||
varnish = varnish71;
|
||||
modules = (callPackages ./modules.nix { inherit varnish; }).modules19;
|
||||
digest = callPackage ./digest.nix {
|
||||
inherit varnish;
|
||||
version = "6.6";
|
||||
sha256 = "0n33g8ml4bsyvcvl5lk7yng1ikvmcv8dd6bc1mv2lj4729pp97nn";
|
||||
};
|
||||
dynamic = callPackage ./dynamic.nix {
|
||||
inherit varnish;
|
||||
version = "2.4.0";
|
||||
sha256 = "1g53zblyxi1jivwppmpdqhi5xnzapsfib453sxyqbc5dfs7fijxr";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue