forked from mirrors/nixpkgs
Merge staging-next into staging
This commit is contained in:
commit
2908f0cd18
|
@ -2,7 +2,7 @@
|
|||
, libxml2, gnutls, sane-backends }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sane-airscan";
|
||||
version = "0.99.24";
|
||||
version = "0.99.26";
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkg-config ];
|
||||
buildInputs = [ avahi gnutls libjpeg libpng libxml2 sane-backends ];
|
||||
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||
owner = "alexpevzner";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-2zSLC9P7Q/GMefHvmrUz6nV2hgScb4BhPAkahNBouqk=";
|
||||
sha256 = "08snfg5zx9924ryww0kxf1kgl085yw7fg6l4f1kzlhcmqf1958w5";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -11,11 +11,11 @@ let
|
|||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jitsi-meet-electron";
|
||||
version = "2.8.5";
|
||||
version = "2.8.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/jitsi/jitsi-meet-electron/releases/download/v${version}/jitsi-meet-x86_64.AppImage";
|
||||
sha256 = "0r3jj3qjx38l1g733vhrwcm2yg7ppp23ciz84x2kqq51mlzr84c6";
|
||||
sha256 = "sha256-kLX8SZERlyNVSvszkV/fkQh/Z/Z20PAPJ9eug2oKlqI=";
|
||||
name = "${pname}-${version}.AppImage";
|
||||
};
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "kdeltachat";
|
||||
version = "unstable-2021-05-22";
|
||||
version = "unstable-2021-05-31";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~link2xt";
|
||||
repo = "kdeltachat";
|
||||
rev = "9c22c6d6a03f620f14f289b464354159b8a76f6b";
|
||||
sha256 = "1qmal6dng8ynp5mrkrgykz78c8zp1gbv53s479qvj0h3axrp2s8p";
|
||||
rev = "318ae67c17f3e64532bad23c2a61a93446db553d";
|
||||
sha256 = "1qy0hlp0r91sqn26ai9isxw4rl8kcmmb10a2p9yqynhm8py3dfn4";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
# How to obtain `sha256`:
|
||||
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
|
||||
mkDerivation {
|
||||
version = "24.0.1";
|
||||
sha256 = "z01gaKNkKsIPKdPKhX6IUUY9uBSuyA33E4aVM0MdXsg=";
|
||||
version = "24.0.2";
|
||||
sha256 = "gAiQc+AVj5xjwAnn9mF4xprjZOft1JvfEFVJMG5isxg=";
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "janet";
|
||||
version = "1.15.5";
|
||||
version = "1.16.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "janet-lang";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-szqH2Qqc+AKTuoZjYHhTmiHcFQ+PMsljh0RSD/q4gD4=";
|
||||
sha256 = "sha256-Wrr2zie251oB+uhsLMmkPBV0b3MwTmcPTgNJOsgCems=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson ninja ];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}:
|
||||
let
|
||||
# Poetry2nix version
|
||||
version = "1.16.1";
|
||||
version = "1.17.0";
|
||||
|
||||
inherit (poetryLib) isCompatible readTOML moduleName;
|
||||
|
||||
|
@ -163,7 +163,7 @@ lib.makeScope pkgs.newScope (self: {
|
|||
compatible = partitions.right;
|
||||
incompatible = partitions.wrong;
|
||||
|
||||
# Create an overriden version of pythonPackages
|
||||
# Create an overridden version of pythonPackages
|
||||
#
|
||||
# We need to avoid mixing multiple versions of pythonPackages in the same
|
||||
# closure as python can only ever have one version of a dependency
|
||||
|
@ -229,7 +229,12 @@ lib.makeScope pkgs.newScope (self: {
|
|||
|
||||
inputAttrs = mkInputAttrs { inherit py pyProject; attrs = { }; includeBuildSystem = false; };
|
||||
|
||||
storePackages = builtins.foldl' (acc: v: acc ++ v) [ ] (lib.attrValues inputAttrs);
|
||||
requiredPythonModules = python.pkgs.requiredPythonModules;
|
||||
/* Include all the nested dependencies which are required for each package.
|
||||
This guarantees that using the "poetryPackages" attribute will return
|
||||
complete list of dependencies for the poetry project to be portable.
|
||||
*/
|
||||
storePackages = requiredPythonModules (builtins.foldl' (acc: v: acc ++ v) [ ] (lib.attrValues inputAttrs));
|
||||
in
|
||||
{
|
||||
python = py;
|
||||
|
|
|
@ -9,12 +9,12 @@ curl="curl \
|
|||
--cookie-jar cookies \
|
||||
--insecure \
|
||||
--speed-time 5 \
|
||||
-# \
|
||||
--progress-bar \
|
||||
--fail \
|
||||
$curlOpts \
|
||||
$NIX_CURL_FLAGS"
|
||||
|
||||
echo "Trying to fetch wheel with predicted URL: $predictedURL"
|
||||
echo "Trying to fetch with predicted URL: $predictedURL"
|
||||
|
||||
$curl $predictedURL --output $out && exit 0
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
# Some repositories (such as Devpi) expose the Pypi legacy API
|
||||
# (https://warehouse.pypa.io/api-reference/legacy.html).
|
||||
#
|
||||
# Note it is not possible to use pip
|
||||
# https://discuss.python.org/t/pip-download-just-the-source-packages-no-building-no-metadata-etc/4651/12
|
||||
|
||||
import sys
|
||||
from urllib.parse import urlparse
|
||||
from html.parser import HTMLParser
|
||||
import urllib.request
|
||||
import shutil
|
||||
import ssl
|
||||
import os
|
||||
|
||||
|
||||
# Parse the legacy index page to extract the href and package names
|
||||
class Pep503(HTMLParser):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.sources = {}
|
||||
self.url = None
|
||||
self.name = None
|
||||
|
||||
def handle_data(self, data):
|
||||
if self.url is not None:
|
||||
self.name = data
|
||||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
if tag == "a":
|
||||
for name, value in attrs:
|
||||
if name == "href":
|
||||
self.url = value
|
||||
|
||||
def handle_endtag(self, tag):
|
||||
if self.url is not None:
|
||||
self.sources[self.name] = self.url
|
||||
self.url = None
|
||||
|
||||
|
||||
url = sys.argv[1]
|
||||
package_name = sys.argv[2]
|
||||
index_url = url + "/" + package_name
|
||||
package_filename = sys.argv[3]
|
||||
|
||||
print("Reading index %s" % index_url)
|
||||
|
||||
response = urllib.request.urlopen(
|
||||
index_url,
|
||||
context=ssl.CERT_NONE)
|
||||
index = response.read()
|
||||
|
||||
parser = Pep503()
|
||||
parser.feed(str(index))
|
||||
if package_filename not in parser.sources:
|
||||
print("The file %s has not be found in the index %s" % (
|
||||
package_filename, index_url))
|
||||
exit(1)
|
||||
|
||||
package_file = open(package_filename, "wb")
|
||||
# Sometimes the href is a relative path
|
||||
if urlparse(parser.sources[package_filename]).netloc == '':
|
||||
package_url = index_url + "/" + parser.sources[package_filename]
|
||||
else:
|
||||
package_url = parser.sources[package_filename]
|
||||
print("Downloading %s" % package_url)
|
||||
|
||||
response = urllib.request.urlopen(
|
||||
package_url,
|
||||
context=ssl.CERT_NONE)
|
||||
|
||||
with response as r:
|
||||
shutil.copyfileobj(r, package_file)
|
|
@ -93,17 +93,19 @@ let
|
|||
);
|
||||
|
||||
|
||||
# Fetch the wheels from the PyPI index.
|
||||
# We need to first get the proper URL to the wheel.
|
||||
# Fetch from the PyPI index.
|
||||
# At first we try to fetch the predicated URL but if that fails we
|
||||
# will use the Pypi API to determine the correct URL.
|
||||
# Args:
|
||||
# pname: package name
|
||||
# file: filename including extension
|
||||
# version: the version string of the dependency
|
||||
# hash: SRI hash
|
||||
# kind: Language implementation and version tag
|
||||
fetchWheelFromPypi = lib.makeOverridable (
|
||||
{ pname, file, hash, kind, curlOpts ? "" }:
|
||||
fetchFromPypi = lib.makeOverridable (
|
||||
{ pname, file, version, hash, kind, curlOpts ? "" }:
|
||||
let
|
||||
version = builtins.elemAt (builtins.split "-" file) 2;
|
||||
predictedURL = predictURLFromPypi { inherit pname file hash kind; };
|
||||
in
|
||||
(pkgs.stdenvNoCC.mkDerivation {
|
||||
name = file;
|
||||
|
@ -111,7 +113,7 @@ let
|
|||
pkgs.curl
|
||||
pkgs.jq
|
||||
];
|
||||
isWheel = true;
|
||||
isWheel = lib.strings.hasSuffix "whl" file;
|
||||
system = "builtin";
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
@ -119,36 +121,35 @@ let
|
|||
"NIX_CURL_FLAGS"
|
||||
];
|
||||
|
||||
predictedURL = predictURLFromPypi { inherit pname file hash kind; };
|
||||
inherit pname file version curlOpts;
|
||||
inherit pname file version curlOpts predictedURL;
|
||||
|
||||
builder = ./fetch-wheel.sh;
|
||||
builder = ./fetch-from-pypi.sh;
|
||||
|
||||
outputHashMode = "flat";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = hash;
|
||||
|
||||
passthru = {
|
||||
urls = [ predictedURL ]; # retain compatibility with nixpkgs' fetchurl
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
# Fetch the artifacts from the PyPI index. Since we get all
|
||||
# info we need from the lock file we don't use nixpkgs' fetchPyPi
|
||||
# as it modifies casing while not providing anything we don't already
|
||||
# have.
|
||||
#
|
||||
# Args:
|
||||
# pname: package name
|
||||
# file: filename including extension
|
||||
# hash: SRI hash
|
||||
# kind: Language implementation and version tag https://www.python.org/dev/peps/pep-0427/#file-name-convention
|
||||
fetchFromPypi = lib.makeOverridable (
|
||||
{ pname, file, hash, kind }:
|
||||
if lib.strings.hasSuffix "whl" file then fetchWheelFromPypi { inherit pname file hash kind; }
|
||||
else
|
||||
pkgs.fetchurl {
|
||||
url = predictURLFromPypi { inherit pname file hash kind; };
|
||||
inherit hash;
|
||||
}
|
||||
fetchFromLegacy = lib.makeOverridable (
|
||||
{ python, pname, url, file, hash }:
|
||||
pkgs.runCommand file
|
||||
{
|
||||
nativeBuildInputs = [ python ];
|
||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
||||
outputHashMode = "flat";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = hash;
|
||||
} ''
|
||||
python ${./fetch_from_legacy.py} ${url} ${pname} ${file}
|
||||
mv ${file} $out
|
||||
''
|
||||
);
|
||||
|
||||
getBuildSystemPkgs =
|
||||
{ pythonPackages
|
||||
, pyProject
|
||||
|
@ -215,7 +216,7 @@ in
|
|||
{
|
||||
inherit
|
||||
fetchFromPypi
|
||||
fetchWheelFromPypi
|
||||
fetchFromLegacy
|
||||
getManyLinuxDeps
|
||||
isCompatible
|
||||
readTOML
|
||||
|
|
|
@ -28,7 +28,7 @@ pythonPackages.callPackage
|
|||
}@args:
|
||||
let
|
||||
inherit (pkgs) stdenv;
|
||||
inherit (poetryLib) isCompatible getManyLinuxDeps fetchFromPypi moduleName;
|
||||
inherit (poetryLib) isCompatible getManyLinuxDeps fetchFromLegacy fetchFromPypi moduleName;
|
||||
|
||||
inherit (import ./pep425.nix {
|
||||
inherit lib poetryLib python;
|
||||
|
@ -37,7 +37,7 @@ pythonPackages.callPackage
|
|||
;
|
||||
fileCandidates =
|
||||
let
|
||||
supportedRegex = ("^.*?(" + builtins.concatStringsSep "|" supportedExtensions + ")");
|
||||
supportedRegex = ("^.*(" + builtins.concatStringsSep "|" supportedExtensions + ")");
|
||||
matchesVersion = fname: builtins.match ("^.*" + builtins.replaceStrings [ "." ] [ "\\." ] version + ".*$") fname != null;
|
||||
hasSupportedExtension = fname: builtins.match supportedRegex fname != null;
|
||||
isCompatibleEgg = fname: ! lib.strings.hasSuffix ".egg" fname || lib.strings.hasSuffix "py${python.pythonVersion}.egg" fname;
|
||||
|
@ -48,6 +48,7 @@ pythonPackages.callPackage
|
|||
isGit = isSource && source.type == "git";
|
||||
isUrl = isSource && source.type == "url";
|
||||
isLocal = isSource && source.type == "directory";
|
||||
isLegacy = isSource && source.type == "legacy";
|
||||
localDepPath = toPath source.url;
|
||||
|
||||
buildSystemPkgs =
|
||||
|
@ -171,10 +172,19 @@ pythonPackages.callPackage
|
|||
}
|
||||
else if isLocal then
|
||||
(poetryLib.cleanPythonSources { src = localDepPath; })
|
||||
else if isLegacy then
|
||||
fetchFromLegacy
|
||||
{
|
||||
pname = name;
|
||||
inherit python;
|
||||
inherit (fileInfo) file hash;
|
||||
inherit (source) url;
|
||||
}
|
||||
else
|
||||
fetchFromPypi {
|
||||
pname = name;
|
||||
inherit (fileInfo) file hash kind;
|
||||
inherit version;
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
|
@ -8,7 +8,13 @@ self: super:
|
|||
{
|
||||
automat = super.automat.overridePythonAttrs (
|
||||
old: rec {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.m2r ];
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.m2r ];
|
||||
}
|
||||
);
|
||||
|
||||
aiohttp-swagger3 = super.aiohttp-swagger3.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -21,7 +27,7 @@ self: super:
|
|||
|
||||
# Inputs copied from nixpkgs as ansible doesn't specify it's dependencies
|
||||
# in a correct manner.
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [
|
||||
self.pycrypto
|
||||
self.paramiko
|
||||
self.jinja2
|
||||
|
@ -170,7 +176,7 @@ self: super:
|
|||
dictdiffer = super.dictdiffer.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.setuptools ];
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.setuptools ];
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -178,7 +184,7 @@ self: super:
|
|||
super.django.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedNativeBuildInputs = (old.propagatedNativeBuildInputs or [ ])
|
||||
++ [ pkgs.gettext ];
|
||||
++ [ pkgs.gettext self.pytest-runner ];
|
||||
}
|
||||
)
|
||||
);
|
||||
|
@ -193,6 +199,36 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
django-cors-headers = super.django-cors-headers.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
}
|
||||
);
|
||||
|
||||
django-hijack = super.django-hijack.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
}
|
||||
);
|
||||
|
||||
django-prometheus = super.django-prometheus.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
}
|
||||
);
|
||||
|
||||
django-rosetta = super.django-rosetta.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
}
|
||||
);
|
||||
|
||||
django-stubs-ext = super.django-stubs-ext.overridePythonAttrs (
|
||||
old: {
|
||||
prePatch = (old.prePatch or "") + "touch ../LICENSE.txt";
|
||||
}
|
||||
);
|
||||
|
||||
dlib = super.dlib.overridePythonAttrs (
|
||||
old: {
|
||||
# Parallel building enabled
|
||||
|
@ -227,6 +263,16 @@ self: super:
|
|||
'';
|
||||
};
|
||||
|
||||
# remove eth-hash dependency because eth-hash also depends on eth-utils causing a cycle.
|
||||
eth-utils = super.eth-utils.overridePythonAttrs (old: {
|
||||
propagatedBuildInputs =
|
||||
builtins.filter (i: i.pname != "eth-hash") old.propagatedBuildInputs;
|
||||
preConfigure = ''
|
||||
${old.preConfigure or ""}
|
||||
sed -i '/eth-hash/d' setup.py
|
||||
'';
|
||||
});
|
||||
|
||||
faker = super.faker.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
|
@ -244,6 +290,10 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
fastecdsa = super.fastecdsa.overridePythonAttrs (old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.gmp.dev ];
|
||||
});
|
||||
|
||||
fastparquet = super.fastparquet.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
|
@ -313,11 +363,11 @@ self: super:
|
|||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];
|
||||
buildInputs =
|
||||
(old.buildInputs or [ ])
|
||||
++ [ pkgs.hdf5 self.pkg-config self.cython ]
|
||||
++ [ pkgs.hdf5 self.pkgconfig self.cython ]
|
||||
++ lib.optional mpiSupport mpi
|
||||
;
|
||||
propagatedBuildInputs =
|
||||
old.propagatedBuildInputs
|
||||
(old.propagatedBuildInputs or [ ])
|
||||
++ lib.optionals mpiSupport [ self.mpi4py self.openssh ]
|
||||
;
|
||||
preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else "";
|
||||
|
@ -333,9 +383,25 @@ self: super:
|
|||
) else old
|
||||
);
|
||||
|
||||
hid = super.hid.overridePythonAttrs (
|
||||
old: {
|
||||
postPatch = ''
|
||||
found=
|
||||
for name in libhidapi-hidraw libhidapi-libusb libhidapi-iohidmanager libhidapi; do
|
||||
full_path=${pkgs.hidapi.out}/lib/$name${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
if test -f $full_path; then
|
||||
found=t
|
||||
sed -i -e "s|'$name\..*'|'$full_path'|" hid/__init__.py
|
||||
fi
|
||||
done
|
||||
test -n "$found" || { echo "ERROR: No known libraries found in ${pkgs.hidapi.out}/lib, please update/fix this build expression."; exit 1; }
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
horovod = super.horovod.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.mpi ];
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.mpi ];
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -399,7 +465,10 @@ self: super:
|
|||
# importlib-metadata has an incomplete dependency specification
|
||||
importlib-metadata = super.importlib-metadata.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ lib.optional self.python.isPy2 self.pathlib2;
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ lib.optional self.python.isPy2 self.pathlib2;
|
||||
|
||||
# disable the removal of pyproject.toml, required because of setuptools_scm
|
||||
dontPreferSetupPy = true;
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -411,7 +480,7 @@ self: super:
|
|||
|
||||
isort = super.isort.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.setuptools ];
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.setuptools ];
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -453,7 +522,7 @@ self: super:
|
|||
);
|
||||
|
||||
jsonslicer = super.jsonslicer.overridePythonAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkgconfig ];
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.yajl ];
|
||||
});
|
||||
|
||||
|
@ -487,7 +556,7 @@ self: super:
|
|||
|
||||
lap = super.lap.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [
|
||||
self.numpy
|
||||
];
|
||||
}
|
||||
|
@ -512,7 +581,7 @@ self: super:
|
|||
|
||||
# Set directory containing llvm-config binary
|
||||
preConfigure = ''
|
||||
export LLVM_CONFIG=${pkgs.llvm.dev}/bin/llvm-config
|
||||
export LLVM_CONFIG=${pkgs.llvm}/bin/llvm-config
|
||||
'';
|
||||
|
||||
__impureHostDeps = lib.optionals pkgs.stdenv.isDarwin [ "/usr/lib/libm.dylib" ];
|
||||
|
@ -523,7 +592,7 @@ self: super:
|
|||
|
||||
lockfile = super.lockfile.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pbr ];
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.pbr ];
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -570,7 +639,7 @@ self: super:
|
|||
EOF
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [
|
||||
pkgs.libpng
|
||||
pkgs.freetype
|
||||
]
|
||||
|
@ -650,7 +719,7 @@ self: super:
|
|||
};
|
||||
in
|
||||
{
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.mpi ];
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.mpi ];
|
||||
enableParallelBuilding = true;
|
||||
preBuild = ''
|
||||
ln -sf ${cfg} mpi.cfg
|
||||
|
@ -670,8 +739,15 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
mypy = super.mypy.overridePythonAttrs (
|
||||
old: {
|
||||
MYPY_USE_MYPYC = pkgs.stdenv.buildPlatform.is64bit;
|
||||
}
|
||||
);
|
||||
|
||||
mysqlclient = super.mysqlclient.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.libmysqlclient ];
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.libmysqlclient ];
|
||||
}
|
||||
);
|
||||
|
@ -682,7 +758,7 @@ self: super:
|
|||
self.cython
|
||||
];
|
||||
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [
|
||||
pkgs.zlib
|
||||
pkgs.netcdf
|
||||
pkgs.hdf5
|
||||
|
@ -769,7 +845,7 @@ self: super:
|
|||
in
|
||||
{
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.sqlite ];
|
||||
propagatedBuildInputs = old.propagatedBuildInputs or [ ]
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ])
|
||||
++ lib.optional withPostgres self.psycopg2
|
||||
++ lib.optional withMysql self.mysql-connector;
|
||||
}
|
||||
|
@ -777,7 +853,7 @@ self: super:
|
|||
|
||||
pillow = super.pillow.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = [ pkgs.pkg-config ] ++ (old.nativeBuildInputs or [ ]);
|
||||
nativeBuildInputs = [ pkgs.pkg-config self.pytest-runner ] ++ (old.nativeBuildInputs or [ ]);
|
||||
buildInputs = with pkgs; [ freetype libjpeg zlib libtiff libwebp tcl lcms2 ] ++ (old.buildInputs or [ ]);
|
||||
}
|
||||
);
|
||||
|
@ -924,7 +1000,7 @@ self: super:
|
|||
pkgs.pkg-config
|
||||
];
|
||||
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [
|
||||
pkgs.cairo
|
||||
pkgs.xlibsWrapper
|
||||
];
|
||||
|
@ -1028,6 +1104,16 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
pyproject-flake8 = super.pyproject-flake8.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ self.flit-core ];
|
||||
}
|
||||
);
|
||||
|
||||
pytezos = super.pytezos.override (old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.libsodium ];
|
||||
});
|
||||
|
||||
python-bugzilla = super.python-bugzilla.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
||||
|
@ -1214,6 +1300,12 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
python-snappy = super.python-snappy.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.snappy ];
|
||||
}
|
||||
);
|
||||
|
||||
ffmpeg-python = super.ffmpeg-python.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
|
@ -1228,10 +1320,20 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
pyusb = super.pyusb.overridePythonAttrs (
|
||||
old: {
|
||||
postPatch = ''
|
||||
libusb=${pkgs.libusb1.out}/lib/libusb-1.0${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
|
||||
sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
pyzmq = super.pyzmq.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.zeromq ];
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.zeromq ];
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -1298,7 +1400,7 @@ self: super:
|
|||
old:
|
||||
if old.format != "wheel" then {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.gfortran ];
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pybind11 ];
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.pybind11 ];
|
||||
setupPyBuildFlags = [ "--fcompiler='gnu95'" ];
|
||||
enableParallelBuilding = true;
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ self.numpy.blas ];
|
||||
|
@ -1329,6 +1431,17 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
secp256k1 = super.secp256k1.overridePythonAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkgconfig pkgs.autoconf pkgs.automake pkgs.libtool ];
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
doCheck = false;
|
||||
# Local setuptools versions like "x.y.post0" confuse an internal check
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace 'setuptools_version.' '"${self.setuptools.version}".'
|
||||
'';
|
||||
});
|
||||
|
||||
shapely = super.shapely.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.geos self.cython ];
|
||||
|
@ -1387,6 +1500,14 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
# The tokenizers build requires a complex rust setup (cf. nixpkgs override)
|
||||
#
|
||||
# Instead of providing a full source build, we use a wheel to keep
|
||||
# the complexity manageable for now.
|
||||
tokenizers = super.tokenizers.override {
|
||||
preferWheel = true;
|
||||
};
|
||||
|
||||
torch = lib.makeOverridable
|
||||
({ enableCuda ? false
|
||||
, cudatoolkit ? pkgs.cudatoolkit_10_1
|
||||
|
@ -1415,11 +1536,34 @@ self: super:
|
|||
propagatedBuildInputs = [
|
||||
self.numpy
|
||||
self.future
|
||||
self.typing-extensions
|
||||
];
|
||||
})
|
||||
)
|
||||
{ };
|
||||
|
||||
torchvision = lib.makeOverridable
|
||||
({ enableCuda ? false
|
||||
, cudatoolkit ? pkgs.cudatoolkit_10_1
|
||||
, pkg ? super.torchvision
|
||||
}: pkg.overrideAttrs (old: {
|
||||
|
||||
# without that autoPatchelfHook will fail because cudatoolkit is not in LD_LIBRARY_PATH
|
||||
autoPatchelfIgnoreMissingDeps = true;
|
||||
buildInputs = (old.buildInputs or [ ])
|
||||
++ [ self.torch ]
|
||||
++ lib.optionals enableCuda [
|
||||
cudatoolkit
|
||||
];
|
||||
preConfigure =
|
||||
if (enableCuda) then ''
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${self.torch}/${self.python.sitePackages}/torch/lib:${lib.makeLibraryPath [ cudatoolkit "${cudatoolkit}" ]}"
|
||||
'' else ''
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${self.torch}/${self.python.sitePackages}/torch/lib"
|
||||
'';
|
||||
}))
|
||||
{ };
|
||||
|
||||
typeguard = super.typeguard.overridePythonAttrs (old: {
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
|
@ -1427,12 +1571,18 @@ self: super:
|
|||
'';
|
||||
});
|
||||
|
||||
typed_ast = super.typed-ast.overridePythonAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
||||
self.pytest-runner
|
||||
];
|
||||
});
|
||||
|
||||
# nix uses a dash, poetry uses an underscore
|
||||
typing_extensions = super.typing_extensions or self.typing-extensions;
|
||||
|
||||
urwidtrees = super.urwidtrees.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [
|
||||
self.urwid
|
||||
];
|
||||
}
|
||||
|
@ -1476,6 +1626,7 @@ self: super:
|
|||
weasyprint = super.weasyprint.overridePythonAttrs (
|
||||
old: {
|
||||
inherit (pkgs.python3.pkgs.weasyprint) patches;
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ];
|
||||
}
|
||||
);
|
||||
|
@ -1524,7 +1675,7 @@ self: super:
|
|||
) else super.zipp
|
||||
).overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [
|
||||
self.toml
|
||||
];
|
||||
}
|
||||
|
@ -1551,9 +1702,38 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
psutil = super.psutil.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++
|
||||
lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.IOKit;
|
||||
}
|
||||
);
|
||||
|
||||
sentencepiece = super.sentencepiece.overridePythonAttrs (
|
||||
old: {
|
||||
dontUseCmakeConfigure = true;
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
|
||||
pkgs.pkg-config
|
||||
pkgs.cmake
|
||||
pkgs.gperftools
|
||||
];
|
||||
buildInputs = (old.buildInputs or [ ]) ++ [
|
||||
pkgs.sentencepiece
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
sentence-transformers = super.sentence-transformers.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs =
|
||||
(old.buildInputs or [ ])
|
||||
++ [ self.typing-extensions ];
|
||||
}
|
||||
);
|
||||
|
||||
supervisor = super.supervisor.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [
|
||||
self.meld3
|
||||
self.setuptools
|
||||
];
|
||||
|
@ -1562,7 +1742,7 @@ self: super:
|
|||
|
||||
cytoolz = super.cytoolz.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.toolz ];
|
||||
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.toolz ];
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -1607,5 +1787,52 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
wxpython = super.wxpython.overridePythonAttrs (old:
|
||||
let
|
||||
localPython = self.python.withPackages (ps: with ps; [
|
||||
setuptools
|
||||
numpy
|
||||
six
|
||||
]);
|
||||
in
|
||||
{
|
||||
DOXYGEN = "${pkgs.doxygen}/bin/doxygen";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
which
|
||||
doxygen
|
||||
gtk3
|
||||
pkg-config
|
||||
autoPatchelfHook
|
||||
] ++ (old.nativeBuildInputs or [ ]);
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
gtk3
|
||||
webkitgtk
|
||||
ncurses
|
||||
SDL2
|
||||
xorg.libXinerama
|
||||
xorg.libSM
|
||||
xorg.libXxf86vm
|
||||
xorg.libXtst
|
||||
xorg.xorgproto
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
libGLU
|
||||
libGL
|
||||
libglvnd
|
||||
mesa
|
||||
] ++ old.buildInputs;
|
||||
|
||||
buildPhase = ''
|
||||
${localPython.interpreter} build.py -v build_wx
|
||||
${localPython.interpreter} build.py -v dox etg --nodoc sip
|
||||
${localPython.interpreter} build.py -v build_py
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
${localPython.interpreter} setup.py install --skip-build --prefix=$out
|
||||
'';
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ let
|
|||
if exprs.type == "expr" then
|
||||
(
|
||||
let
|
||||
mVal = ''[a-zA-Z0-9\'"_\. ]+'';
|
||||
mVal = ''[a-zA-Z0-9\'"_\. \-]+'';
|
||||
mOp = "in|[!=<>]+";
|
||||
e = stripStr exprs.value;
|
||||
m = builtins.map stripStr (builtins.match ''^(${mVal}) *(${mOp}) *(${mVal})$'' e);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake, fetchpatch
|
||||
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake
|
||||
, libiconv
|
||||
, useMimalloc ? false
|
||||
, doCheck ? true
|
||||
|
@ -6,32 +6,16 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rust-analyzer-unwrapped";
|
||||
version = "2021-05-17";
|
||||
cargoSha256 = "sha256-uSBukInJ3FEMmMpG9DN3XeXm+hzUFqCrZORb4NIEJhw=";
|
||||
version = "2021-05-31";
|
||||
cargoSha256 = "sha256-atfpcP3esMQQ2lOFTKksQH1nV78KAic51XZi+R++vHg=";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-analyzer";
|
||||
repo = "rust-analyzer";
|
||||
rev = version;
|
||||
sha256 = "sha256-BsabpY4LArfsDPAMsggxKu1+OQZmqRe//+a5uBcuFps=";
|
||||
sha256 = "sha256-v2zS9qnvNrImQ3UqU80YagwLJKkVxwvwMMISimFbMOI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Revert updates which require rust 1.52.0.
|
||||
# We currently have rust 1.51.0 in nixpkgs.
|
||||
# https://github.com/rust-analyzer/rust-analyzer/pull/8718
|
||||
(fetchpatch {
|
||||
url = "https://github.com/rust-analyzer/rust-analyzer/pull/8718/commits/607d8a2f61e56fabb7a3bc5132592917fcdca970.patch";
|
||||
sha256 = "sha256-g1yyq/XSwGxftnqSW1bR5UeMW4gW28f4JciGvwQ/n08=";
|
||||
revert = true;
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/rust-analyzer/rust-analyzer/pull/8718/commits/6a16ec52aa0d91945577c99cdf421b303b59301e.patch";
|
||||
sha256 = "sha256-n7Ew/0fG8zPaMFCi8FVLjQZwJSaczI/QoehC6pDLrAk=";
|
||||
revert = true;
|
||||
})
|
||||
];
|
||||
|
||||
buildAndTestSubdir = "crates/rust-analyzer";
|
||||
|
||||
cargoBuildFlags = lib.optional useMimalloc "--features=mimalloc";
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "sqlx-cli";
|
||||
version = "0.5.2";
|
||||
version = "0.5.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "launchbadge";
|
||||
repo = "sqlx";
|
||||
rev = "v${version}";
|
||||
sha256 = "0jz0gddw1xp51rnap0dsyq4886x2glmr087r1lf3fxlnv6anaqn9";
|
||||
sha256 = "1051vldajdbkcxvrw2cig201c4nm68cvvnr2yia9f2ysmr68x5rh";
|
||||
};
|
||||
|
||||
cargoSha256 = "046blw366d6zjpq944g9n4cdhhv2w97qfi1ynljc9bnz03d8v39c";
|
||||
cargoSha256 = "1ry893gjrwb670v80ff61yb00jvf49yp6194gqrjvnyarjc6bbb1";
|
||||
|
||||
doCheck = false;
|
||||
cargoBuildFlags = [ "-p sqlx-cli" ];
|
||||
|
|
12
pkgs/servers/http/bozohttpd/0001-include-stdint.h.patch
Normal file
12
pkgs/servers/http/bozohttpd/0001-include-stdint.h.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/libexec/httpd/bozohttpd.c b/libexec/httpd/bozohttpd.c
|
||||
index 67083b2c6782..273cb5f5a42b 100644
|
||||
--- a/libexec/httpd/bozohttpd.c
|
||||
+++ b/libexec/httpd/bozohttpd.c
|
||||
@@ -138,6 +138,7 @@
|
||||
#include <grp.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
+#include <stdint.h>
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
88
pkgs/servers/http/bozohttpd/0002-dont-use-host-BUFSIZ.patch
Normal file
88
pkgs/servers/http/bozohttpd/0002-dont-use-host-BUFSIZ.patch
Normal file
|
@ -0,0 +1,88 @@
|
|||
diff --git a/libexec/httpd/auth-bozo.c b/libexec/httpd/auth-bozo.c
|
||||
index a2f2ee4304c1..c9eefe3313dd 100644
|
||||
--- a/libexec/httpd/auth-bozo.c
|
||||
+++ b/libexec/httpd/auth-bozo.c
|
||||
@@ -54,7 +54,7 @@ bozo_auth_check(bozo_httpreq_t *request, const char *file)
|
||||
bozohttpd_t *httpd = request->hr_httpd;
|
||||
struct stat sb;
|
||||
char dir[MAXPATHLEN], authfile[MAXPATHLEN], *basename;
|
||||
- char user[BUFSIZ], *pass;
|
||||
+ char user[BOZO_MINBUFSIZE], *pass;
|
||||
FILE *fp;
|
||||
int len;
|
||||
|
||||
@@ -144,7 +144,7 @@ bozo_auth_check_headers(bozo_httpreq_t *request, char *val, char *str,
|
||||
|
||||
if (strcasecmp(val, "authorization") == 0 &&
|
||||
strncasecmp(str, "Basic ", 6) == 0) {
|
||||
- char authbuf[BUFSIZ];
|
||||
+ char authbuf[BOZO_MINBUFSIZE];
|
||||
char *pass = NULL;
|
||||
ssize_t alen;
|
||||
|
||||
diff --git a/libexec/httpd/bozohttpd.c b/libexec/httpd/bozohttpd.c
|
||||
index 273cb5f5a42b..f619567ba822 100644
|
||||
--- a/libexec/httpd/bozohttpd.c
|
||||
+++ b/libexec/httpd/bozohttpd.c
|
||||
@@ -2275,7 +2275,7 @@ bozo_http_error(bozohttpd_t *httpd, int code, bozo_httpreq_t *request,
|
||||
}
|
||||
#endif /* !NO_USER_SUPPORT */
|
||||
|
||||
- size = snprintf(httpd->errorbuf, BUFSIZ,
|
||||
+ size = snprintf(httpd->errorbuf, BOZO_MINBUFSIZE,
|
||||
"<html><head><title>%s</title></head>\n"
|
||||
"<body><h1>%s</h1>\n"
|
||||
"%s%s: <pre>%s</pre>\n"
|
||||
@@ -2285,10 +2285,10 @@ bozo_http_error(bozohttpd_t *httpd, int code, bozo_httpreq_t *request,
|
||||
user ? user : "", file,
|
||||
reason, hostname, portbuf, hostname, portbuf);
|
||||
free(user);
|
||||
- if (size >= (int)BUFSIZ) {
|
||||
+ if (size >= (int)BOZO_MINBUFSIZE) {
|
||||
bozowarn(httpd,
|
||||
"bozo_http_error buffer too small, truncated");
|
||||
- size = (int)BUFSIZ;
|
||||
+ size = (int)BOZO_MINBUFSIZE;
|
||||
}
|
||||
|
||||
if (file_alloc)
|
||||
@@ -2515,7 +2515,7 @@ bozo_init_httpd(bozohttpd_t *httpd)
|
||||
httpd->mmapsz = BOZO_MMAPSZ;
|
||||
|
||||
/* error buffer for bozo_http_error() */
|
||||
- if ((httpd->errorbuf = malloc(BUFSIZ)) == NULL) {
|
||||
+ if ((httpd->errorbuf = malloc(BOZO_MINBUFSIZE)) == NULL) {
|
||||
fprintf(stderr,
|
||||
"bozohttpd: memory_allocation failure\n");
|
||||
return 0;
|
||||
diff --git a/libexec/httpd/bozohttpd.h b/libexec/httpd/bozohttpd.h
|
||||
index c83bd112d9d7..7b19494cf5ad 100644
|
||||
--- a/libexec/httpd/bozohttpd.h
|
||||
+++ b/libexec/httpd/bozohttpd.h
|
||||
@@ -227,6 +227,8 @@ typedef struct bozoprefs_t {
|
||||
/* only allow this many total headers bytes */
|
||||
#define BOZO_HEADERS_MAX_SIZE (16 * 1024)
|
||||
|
||||
+#define BOZO_MINBUFSIZE (4 * 1024)
|
||||
+
|
||||
/* debug flags */
|
||||
#define DEBUG_NORMAL 1
|
||||
#define DEBUG_FAT 2
|
||||
diff --git a/libexec/httpd/testsuite/t10.out b/libexec/httpd/testsuite/t10.out
|
||||
index cf410110627c..b3ab88f94fb9 100644
|
||||
--- a/libexec/httpd/testsuite/t10.out
|
||||
+++ b/libexec/httpd/testsuite/t10.out
|
||||
@@ -1,8 +1,8 @@
|
||||
HTTP/1.0 404 Not Found
|
||||
Content-Type: text/html
|
||||
-Content-Length: 1024
|
||||
-Server: bozohttpd/20140708
|
||||
+Content-Length: 4096
|
||||
+Server: bozohttpd/20210403
|
||||
|
||||
<html><head><title>404 Not Found</title></head>
|
||||
<body><h1>404 Not Found</h1>
|
||||
-/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
\ No newline at end of file
|
95
pkgs/servers/http/bozohttpd/default.nix
Normal file
95
pkgs/servers/http/bozohttpd/default.nix
Normal file
|
@ -0,0 +1,95 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, bmake
|
||||
, groff
|
||||
, inetutils
|
||||
, wget
|
||||
, openssl
|
||||
, minimal ? false
|
||||
, userSupport ? !minimal
|
||||
, cgiSupport ? !minimal
|
||||
, dirIndexSupport ? !minimal
|
||||
, dynamicContentSupport ? !minimal
|
||||
, sslSupport ? !minimal
|
||||
, luaSupport ? !minimal
|
||||
, lua
|
||||
, htpasswdSupport ? !minimal
|
||||
}:
|
||||
|
||||
let inherit (lib) optional optionals;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bozohttpd";
|
||||
version = "20210227";
|
||||
|
||||
# bozohttpd is developed in-tree in pkgsrc, canonical hashes can be found at:
|
||||
# http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/bozohttpd/distinfo
|
||||
src = fetchurl {
|
||||
url = "http://www.eterna.com.au/${pname}/${pname}-${version}.tar.bz2";
|
||||
sha512 = "b838498626ffb7f7e84f31611e0e99aaa3af64bd9376e1a13ec16313c182eebfd9ea2c2d03904497239af723bf34a3d2202dac1f2d3e55f9fd076f6d45ccfa33";
|
||||
};
|
||||
|
||||
# backport two unreleased commits to fix builds on non-netbsd platforms.
|
||||
patches = [
|
||||
# add missing `#include <stdint.h>`
|
||||
# https://freshbsd.org/netbsd/src/commit/qMGNoXfgeieZBVRC
|
||||
./0001-include-stdint.h.patch
|
||||
|
||||
# BUFSIZ is not guaranteed to be large enough
|
||||
# https://freshbsd.org/netbsd/src/commit/A4ueIHIp3JgjNVRC
|
||||
./0002-dont-use-host-BUFSIZ.patch
|
||||
];
|
||||
patchFlags = [ "-p3" ];
|
||||
|
||||
buildInputs = [ openssl ] ++ optional (luaSupport) lua;
|
||||
nativeBuildInputs = [ bmake groff ];
|
||||
|
||||
COPTS = [
|
||||
"-D_DEFAULT_SOURCE"
|
||||
"-D_GNU_SOURCE"
|
||||
|
||||
# ensure that we can serve >2GB files even on 32-bit systems.
|
||||
"-D_LARGEFILE_SOURCE"
|
||||
"-D_FILE_OFFSET_BITS=64"
|
||||
|
||||
# unpackaged dependency: https://man.netbsd.org/blocklist.3
|
||||
"-DNO_BLOCKLIST_SUPPORT"
|
||||
]
|
||||
++ optional (!userSupport) "-DNO_USER_SUPPORT"
|
||||
++ optional (!dirIndexSupport) "-DNO_DIRINDEX_SUPPORT"
|
||||
++ optional (!dynamicContentSupport) "-DNO_DYNAMIC_CONTENT"
|
||||
++ optional (!luaSupport) "-DNO_LUA_SUPPORT"
|
||||
++ optional (!sslSupport) "-DNO_SSL_SUPPORT"
|
||||
++ optional (!cgiSupport) "-DNO_CGIBIN_SUPPORT"
|
||||
++ optional (htpasswdSupport) "-DDO_HTPASSWD";
|
||||
|
||||
_LDADD = [ "-lm" ]
|
||||
++ optional (stdenv.hostPlatform.libc != "libSystem") "-lcrypt"
|
||||
++ optional (luaSupport) "-llua"
|
||||
++ optionals (sslSupport) [ "-lssl" "-lcrypto" ];
|
||||
makeFlags = [ "LDADD=$(_LDADD)" "prefix=$(out)" "MANDIR=$(out)/share/man" "BINOWN=" ];
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ inetutils wget ];
|
||||
checkFlags = optional (!cgiSupport) "CGITESTS=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Bozotic HTTP server; small and secure";
|
||||
longDescription = ''
|
||||
bozohttpd is a small and secure HTTP version 1.1 server. Its main
|
||||
feature is the lack of features, reducing the code size and improving
|
||||
verifiability.
|
||||
|
||||
It supports CGI/1.1, HTTP/1.1, HTTP/1.0, HTTP/0.9, ~user translations,
|
||||
virtual hosting support, as well as multiple IP-based servers on a
|
||||
single machine. It is capable of servicing pages via the IPv6 protocol.
|
||||
It has SSL support. It has no configuration file by design.
|
||||
'';
|
||||
homepage = "http://www.eterna.com.au/bozohttpd/";
|
||||
changelog = "http://www.eterna.com.au/bozohttpd/CHANGES";
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ maintainers.embr ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
|
@ -30,14 +30,14 @@ let
|
|||
php74-unit = php74.override phpConfig;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "1.22.0";
|
||||
version = "1.24.0";
|
||||
pname = "unit";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nginx";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-M5Q8sxI1nZi8+ixO1PHuQpQ81EwyLAsnBI5PTtm+bKA=";
|
||||
sha256 = "0214dvwz31hxjxnqk3fkqhn2xznaqdrb96m5s2k8ll8rldmk1gd6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ which ];
|
||||
|
|
2
pkgs/tools/audio/botamusique/node-packages.nix
generated
2
pkgs/tools/audio/botamusique/node-packages.nix
generated
|
@ -4527,7 +4527,7 @@ let
|
|||
name = "botamusique";
|
||||
packageName = "botamusique";
|
||||
version = "0.0.0";
|
||||
src = ../../../../../../../../../tmp/tmp.hWY9btrx5g;
|
||||
src = ../../../../../../../../../tmp/tmp.UAoivnXH3n;
|
||||
dependencies = [
|
||||
sources."@babel/code-frame-7.10.4"
|
||||
sources."@babel/compat-data-7.12.7"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"url": "https://github.com/azlux/botamusique",
|
||||
"rev": "33a9e75ba9d0a382f7a76d23a0ceb626924a8b49",
|
||||
"date": "2021-05-19T22:37:39+08:00",
|
||||
"path": "/nix/store/dqc2vjd43cixm49w8g66wvi9zmdfwsdd-botamusique",
|
||||
"sha256": "18lbgslx9vdwd5nrbkqfjvzaikp2swvv375v9gql7cg8p46w7i11",
|
||||
"rev": "ba02cdebf2e175dc371995361eafcb88ad2c1b52",
|
||||
"date": "2021-06-01T23:39:44+02:00",
|
||||
"path": "/nix/store/dp5vnj7zqv1sp1ab5xycvvqdpia9xb71-botamusique",
|
||||
"sha256": "01d51y6h38hs4ynjgz050ryy14sp5y2c3n7f80mcv0a4ls8413qp",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "fzf";
|
||||
version = "0.27.1";
|
||||
version = "0.27.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "junegunn";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-TMzyUhgOfcWXKhxy+2SeBy0mws/M+4YoitlPpYt6k9g=";
|
||||
sha256 = "sha256-JWTyZRZrW1mFy91D+eZL6iYV0CcNxJUT4JA0hrBKZZU=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-FKDCIotyra/TZ48wbpzudJZ2aI2pn+ZR4EoZ+9+19Mw=";
|
||||
|
|
|
@ -1973,6 +1973,9 @@ in
|
|||
|
||||
boxfs = callPackage ../tools/filesystems/boxfs { };
|
||||
|
||||
bozohttpd = callPackage ../servers/http/bozohttpd { };
|
||||
bozohttpd-minimal = callPackage ../servers/http/bozohttpd { minimal = true; };
|
||||
|
||||
bpytop = callPackage ../tools/system/bpytop { };
|
||||
|
||||
brasero-original = lowPrio (callPackage ../tools/cd-dvd/brasero { });
|
||||
|
|
Loading…
Reference in a new issue