Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2021-08-10 00:06:08 +00:00 committed by GitHub
commit 912311c8e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
127 changed files with 3861 additions and 1480 deletions

View File

@ -139,11 +139,9 @@ the whitelist maintainers/scripts/luarocks-packages.csv and updated by running m
[luarocks2nix](https://github.com/nix-community/luarocks) is a tool capable of generating nix derivations from both rockspec and src.rock (and favors the src.rock).
The automation only goes so far though and some packages need to be customized.
These customizations go in `pkgs/development/lua-modules/overrides.nix`.
For instance if the rockspec defines `external_dependencies`, these need to be manually added in its rockspec file then it won't work.
For instance if the rockspec defines `external_dependencies`, these need to be manually added to the overrides.nix.
You can try converting luarocks packages to nix packages with the command `nix-shell -p luarocks-nix` and then `luarocks nix PKG_NAME`.
Nix rely on luarocks to install lua packages, basically it runs:
`luarocks make --deps-mode=none --tree $out`
#### Packaging a library manually {#packaging-a-library-manually}
@ -161,8 +159,8 @@ are not packaged for luarocks. You can see a few examples at `pkgs/top-level/lua
### Lua interpreters {#lua-interpreters}
Versions 5.1, 5.2 and 5.3 of the lua interpreter are available as
respectively `lua5_1`, `lua5_2` and `lua5_3`. Luajit is available too.
Versions 5.1, 5.2, 5.3 and 5.4 of the lua interpreter are available as
respectively `lua5_1`, `lua5_2`, `lua5_3` and `lua5_4`. Luajit is available too.
The Nix expressions for the interpreters can be found in `pkgs/development/interpreters/lua-5`.
#### Attributes on lua interpreters packages {#attributes-on-lua-interpreters-packages}

View File

@ -309,7 +309,7 @@ Sample output2:
## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs}
Nix expressions for Vim plugins are stored in [pkgs/misc/vim-plugins](/pkgs/misc/vim-plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](/pkgs/misc/vim-plugins/update.py). This creates a [generated.nix](/pkgs/misc/vim-plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](/pkgs/misc/vim-plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
Nix expressions for Vim plugins are stored in [pkgs/misc/vim-plugins](/pkgs/misc/vim-plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](/pkgs/misc/vim-plugins/update.py). This creates a [generated.nix](/pkgs/misc/vim-plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](/pkgs/misc/vim-plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]@[gitref]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](/pkgs/misc/vim-plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added:

View File

@ -1,88 +1,89 @@
# nix name, luarocks name, server, version,luaversion,maintainers
alt-getopt,,,,,arobyn
ansicolors,,,,,
argparse,,,,,
basexx,,,,,
binaryheap,,,,,vcunat
bit32,,,,lua5_1,lblasc
busted,,,,,
cassowary,,,,,marsam alerque
cjson,lua-cjson,,,,
compat53,,,,,vcunat
cosmo,,,,,marsam
coxpcall,,,1.17.0-1,,
cqueues,,,,,vcunat
cyrussasl,,,,,
digestif,,,,lua5_3,
dkjson,,,,,
fifo,,,,,
http,,,,,vcunat
inspect,,,,,
ldbus,,http://luarocks.org/dev,,,
ldoc,,,,,
lgi,,,,,
linenoise,,,,,
ljsyscall,,,,lua5_1,lblasc
lpeg,,,,,vyp
lpeg_patterns,,,,,
lpeglabel,,,,,
lpty,,,,,
lrexlib-gnu,,,,,
lrexlib-pcre,,,,,vyp
lrexlib-posix,,,,,
ltermbox,,,,,
lua-cmsgpack,,,,,
lua-iconv,,,,,
lua-lsp,,http://luarocks.org/dev,,,
lua-messagepack,,,,,
lua-resty-http,,,,,
lua-resty-jwt,,,,,
lua-resty-openidc,,,,,
lua-resty-openssl,,,,,
lua-resty-session,,,,,
lua-term,,,,,
lua-toml,,,,,
lua-zlib,,,,,koral
lua_cliargs,,,,,
luabitop,,,,,
luacheck,,,,,
luacov,,,,,
luadbi,,,,,
luadbi-mysql,,,,,
luadbi-postgresql,,,,,
luadbi-sqlite3,,,,,
luadoc,,,,,
luaepnf,,,,,
luaevent,,,,,
luaexpat,,,1.3.0-1,,arobyn flosse
luaffi,,http://luarocks.org/dev,,,
luafilesystem,,,1.7.0-2,,flosse
lualogging,,,,,
luaossl,,,,lua5_1,
luaposix,,,,,vyp lblasc
luarepl,,,,,
luasec,,,,,flosse
luasocket,,,,,
luasql-sqlite3,,,,,vyp
luassert,,,,,
luasystem,,,,,
luautf8,,,,,pstn
luazip,,,,,
lua-yajl,,,,,pstn
luuid,,,,,
luv,,,,,
lyaml,,,,,lblasc
markdown,,,,,
mediator_lua,,,,,
mpack,,,,,
moonscript,,,,,arobyn
nvim-client,,,,,
penlight,,,,,
plenary.nvim,,,,lua5_1,
rapidjson,,,,,
readline,,,,,
say,,,,,
std-_debug,std._debug,,,,
std_normalize,std.normalize,,,,
stdlib,,,,,vyp
vstruct,,,,,
name,server,version,luaversion,maintainers
alt-getopt,,,,arobyn
ansicolors,,,,
bit32,,5.3.0-1,lua5_1,lblasc
argparse,,,,
basexx,,,,
binaryheap,,,,vcunat
busted,,,,
cassowary,,,,marsam alerque
compat53,,0.7-1,,vcunat
cosmo,,,,marsam
coxpcall,,1.17.0-1,,
cqueues,,,,vcunat
cyrussasl,,,,
digestif,,0.2-1,lua5_3,
dkjson,,,,
fifo,,,,
gitsigns.nvim,,,lua5_1,
http,,0.3-0,,vcunat
inspect,,,,
ldbus,http://luarocks.org/dev,,,
ldoc,,,,
lgi,,,,
linenoise,,,,
ljsyscall,,,lua5_1,lblasc
lpeg,,,,vyp
lpeg_patterns,,,,
lpeglabel,,,,
lpty,,,,
lrexlib-gnu,,,,
lrexlib-pcre,,,,vyp
lrexlib-posix,,,,
ltermbox,,,,
lua-cjson,,,,
lua-cmsgpack,,,,
lua-iconv,,,,
lua-lsp,http://luarocks.org/dev,,,
lua-messagepack,,,,
lua-resty-http,,,,
lua-resty-jwt,,,,
lua-resty-openidc,,,,
lua-resty-openssl,,,,
lua-resty-session,,,,
lua-term,,,,
lua-toml,,,,
lua-zlib,,,,koral
lua_cliargs,,,,
luabitop,,,,
luacheck,,,,
luacov,,,,
luadbi,,,,
luadbi-mysql,,,,
luadbi-postgresql,,,,
luadbi-sqlite3,,,,
luadoc,,,,
luaepnf,,,,
luaevent,,,,
luaexpat,,1.3.0-1,,arobyn flosse
luaffi,http://luarocks.org/dev,,,
luafilesystem,,1.7.0-2,,flosse
lualogging,,,,
luaossl,,,lua5_1,
luaposix,,34.1.1-1,,vyp lblasc
luarepl,,,,
luasec,,,,flosse
luasocket,,,,
luasql-sqlite3,,,,vyp
luassert,,,,
luasystem,,,,
luautf8,,,,pstn
luazip,,,,
lua-yajl,,,,pstn
luuid,,,,
luv,,1.30.0-0,,
lyaml,,,,lblasc
markdown,,,,
mediator_lua,,,,
mpack,,,,
moonscript,,,,arobyn
nvim-client,,,,
penlight,,,,
plenary.nvim,,,lua5_1,
rapidjson,,,,
readline,,,,
say,,,,
std._debug,,,,
std.normalize,,,,
stdlib,,,,vyp
vstruct,,,,

1 # nix name name luarocks name server version luaversion maintainers
2 alt-getopt alt-getopt arobyn
3 ansicolors ansicolors
4 argparse bit32 5.3.0-1 lua5_1 lblasc
5 basexx argparse
6 binaryheap basexx vcunat
7 bit32 binaryheap lua5_1 lblasc vcunat
8 busted busted
9 cassowary cassowary marsam alerque
10 cjson compat53 lua-cjson 0.7-1 vcunat
11 compat53 cosmo vcunat marsam
12 cosmo coxpcall 1.17.0-1 marsam
13 coxpcall cqueues 1.17.0-1 vcunat
14 cqueues cyrussasl vcunat
15 cyrussasl digestif 0.2-1 lua5_3
16 digestif dkjson lua5_3
17 dkjson fifo
18 fifo gitsigns.nvim lua5_1
19 http http 0.3-0 vcunat
20 inspect inspect
21 ldbus ldbus http://luarocks.org/dev
22 ldoc ldoc
23 lgi lgi
24 linenoise linenoise
25 ljsyscall ljsyscall lua5_1 lblasc
26 lpeg lpeg vyp
27 lpeg_patterns lpeg_patterns
28 lpeglabel lpeglabel
29 lpty lpty
30 lrexlib-gnu lrexlib-gnu
31 lrexlib-pcre lrexlib-pcre vyp
32 lrexlib-posix lrexlib-posix
33 ltermbox ltermbox
34 lua-cmsgpack lua-cjson
35 lua-iconv lua-cmsgpack
36 lua-lsp lua-iconv http://luarocks.org/dev
37 lua-messagepack lua-lsp http://luarocks.org/dev
38 lua-resty-http lua-messagepack
39 lua-resty-jwt lua-resty-http
40 lua-resty-openidc lua-resty-jwt
41 lua-resty-openssl lua-resty-openidc
42 lua-resty-session lua-resty-openssl
43 lua-term lua-resty-session
44 lua-toml lua-term
45 lua-zlib lua-toml koral
46 lua_cliargs lua-zlib koral
47 luabitop lua_cliargs
48 luacheck luabitop
49 luacov luacheck
50 luadbi luacov
51 luadbi-mysql luadbi
52 luadbi-postgresql luadbi-mysql
53 luadbi-sqlite3 luadbi-postgresql
54 luadoc luadbi-sqlite3
55 luaepnf luadoc
56 luaevent luaepnf
57 luaexpat luaevent 1.3.0-1 arobyn flosse
58 luaffi luaexpat http://luarocks.org/dev 1.3.0-1 arobyn flosse
59 luafilesystem luaffi http://luarocks.org/dev 1.7.0-2 flosse
60 lualogging luafilesystem 1.7.0-2 flosse
61 luaossl lualogging lua5_1
62 luaposix luaossl lua5_1 vyp lblasc
63 luarepl luaposix 34.1.1-1 vyp lblasc
64 luasec luarepl flosse
65 luasocket luasec flosse
66 luasql-sqlite3 luasocket vyp
67 luassert luasql-sqlite3 vyp
68 luasystem luassert
69 luautf8 luasystem pstn
70 luazip luautf8 pstn
71 lua-yajl luazip pstn
72 luuid lua-yajl pstn
73 luv luuid
74 lyaml luv 1.30.0-0 lblasc
75 markdown lyaml lblasc
76 mediator_lua markdown
77 mpack mediator_lua
78 moonscript mpack arobyn
79 nvim-client moonscript arobyn
80 penlight nvim-client
81 plenary.nvim penlight lua5_1
82 rapidjson plenary.nvim lua5_1
83 readline rapidjson
84 say readline
85 std-_debug say std._debug
86 std_normalize std._debug std.normalize
87 stdlib std.normalize vyp
88 vstruct stdlib vyp
89 vstruct

View File

@ -28,6 +28,7 @@ from pathlib import Path
from typing import Dict, List, Optional, Tuple, Union, Any, Callable
from urllib.parse import urljoin, urlparse
from tempfile import NamedTemporaryFile
from dataclasses import dataclass
import git
@ -82,6 +83,13 @@ def make_request(url: str) -> urllib.request.Request:
headers["Authorization"] = f"token {token}"
return urllib.request.Request(url, headers=headers)
@dataclass
class PluginDesc:
owner: str
repo: str
branch: str
alias: str
class Repo:
def __init__(
@ -201,15 +209,39 @@ class Editor:
deprecated: Optional[Path] = None,
cache_file: Optional[str] = None,
):
log.debug("get_plugins:", get_plugins)
self.name = name
self.root = root
self.get_plugins = get_plugins
self.generate_nix = generate_nix
self._generate_nix = generate_nix
self.default_in = default_in or root.joinpath(f"{name}-plugin-names")
self.default_out = default_out or root.joinpath("generated.nix")
self.deprecated = deprecated or root.joinpath("deprecated.json")
self.cache_file = cache_file or f"{name}-plugin-cache.json"
def get_current_plugins(self):
"""To fill the cache"""
return get_current_plugins(self)
def load_plugin_spec(self, plugin_file) -> List[PluginDesc]:
return load_plugin_spec(plugin_file)
def generate_nix(self, plugins, outfile):
'''Returns nothing for now, writes directly to outfile'''
self._generate_nix(plugins, outfile)
def get_update(self, input_file: str, outfile: str, proc: int):
return get_update(input_file, outfile, proc, editor=self)
@property
def attr_path(self):
return self.name + "Plugins"
def rewrite_input(self, *args, **kwargs):
return rewrite_input(*args, **kwargs)
class CleanEnvironment(object):
def __enter__(self) -> None:
@ -228,7 +260,9 @@ class CleanEnvironment(object):
def get_current_plugins(editor: Editor) -> List[Plugin]:
with CleanEnvironment():
out = subprocess.check_output(["nix", "eval", "--json", editor.get_plugins])
cmd = ["nix", "eval", "--json", editor.get_plugins]
log.debug("Running command %s", cmd)
out = subprocess.check_output(cmd)
data = json.loads(out)
plugins = []
for name, attr in data.items():
@ -244,12 +278,13 @@ def prefetch_plugin(
alias: Optional[str],
cache: "Optional[Cache]" = None,
) -> Tuple[Plugin, Dict[str, str]]:
log.info("Prefetching plugin %s", repo_name)
log.info(f"Fetching last commit for plugin {user}/{repo_name}@{branch}")
repo = Repo(user, repo_name, branch, alias)
commit, date = repo.latest_commit()
has_submodules = repo.has_submodules()
cached_plugin = cache[commit] if cache else None
if cached_plugin is not None:
log.debug("Cache hit !")
cached_plugin.name = alias or repo_name
cached_plugin.date = date
return cached_plugin, repo.redirect
@ -306,8 +341,7 @@ def check_results(
sys.exit(1)
def parse_plugin_line(line: str) -> Tuple[str, str, str, Optional[str]]:
def parse_plugin_line(line: str) -> PluginDesc:
branch = "master"
alias = None
name, repo = line.split("/")
@ -317,15 +351,15 @@ def parse_plugin_line(line: str) -> Tuple[str, str, str, Optional[str]]:
if "@" in repo:
repo, branch = repo.split("@")
return (name.strip(), repo.strip(), branch.strip(), alias)
return PluginDesc(name.strip(), repo.strip(), branch.strip(), alias)
def load_plugin_spec(plugin_file: str) -> List[Tuple[str, str, str, Optional[str]]]:
def load_plugin_spec(plugin_file: str) -> List[PluginDesc]:
plugins = []
with open(plugin_file) as f:
for line in f:
plugin = parse_plugin_line(line)
if not plugin[0]:
if not plugin.owner:
msg = f"Invalid repository {line}, must be in the format owner/repo[ as alias]"
print(msg, file=sys.stderr)
sys.exit(1)
@ -387,12 +421,11 @@ class Cache:
def prefetch(
args: Tuple[str, str, str, Optional[str]], cache: Cache
args: PluginDesc, cache: Cache
) -> Tuple[str, str, Union[Exception, Plugin], dict]:
assert len(args) == 4
owner, repo, branch, alias = args
owner, repo = args.owner, args.repo
try:
plugin, redirect = prefetch_plugin(owner, repo, branch, alias, cache)
plugin, redirect = prefetch_plugin(owner, repo, args.branch, args.alias, cache)
cache[plugin.commit] = plugin
return (owner, repo, plugin, redirect)
except Exception as e:
@ -433,7 +466,7 @@ def rewrite_input(
with open(input_file, "w") as f:
f.writelines(lines)
# TODO move to Editor ?
def parse_args(editor: Editor):
parser = argparse.ArgumentParser(
description=(
@ -446,7 +479,7 @@ def parse_args(editor: Editor):
dest="add_plugins",
default=[],
action="append",
help=f"Plugin to add to {editor.name}Plugins from Github in the form owner/repo",
help=f"Plugin to add to {editor.attr_path} from Github in the form owner/repo",
)
parser.add_argument(
"--input-names",
@ -493,11 +526,11 @@ def commit(repo: git.Repo, message: str, files: List[Path]) -> None:
def get_update(input_file: str, outfile: str, proc: int, editor: Editor):
cache: Cache = Cache(get_current_plugins(editor), editor.cache_file)
cache: Cache = Cache(editor.get_current_plugins(), editor.cache_file)
_prefetch = functools.partial(prefetch, cache=cache)
def update() -> dict:
plugin_names = load_plugin_spec(input_file)
plugin_names = editor.load_plugin_spec(input_file)
try:
pool = Pool(processes=proc)
@ -522,33 +555,33 @@ def update_plugins(editor: Editor):
log.info("Start updating plugins")
nixpkgs_repo = git.Repo(editor.root, search_parent_directories=True)
update = get_update(args.input_file, args.outfile, args.proc, editor)
update = editor.get_update(args.input_file, args.outfile, args.proc)
redirects = update()
rewrite_input(args.input_file, editor.deprecated, redirects)
editor.rewrite_input(args.input_file, editor.deprecated, redirects)
autocommit = not args.no_commit
if autocommit:
commit(nixpkgs_repo, f"{editor.name}Plugins: update", [args.outfile])
commit(nixpkgs_repo, f"{editor.attr_path}: update", [args.outfile])
if redirects:
update()
if autocommit:
commit(
nixpkgs_repo,
f"{editor.name}Plugins: resolve github repository redirects",
f"{editor.attr_path}: resolve github repository redirects",
[args.outfile, args.input_file, editor.deprecated],
)
for plugin_line in args.add_plugins:
rewrite_input(args.input_file, editor.deprecated, append=(plugin_line + "\n",))
editor.rewrite_input(args.input_file, editor.deprecated, append=(plugin_line + "\n",))
update()
plugin = fetch_plugin_from_pluginline(plugin_line)
if autocommit:
commit(
nixpkgs_repo,
"{editor}Plugins.{name}: init at {version}".format(
"{editor.attr_path}.{name}: init at {version}".format(
editor=editor.name, name=plugin.normalized_name, version=plugin.version
),
[args.outfile, args.input_file],

View File

@ -1,140 +1,179 @@
#!/usr/bin/env nix-shell
#!nix-shell update-luarocks-shell.nix -i bash
#!nix-shell -p nix-prefetch-git luarocks-nix python3 python3Packages.GitPython nix -i python3
# You'll likely want to use
# ``
# nixpkgs $ maintainers/scripts/update-luarocks-packages pkgs/development/lua-modules/generated-packages.nix
# ``
# to update all libraries in that folder.
# to debug, redirect stderr to stdout with 2>&1
# format:
# $ nix run nixpkgs.python3Packages.black -c black update.py
# type-check:
# $ nix run nixpkgs.python3Packages.mypy -c mypy update.py
# linted:
# $ nix run nixpkgs.python3Packages.flake8 -c flake8 --ignore E501,E265,E402 update.py
# stop the script upon C-C
set -eu -o pipefail
import inspect
import os
import tempfile
import shutil
from dataclasses import dataclass
import subprocess
import csv
import logging
CSV_FILE="maintainers/scripts/luarocks-packages.csv"
from typing import List
from pathlib import Path
LOG_LEVELS = {
logging.getLevelName(level): level for level in [
logging.DEBUG, logging.INFO, logging.WARN, logging.ERROR ]
}
log = logging.getLogger()
log.addHandler(logging.StreamHandler())
ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))).parent.parent
from pluginupdate import Editor, parse_args, update_plugins, PluginDesc, CleanEnvironment
PKG_LIST="maintainers/scripts/luarocks-packages.csv"
TMP_FILE="$(mktemp)"
# Set in the update-luarocks-shell.nix
NIXPKGS_PATH="$LUAROCKS_NIXPKGS_PATH"
export LUAROCKS_CONFIG="$NIXPKGS_PATH/maintainers/scripts/luarocks-config.lua"
GENERATED_NIXFILE="pkgs/development/lua-modules/generated-packages.nix"
LUAROCKS_CONFIG="$NIXPKGS_PATH/maintainers/scripts/luarocks-config.lua"
# 10 is a pretty arbitrary number of simultaneous jobs, but it is generally
# impolite to hit a webserver with *too* many simultaneous connections :)
PARALLEL_JOBS=1
exit_trap() {
local lc="$BASH_COMMAND" rc=$?
test $rc -eq 0 || echo -e "*** error $rc: $lc.\nGenerated temporary file in $TMP_FILE" >&2
}
print_help() {
echo "Usage: $0 <GENERATED_FILE>"
echo "(most likely pkgs/development/lua-modules/generated-packages.nix)"
echo ""
echo " -c <CSV_FILE> to set the list of luarocks package to generate"
exit 1
}
if [ $# -lt 1 ]; then
print_help
exit 1
fi
trap exit_trap EXIT
while getopts ":hc:" opt; do
case $opt in
h)
print_help
;;
c)
echo "Loading package list from $OPTARG !" >&2
CSV_FILE="$OPTARG"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
;;
esac
shift $((OPTIND - 1))
done
GENERATED_NIXFILE="$1"
HEADER="
/* ${GENERATED_NIXFILE} is an auto-generated file -- DO NOT EDIT!
HEADER = """
/* {GENERATED_NIXFILE} is an auto-generated file -- DO NOT EDIT!
Regenerate it with:
nixpkgs$ ${0} ${GENERATED_NIXFILE}
nixpkgs$ ./maintainers/scripts/update-luarocks-packages
These packages are manually refined in lua-overrides.nix
You can customize the generated packages in pkgs/development/lua-modules/overrides.nix
*/
{ self, stdenv, lib, fetchurl, fetchgit, pkgs, ... } @ args:
""".format(GENERATED_NIXFILE=GENERATED_NIXFILE)
FOOTER="""
}
/* GENERATED - do not edit this file */
"""
@dataclass
class LuaPlugin:
name: str
version: str
server: str
luaversion: str
maintainers: str
@property
def normalized_name(self) -> str:
return self.name.replace(".", "-")
# rename Editor to LangUpdate/ EcosystemUpdater
class LuaEditor(Editor):
def get_current_plugins(self):
return []
def load_plugin_spec(self, input_file) -> List[PluginDesc]:
luaPackages = []
csvfilename=input_file
log.info("Loading package descriptions from %s", csvfilename)
with open(csvfilename, newline='') as csvfile:
reader = csv.DictReader(csvfile,)
for row in reader:
# name,server,version,luaversion,maintainers
plugin = LuaPlugin(**row)
luaPackages.append(plugin)
return luaPackages
@property
def attr_path(self):
return "luaPackages"
def get_update(self, input_file: str, outfile: str, _: int):
def update() -> dict:
plugin_specs = self.load_plugin_spec(input_file)
self.generate_nix(plugin_specs, outfile)
redirects = []
return redirects
return update
def rewrite_input(self, *args, **kwargs):
# not implemented yet
pass
def generate_nix(
plugins: List[LuaPlugin],
outfilename: str
):
sorted_plugins = sorted(plugins, key=lambda v: v.name.lower())
# plug = {}
# selon le manifest luarocks.org/manifest
def _generate_pkg_nix(plug):
cmd = [ "luarocks", "nix", plug.name]
if plug.server:
cmd.append(f"--only-server={plug.server}")
if plug.maintainers:
cmd.append(f"--maintainers={plug.maintainers}")
if plug.version:
cmd.append(plug.version)
if plug.luaversion:
with CleanEnvironment():
local_pkgs = str(ROOT.resolve())
cmd2 = ["nix-build", "--no-out-link", local_pkgs, "-A", f"{plug.luaversion}"]
log.debug("running %s", cmd2)
lua_drv_path=subprocess.check_output(cmd2, text=True).strip()
cmd.append(f"--lua-dir={lua_drv_path}/bin")
log.debug("running %s", cmd)
output = subprocess.check_output(cmd, text=True)
return output
with tempfile.NamedTemporaryFile("w+") as f:
f.write(HEADER)
f.write("""
{ self, stdenv, lib, fetchurl, fetchgit, ... } @ args:
self: super:
with self;
{
"
""")
FOOTER="
}
/* GENERATED */
"
for plugin in sorted_plugins:
function convert_pkg() {
nix_pkg_name="$1"
lua_pkg_name="$2"
server="$3"
pkg_version="$4"
lua_version="$5"
maintainers="$6"
nix_expr = _generate_pkg_nix(plugin)
f.write(f"{plugin.normalized_name} = {nix_expr}"
)
f.write(FOOTER)
f.flush()
if [ "${nix_pkg_name:0:1}" == "#" ]; then
echo "Skipping comment ${*}" >&2
return
fi
# if everything went fine, move the generated file to its destination
# using copy since move doesn't work across disks
shutil.copy(f.name, outfilename)
# Normalize package name
nix_pkg_name_normalized=$(sed 's/\./-/' <(echo "$nix_pkg_name"))
print(f"updated {outfilename}")
if [ -z "$lua_pkg_name" ]; then
echo "Using nix_name as lua_pkg_name for '$nix_pkg_name'" >&2
lua_pkg_name="$nix_pkg_name"
fi
def load_plugin_spec():
pass
echo "Building expression for $lua_pkg_name (version $pkg_version) from server [$server]" >&2
luarocks_args=(nix)
if [[ -n $server ]]; then
luarocks_args+=("--only-server=$server")
fi
if [[ -n $maintainers ]]; then
luarocks_args+=("--maintainers=$maintainers")
fi
if [[ -n $lua_version ]]; then
lua_drv_path=$(nix-build --no-out-link "$NIXPKGS_PATH" -A "$lua_version")
luarocks_args+=("--lua-dir=$lua_drv_path/bin")
fi
luarocks_args+=("$lua_pkg_name")
if [[ -n $pkg_version ]]; then
luarocks_args+=("$pkg_version")
fi
echo "Running 'luarocks ${luarocks_args[*]}'" >&2
if drv="$nix_pkg_name_normalized = $(luarocks "${luarocks_args[@]}")"; then
echo "$drv"
else
echo "Failed to convert $nix_pkg_name" >&2
return 1
fi
}
# params needed when called via callPackage
echo "$HEADER" | tee "$TMP_FILE"
def main():
# Ensure parallel can run our bash function
export -f convert_pkg
export SHELL=bash
# Read each line in the csv file and run convert_pkg for each, in parallel
parallel --group --keep-order --halt now,fail=1 --jobs "$PARALLEL_JOBS" --colsep ',' convert_pkg {} <"$CSV_FILE" | tee -a "$TMP_FILE"
editor = LuaEditor("lua", ROOT, '', generate_nix,
default_in = ROOT.joinpath(PKG_LIST),
default_out = ROOT.joinpath(GENERATED_NIXFILE)
)
# close the set
echo "$FOOTER" | tee -a "$TMP_FILE"
args = parse_args(editor)
log.setLevel(LOG_LEVELS[args.debug])
cp "$TMP_FILE" "$GENERATED_NIXFILE"
update_plugins(editor)
if __name__ == "__main__":
main()
# vim: set ts=4 sw=4 ft=sh:

View File

@ -156,6 +156,14 @@
<link linkend="opt-services.moonraker.enable">moonraker</link>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://github.com/influxdata/influxdb">influxdb2</link>,
a Scalable datastore for metrics, events, and real-time
analytics. Available as
<link linkend="opt-services.influxdb2.enable">services.influxdb2</link>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-21.11-incompatibilities">

View File

@ -48,6 +48,8 @@ pt-services.clipcat.enable).
- [moonraker](https://github.com/Arksine/moonraker), an API web server for Klipper.
Available as [moonraker](#opt-services.moonraker.enable).
- [influxdb2](https://github.com/influxdata/influxdb), a Scalable datastore for metrics, events, and real-time analytics. Available as [services.influxdb2](#opt-services.influxdb2.enable).
## Backward Incompatibilities {#sec-release-21.11-incompatibilities}
- The `staticjinja` package has been upgraded from 1.0.4 to 3.0.1

View File

@ -321,6 +321,7 @@
./services/databases/foundationdb.nix
./services/databases/hbase.nix
./services/databases/influxdb.nix
./services/databases/influxdb2.nix
./services/databases/memcached.nix
./services/databases/monetdb.nix
./services/databases/mongodb.nix

View File

@ -0,0 +1,53 @@
{ config, lib, pkgs, ... }:
with lib;
let
format = pkgs.formats.json { };
cfg = config.services.influxdb2;
configFile = format.generate "config.json" cfg.settings;
in
{
options = {
services.influxdb2 = {
enable = mkEnableOption "the influxdb2 server";
package = mkOption {
default = pkgs.influxdb2;
defaultText = "pkgs.influxdb2";
description = "influxdb2 derivation to use.";
type = types.package;
};
settings = mkOption {
default = { };
description = "configuration options for influxdb2, see https://docs.influxdata.com/influxdb/v2.0/reference/config-options for details.";
type = format.type;
};
};
};
config = mkIf cfg.enable {
assertions = [{
assertion = !(builtins.hasAttr "bolt-path" cfg.settings) && !(builtins.hasAttr "engine-path" cfg.settings);
message = "services.influxdb2.config: bolt-path and engine-path should not be set as they are managed by systemd";
}];
systemd.services.influxdb2 = {
description = "InfluxDB is an open-source, distributed, time series database";
documentation = [ "https://docs.influxdata.com/influxdb/" ];
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
environment = {
INFLUXD_CONFIG_PATH = "${configFile}";
};
serviceConfig = {
ExecStart = "${cfg.package}/bin/influxd --bolt-path \${STATE_DIRECTORY}/influxd.bolt --engine-path \${STATE_DIRECTORY}/engine";
StateDirectory = "influxdb2";
DynamicUser = true;
CapabilityBoundingSet = "";
SystemCallFilter = "@system-service";
LimitNOFILE = 65536;
KillMode = "control-group";
Restart = "on-failure";
};
};
};
meta.maintainers = with lib.maintainers; [ nickcao ];
}

View File

@ -102,8 +102,8 @@ in
plugins = mkOption {
type = types.listOf types.package;
default = with pkgs; [ nagiosPluginsOfficial ssmtp mailutils ];
defaultText = "[pkgs.nagiosPluginsOfficial pkgs.ssmtp pkgs.mailutils]";
default = with pkgs; [ monitoring-plugins ssmtp mailutils ];
defaultText = "[pkgs.monitoring-plugins pkgs.ssmtp pkgs.mailutils]";
description = "
Packages to be added to the Nagios <envar>PATH</envar>.
Typically used to add plugins, but can be anything.

View File

@ -69,6 +69,7 @@ in
cjdns = handleTest ./cjdns.nix {};
clickhouse = handleTest ./clickhouse.nix {};
cloud-init = handleTest ./cloud-init.nix {};
cntr = handleTest ./cntr.nix {};
cockroachdb = handleTestOn ["x86_64-linux"] ./cockroachdb.nix {};
consul = handleTest ./consul.nix {};
containers-bridge = handleTest ./containers-bridge.nix {};
@ -125,8 +126,9 @@ in
fancontrol = handleTest ./fancontrol.nix {};
fcitx = handleTest ./fcitx {};
ferm = handleTest ./ferm.nix {};
firefox = handleTest ./firefox.nix {};
firefox-esr = handleTest ./firefox.nix { esr = true; };
firefox = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox; };
firefox-esr-78 = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-esr-78; };
firefox-esr-91 = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-esr-91; };
firejail = handleTest ./firejail.nix {};
firewall = handleTest ./firewall.nix {};
fish = handleTest ./fish.nix {};

63
nixos/tests/cntr.nix Normal file
View File

@ -0,0 +1,63 @@
# Test for cntr tool
{ system ? builtins.currentSystem, config ? { }
, pkgs ? import ../.. { inherit system config; }, lib ? pkgs.lib }:
let
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
mkOCITest = backend:
makeTest {
name = "cntr-${backend}";
meta = { maintainers = with lib.maintainers; [ srk mic92 ]; };
nodes = {
${backend} = { pkgs, ... }: {
environment.systemPackages = [ pkgs.cntr ];
virtualisation.oci-containers = {
inherit backend;
containers.nginx = {
image = "nginx-container";
imageFile = pkgs.dockerTools.examples.nginx;
ports = [ "8181:80" ];
};
};
};
};
testScript = ''
start_all()
${backend}.wait_for_unit("${backend}-nginx.service")
result = ${backend}.wait_until_succeeds(
"cntr attach -t ${backend} nginx sh -- -c 'curl localhost | grep Hello'"
)
assert "Hello" in result
'';
};
mkContainersTest = makeTest {
name = "cntr-containers";
meta = with pkgs.lib.maintainers; { maintainers = [ sorki mic92 ]; };
machine = { lib, ... }: {
environment.systemPackages = [ pkgs.cntr ];
containers.test = {
autoStart = true;
privateNetwork = true;
hostAddress = "172.16.0.1";
localAddress = "172.16.0.2";
config = { };
};
};
testScript = ''
machine.start()
machine.wait_for_unit("container@test.service")
machine.succeed("cntr attach test sh -- -c 'ping -c5 172.16.0.1'")
'';
};
in {
nixos-container = mkContainersTest;
} // (lib.foldl' (attrs: backend: attrs // { ${backend} = mkOCITest backend; })
{ } [ "docker" "podman" ])

View File

@ -1,4 +1,4 @@
import ./make-test-python.nix ({ pkgs, esr ? false, ... }: {
import ./make-test-python.nix ({ pkgs, firefoxPackage, ... }: {
name = "firefox";
meta = with pkgs.lib.maintainers; {
maintainers = [ eelco shlevy ];
@ -8,9 +8,10 @@ import ./make-test-python.nix ({ pkgs, esr ? false, ... }: {
{ pkgs, ... }:
{ imports = [ ./common/x11.nix ];
environment.systemPackages =
(if esr then [ pkgs.firefox-esr ] else [ pkgs.firefox ])
++ [ pkgs.xdotool ];
environment.systemPackages = [
firefoxPackage
pkgs.xdotool
];
# Need some more memory to record audio.
virtualisation.memorySize = "500";

View File

@ -163,7 +163,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
'';
tls-cert = pkgs.runCommandNoCC "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=pleroma.nixos.test'
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=pleroma.nixos.test' -days 36500
mkdir -p $out
cp key.pem cert.pem $out
'';
@ -202,6 +202,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
security.pki.certificateFiles = [ "${tls-cert}/cert.pem" ];
networking.extraHosts = hosts nodes;
networking.firewall.enable = false;
virtualisation.memorySize = 512;
environment.systemPackages = with pkgs; [
provision-db
provision-secrets

View File

@ -15,13 +15,13 @@ assert withGtk3 -> gtk3 != null;
stdenv.mkDerivation rec {
pname = "carla";
version = "2.3.1";
version = "2.3.2";
src = fetchFromGitHub {
owner = "falkTX";
repo = pname;
rev = "v${version}";
sha256 = "sha256-LM7wRvUg2Q3f4qBZN1MPvsLkdl1ziArCfhdalyD1G3w=";
sha256 = "sha256-en3eQtRUd2schpIccnuD42+wTYOAG9zsD6yNRA73bKE=";
};
nativeBuildInputs = [

View File

@ -2,11 +2,11 @@
mkDerivation rec {
pname = "drumkv1";
version = "0.9.18";
version = "0.9.23";
src = fetchurl {
url = "mirror://sourceforge/drumkv1/${pname}-${version}.tar.gz";
sha256 = "1bzkaz7sqx1pvirja8zm7i2ckzl5ad6xspr4840389ik3l8qpnr5";
sha256 = "sha256-gNscsqGpEfU1CNJDlBAzum9M0vzJSm6Wx5b/zhOt+sk=";
};
buildInputs = [ libjack2 alsa-lib libsndfile liblo lv2 qt5.qtbase qt5.qttools ];

View File

@ -70,7 +70,48 @@ let
)
);
overrides = {
overrides = lib.optionalAttrs (variant == "stable") {
# upstream issue: missing file header
speech-tagger = markBroken super.speech-tagger;
# upstream issue: missing file header
textmate = markBroken super.textmate;
# upstream issue: missing file header
window-numbering = markBroken super.window-numbering;
# upstream issue: missing file header
voca-builder = markBroken super.voca-builder;
# upstream issue: missing file header
initsplit = markBroken super.initsplit;
# upstream issue: missing file header
jsfmt = markBroken super.jsfmt;
# upstream issue: missing file header
maxframe = markBroken super.maxframe;
# upstream issue: missing file header
connection = markBroken super.connection;
# upstream issue: missing file header
dictionary = markBroken super.dictionary;
# upstream issue: missing file header
link = markBroken super.link;
# upstream issue: missing file header
bufshow = markBroken super.bufshow;
# upstream issue: missing file header
elmine = markBroken super.elmine;
# upstream issue: missing file header
ido-complete-space-or-hyphen = markBroken super.ido-complete-space-or-hyphen;
} // {
# Expects bash to be at /bin/bash
ac-rtags = fix-rtags super.ac-rtags;
@ -391,33 +432,9 @@ let
package-plus = super."package+";
rect-plus = super."rect+";
# upstream issue: missing file header
bufshow = markBroken super.bufshow;
# upstream issue: missing file header
connection = markBroken super.connection;
# upstream issue: missing file header
dictionary = markBroken super.dictionary;
# upstream issue: missing file header
elmine = markBroken super.elmine;
# upstream issue: missing file header
ido-complete-space-or-hyphen = markBroken super.ido-complete-space-or-hyphen;
# upstream issue: missing file header
initsplit = markBroken super.initsplit;
# upstream issue: missing file header
instapaper = markBroken super.instapaper;
# upstream issue: missing file header
jsfmt = markBroken super.jsfmt;
# upstream issue: missing file header
maxframe = markBroken super.maxframe;
# upstream issue: doesn't build
magit-stgit = markBroken super.magit-stgit;
@ -433,24 +450,9 @@ let
# upstream issue: missing file header
qiita = markBroken super.qiita;
# upstream issue: missing file header
speech-tagger = markBroken super.speech-tagger;
# upstream issue: missing file header
sql-presto = markBroken super.sql-presto;
# upstream issue: missing file header
textmate = markBroken super.textmate;
# upstream issue: missing file header
link = markBroken super.link;
# upstream issue: missing file header
voca-builder = markBroken super.voca-builder;
# upstream issue: missing file header
window-numbering = markBroken super.window-numbering;
editorconfig = super.editorconfig.overrideAttrs (attrs: {
propagatedUserEnvPkgs = [ pkgs.editorconfig-core-c ];
});

View File

@ -14,17 +14,17 @@ let
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
sha256 = {
x86_64-linux = "049spg4c1arkw97mg0h046kiirmcrjj97sy4ldiblwldjn510acw";
x86_64-darwin = "0g6b1891ag4a6p7rlkfka5v4nbmpr4ckkmibhw8l3wa9zdzs77x6";
aarch64-linux = "1qvk6cn5v9bz4vl5ifpdgrba94v6a54xx8s3fxdkj3lqvq27kpd1";
aarch64-darwin = "1whgjkxy70ifx1vaddxr8f1xcg651fhca4x7rzidzbyyf3baghy0";
armv7l-linux = "1k45s81s4ispc0vz7i17a7gss05d82vpymxgangg6f1yxwz944r4";
x86_64-linux = "14j1bss4bqw39ijmyh0kyr5xgzq61bc0if7g94jkvdbngz6fa25f";
x86_64-darwin = "0922r49475j1i8jrx5935bly7cv26hniz9iqf30qj6qs6d8kibci";
aarch64-linux = "11kkys3fsf4a4hvqv524fkdl686addd3ygzz0mav09xh8wjqbisw";
aarch64-darwin = "1xk56ww2ndksi6sqnr42zcqx2fl52aip3jb4fmdmqg1cvllfx0sd";
armv7l-linux = "1jiyjknl2xxivifixcwvyi6qsq7kr71gbalzdj6xca2i6pc1gbvp";
}.${system};
in
callPackage ./generic.nix rec {
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.58.2";
version = "1.59.0";
pname = "vscode";
executableName = "code" + lib.optionalString isInsiders "-insiders";

View File

@ -13,10 +13,10 @@ let
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
sha256 = {
x86_64-linux = "11h4c5ghgn3qrg66jh2par3cl3fqzn9xb7gdniww4badnyajnij8";
x86_64-darwin = "0hd3qdxg4cknk3fxv509jlblwmfx65bm2a4arsg255224dpg64n2";
aarch64-linux = "0waakj413kqf68sawajd3n24qdbx6b2svyb4lgbn0sy1apc96s3c";
armv7l-linux = "1ij2bmsk601f1vjljj6gvxsxrcjqf2m74s9kc006hmcz7czjgk8f";
x86_64-linux = "0yx0h7rd8v9j3yq863dj78bm587s8lpisbn1skb5whv6qv88x7c0";
x86_64-darwin = "1b5jr08cgl49rh26id8iwi64d32ssr7kis72zcqg0jkw7larxvvh";
aarch64-linux = "1a62krnilfi7nr7mmxyv3danj7h2yfdwg784q8vhrdjyqjd8gjbs";
armv7l-linux = "1axazx7hf6iw0dq1m2049kfrmk8jndycz9pcn3csj6rm65plg746";
}.${system};
sourceRoot = {
@ -31,7 +31,7 @@ in
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.58.2";
version = "1.59.0";
pname = "vscodium";
executableName = "codium";

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "goxel";
version = "0.10.7";
version = "0.10.8";
src = fetchFromGitHub {
owner = "guillaumechereau";
repo = "goxel";
rev = "v${version}";
sha256 = "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039";
sha256 = "sha256-M9H9SV8xmU7Jw5rEdV0gfloIEBvWmWSuH+BCrowpf2M=";
};
patches = [ ./disable-imgui_ini.patch ];

View File

@ -46,5 +46,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ramkromberg ];
platforms = with platforms; linux;
broken = stdenv.hostPlatform.isAarch64;
};
}

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "logseq";
version = "0.2.10";
version = "0.3.2";
src = fetchurl {
url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-linux-x64-${version}.AppImage";
sha256 = "1YVOyaHDcv+GKx5nQq3cUrViKZ6CEuHQPiDvK0Jv+Qc=";
sha256 = "4gWpB3uTQsm9oRvT9rGizIU7xgrZim7jxjJGfME7WAg=";
name = "${pname}-${version}.AppImage";
};

View File

@ -187,7 +187,7 @@ stdenv.mkDerivation {
# update with:
# $ nix-shell maintainers/scripts/update.nix --argstr package firefox-bin-unwrapped
passthru.updateScript = import ./update.nix {
inherit pname version channel writeScript xidel coreutils gnused gnugrep gnupg curl runtimeShell;
inherit pname channel writeScript xidel coreutils gnused gnugrep gnupg curl runtimeShell;
baseUrl =
if channel == "devedition"
then "http://archive.mozilla.org/pub/devedition/releases/"

View File

@ -1,4 +1,4 @@
{ name
{ pname
, channel
, writeScript
, xidel
@ -17,7 +17,7 @@ let
isBeta =
channel != "release";
in writeScript "update-${name}" ''
in writeScript "update-${pname}" ''
#!${runtimeShell}
PATH=${coreutils}/bin:${gnused}/bin:${gnugrep}/bin:${xidel}/bin:${curl}/bin:${gnupg}/bin
set -eux

View File

@ -8,7 +8,7 @@
, yasm, libGLU, libGL, sqlite, unzip, makeWrapper
, hunspell, libevent, libstartup_notification
, libvpx_1_8
, icu67, libpng, jemalloc, glib, pciutils
, icu69, libpng, jemalloc, glib, pciutils
, autoconf213, which, gnused, rustPackages, rustPackages_1_45
, rust-cbindgen, nodejs, nasm, fetchpatch
, gnum4
@ -173,7 +173,7 @@ buildStdenv.mkDerivation ({
xorg.libXext
libevent libstartup_notification /* cairo */
libpng jemalloc glib
nasm icu67 libvpx_1_8
nasm icu69 libvpx_1_8
# >= 66 requires nasm for the AV1 lib dav1d
# yasm can potentially be removed in future versions
# https://bugzilla.mozilla.org/show_bug.cgi?id=1501796

View File

@ -7,10 +7,10 @@ in
rec {
firefox = common rec {
pname = "firefox";
ffversion = "90.0.2";
ffversion = "91.0";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
sha512 = "4fda0b1e666fb0b1d846708fad2b48a5b53d48e7fc2a5da1f234b5b839c55265b41f6509e6b506d5e8a7455f816dfa5ab538589bc9e83b7e3846f0f72210513e";
sha512 = "a02486a3996570e0cc815e92c98890bca1d27ce0018c2ee3d4bff9a6e54dbc8f5926fea8b5864f208e15389d631685b2add1e4e9e51146e40224d16d5c02f730";
};
meta = {
@ -31,6 +31,32 @@ rec {
};
};
firefox-esr-91 = common rec {
pname = "firefox-esr";
ffversion = "91.0esr";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
sha512 = "e518e1536094a1da44eb45b3b0f3adc1b5532f17da2dbcc994715419ec4fcec40574fdf633349a8e5de6382942f5706757a35f1b96b11de4754855b9cf7946ae";
};
meta = {
description = "A web browser built from Firefox Extended Support Release source tree";
homepage = "http://www.mozilla.com/en-US/firefox/";
maintainers = with lib.maintainers; [ hexa ];
platforms = lib.platforms.unix;
badPlatforms = lib.platforms.darwin;
broken = stdenv.buildPlatform.is32bit; # since Firefox 60, build on 32-bit platforms fails with "out of memory".
# not in `badPlatforms` because cross-compilation on 64-bit machine might work.
license = lib.licenses.mpl20;
};
tests = [ nixosTests.firefox-esr-91 ];
updateScript = callPackage ./update.nix {
attrPath = "firefox-esr-91-unwrapped";
versionSuffix = "esr";
versionKey = "ffversion";
};
};
firefox-esr-78 = common rec {
pname = "firefox-esr";
ffversion = "78.12.0esr";
@ -49,7 +75,7 @@ rec {
# not in `badPlatforms` because cross-compilation on 64-bit machine might work.
license = lib.licenses.mpl20;
};
tests = [ nixosTests.firefox-esr ];
tests = [ nixosTests.firefox-esr-78 ];
updateScript = callPackage ./update.nix {
attrPath = "firefox-esr-78-unwrapped";
versionSuffix = "esr";

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "flink";
version = "1.12.1";
version = "1.13.2";
src = fetchurl {
url = "mirror://apache/flink/${pname}-${version}/${pname}-${version}-bin-scala_2.11.tgz";
sha256 = "146azc5wg1xby3nqz8mha959qy99z2h8032rfgs2mcl3d5rrsm2l";
sha256 = "sha256-GPiHV19Z2Htt75hCXK2nCeQMIBQFEEUxXlBembenFL0=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -2,7 +2,7 @@
buildGoPackage rec {
pname = "kube-router";
version = "1.1.1";
version = "1.2.2";
goPackagePath = "github.com/cloudnativelabs/kube-router";
@ -10,7 +10,7 @@ buildGoPackage rec {
owner = "cloudnativelabs";
repo = pname;
rev = "v${version}";
sha256 = "sha256-U7vjWtVXmyEPYFS1fAPOgV3WILGPhWsmoawV7B0pZaE=";
sha256 = "sha256-/VToLQexvRtcBU+k8WnGEcfLfxme/hgRnhU8723BEFU=";
};
buildFlagsArray = ''

View File

@ -21,13 +21,13 @@
stdenv.mkDerivation rec {
pname = "kubernetes";
version = "1.21.3";
version = "1.22.0";
src = fetchFromGitHub {
owner = "kubernetes";
repo = "kubernetes";
rev = "v${version}";
sha256 = "sha256-GMigdVuqJN6eIN0nhY5PVUEnCqjAYUzitetk2QmX5wQ=";
sha256 = "sha256-4lqqD3SBLBWrnFWhRzV3QgRLdGRW1Jx/eL6swtHL0Vw=";
};
nativeBuildInputs = [ removeReferencesTo makeWrapper which go rsync installShellFiles ];

View File

@ -0,0 +1,112 @@
{ lib, fetchFromGitHub, buildGoModule, go, removeReferencesTo, buildEnv }:
let
package = buildGoModule rec {
pname = "nomad-autoscaler";
version = "0.3.3";
outputs = [
"out"
"bin"
"aws_asg"
"azure_vmss"
"datadog"
"fixed_value"
"gce_mig"
"nomad_apm"
"nomad_target"
"pass_through"
"prometheus"
"target_value"
"threshold"
];
src = fetchFromGitHub {
owner = "hashicorp";
repo = "nomad-autoscaler";
rev = "v${version}";
sha256 = "sha256-bN/U6aCf33B88ouQwTGG8CqARzWmIvXNr5JPr3l8cVI=";
};
vendorSha256 = "sha256-Ls8gkfLyxfQD8krvxjAPnZhf1r1s2MhtQfMMfp8hJII=";
subPackages = [ "." ];
nativeBuildInputs = [ removeReferencesTo ];
# buildGoModule overrides normal buildPhase, can't use makeTargets
postBuild = ''
make build plugins
'';
# tries to pull tests from network, and fails silently anyway
doCheck = false;
postInstall = ''
mkdir -p $bin/bin
mv $out/bin/nomad-autoscaler $bin/bin/nomad-autoscaler
ln -s $bin/bin/nomad-autoscaler $out/bin/nomad-autoscaler
for d in $outputs; do
mkdir -p ''${!d}/share
done
rmdir $bin/share
# have out contain all of the plugins
for plugin in bin/plugins/*; do
remove-references-to -t ${go} "$plugin"
cp "$plugin" $out/share/
done
# populate the outputs as individual plugins
# can't think of a more generic way to handle this
# bash doesn't allow for dashes '-' to be in a variable name
# this means that the output names will need to differ slightly from the binary
mv bin/plugins/aws-asg $aws_asg/share/
mv bin/plugins/azure-vmss $azure_vmss/share/
mv bin/plugins/datadog $datadog/share/
mv bin/plugins/fixed-value $fixed_value/share/
mv bin/plugins/gce-mig $gce_mig/share/
mv bin/plugins/nomad-apm $nomad_apm/share/
mv bin/plugins/nomad-target $nomad_target/share/
mv bin/plugins/pass-through $pass_through/share/
mv bin/plugins/prometheus $prometheus/share/
mv bin/plugins/target-value $target_value/share/
mv bin/plugins/threshold $threshold/share/
'';
# make toggle-able, so that overrided versions can disable this check if
# they want newer versions of the plugins without having to modify
# the output logic
doInstallCheck = true;
installCheckPhase = ''
rmdir bin/plugins || {
echo "Not all plugins were extracted"
echo "Please move the following to their related output: $(ls bin/plugins)"
exit 1
}
'';
passthru = {
inherit plugins withPlugins;
};
meta = with lib; {
description = "Autoscaling daemon for Nomad";
homepage = "https://github.com/hashicorp/nomad-autoscaler";
license = licenses.mpl20;
maintainers = with maintainers; [ jonringer ];
};
};
plugins = let
plugins = builtins.filter (n: !(lib.elem n [ "out" "bin" ])) package.outputs;
in lib.genAttrs plugins (output: package.${output});
# Intended to be used as: (nomad-autoscaler.withPlugins (ps: [ ps.aws_asg ps.nomad_target ])
withPlugins = f: buildEnv {
name = "nomad-autoscaler-env";
paths = [ package.bin ] ++ f plugins;
};
in
package

View File

@ -0,0 +1,95 @@
{ lib
, copyDesktopItems
, electron
, esbuild
, fetchFromGitHub
, libdeltachat
, makeDesktopItem
, makeWrapper
, nodePackages
, pkg-config
, stdenv
, CoreServices
}:
let
electronExec = if stdenv.isDarwin then
"${electron}/Applications/Electron.app/Contents/MacOS/Electron"
else
"${electron}/bin/electron";
in nodePackages.deltachat-desktop.override rec {
pname = "deltachat-desktop";
version = "unstable-2021-08-04";
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-desktop";
rev = "2c47d6b7e46f4f68c7eb45508ab9e145af489ea1";
sha256 = "03b6j3cj2yanvsargh6q57bf1llg17yrqgmd14lp0wkam767kkfa";
};
nativeBuildInputs = [
esbuild
makeWrapper
pkg-config
] ++ lib.optionals stdenv.isLinux [
copyDesktopItems
];
buildInputs = [
libdeltachat
] ++ lib.optionals stdenv.isDarwin [
CoreServices
];
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
USE_SYSTEM_LIBDELTACHAT = "true";
VERSION_INFO_GIT_REF = src.rev;
postInstall = let
keep = lib.concatMapStringsSep " " (file: "! -name ${file}") [
"_locales" "build" "html-dist" "images" "index.js"
"node_modules" "themes" "tsc-dist"
];
in ''
rm -r node_modules/deltachat-node/{deltachat-core-rust,prebuilds,src}
patchShebangs node_modules/sass/sass.js
npm run build
npm prune --production
find . -mindepth 1 -maxdepth 1 ${keep} -print0 | xargs -0 rm -r
mkdir -p $out/share/icons/hicolor/scalable/apps
ln -s $out/lib/node_modules/deltachat-desktop/build/icon.png \
$out/share/icons/hicolor/scalable/apps/deltachat.png
makeWrapper ${electronExec} $out/bin/deltachat \
--add-flags $out/lib/node_modules/deltachat-desktop
'';
desktopItems = lib.singleton (makeDesktopItem {
name = "deltachat";
exec = "deltachat %u";
icon = "deltachat";
desktopName = "Delta Chat";
genericName = "Delta Chat";
comment = meta.description;
categories = "Network;InstantMessaging;Chat;";
extraEntries = ''
StartupWMClass=DeltaChat
MimeType=x-scheme-handler/openpgp4fpr;x-scheme-handler/mailto;
'';
});
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Email-based instant messaging for Desktop";
homepage = "https://github.com/deltachat/deltachat-desktop";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
};
}

View File

@ -0,0 +1,58 @@
{
"name": "deltachat-desktop",
"version": "1.20.3",
"dependencies": {
"@blueprintjs/core": "^3.22.3",
"@mapbox/geojson-extent": "^1.0.0",
"application-config": "^1.0.1",
"array-differ": "^3.0.0",
"classnames": "^2.3.1",
"debounce": "^1.2.0",
"deltachat-node": "1.56.2",
"emoji-js-clean": "^4.0.0",
"emoji-mart": "^3.0.0",
"emoji-regex": "^9.2.2",
"error-stack-parser": "^2.0.6",
"filesize": "^6.1.0",
"fs-extra": "^8.1.0",
"mapbox-gl": "^1.12.0",
"mime-types": "^2.1.31",
"moment": "^2.27.0",
"node-fetch": "^2.6.1",
"path-browserify": "^1.0.1",
"punycode": "^2.1.1",
"rc": "^1.2.8",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-qr-reader": "^2.2.1",
"react-qr-svg": "^2.1.0",
"react-string-replace": "^0.4.4",
"react-virtualized": "^9.21.2",
"simple-markdown": "^0.7.1",
"source-map-support": "^0.5.19",
"tempy": "^0.3.0",
"url-parse": "^1.4.7",
"use-debounce": "^3.3.0",
"@babel/core": "^7.7.7",
"@types/debounce": "^1.2.0",
"@babel/preset-env": "^7.7.7",
"@babel/preset-react": "^7.7.4",
"@types/emoji-mart": "^3.0.2",
"@types/fs-extra": "^8.0.1",
"@types/mapbox-gl": "^0.54.5",
"@types/mime-types": "^2.1.0",
"@types/node": "^14.14.20",
"@types/node-fetch": "^2.5.7",
"@types/prop-types": "^15.7.3",
"@types/rc": "^1.1.0",
"@types/react": "^16.9.17",
"@types/react-dom": "^16.9.4",
"@types/react-virtualized": "^9.21.10",
"@types/url-parse": "^1.4.3",
"electron": "^13.1.6",
"glob-watcher": "^5.0.5",
"sass": "^1.26.5",
"typescript": "^3.9.7",
"xml-js": "^1.6.8"
}
}

View File

@ -0,0 +1,42 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl jq nix-prefetch
set -euo pipefail
cd "$(dirname "$0")"
owner=deltachat
repo=deltachat-desktop
nixpkgs=../../../../..
rev=$(
curl -s "https://api.github.com/repos/$owner/$repo/releases" |
jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output
)
ver=$(echo "$rev" | sed 's/^v//')
old_ver=$(sed -n 's/.*\bversion = "\(.*\)".*/\1/p' default.nix)
if [ "$ver" = "$old_ver" ]; then
echo "Up to date: $ver"
exit
fi
echo "$old_ver -> $ver"
sha256=$(nix-prefetch -f "$nixpkgs" deltachat-desktop --rev "$rev")
sed -e "s#\\bversion = \".*\"#version = \"$ver\"#" \
-e "s#\\bsha256 = \".*\"#sha256 = \"$sha256\"#" \
-i default.nix
src=$(nix-build "$nixpkgs" -A deltachat-desktop.src --no-out-link)
jq '{ name, version, dependencies: (.dependencies + (.devDependencies | del(.["@typescript-eslint/eslint-plugin","@typescript-eslint/parser","esbuild","electron-builder","electron-devtools-installer","electron-notarize","esbuild","eslint","eslint-config-prettier","eslint-plugin-react-hooks","hallmark","prettier","tape","testcafe","testcafe-browser-provider-electron","testcafe-react-selectors","walk"]))) }' \
"$src/package.json" > package.json.new
if cmp --quiet package.json{.new,}; then
echo "package.json not changed, skip updating nodePackages"
rm package.json.new
else
echo "package.json changed, updating nodePackages"
mv package.json{.new,}
pushd ../../../../development/node-packages
./generate.sh
popd
fi

View File

@ -1,40 +0,0 @@
{ lib, fetchurl, appimageTools, gsettings-desktop-schemas, gtk3 }:
let
pname = "deltachat-electron";
version = "1.20.3";
name = "${pname}-${version}";
src = fetchurl {
url = "https://download.delta.chat/desktop/v${version}/DeltaChat-${version}.AppImage";
sha256 = "sha256-u0YjaXb+6BOBWaZANPcaxp7maqlBWAtecSsCGbr67dk=";
};
appimageContents = appimageTools.extract { inherit name src; };
in
appimageTools.wrapType2 {
inherit name src;
profile = ''
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
'';
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D \
${appimageContents}/deltachat-desktop.desktop \
$out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
meta = with lib; {
description = "Electron client for DeltaChat";
homepage = "https://delta.chat/";
license = licenses.gpl3;
maintainers = with maintainers; [ ehmry ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -66,5 +66,6 @@ in mkDerivation rec {
homepage = "https://git.sr.ht/~link2xt/kdeltachat";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
platforms = platforms.linux;
};
}

View File

@ -7,12 +7,12 @@
}:
stdenv.mkDerivation rec {
version = "4.0.17";
version = "4.0.19";
pname = "flmsg";
src = fetchurl {
url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz";
sha256 = "09xf3f65d3qi69frznf4fdznbfbc7kmgxw716q2c7ccsmh9c5q44";
sha256 = "sha256-Pm5qAUNbenkX9V3OSQWW09iIRR/WB1jB4ioyRCZmjqs=";
};
buildInputs = [

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, lib, expat, octave, libxml2, texinfo, zip }:
stdenv.mkDerivation rec {
pname = "gama";
version = "2.12";
version = "2.14";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
sha256 = "0zfilasalsy29b7viw0iwgnl9bkvp0l87gpxl1hx7379l8agwqyj";
sha256 = "sha256-ltYoJyo4b4Ys70nbZo5gxkjBw/RiEs5Rrdb6he9bsBI=";
};
buildInputs = [ expat ];

View File

@ -1,4 +1,4 @@
{ callPackage, lib, stdenv, fetchFromGitHub, git, zsh, ...}:
{ callPackage, lib, stdenv, fetchFromGitHub, git, zsh }:
stdenv.mkDerivation rec {
pname = "gitstatus";
@ -11,25 +11,33 @@ stdenv.mkDerivation rec {
sha256 = "sha256-MQG4thW73gDqY68bKP2FO8z5uc2R/tED+/X9qas/GOA=";
};
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
patchPhase = ''
buildInputs = [ (callPackage ./romkatv_libgit2.nix { }) ];
postPatch = ''
sed -i '1i GITSTATUS_AUTO_INSTALL=''${GITSTATUS_AUTO_INSTALL-0}' gitstatus.plugin.sh
sed -i '1i GITSTATUS_AUTO_INSTALL=''${GITSTATUS_AUTO_INSTALL-0}' gitstatus.plugin.zsh
sed -i "1a GITSTATUS_DAEMON=$out/bin/gitstatusd" install
'';
installPhase = ''
install -Dm755 usrbin/gitstatusd $out/bin/gitstatusd
install -Dm444 gitstatus.plugin.sh $out
install -Dm444 gitstatus.plugin.zsh $out
install -Dm555 install $out
install -Dm444 build.info $out
install -Dm444 gitstatus.plugin.sh -t $out/share/gitstatus/
install -Dm444 gitstatus.plugin.zsh -t $out/share/gitstatus/
install -Dm555 install -t $out/share/gitstatus/
install -Dm444 build.info -t $out/share/gitstatus/
# the fallback path is wrong in the case of home-manager
# because the FHS directories don't start at /
substituteInPlace install \
--replace "_gitstatus_install_main ." "_gitstatus_install_main $out"
'';
# Don't install the "install" and "build.info" files, which the end user
# should not need to worry about.
pathsToLink = [
"/bin/gitstatusd"
"/gitstatus.plugin.sh"
"/gitstatus.plugin.zsh"
"/share/gitstatus/gitstatus.plugin.sh"
"/share/gitstatus/gitstatus.plugin.zsh"
];
# The install check sets up an empty Git repository and a minimal zshrc that
@ -47,7 +55,7 @@ stdenv.mkDerivation rec {
echo '
GITSTATUS_LOG_LEVEL=DEBUG
. $out/gitstatus.plugin.zsh || exit 1
. $out/share/gitstatus/gitstatus.plugin.zsh || exit 1
gitstatus_stop NIX_TEST && gitstatus_start NIX_TEST
gitstatus_query NIX_TEST
@ -77,6 +85,6 @@ stdenv.mkDerivation rec {
description = "10x faster implementation of `git status` command";
homepage = "https://github.com/romkatv/gitstatus";
license = licenses.gpl3Only;
maintainers = with maintainers; [ mmlb hexa ];
maintainers = with maintainers; [ mmlb hexa SuperSandro2000 ];
};
}

View File

@ -16,7 +16,7 @@ libgit2.overrideAttrs (oldAttrs: {
src = fetchFromGitHub {
owner = "romkatv";
repo = "libgit2";
rev = "tag-82cefe2b42300224ad3c148f8b1a569757cc617a";
sha256 = "1vhnqynqyxizzkq1h5dfjm75f0jm5637jh0gypwqqz2yjqrscza0";
rev = "tag-5860a42d19bcd226cb6eff2dcbfcbf155d570c73";
sha256 = "sha256-OdGLNGOzXbWQGqw5zYM1RhU4Z2yRXi9cpAt7Vn9+j5I=";
};
})

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "go-chromecast";
version = "0.2.9";
version = "0.2.10";
src = fetchFromGitHub {
owner = "vishen";
repo = pname;
rev = "v${version}";
sha256 = "sha256-KhJMgr57pDnuFLhsbf0/4n9w0EfjuuKA46ENPLXox3A=";
sha256 = "sha256-8216YaDgjy9Fp94Y5SQwEQpAP4NwvEhsJHe6xpQLAk8=";
};
vendorSha256 = "sha256-idxElk4Sy7SE9G1OMRw8YH4o8orBa80qhBXPA+ar620=";

View File

@ -2,13 +2,13 @@
buildKodiBinaryAddon rec {
pname = "inputstream-adaptive";
namespace = "inputstream.adaptive";
version = "2.6.22";
version = "2.6.23";
src = fetchFromGitHub {
owner = "xbmc";
repo = "inputstream.adaptive";
rev = "${version}-${rel}";
sha256 = "sha256-WSFbDuUgw0WHWb3ZZVavwpu1TizU9lMA5JAC5haR7c0=";
sha256 = "sha256-3w/fMaGqaOHSE7GUJtYoWovBKSOv3sNOIX1UOcp8hQE=";
};
extraNativeBuildInputs = [ gtest ];

View File

@ -1,4 +1,4 @@
{ lib, rustPlatform, fetchFromGitHub }:
{ lib, rustPlatform, fetchFromGitHub, nixosTests }:
rustPlatform.buildRustPackage rec {
pname = "cntr";
@ -13,6 +13,10 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-3e5wDne6Idu+kDinHPcAKHfH/d4DrGg90GkiMbyF280=";
passthru.tests = {
nixos = nixosTests.cntr;
};
meta = with lib; {
description = "A container debugging tool based on FUSE";
homepage = "https://github.com/Mic92/cntr";

View File

@ -78,7 +78,7 @@ let
in stdenvNoCC.mkDerivation rec {
inherit name makeUInitrd extension uInitrdArch prepend;
${if makeUInitrd then "uinitrdCompression" else null} = uInitrdCompression;
${if makeUInitrd then "uInitrdCompression" else null} = uInitrdCompression;
builder = ./make-initrd.sh;

View File

@ -43,9 +43,9 @@ done
(cd root && find * .[^.*] -print0 | sort -z | cpio -o -H newc -R +0:+0 --reproducible --null | eval -- $compress >> "$out/initrd")
if [ -n "$makeUInitrd" ]; then
mkimage -A $uInitrdArch -O linux -T ramdisk -C "$uInitrdCompression" -d $out/initrd"$extension" $out/initrd.img
mkimage -A "$uInitrdArch" -O linux -T ramdisk -C "$uInitrdCompression" -d "$out/initrd" $out/initrd.img
# Compatibility symlink
ln -s "initrd.img" "$out/initrd"
ln -sf "initrd.img" "$out/initrd"
else
ln -s "initrd" "$out/initrd$extension"
fi

View File

@ -13,13 +13,13 @@ assert enableLTO -> stdenv.cc.isGNU;
stdenv.mkDerivation rec {
pname = "dictu";
version = "0.19.0";
version = "0.20.0";
src = fetchFromGitHub {
owner = "dictu-lang";
repo = pname;
rev = "v${version}";
sha256 = "5Sfmzz4I0dhcbz14LmXx5cHELRFENunLbZmU93uSEJo=";
sha256 = "sha256-GiiNIySrfpjYf5faNNml7ZRXT5pDU0SVvNvMyBh1K8E=";
};
nativeBuildInputs = [ cmake ];

View File

@ -38,8 +38,10 @@ stdenv.mkDerivation {
configureFlags = [
(if threadSupport then "--enable-threads" else "--disable-threads")
"--with-gmp-prefix=${gmp.dev}"
"--with-libffi-prefix=${libffi.dev}"
"--with-gmp-incdir=${lib.getDev gmp}/include"
"--with-gmp-libdir=${lib.getLib gmp}/lib"
# -incdir, -libdir doesn't seem to be supported for libffi
"--with-libffi-prefix=${lib.getDev libffi}"
]
++
(lib.optional (! noUnicode)
@ -69,9 +71,24 @@ stdenv.mkDerivation {
postInstall = ''
sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
wrapProgram "$out/bin/ecl" \
--prefix PATH ':' "${gcc}/bin" \
--prefix NIX_LDFLAGS ' ' "-L${gmp.lib or gmp.out or gmp}/lib" \
--prefix NIX_LDFLAGS ' ' "-L${libffi.lib or libffi.out or libffi}/lib"
--prefix PATH ':' "${
lib.makeBinPath [
gcc # for the C compiler
gcc.bintools.bintools # for ar
]
}" \
''
# ecl 16.1.2 is too old to have -libdir for libffi and boehmgc, so we need to
# use NIX_LDFLAGS_BEFORE to make gcc find these particular libraries.
# Since it is missing even the prefix flag for boehmgc we also need to inject
# the correct -I flag via NIX_CFLAGS_COMPILE. Since we have access to it, we
# create the variables with suffixSalt (which seems to be necessary for
# NIX_CFLAGS_COMPILE even).
+ lib.optionalString useBoehmgc ''
--prefix NIX_CFLAGS_COMPILE_${gcc.suffixSalt} ' ' "-I${lib.getDev boehmgc}/include" \
--prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib boehmgc}/lib" \
'' + ''
--prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib libffi}/lib"
'';
meta = {

View File

@ -45,20 +45,25 @@ stdenv.mkDerivation {
configureFlags = [
(if threadSupport then "--enable-threads" else "--disable-threads")
"--with-gmp-prefix=${lib.getDev gmp}"
"--with-libffi-prefix=${lib.getDev libffi}"
] ++ lib.optional useBoehmgc "--with-libgc-prefix=${lib.getDev boehmgc}"
++ lib.optional (!noUnicode) "--enable-unicode";
"--with-gmp-incdir=${lib.getDev gmp}/include"
"--with-gmp-libdir=${lib.getLib gmp}/lib"
"--with-libffi-incdir=${lib.getDev libffi}/include"
"--with-libffi-libdir=${lib.getLib libffi}/lib"
] ++ lib.optionals useBoehmgc [
"--with-libgc-incdir=${lib.getDev boehmgc}/include"
"--with-libgc-libdir=${lib.getLib boehmgc}/lib"
] ++ lib.optional (!noUnicode) "--enable-unicode";
hardeningDisable = [ "format" ];
postInstall = let
ldArgs = lib.strings.concatMapStringsSep " "
(l: ''--prefix NIX_LDFLAGS ' ' "-L${l.lib or l.out or l}/lib"'')
([ gmp libffi ] ++ lib.optional useBoehmgc boehmgc);
in ''
postInstall = ''
sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
wrapProgram "$out/bin/ecl" --prefix PATH ':' "${gcc}/bin" ${ldArgs}
wrapProgram "$out/bin/ecl" --prefix PATH ':' "${
lib.makeBinPath [
gcc # for the C compiler
gcc.bintools.bintools # for ar
]
}"
'';
meta = with lib; {

View File

@ -1,4 +1,4 @@
{ lib, stdenv, llvm_meta, src, cmake, libxml2, libllvm, version, python3
{ lib, stdenv, llvm_meta, src, substituteAll, cmake, libxml2, libllvm, version, python3
, buildLlvmTools
, fixDarwinDylibNames
, enableManpages ? false
@ -37,6 +37,10 @@ let
./purity.patch
# https://reviews.llvm.org/D51899
./gnu-install-dirs.patch
(substituteAll {
src = ../../clang-11-12-LLVMgold-path.patch;
libllvmLibdir = "${libllvm.lib}/lib";
})
];
postPatch = ''
@ -52,12 +56,7 @@ let
outputs = [ "out" "lib" "dev" "python" ];
# Clang expects to find LLVMgold in its own prefix
postInstall = ''
if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then
ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib
fi
ln -sv $out/bin/clang $out/bin/cpp
# Move libclang to 'lib' output

View File

@ -2,9 +2,7 @@ diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index 3a66dd9c3fb..7efc85d9f9f 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -301,6 +301,10 @@ if (NOT MSVC)
i386/umoddi3.S
)
@@ -345,4 +345,8 @@ if (NOT MSVC)
+ set(i486_SOURCES ${i386_SOURCES})
+ set(i586_SOURCES ${i386_SOURCES})

View File

@ -0,0 +1,71 @@
diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp
--- a/lib/sanitizer_common/sanitizer_mac.cpp
+++ b/lib/sanitizer_common/sanitizer_mac.cpp
@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) {
// Offset example:
// XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
constexpr u16 GetOSMajorKernelOffset() {
- if (TARGET_OS_OSX) return 4;
- if (TARGET_OS_IOS || TARGET_OS_TV) return 6;
- if (TARGET_OS_WATCH) return 13;
+#if TARGET_OS_OSX
+ return 4;
+#endif
+#if TARGET_OS_IOS || TARGET_OS_TV
+ return 6;
+#endif
+#if TARGET_OS_WATCH
+ return 13;
+#endif
}
using VersStr = char[64];
@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) {
u16 os_major = kernel_major - offset;
const char *format = "%d.0";
- if (TARGET_OS_OSX) {
- if (os_major >= 16) { // macOS 11+
- os_major -= 5;
- } else { // macOS 10.15 and below
- format = "10.%d";
- }
+#if TARGET_OS_OSX
+ if (os_major >= 16) { // macOS 11+
+ os_major -= 5;
+ } else { // macOS 10.15 and below
+ format = "10.%d";
}
+#endif
return internal_snprintf(vers, sizeof(VersStr), format, os_major);
}
@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) {
// Aligned versions example:
// macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
static void MapToMacos(u16 *major, u16 *minor) {
- if (TARGET_OS_OSX)
- return;
-
- if (TARGET_OS_IOS || TARGET_OS_TV)
+#if !TARGET_OS_OSX
+#if TARGET_OS_IOS || TARGET_OS_TV
*major += 2;
- else if (TARGET_OS_WATCH)
+#elif TARGET_OS_WATCH
*major += 9;
- else
+#else
UNREACHABLE("unsupported platform");
+#endif
if (*major >= 16) { // macOS 11+
*major -= 5;
@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) {
*minor = *major;
*major = 10;
}
+#endif
}
static MacosVersion GetMacosAlignedVersionInternal() {

View File

@ -60,6 +60,8 @@ stdenv.mkDerivation {
# extra `/`.
./normalize-var.patch
]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
# Prevent a compilation error on darwin
++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-targetconditionals.patch
++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks

View File

@ -19,6 +19,7 @@
, Carbon
, Cocoa
, lit
, makeWrapper
, enableManpages ? false
}:
@ -42,7 +43,7 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" ];
nativeBuildInputs = [
cmake python3 which swig lit
cmake python3 which swig lit makeWrapper
] ++ lib.optionals enableManpages [
python3.pkgs.sphinx python3.pkgs.recommonmark
];
@ -84,7 +85,15 @@ stdenv.mkDerivation (rec {
doCheck = false;
installCheckPhase = ''
if [ ! -e "$lib/${python3.sitePackages}/lldb/_lldb.so" ] ; then
return 1;
fi
'';
postInstall = ''
wrapProgram $out/bin/lldb --prefix PYTHONPATH : $lib/${python3.sitePackages}/
# Editor support
# vscode:
install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json

View File

@ -63,3 +63,29 @@ index 734167e51bc5..f95761b5df58 100644
install(TARGETS lldbIntelFeatures
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake
index 752113b..010f187 100644
--- a/cmake/modules/LLDBStandalone.cmake
+++ b/cmake/modules/LLDBStandalone.cmake
@@ -62,7 +62,7 @@ endif()
# They are used as destination of target generators.
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
-set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
if(WIN32 OR CYGWIN)
# DLL platform -- put DLLs into bin.
set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5633e2..86e4738 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON)
if(LLDB_BUILD_FRAMEWORK)
set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb")
else()
- set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb")
+ set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb")
endif()
get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR)
finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}")

View File

@ -2,15 +2,16 @@
stdenv.mkDerivation rec {
pname = "scala-runners";
version = "unstable-2020-02-02";
version = "unstable-2021-07-28";
src = fetchFromGitHub {
repo = pname;
owner = "dwijnand";
rev = "95e03c9f9de0fe0ab61eeb6dea2a364f9d081d31";
sha256 = "0mvlc6fxsh5d6gsyak9n3g98g4r061n8pir37jpiqb7z00m9lfrx";
rev = "9bf096ca81f4974d7327e291eac291e22b344a8f";
sha256 = "032fds5nr102h1lc81n9jc60jmxzivi4md4hcjrlqn076hfhj4ax";
};
dontBuild = true;
installPhase = ''
mkdir -p $out/bin $out/lib
sed -ie "s| cs | ${coursier}/bin/coursier |" scala-runner

View File

@ -10,11 +10,11 @@ assert stdenv ? cc && stdenv.cc.isGNU;
stdenv.mkDerivation rec {
pname = "guile-lib";
version = "0.2.6.1";
version = "0.2.7";
src = fetchurl {
url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz";
hash = "sha256-bR09DxTbnSgLjUJ9bh3sRBfd0Cv/I71Zguy24mLrPyo=";
hash = "sha256-5O87hF8SGILHwM8E+BocuP02DG9ktWuGjeVUYhT5BN4=";
};
nativeBuildInputs = [

View File

@ -198,9 +198,9 @@ in {
major = "3";
minor = "10";
patch = "0";
suffix = "b3";
suffix = "rc1";
};
sha256 = "05fc4mp2ysb372bzkwbn1b1z01bfldnaqig6rxmif58hs3aawrr2";
sha256 = "0f76q6rsvbvrzcnsp0k7sp555krrgvjpcd09l1rybl4249ln2w3r";
inherit (darwin) configd;
inherit passthruFun;
};

View File

@ -7,6 +7,14 @@
customMemoryManagement ? true
}:
let
host_os = if stdenv.hostPlatform.isDarwin then "APPLE"
else if stdenv.hostPlatform.isAndroid then "ANDROID"
else if stdenv.hostPlatform.isWindows then "WINDOWS"
else if stdenv.hostPlatform.isLinux then "LINUX"
else throw "Unknown host OS";
in
stdenv.mkDerivation rec {
pname = "aws-sdk-cpp";
version = "1.8.130";
@ -49,6 +57,7 @@ stdenv.mkDerivation rec {
"-DENABLE_TESTING=OFF"
"-DCURL_HAS_H2=1"
"-DCURL_HAS_TLS_PROXY=1"
"-DTARGET_ARCH=${host_os}"
] ++ lib.optional (apis != ["*"])
"-DBUILD_ONLY=${lib.concatStringsSep ";" apis}";

View File

@ -1,11 +1,11 @@
{ lib, stdenv, fetchurl, makeWrapper, jdk }:
stdenv.mkDerivation rec {
name = "lombok-1.18.16";
name = "lombok-1.18.20";
src = fetchurl {
url = "https://projectlombok.org/downloads/${name}.jar";
sha256 = "1msys7xkaj0d7fi112fmb2z50mk46db58agzrrdyimggsszwn1kj";
sha256 = "sha256-zpR75sL751n7vo7ztCtoJfgUyYyIU/EBPy2WMM7fdLA=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "libaudec";
version = "0.2.4";
version = "0.3.4";
src = fetchFromGitHub {
owner = "zrythm";
repo = "libaudec";
rev = "v${version}";
sha256 = "1570m2dfia17dbkhd2qhx8jjihrpm7g8nnyg6n4wif4vv229s7dz";
sha256 = "sha256-8morbrq8zG+2N3ruMeJa85ci9P0wPQOfZ5H56diFEAo=";
};
buildInputs = [ libsndfile libsamplerate ];

View File

@ -1,12 +1,17 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, openssl
, perl
, pkg-config
, rustPlatform
, sqlite
, fixDarwinDylibNames
, CoreFoundation
, Security
, libiconv
}:
stdenv.mkDerivation rec {
@ -20,6 +25,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-ZyVEI6q+GzHLEFH01TxS7NqwT7zqVgg0vduyf/fibB8=";
};
patches = [
# https://github.com/deltachat/deltachat-core-rust/pull/2589
(fetchpatch {
url = "https://github.com/deltachat/deltachat-core-rust/commit/408467e85d04fbbfd6bed5908d84d9e995943487.patch";
sha256 = "1j2ywaazglgl6370js34acrg0wrh0b7krqg05dfjf65n527lzn59";
})
./no-static-lib.patch
];
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
@ -33,11 +47,17 @@ stdenv.mkDerivation rec {
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
]);
]) ++ lib.optionals stdenv.isDarwin [
fixDarwinDylibNames
];
buildInputs = [
openssl
sqlite
] ++ lib.optionals stdenv.isDarwin [
CoreFoundation
Security
libiconv
];
checkInputs = with rustPlatform; [
@ -49,7 +69,7 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/deltachat/deltachat-core-rust/";
changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${version}/CHANGELOG.md";
license = licenses.mpl20;
platforms = platforms.linux;
maintainers = with maintainers; [ dotlambda ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,39 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe7abe08..acdbe0d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,6 @@ find_program(CARGO cargo)
add_custom_command(
OUTPUT
- "target/release/libdeltachat.a"
"target/release/libdeltachat.${DYNAMIC_EXT}"
"target/release/pkgconfig/deltachat.pc"
COMMAND
@@ -38,13 +37,11 @@ add_custom_target(
lib_deltachat
ALL
DEPENDS
- "target/release/libdeltachat.a"
"target/release/libdeltachat.${DYNAMIC_EXT}"
"target/release/pkgconfig/deltachat.pc"
)
include(GNUInstallDirs)
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml
index a34a27ba..cf354abb 100644
--- a/deltachat-ffi/Cargo.toml
+++ b/deltachat-ffi/Cargo.toml
@@ -12,7 +12,7 @@ categories = ["cryptography", "std", "email"]
[lib]
name = "deltachat"
-crate-type = ["cdylib", "staticlib"]
+crate-type = ["cdylib"]
[dependencies]
deltachat = { path = "../", default-features = false }

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "liblscp";
version = "0.6.0";
version = "0.9.2";
src = fetchurl {
url = "https://download.linuxsampler.org/packages/${pname}-${version}.tar.gz";
sha256 = "1rl7ssdzj0z3658yvdijmb27n2lcwmplx4qxg5mwrm07pvs7i75k";
sha256 = "sha256-GTW6SBQVCDtzeU+arLmAJi6N9jtN68NdI69p6RSazvs=";
};
nativeBuildInputs = [ autoconf automake libtool pkg-config ];

View File

@ -7,7 +7,7 @@ with lib;
stdenv.mkDerivation rec {
pname = "phonon-backend-vlc";
version = "0.11.1";
version = "0.11.2";
meta = with lib; {
homepage = "https://phonon.kde.org/";
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://kde/stable/phonon/${pname}/${version}/${pname}-${version}.tar.xz";
sha256 = "1vp52i5996khpxs233an7mlrzdji50gcs58ig8nrwfwlgyb1xnfc";
sha256 = "sha256-xsM7/GjRN/DlegKeS3mMu5D1Svb3Ma9JZ3hXeRzNU6U=";
};
buildInputs = [

View File

@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
pname = "unicorn";
version = "1.0.2";
version = "1.0.3";
src = fetchFromGitHub {
owner = "unicorn-engine";
repo = pname;
rev = version;
sha256 = "0jgnyaq6ykpbg5hrwc0p3pargmr9hpzqfsj6ymp4k07pxnqal76j";
sha256 = "079azb1df4nwsnsck36b200rnf03aqilw30h3fiaqi1ixash957k";
};
nativeBuildInputs = [ pkg-config cmake ];

View File

@ -48,6 +48,6 @@ stdenv.mkDerivation rec {
homepage = "https://www.wolfssl.com/";
platforms = platforms.all;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ fab mcmtroffaes ];
maintainers = with maintainers; [ fab ];
};
}

View File

@ -8,13 +8,13 @@
stdenv.mkDerivation rec {
pname = "wxsqlite3";
version = "4.6.2";
version = "4.6.4";
src = fetchFromGitHub {
owner = "utelle";
repo = "wxsqlite3";
rev = "v${version}";
sha256 = "10jlb4p3ahck9apcy2c2mrrjynv4c1dfwwbf1vwd8dl17pgv4kgs";
sha256 = "sha256-fIm8xbNP7pjzvfBn7NgYmUtbVVh2aiaXQVANJQnrWCs=";
};
nativeBuildInputs = [ autoreconfHook ];
@ -27,6 +27,6 @@ stdenv.mkDerivation rec {
description = "A C++ wrapper around the public domain SQLite 3.x for wxWidgets";
platforms = platforms.unix;
maintainers = with maintainers; [ vrthra ];
license = [ licenses.lgpl2 ];
license = [ licenses.lgpl3Plus licenses.gpl3Plus ];
};
}

File diff suppressed because it is too large Load Diff

View File

@ -344,7 +344,11 @@ with super;
})).overrideAttrs (old: {
# Without this, source root is wrongly set to ./readline-2.6/doc
setSourceRoot = ''
sourceRoot=./readline-2.6
sourceRoot=./readline-3.0
'';
});
# aliases
cjson = super.lua-cjson;
}

View File

@ -46,6 +46,10 @@ let
'';
};
deltachat-desktop = super."deltachat-desktop-../../applications/networking/instant-messengers/deltachat-desktop".override {
meta.broken = true; # use the top-level package instead
};
fast-cli = super.fast-cli.override ({
nativeBuildInputs = [ pkgs.makeWrapper ];
prePatch = ''

View File

@ -78,6 +78,7 @@
, "csslint"
, "dat"
, "degit"
, {"deltachat-desktop": "../../applications/networking/instant-messengers/deltachat-desktop"}
, "dhcp"
, "diagnostic-languageserver"
, "dockerfile-language-server-nodejs"

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,13 @@
buildPythonPackage rec {
pname = "flufl.bounce";
version = "3.0.1";
version = "3.0.2";
buildInputs = [ nose2 ];
propagatedBuildInputs = [ atpublic zope_interface ];
src = fetchPypi {
inherit pname version;
sha256 = "e432fa1ca25ddbf23e2716b177d4d1c6ab6c078e357df56b0106b92bc10a8f06";
sha256 = "5014b23248fce72b13143c32da30073e6abc655b963e7739575608280c52c9a7";
};
}

View File

@ -2,7 +2,7 @@
buildPythonPackage rec {
pname = "flufl.i18n";
version = "3.1.4";
version = "3.1.5";
propagatedBuildInputs = [ atpublic ];
@ -12,6 +12,6 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
sha256 = "e19036292a825a69f0e0a87566d1628830c69eecd3b0295d22f582039477a6bb";
sha256 = "b7016000a4d9d366866e776947b777dbe2b1532c990efeef58922b3e7bcab36e";
};
}

View File

@ -2,10 +2,11 @@
, buildPythonPackage
, fetchFromGitHub
, aenum
, aiohttp
, importlib-metadata
, isodate
, nest-asyncio
, six
, tornado
, pytestCheckHook
, mock
, pyhamcrest
@ -14,20 +15,20 @@
buildPythonPackage rec {
pname = "gremlinpython";
version = "3.4.10";
version = "3.5.1";
# pypi tarball doesn't include tests
src = fetchFromGitHub {
owner = "apache";
repo = "tinkerpop";
rev = version;
sha256 = "0i9lkrwbsmpx1h9480vf97pibm2v37sgw2qm2r1c0i8gg5bcmhj3";
sha256 = "1vlhxq0f2hanhkv6f17dxgbwr7gnbnh1kkkq0lxcwkbm2l0rdrlr";
};
sourceRoot = "source/gremlin-python/src/main/jython";
sourceRoot = "source/gremlin-python/src/main/python";
postPatch = ''
substituteInPlace setup.py \
--replace 'aenum>=1.4.5,<3.0.0' 'aenum' \
--replace 'tornado>=4.4.1,<6.0' 'tornado' \
--replace 'aiohttp>=3.7.0,<=3.7.4' 'aiohttp' \
--replace 'PyHamcrest>=1.9.0,<2.0.0' 'PyHamcrest' \
--replace 'radish-bdd==0.8.6' 'radish-bdd' \
--replace 'mock>=3.0.5,<4.0.0' 'mock' \
@ -42,9 +43,10 @@ buildPythonPackage rec {
];
propagatedBuildInputs = [
aenum
aiohttp
isodate
nest-asyncio
six
tornado
];
checkInputs = [

View File

@ -19,13 +19,13 @@
buildPythonPackage rec {
pname = "plugwise";
version = "0.11.1";
version = "0.11.2";
src = fetchFromGitHub {
owner = pname;
repo = "python-plugwise";
rev = version;
sha256 = "sha256-b00jfPZTVRI7BRpUHI2NjcydkykC/1HjmVzDaIech8c=";
sha256 = "sha256-ywVCa6PfyQ1SiejE2IYkf/IpQM0iDXJPpCm0vDtlrw8=";
};
propagatedBuildInputs = [

View File

@ -8,14 +8,14 @@
buildPythonPackage rec {
pname = "pyupgrade";
version = "2.23.1";
version = "2.23.3";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "asottile";
repo = pname;
rev = "v${version}";
sha256 = "1jc0gh0y5fz02wab50v6m4x0pfycdkjvf1vw05d8d0yqsv7ld7fw";
sha256 = "sha256-Z17Bs3Mr1PJ9bYP2vsXTaJ85jOoIIlKLWR6D6s7enFs=";
};
checkInputs = [ pytestCheckHook ];

View File

@ -14,14 +14,14 @@
buildPythonPackage rec {
pname = "soco";
version = "0.23.2";
version = "0.23.3";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "SoCo";
repo = "SoCo";
rev = "v${version}";
sha256 = "0qq2k0xy8a5b54nk7h4ipkvq8dpzklhgcwcffhnlcnl1vhq2dh33";
sha256 = "sha256-T6gDImH/HfHg8e1YzUYB8zr2GJHRtF6vdYm2cSiXSb0=";
};
propagatedBuildInputs = [

View File

@ -5,11 +5,11 @@
buildPythonPackage rec {
pname = "types-decorator";
version = "0.1.5";
version = "0.1.7";
src = fetchPypi {
inherit pname version;
sha256 = "0rfg2s4y23w1xk0502sg2jqbzswalkg6infblyzgf94i4bsg1j48";
sha256 = "0pmcc8xpsmij4174ky81vp811yxgic2lj1dfj2fa0ii87nlcfwhp";
};
# Modules doesn't have tests

View File

@ -5,11 +5,11 @@
buildPythonPackage rec {
pname = "types-requests";
version = "2.25.1";
version = "2.25.6";
src = fetchPypi {
inherit pname version;
sha256 = "0vyr1vgg03a1gkjcz59iwqc1q9mx4ij7slslsp08z2h8fbhlwl9d";
sha256 = "1vh203dppi6457lwv7z46dc8rpanjlahk4v3394nq1jwyp0425g2";
};
# Modules doesn't have tests

View File

@ -1,12 +1,12 @@
{ lib, stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
version = "8.45";
version = "8.45.1";
pname = "checkstyle";
src = fetchurl {
url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${version}/checkstyle-${version}-all.jar";
sha256 = "sha256-XFeufPaMz5rk+Ym0zXFCitoi9+mDs/PZUByIeZrj538=";
sha256 = "sha256-H4w/rjVBhZCfBzLavd4/BkojwhCu05VsxrtzyS0wyk4=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -1,20 +1,23 @@
{ lib, stdenv, fetchFromGitHub, buildGoPackage }:
{ lib, stdenv, buildGoModule, fetchFromGitHub }:
buildGoPackage rec {
buildGoModule rec {
pname = "buildkit";
version = "0.8.3";
goPackagePath = "github.com/moby/buildkit";
subPackages = [ "cmd/buildctl" ] ++ lib.optionals stdenv.isLinux [ "cmd/buildkitd" ];
version = "0.9.0";
src = fetchFromGitHub {
owner = "moby";
repo = "buildkit";
rev = "v${version}";
sha256 = "sha256-dHtGxugTtxHcfZHMIHinlcH05ss7zT/+Ll1WboAhw9o=";
sha256 = "0i04b5ngvhkan45mx6xjcia0dsx0dc6w8bwy90yg3qnz7yzidm2d";
};
buildFlagsArray = [ "-ldflags=-s -w -X ${goPackagePath}/version.Version=${version} -X ${goPackagePath}/version.Revision=${src.rev}" ];
vendorSha256 = null;
subPackages = [ "cmd/buildctl" ] ++ lib.optionals stdenv.isLinux [ "cmd/buildkitd" ];
ldflags = [ "-s" "-w" "-X github.com/moby/buildkit/version.Version=${version}" "-X github.com/moby/buildkit/version.Revision=${src.rev}" ];
doCheck = false;
meta = with lib; {
description = "Concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit";

View File

@ -10,11 +10,11 @@ in
stdenv.mkDerivation rec {
pname = "liquibase";
version = "4.4.2";
version = "4.4.3";
src = fetchurl {
url = "https://github.com/liquibase/liquibase/releases/download/v${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-qOKMyqf3KX7pWjslVgcPiGlTiwvMZLvm7DiatmSLd1U=";
sha256 = "sha256-td+mBf/JhTw5vvlupyllpZ2e4So7y1kEC1OdR4LUv/k=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -1,10 +1,10 @@
{ lib, stdenv, fetchurl, jre_headless, makeWrapper }:
stdenv.mkDerivation rec{
pname = "flyway";
version = "7.5.4";
version = "7.12.1";
src = fetchurl {
url = "https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/${version}/flyway-commandline-${version}.tar.gz";
sha256 = "sha256-WU8j1NSf2KfA/HJWFtMLOZ3t5nxW4sU713e6qEEhZ0I=";
sha256 = "sha256-EwS4prlZlI6V0mUidE7Kaz/rYy5ji/DB0huDt0ATxGs=";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;

View File

@ -0,0 +1,16 @@
Disable v8 system instrumentation on Darwin
On Darwin, the v8 system instrumentation requires the header "os/signpost.h"
which is available since apple_sdk 11+. See: https://github.com/nodejs/node/issues/39584
--- old/tools/v8_gypfiles/features.gypi
+++ new/tools/v8_gypfiles/features.gypi
@@ -62,7 +62,7 @@
}, {
'is_component_build': 0,
}],
- ['OS == "win" or OS == "mac"', {
+ ['OS == "win"', {
# Sets -DSYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing
'v8_enable_system_instrumentation': 1,
}, {

View File

@ -1,4 +1,4 @@
{ callPackage, openssl, python3, fetchpatch, enableNpm ? true }:
{ callPackage, openssl, python3, enableNpm ? true }:
let
buildNodejs = callPackage ./nodejs.nix {
@ -8,14 +8,7 @@ let
in
buildNodejs {
inherit enableNpm;
version = "16.5.0";
sha256 = "16dapj5pm2y1m3ldrjjlz8rq9axk85nn316iz02nk6qjs66y6drz";
patches = [
# Fix CVE-2021-22930 https://github.com/nodejs/node/pull/39423.
# It should be fixed by Node.js 16.6.0, but currently it fails to build on Darwin
(fetchpatch {
url = "https://github.com/nodejs/node/commit/9d950a0956bf2c3dd87bacb56807f37e16a91db4.patch";
sha256 = "1narhk5dqdkbndh9hg0dn5ghhgrd6gsamjqszpivmp33nl5hgsx3";
})
];
version = "16.6.1";
sha256 = "0mz5wfhf2k1qf3d57h4r8b30izhyg93g5m9c8rljlzy6ih2ymcbr";
patches = [ ./disable-darwin-v8-system-instrumentation.patch ];
}

View File

@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "http://releases.wildfiregames.com/0ad-${version}-alpha-unix-data.tar.xz";
sha256 = "0b53jzl64i49rk3n3c3x0hibwbl7vih2xym8jq5s56klg61qdxa1";
sha256 = "1d8c58s2fwdmjjpna57gk0d2ar17f2fqcrkgsn45x6s3ickf984p";
};
installPhase = ''

View File

@ -26,11 +26,11 @@ let
in
stdenv.mkDerivation rec {
pname = "0ad";
version = "0.0.24b";
version = "0.0.25";
src = fetchurl {
url = "http://releases.wildfiregames.com/0ad-${version}-alpha-unix-build.tar.xz";
sha256 = "1a1py45hkh2cswi09vbf9chikgxdv9xplsmg6sv6xhdznv4j6p1j";
sha256 = "03s38pknggsbzkhgj692yd3vm16ass7k4bgjn63qwn51q4vsnbjr";
};
nativeBuildInputs = [ python2 perl pkg-config ];

View File

@ -72,6 +72,7 @@ in rec {
rev = "aa59077c635ab21b251bd8cb4dc24c415e64a58e";
sha256 = "06346ih3hzwszhkj25g4xv5av7292s6sdbrdpx39p0n3kgf5mwww";
};
rtpFilePath = "scroll_copy_mode.tmux";
meta = {
homepage = "https://github.com/NHDaly/tmux-better-mouse-mode";
description = "better mouse support for tmux";

View File

@ -1,5 +1,5 @@
# TODO check that no license information gets lost
{ callPackage, config, lib, vimUtils, vim, darwin, llvmPackages }:
{ callPackage, config, lib, vimUtils, vim, darwin, llvmPackages, luaPackages }:
let
@ -7,7 +7,15 @@ let
inherit (lib) extends;
initialPackages = self: {};
initialPackages = self: {
# Convert derivation to a vim plugin.
toVimPlugin = drv:
drv.overrideAttrs(oldAttrs: {
passthru = (oldAttrs.passthru or {}) // {
vimPlugin = true;
};
});
};
plugins = callPackage ./generated.nix {
inherit buildVimPluginFrom2Nix;
@ -22,7 +30,7 @@ let
overrides = callPackage ./overrides.nix {
inherit (darwin.apple_sdk.frameworks) Cocoa CoreFoundation CoreServices;
inherit buildVimPluginFrom2Nix;
inherit llvmPackages;
inherit llvmPackages luaPackages;
};
aliases = if (config.allowAliases or true) then (import ./aliases.nix lib) else final: prev: {};

View File

@ -86,6 +86,8 @@
, iferr
, impl
, reftools
# must be lua51Packages
, luaPackages
}:
self: super: {
@ -282,6 +284,8 @@ self: super: {
dependencies = with self; [ plenary-nvim ];
});
plenary-nvim = super.toVimPlugin(luaPackages.plenary-nvim);
gruvbox-nvim = super.gruvbox-nvim.overrideAttrs (old: {
dependencies = with self; [ lush-nvim ];
});

View File

@ -2,6 +2,7 @@
{ lib, stdenv, vim, vimPlugins, vim_configurable, buildEnv, writeText, writeScriptBin
, nix-prefetch-hg, nix-prefetch-git
, fetchFromGitHub, runtimeShell
, hasLuaModule
}:
/*
@ -186,7 +187,21 @@ let
nativeImpl = packages:
(let
link = (packageName: dir: pluginPath: "ln -sf ${pluginPath}/share/vim-plugins/* $out/pack/${packageName}/${dir}");
# dir is "start" or "opt"
linkLuaPlugin = plugin: packageName: dir: ''
mkdir -p $out/pack/${packageName}/${dir}/${plugin.pname}/lua
ln -sf ${plugin}/share/lua/5.1/* $out/pack/${packageName}/${dir}/${plugin.pname}/lua
ln -sf ${plugin}/${plugin.pname}-${plugin.version}-rocks/${plugin.pname}/${plugin.version}/* $out/pack/${packageName}/${dir}/${plugin.pname}/
'';
linkVimlPlugin = pluginPath: packageName: dir:
"ln -sf ${pluginPath}/${rtpPath}/* $out/pack/${packageName}/${dir}";
# (builtins.trace pluginPath )
link = pluginPath: if hasLuaModule pluginPath
then linkLuaPlugin pluginPath
else linkVimlPlugin pluginPath;
packageLinks = (packageName: {start ? [], opt ? []}:
let
# `nativeImpl` expects packages to be derivations, not strings (as
@ -199,9 +214,9 @@ let
[ "mkdir -p $out/pack/${packageName}/start" ]
# To avoid confusion, even dependencies of optional plugins are added
# to `start` (except if they are explicitly listed as optional plugins).
++ (builtins.map (link packageName "start") (lib.unique (startWithDeps ++ depsOfOptionalPlugins)))
++ (builtins.map (x: link x packageName "start") (lib.unique (startWithDeps ++ depsOfOptionalPlugins)))
++ ["mkdir -p $out/pack/${packageName}/opt"]
++ (builtins.map (link packageName "opt") opt)
++ (builtins.map (x: link x packageName "opt") opt)
);
packDir = (packages:
stdenv.mkDerivation {
@ -217,6 +232,18 @@ let
set runtimepath^=${packDir packages}
'');
/* Generates a vimrc string
packages is an attrset with {name: { start = [ vim derivations ]; opt = [ vim derivations ]; }
Example:
vimrcContent {
packages = { home-manager = { start = [vimPlugins.vim-fugitive]; opt = [];};
beforePlugins = '';
customRc = ''let mapleader = " "'';
};
*/
vimrcContent = {
packages ? null,
vam ? null,

View File

@ -31,7 +31,7 @@ let
buildAndTestSubdir = "adapter";
cargoFlags = [
cargoBuildFlags = [
"--lib"
"--bin=codelldb"
"--features=weak-linkage"
@ -99,6 +99,5 @@ in stdenv.mkDerivation {
license = with licenses; [ mit ];
maintainers = with maintainers; [ oxalica ];
platforms = platforms.all;
broken = stdenv.isDarwin; # Build failed on x86_64-darwin currently.
};
}

View File

@ -1,21 +1,21 @@
{
"4.14": {
"extra": "-hardened1",
"name": "linux-hardened-4.14.240-hardened1.patch",
"sha256": "0j5zp0f8s4w3f60yam2spg3bx56bdjvv0mh632zlhchz8rdk5zs4",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.240-hardened1/linux-hardened-4.14.240-hardened1.patch"
"name": "linux-hardened-4.14.243-hardened1.patch",
"sha256": "0ngz1ywkxjqyv92wirj9m6l99p4caj6n75h2mv0a6rhk9r4di6p6",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.243-hardened1/linux-hardened-4.14.243-hardened1.patch"
},
"4.19": {
"extra": "-hardened1",
"name": "linux-hardened-4.19.198-hardened1.patch",
"sha256": "18c5j00xiwc0xn5klcrwazk6wvjiy3cixbfbrw4xj7zal9r5p6q9",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.198-hardened1/linux-hardened-4.19.198-hardened1.patch"
"name": "linux-hardened-4.19.202-hardened1.patch",
"sha256": "0bylyc7k5azs8335mmzrgsx42cg8l3vm4izzikc8kchs2grb1q5v",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.202-hardened1/linux-hardened-4.19.202-hardened1.patch"
},
"5.10": {
"extra": "-hardened1",
"name": "linux-hardened-5.10.52-hardened1.patch",
"sha256": "062a32rb1g5xk1npiz9fa114k7g4x9pmygycn3alc0phngjmvr98",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.52-hardened1/linux-hardened-5.10.52-hardened1.patch"
"name": "linux-hardened-5.10.57-hardened1.patch",
"sha256": "0zqv77k0i4q5w4qhgiknvrh4fav1jc4a2i9cdracwqlrk8fgmiih",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.57-hardened1/linux-hardened-5.10.57-hardened1.patch"
},
"5.12": {
"extra": "-hardened1",
@ -25,8 +25,8 @@
},
"5.4": {
"extra": "-hardened1",
"name": "linux-hardened-5.4.134-hardened1.patch",
"sha256": "0iay6dxwd1vqj02ljf0ghncrqpr6b0gby90xiza8kkk8wnh3r9hh",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.134-hardened1/linux-hardened-5.4.134-hardened1.patch"
"name": "linux-hardened-5.4.139-hardened1.patch",
"sha256": "0lznmwy8yqc8rq5pr0akxclpnwz98pgai6ib5a3d77ncfham6fnl",
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.139-hardened1/linux-hardened-5.4.139-hardened1.patch"
}
}

View File

@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "4.14.240";
version = "4.14.243";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,7 +13,7 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1k65qwzlnqnh9ym0n2fxpa8nk2qwvykwhwgaixk3b7ndzmr8b6c8";
sha256 = "0wdk93qv91pa6bd3ff1gv7manhkzh190c5blcpl14cbh9m2ms8vz";
};
kernelTests = args.kernelTests or [ nixosTests.kernel-generic.linux_4_14 ];

View File

@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "4.19.198";
version = "4.19.202";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,7 +13,7 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "13k0r6a4n8nbni64a18wqzy0pg4vn1zw2li78xrm78rqcrnah85y";
sha256 = "09ya7n0il8fipp8ksb8cyl894ihny2r75g70vbhclbv20q2pv0pj";
};
kernelTests = args.kernelTests or [ nixosTests.kernel-generic.linux_4_19 ];

View File

@ -1,13 +1,13 @@
{ buildPackages, fetchurl, perl, buildLinux, nixosTests, stdenv, ... } @ args:
buildLinux (args // rec {
version = "4.4.278";
version = "4.4.279";
extraMeta.branch = "4.4";
extraMeta.broken = stdenv.isAarch64;
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1r2sbxn8finzcg72ds5dyh4578vv2s5zwylq3b3xyw3hzr4swn4f";
sha256 = "1d3cfhs7ixk0dhh1mc1z6y73i816a2wl16zhayl1ssp69d4ndpsb";
};
kernelTests = args.kernelTests or [ nixosTests.kernel-generic.linux_4_4 ];

View File

@ -1,13 +1,13 @@
{ buildPackages, fetchurl, perl, buildLinux, nixosTests, stdenv, ... } @ args:
buildLinux (args // rec {
version = "4.9.278";
version = "4.9.279";
extraMeta.branch = "4.9";
extraMeta.broken = stdenv.isAarch64;
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "04byav6cbga3jqkppygm5zj73d9v44xyvx6hbrhwr22lsk282dz7";
sha256 = "01rf3xh2jcz6l2h79g0m02i8f9q51j64wvgvzi8lmq0gx9yvbv91";
};
kernelTests = args.kernelTests or [ nixosTests.kernel-generic.linux_4_9 ];

View File

@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "5.10.52";
version = "5.10.57";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,7 +13,7 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "0ydf09wsg0pkjm9dk8y730ksg15p5rlbhq445zx8k191zah5g7kn";
sha256 = "0b8lwfjlyd6j0csk71v07bxb5lrrzp545g1wv6kdk0kzq6maxfq0";
};
kernelTests = args.kernelTests or [ nixosTests.kernel-generic.linux_5_10 ];

View File

@ -3,7 +3,7 @@
with lib;
buildLinux (args // rec {
version = "5.13.8";
version = "5.13.9";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,7 +13,7 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "0a54r71mcyqvq7c8kff817vh6zfj0bdzmp6ql4az84wq9nwc526h";
sha256 = "16hm6sb64f1hlr0qmf2w81zv55s6flj1x8jr2q326d9ny30przkj";
};
kernelTests = args.kernelTests or [ nixosTests.kernel-generic.linux_5_13 ];

Some files were not shown because too many files have changed in this diff Show More