Merge branch 'staging-next' into staging

; Conflicts:
;	pkgs/tools/misc/t1utils/default.nix
This commit is contained in:
Jan Tojnar 2021-08-11 16:34:11 +02:00
commit 807d3ec359
390 changed files with 11179 additions and 4670 deletions

View file

@ -1,7 +1,7 @@
# How to contribute
Note: contributing implies licensing those contributions
under the terms of [COPYING](../COPYING), which is an MIT-like license.
under the terms of [COPYING](COPYING), which is an MIT-like license.
## Opening issues

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

@ -6722,6 +6722,12 @@
githubId = 35892750;
name = "Maxine Aubrey";
};
maxhille = {
email = "mh@lambdasoup.com";
github = "maxhille";
githubId = 693447;
name = "Max Hille";
};
maxhbr = {
email = "nixos@maxhbr.dev";
github = "maxhbr";
@ -6977,6 +6983,12 @@
fingerprint = "3DEE 1C55 6E1C 3DC5 54F5 875A 003F 2096 411B 5F92";
}];
};
michaeladler = {
email = "therisen06@gmail.com";
github = "michaeladler";
githubId = 1575834;
name = "Michael Adler";
};
michaelpj = {
email = "michaelpj@gmail.com";
github = "michaelpj";
@ -9668,6 +9680,12 @@
githubId = 1567527;
name = "Sebastian Hyberts";
};
sebtm = {
email = "mail@sebastian-sellmeier.de";
github = "sebtm";
githubId = 17243347;
name = "Sebastian Sellmeier";
};
sellout = {
email = "greg@technomadic.org";
github = "sellout";

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

@ -6,7 +6,10 @@ set -euf -o pipefail
(
cd pkgs/development/ruby-modules/with-packages
rm -f gemset.nix Gemfile.lock
bundle lock
# Since bundler 2+, the lock command generates a platform-dependent
# Gemfile.lock, hence causing to bundix to generate a gemset tied to the
# platform from where it was executed.
BUNDLE_FORCE_RUBY_PLATFORM=1 bundle lock
bundix
mv gemset.nix ../../../top-level/ruby-packages.nix
rm -f Gemfile.lock

View file

@ -156,6 +156,21 @@
<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>
<listitem>
<para>
<link xlink:href="https://posativ.org/isso/">isso</link>, a
commenting server similar to Disqus. Available as
<link linkend="opt-services.isso.enable">isso</link>
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-21.11-incompatibilities">
@ -167,6 +182,13 @@
from 1.0.4 to 3.0.1
</para>
</listitem>
<listitem>
<para>
The <literal>erigon</literal> ethereum node has moved to a new
database format in <literal>2021-05-04</literal>, and requires
a full resync
</para>
</listitem>
<listitem>
<para>
<literal>services.geoip-updater</literal> was broken and has
@ -672,6 +694,15 @@
<literal>yambar-wayland</literal> if you are on wayland.
</para>
</listitem>
<listitem>
<para>
The <literal>services.minio</literal> module gained an
additional option <literal>consoleAddress</literal>, that
configures the address and port the web UI is listening, it
defaults to <literal>:9001</literal>. To be able to access the
web UI this port needs to be opened in the firewall.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-21.11-notable-changes">

View file

@ -48,10 +48,17 @@ 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).
- [isso](https://posativ.org/isso/), a commenting server similar to Disqus.
Available as [isso](#opt-services.isso.enable)
## Backward Incompatibilities {#sec-release-21.11-incompatibilities}
- The `staticjinja` package has been upgraded from 1.0.4 to 3.0.1
- The `erigon` ethereum node has moved to a new database format in `2021-05-04`, and requires a full resync
- `services.geoip-updater` was broken and has been replaced by [services.geoipupdate](options.html#opt-services.geoipupdate.enable).
- PHP 7.3 is no longer supported due to upstream not supporting this version for the entire lifecycle of the 21.11 release.
@ -168,6 +175,10 @@ pt-services.clipcat.enable).
- The `yambar` package has been split into `yambar` and `yambar-wayland`, corresponding to the xorg and wayland backend respectively. Please switch to `yambar-wayland` if you are on wayland.
- The `services.minio` module gained an additional option `consoleAddress`, that
configures the address and port the web UI is listening, it defaults to `:9001`.
To be able to access the web UI this port needs to be opened in the firewall.
## Other Notable Changes {#sec-release-21.11-notable-changes}
- The setting [`services.openssh.logLevel`](options.html#opt-services.openssh.logLevel) `"VERBOSE"` `"INFO"`. This brings NixOS in line with upstream and other Linux distributions, and reduces log spam on servers due to bruteforcing botnets.

View file

@ -178,7 +178,7 @@ in
radvd = 139;
zookeeper = 140;
dnsmasq = 141;
uhub = 142;
#uhub = 142; # unused
yandexdisk = 143;
mxisd = 144; # was once collectd
consul = 145;

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
@ -959,6 +960,7 @@
./services/web-apps/icingaweb2/icingaweb2.nix
./services/web-apps/icingaweb2/module-monitoring.nix
./services/web-apps/ihatemoney
./services/web-apps/isso.nix
./services/web-apps/jirafeau.nix
./services/web-apps/jitsi-meet.nix
./services/web-apps/keycloak.nix

View file

@ -61,7 +61,7 @@ in {
port = mkOption {
default = 8080;
type = types.int;
type = types.port;
description = ''
Specifies port number on which the jenkins HTTP interface listens.
The default is 8080.

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

@ -17,7 +17,7 @@ in {
enable = mkEnableOption "Haskell documentation server";
port = mkOption {
type = types.int;
type = types.port;
default = 8080;
description = ''
Port number Hoogle will be listening to.

View file

@ -78,7 +78,7 @@ in {
port = mkOption {
default = 8123;
type = types.int;
type = types.port;
description = "The port on which to listen.";
};

View file

@ -3,178 +3,110 @@
with lib;
let
cfg = config.services.uhub;
uhubPkg = pkgs.uhub.override { tlsSupport = cfg.enableTLS; };
pluginConfig = ""
+ optionalString cfg.plugins.authSqlite.enable ''
plugin ${uhubPkg.mod_auth_sqlite}/mod_auth_sqlite.so "file=${cfg.plugins.authSqlite.file}"
''
+ optionalString cfg.plugins.logging.enable ''
plugin ${uhubPkg.mod_logging}/mod_logging.so ${if cfg.plugins.logging.syslog then "syslog=true" else "file=${cfg.plugins.logging.file}"}
''
+ optionalString cfg.plugins.welcome.enable ''
plugin ${uhubPkg.mod_welcome}/mod_welcome.so "motd=${pkgs.writeText "motd.txt" cfg.plugins.welcome.motd} rules=${pkgs.writeText "rules.txt" cfg.plugins.welcome.rules}"
''
+ optionalString cfg.plugins.history.enable ''
plugin ${uhubPkg.mod_chat_history}/mod_chat_history.so "history_max=${toString cfg.plugins.history.max} history_default=${toString cfg.plugins.history.default} history_connect=${toString cfg.plugins.history.connect}"
'';
uhubConfigFile = pkgs.writeText "uhub.conf" ''
file_acl=${pkgs.writeText "users.conf" cfg.aclConfig}
file_plugins=${pkgs.writeText "plugins.conf" pluginConfig}
server_bind_addr=${cfg.address}
server_port=${toString cfg.port}
${lib.optionalString cfg.enableTLS "tls_enable=yes"}
${cfg.hubConfig}
'';
in
{
settingsFormat = {
type = with lib.types; attrsOf (oneOf [ bool int str ]);
generate = name: attrs:
pkgs.writeText name (lib.strings.concatStringsSep "\n"
(lib.attrsets.mapAttrsToList
(key: value: "${key}=${builtins.toJSON value}") attrs));
};
in {
options = {
services.uhub = {
services.uhub = mkOption {
default = { };
description = "Uhub ADC hub instances";
type = types.attrsOf (types.submodule {
options = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the uhub ADC hub.";
};
enable = mkEnableOption "hub instance" // { default = true; };
port = mkOption {
type = types.int;
default = 1511;
description = "TCP port to bind the hub to.";
};
address = mkOption {
type = types.str;
default = "any";
description = "Address to bind the hub to.";
};
enableTLS = mkOption {
type = types.bool;
default = false;
description = "Whether to enable TLS support.";
};
hubConfig = mkOption {
type = types.lines;
default = "";
description = "Contents of uhub configuration file.";
};
aclConfig = mkOption {
type = types.lines;
default = "";
description = "Contents of user ACL configuration file.";
};
plugins = {
authSqlite = {
enable = mkOption {
enableTLS = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the Sqlite authentication database plugin";
description = "Whether to enable TLS support.";
};
file = mkOption {
type = types.path;
example = "/var/db/uhub-users";
description = "Path to user database. Use the uhub-passwd utility to create the database and add/remove users.";
};
};
logging = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the logging plugin.";
};
file = mkOption {
type = types.str;
default = "";
description = "Path of log file.";
};
syslog = mkOption {
type = types.bool;
default = false;
description = "If true then the system log is used instead of writing to file.";
};
};
welcome = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the welcome plugin.";
};
motd = mkOption {
default = "";
type = types.lines;
settings = mkOption {
inherit (settingsFormat) type;
description = ''
Welcome message displayed to clients after connecting
and with the <literal>!motd</literal> command.
Configuration of uhub.
See https://www.uhub.org/doc/config.php for a list of options.
'';
default = { };
example = {
server_bind_addr = "any";
server_port = 1511;
hub_name = "My Public Hub";
hub_description = "Yet another ADC hub";
max_users = 150;
};
};
rules = mkOption {
default = "";
type = types.lines;
description = ''
Rules message, displayed to clients with the <literal>!rules</literal> command.
'';
};
};
history = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the history plugin.";
plugins = mkOption {
description = "Uhub plugin configuration.";
type = with types;
listOf (submodule {
options = {
plugin = mkOption {
type = path;
example = literalExample
"$${pkgs.uhub}/plugins/mod_auth_sqlite.so";
description = "Path to plugin file.";
};
settings = mkOption {
description = "Settings specific to this plugin.";
type = with types; attrsOf str;
example = { file = "/etc/uhub/users.db"; };
};
};
});
default = [ ];
};
max = mkOption {
type = types.int;
default = 200;
description = "The maximum number of messages to keep in history";
};
default = mkOption {
type = types.int;
default = 10;
description = "When !history is provided without arguments, then this default number of messages are returned.";
};
connect = mkOption {
type = types.int;
default = 5;
description = "The number of chat history messages to send when users connect (0 = do not send any history).";
};
};
};
};
});
};
};
config = mkIf cfg.enable {
config = let
hubs = lib.attrsets.filterAttrs (_: cfg: cfg.enable) config.services.uhub;
in {
users = {
users.uhub.uid = config.ids.uids.uhub;
groups.uhub.gid = config.ids.gids.uhub;
};
environment.etc = lib.attrsets.mapAttrs' (name: cfg:
let
settings' = cfg.settings // {
tls_enable = cfg.enableTLS;
file_plugins = pkgs.writeText "uhub-plugins.conf"
(lib.strings.concatStringsSep "\n" (map ({ plugin, settings }:
"plugin ${plugin} ${
toString
(lib.attrsets.mapAttrsToList (key: value: ''"${key}=${value}"'')
settings)
}") cfg.plugins));
};
in {
name = "uhub/${name}.conf";
value.source = settingsFormat.generate "uhub-${name}.conf" settings';
}) hubs;
systemd.services.uhub = {
description = "high performance peer-to-peer hub for the ADC network";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "notify";
ExecStart = "${uhubPkg}/bin/uhub -c ${uhubConfigFile} -u uhub -g uhub -L";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
systemd.services = lib.attrsets.mapAttrs' (name: cfg: {
name = "uhub-${name}";
value = let pkg = pkgs.uhub.override { tlsSupport = cfg.enableTLS; };
in {
description = "high performance peer-to-peer hub for the ADC network";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
reloadIfChanged = true;
serviceConfig = {
Type = "notify";
ExecStart = "${pkg}/bin/uhub -c /etc/uhub/${name}.conf -L";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
DynamicUser = true;
};
};
};
}) hubs;
};
}

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

@ -32,9 +32,9 @@ let
description = "Bind address for ${name} endpoint.";
};
port = mkOption {
type = types.int;
type = types.port;
default = port;
description = "Bind port for ${name} endoint.";
description = "Bind port for ${name} endpoint.";
};
};

View file

@ -41,7 +41,7 @@ in {
};
port = mkOption {
type = types.int;
type = types.port;
default = 9000;
description = "TCP port to listen on for http connections.";
};

View file

@ -21,7 +21,7 @@ in
};
port = mkOption {
type = types.int;
type = types.port;
default = 8999;
description = ''
TCP port to bind to.

View file

@ -31,6 +31,20 @@ in
services.wakeonlan.interfaces = mkOption {
default = [ ];
type = types.listOf (types.submodule { options = {
interface = mkOption {
type = types.str;
description = "Interface to enable for Wake-On-Lan.";
};
method = mkOption {
type = types.enum [ "magicpacket" "password"];
description = "Wake-On-Lan method for this interface.";
};
password = mkOption {
type = types.strMatching "[a-fA-F0-9]{2}:([a-fA-F0-9]{2}:){4}[a-fA-F0-9]{2}";
description = "The password has the shape of six bytes in hexadecimal separated by a colon each.";
};
};});
example = [
{
interface = "eth0";

View file

@ -32,7 +32,7 @@ in with lib; {
};
port = mkOption {
type = types.int;
type = types.port;
default = 43110;
example = 43110;
description = "Optional zeronet web UI port.";
@ -41,7 +41,7 @@ in with lib; {
fileserverPort = mkOption {
# Not optional: when absent zeronet tries to write one to the
# read-only config file and crashes
type = types.int;
type = types.port;
default = 12261;
example = 12261;
description = "Zeronet fileserver port.";

View file

@ -0,0 +1,69 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkEnableOption mkIf mkOption types literalExample;
cfg = config.services.isso;
settingsFormat = pkgs.formats.ini { };
configFile = settingsFormat.generate "isso.conf" cfg.settings;
in {
options = {
services.isso = {
enable = mkEnableOption ''
A commenting server similar to Disqus.
Note: The application's author suppose to run isso behind a reverse proxy.
The embedded solution offered by NixOS is also only suitable for small installations
below 20 requests per second.
'';
settings = mkOption {
description = ''
Configuration for <package>isso</package>.
See <link xlink:href="https://posativ.org/isso/docs/configuration/server/">Isso Server Configuration</link>
for supported values.
'';
type = types.submodule {
freeformType = settingsFormat.type;
};
example = literalExample ''
{
general = {
host = "http://localhost";
};
}
'';
};
};
};
config = mkIf cfg.enable {
services.isso.settings.general.dbpath = lib.mkDefault "/var/lib/isso/comments.db";
systemd.services.isso = {
description = "isso, a commenting server similar to Disqus";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "isso";
Group = "isso";
DynamicUser = true;
StateDirectory = "isso";
ExecStart = ''
${pkgs.isso}/bin/isso -c ${configFile}
'';
Restart = "on-failure";
RestartSec = 1;
};
};
};
}

View file

@ -19,7 +19,13 @@ in
listenAddress = mkOption {
default = ":9000";
type = types.str;
description = "Listen on a specific IP address and port.";
description = "IP address and port of the server.";
};
consoleAddress = mkOption {
default = ":9001";
type = types.str;
description = "IP address and port of the web UI (console).";
};
dataDir = mkOption {
@ -99,7 +105,7 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/minio server --json --address ${cfg.listenAddress} --config-dir=${cfg.configDir} ${toString cfg.dataDir}";
ExecStart = "${cfg.package}/bin/minio server --json --address ${cfg.listenAddress} --console-address ${cfg.consoleAddress} --config-dir=${cfg.configDir} ${toString cfg.dataDir}";
Type = "simple";
User = "minio";
Group = "minio";

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 {};
@ -93,6 +94,7 @@ in
cri-o = handleTestOn ["x86_64-linux"] ./cri-o.nix {};
custom-ca = handleTest ./custom-ca.nix {};
croc = handleTest ./croc.nix {};
cryptpad = handleTest ./cryptpad.nix {};
deluge = handleTest ./deluge.nix {};
dendrite = handleTest ./dendrite.nix {};
dhparams = handleTest ./dhparams.nix {};
@ -125,8 +127,10 @@ 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 = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-esr; }; # used in `tested` job
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" ])

18
nixos/tests/cryptpad.nix Normal file
View file

@ -0,0 +1,18 @@
import ./make-test-python.nix ({ lib, ... }:
with lib;
{
name = "cryptpad";
meta.maintainers = with maintainers; [ davhau ];
nodes.machine =
{ pkgs, ... }:
{ services.cryptpad.enable = true; };
testScript = ''
machine.wait_for_unit("cryptpad.service")
machine.wait_for_open_port("3000")
machine.succeed("curl -L --fail http://localhost:3000/sheet")
'';
})

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";

30
nixos/tests/isso.nix Normal file
View file

@ -0,0 +1,30 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "isso";
meta = with pkgs.lib.maintainers; {
maintainers = [ asbachb ];
};
machine = { config, pkgs, ... }: {
services.isso = {
enable = true;
settings = {
general = {
dbpath = "/var/lib/isso/comments.db";
host = "http://localhost";
};
};
};
};
testScript = let
port = 8080;
in
''
machine.wait_for_unit("isso.service")
machine.wait_for_open_port("${toString port}")
machine.succeed("curl --fail http://localhost:${toString port}/?uri")
machine.succeed("curl --fail http://localhost:${toString port}/js/embed.min.js")
'';
})

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

@ -360,7 +360,6 @@ let
systemd.services.prometheus-kea-exporter.after = [ "kea-dhcp6-server.service" ];
services.kea = {
enable = true;
dhcp6 = {
enable = true;
settings = {

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

@ -13,6 +13,7 @@
, tor
, psmisc
}:
let
bisq-launcher = writeScript "bisq-launcher" ''
#! ${bash}/bin/bash
@ -46,15 +47,16 @@ let
'';
in
stdenv.mkDerivation rec {
version = "1.7.0";
pname = "bisq-desktop";
nativeBuildInputs = [ makeWrapper copyDesktopItems dpkg ];
version = "1.7.0";
src = fetchurl {
url = "https://github.com/bisq-network/bisq/releases/download/v${version}/Bisq-64bit-${version}.deb";
sha256 = "0crry5k7crmrqn14wxiyrnhk09ac8a9ksqrwwky7jsnyah0bx5k4";
};
nativeBuildInputs = [ makeWrapper copyDesktopItems dpkg ];
desktopItems = [
(makeDesktopItem {
name = "Bisq";
@ -71,6 +73,8 @@ stdenv.mkDerivation rec {
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib $out/bin
cp opt/bisq/lib/app/desktop-${version}-all.jar $out/lib
@ -80,13 +84,13 @@ stdenv.mkDerivation rec {
makeWrapper ${bisq-launcher} $out/bin/bisq-desktop \
--prefix PATH : $out/bin
copyDesktopItems
for n in 16 24 32 48 64 96 128 256; do
size=$n"x"$n
${imagemagick}/bin/convert opt/bisq/lib/Bisq.png -resize $size bisq.png
install -Dm644 -t $out/share/icons/hicolor/$size/apps bisq.png
done;
runHook postInstall
'';
meta = with lib; {

View file

@ -7,13 +7,13 @@ with lib;
stdenv.mkDerivation rec {
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-unlimited-" + version;
version = "1.9.1.1";
version = "1.9.2.0";
src = fetchFromGitHub {
owner = "bitcoinunlimited";
repo = "bitcoinunlimited";
rev = "BCHunlimited${version}";
sha256 = "sha256-K15SI1F/xI4SkX4a41QHLn89YaHCgrlv+wcbkpwGKhI=";
sha256 = "sha256-qUf/GWZHpI57ATTlvRhjDtAjRa8a4uvUb0G9Xcf0j7w=";
};
nativeBuildInputs = [ pkg-config autoreconfHook python3 ]

View file

@ -20,11 +20,11 @@ let
in
stdenv.mkDerivation rec {
pname = "clightning";
version = "0.10.0";
version = "0.10.1";
src = fetchurl {
url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
sha256 = "5154e67780dddbf12f64c4b1994c3ee3834236f05b6462adf25e8a5f3fa407ea";
sha256 = "9271e9e89d60332b66afedbf8d6eab2a4a488782ab400ee1f60667d73c5a9a96";
};
nativeBuildInputs = [ autogen autoconf automake gettext libtool pkg-config py3 unzip which ];

View file

@ -0,0 +1,34 @@
{ stdenv, lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "erigon";
version = "2021.08.01";
src = fetchFromGitHub {
owner = "ledgerwatch";
repo = pname;
rev = "v${version}";
sha256 = "sha256-fjMkCCeQa/IHB4yXlL7Qi8J9wtZm90l3xIA72LeoW8M=";
};
vendorSha256 = "1vsgd19an592dblm9afasmh8cd0x2frw5pvnxkxd2fikhy2mibbs";
runVend = true;
# Build errors in mdbx when format hardening is enabled:
# cc1: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]
hardeningDisable = [ "format" ];
subPackages = [
"cmd/erigon"
"cmd/evm"
"cmd/rpcdaemon"
"cmd/rlpdump"
];
meta = with lib; {
homepage = "https://github.com/ledgerwatch/erigon/";
description = "Ethereum node implementation focused on scalability and modularity";
license = with licenses; [ lgpl3Plus gpl3Plus ];
maintainers = with maintainers; [ d-xo ];
};
}

View file

@ -2,12 +2,12 @@
let
pname = "ledger-live-desktop";
version = "2.31.1";
version = "2.32.2";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
sha256 = "0cxf4i58l0kg9c13j7mf0w5ijrkkf9z1375vn6xghd0r8g5hvws5";
sha256 = "14agkl6xf0f9s5qldla6p6kzl8zlx61q5m8qy63lq215hrzh9d50";
};
appimageContents = appimageTools.extractType2 {

View file

@ -1,30 +0,0 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "turbo-geth";
version = "2021.05.02";
src = fetchFromGitHub {
owner = "ledgerwatch";
repo = pname;
rev = "v${version}";
sha256 = "sha256-7sTRAAlKZOdwi/LRbIEDKWpBe1ol8pZfEf2KIC4s0xk=";
};
vendorSha256 = "1d0ahdb2b5v8nxq3kdxw151phnyv6habb8kr8qjaq3kyhcnyk6ng";
runVend = true;
subPackages = [
"cmd/tg"
"cmd/evm"
"cmd/rpcdaemon"
"cmd/rlpdump"
];
meta = with lib; {
homepage = "https://github.com/ledgerwatch/turbo-geth/";
description = "Ethereum node and geth fork focused on scalability and modularity";
license = with licenses; [ lgpl3Plus gpl3Plus ];
maintainers = with maintainers; [ d-xo ];
};
}

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

@ -20,6 +20,7 @@ rustPlatform.buildRustPackage rec {
description = "A post-modern modal text editor";
homepage = "https://helix-editor.com";
license = licenses.mpl20;
mainProgram = "hx";
maintainers = with maintainers; [ yusdacra ];
};
}

View file

@ -10,11 +10,11 @@
mkDerivation rec {
pname = "kdevelop";
version = "5.6.1";
version = "5.6.2";
src = fetchurl {
url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz";
sha256 = "02ip5r67hjfpywkm3mz86n6wbqcr7996ifzfd2fyzsvm4998hi4y";
sha256 = "sha256-D4a8P+U/dhwePj91RFd6DEFDO+i/8xDPLnKfdvQ2O/Y=";
};
nativeBuildInputs = [

View file

@ -3,13 +3,14 @@
, lib
, fetchFromGitHub
, fetchgit
, fetchurl
, makeWrapper
, pkg-config
, python2
, expat
, openssl
, SDL2
, fontconfig
, freetype
, ninja
, gn
, llvmPackages
@ -21,16 +22,16 @@
}:
rustPlatform.buildRustPackage rec {
pname = "neovide";
version = "unstable-2021-06-21";
version = "unstable-2021-08-08";
src = fetchFromGitHub {
owner = "Kethku";
repo = "neovide";
rev = "4159c47ff4f30073b92b9d63fc6ab70e07b74b6d";
sha256 = "sha256-XwirJGXMGxc/NkpSeHBUc16ppvJ+H4ECnrOVu030Qfg=";
rev = "725f12cafd4a26babd0d6bbcbca9a99c181991ac";
sha256 = "sha256-ThMobWKe3wHhR15TmmKrI6Gp1wvGVfJ52MzibK0ubkc=";
};
cargoSha256 = "sha256-WCk9kt81DtBwpEEdKH9gKQSVxAvH+vkyP2y24tU+vzY=";
cargoSha256 = "sha256-5lOGncnyA8DwetY5bU6k2KXNClFgp+xIBEeA0/iwGF0=";
SKIA_SOURCE_DIR =
let
@ -38,8 +39,8 @@ rustPlatform.buildRustPackage rec {
owner = "rust-skia";
repo = "skia";
# see rust-skia:skia-bindings/Cargo.toml#package.metadata skia
rev = "m90-0.38.3";
sha256 = "sha256-l8c4vfO1PELAT8bDyr/yQGZetZsaufAlJ6bBOXz7E1w=";
rev = "m91-0.39.4";
sha256 = "sha256-ovlR1vEZaQqawwth/UYVUSjFu+kTsywRpRClBaE1CEA=";
};
# The externals for skia are taken from skia/DEPS
externals = lib.mapAttrs (n: v: fetchgit v) (lib.importJSON ./skia-externals.json);
@ -79,10 +80,20 @@ rustPlatform.buildRustPackage rec {
doCheck = false;
buildInputs = [
expat
openssl
SDL2
fontconfig
(fontconfig.overrideAttrs (old: {
propagatedBuildInputs = [
# skia is not compatible with freetype 2.11.0
(freetype.overrideAttrs (old: rec {
version = "2.10.4";
src = fetchurl {
url = "mirror://savannah/${old.pname}/${old.pname}-${version}.tar.xz";
sha256 = "112pyy215chg7f7fmp2l9374chhhpihbh8wgpj5nj6avj3c59a46";
};
}))
];
}))
];
postFixup = ''

View file

@ -22,7 +22,7 @@ let
inherit pname version src sourceRoot;
passthru = {
inherit executableName tests updateScript;
inherit executableName longName tests updateScript;
fhs = fhs {};
fhsWithPackages = f: fhs { additionalPkgs = f; };
};

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

@ -1,4 +1,4 @@
{ lib, runCommand, buildEnv, vscode, makeWrapper
{ lib, stdenv, runCommand, buildEnv, vscode, makeWrapper
, vscodeExtensions ? [] }:
/*
@ -42,8 +42,7 @@
*/
let
inherit (vscode) executableName;
inherit (vscode) executableName longName;
wrappedPkgVersion = lib.getVersion vscode;
wrappedPkgName = lib.removeSuffix "-${wrappedPkgVersion}" vscode.name;
@ -52,6 +51,9 @@ let
paths = vscodeExtensions;
};
extensionsFlag = lib.optionalString (vscodeExtensions != []) ''
--add-flags "--extensions-dir ${combinedExtensionsDrv}/share/vscode/extensions"
'';
in
# When no extensions are requested, we simply redirect to the original
@ -62,7 +64,17 @@ runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}" {
dontPatchELF = true;
dontStrip = true;
meta = vscode.meta;
} ''
} (if stdenv.isDarwin then ''
mkdir -p $out/bin/
mkdir -p "$out/Applications/${longName}.app/Contents/MacOS"
for path in PkgInfo Frameworks Resources _CodeSignature Info.plist; do
ln -s "${vscode}/Applications/${longName}.app/Contents/$path" "$out/Applications/${longName}.app/Contents/"
done
makeWrapper "${vscode}/bin/${executableName}" "$out/bin/${executableName}" ${extensionsFlag}
makeWrapper "${vscode}/Applications/${longName}.app/Contents/MacOS/Electron" "$out/Applications/${longName}.app/Contents/MacOS/Electron" ${extensionsFlag}
'' else ''
mkdir -p "$out/bin"
mkdir -p "$out/share/applications"
mkdir -p "$out/share/pixmaps"
@ -70,7 +82,5 @@ runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}" {
ln -sT "${vscode}/share/pixmaps/code.png" "$out/share/pixmaps/code.png"
ln -sT "${vscode}/share/applications/${executableName}.desktop" "$out/share/applications/${executableName}.desktop"
ln -sT "${vscode}/share/applications/${executableName}-url-handler.desktop" "$out/share/applications/${executableName}-url-handler.desktop"
makeWrapper "${vscode}/bin/${executableName}" "$out/bin/${executableName}" ${lib.optionalString (vscodeExtensions != []) ''
--add-flags "--extensions-dir ${combinedExtensionsDrv}/share/vscode/extensions"
''}
''
makeWrapper "${vscode}/bin/${executableName}" "$out/bin/${executableName}" ${extensionsFlag}
'')

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

@ -16,13 +16,13 @@
stdenv.mkDerivation rec {
pname = "openimageio";
version = "2.2.12.0";
version = "2.2.17.0";
src = fetchFromGitHub {
owner = "OpenImageIO";
repo = "oiio";
rev = "Release-${version}";
sha256 = "16z8lnsqhljbfaarfwx9rc95p0a9wxf4p271j6kxdfknjb88p56i";
sha256 = "0jqpb1zci911wdm928addsljxx8zsh0gzbhv9vbw6man4wi93h6h";
};
outputs = [ "bin" "out" "dev" "doc" ];

View file

@ -1,31 +1,46 @@
{ boost, cmake, fetchFromGitHub, ffmpeg, qtbase, qtx11extras,
qttools, qtxmlpatterns, qtsvg, gdal, gfortran, libXt, makeWrapper,
mkDerivation, ninja, mpi, python3, lib, tbb, libGLU, libGL }:
{ lib, stdenv, fetchFromGitLab, fetchurl
, boost, cmake, ffmpeg, qtbase, qtx11extras
, qttools, qtxmlpatterns, qtsvg, gdal, gfortran, libXt, makeWrapper
, mkDerivation, ninja, mpi, python3, tbb, libGLU, libGL
, withDocs ? true
}:
mkDerivation rec {
let
version = "5.9.1";
docFiles = [
(fetchurl {
url = "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${lib.versions.majorMinor version}&type=data&os=Sources&downloadFile=ParaViewTutorial-${version}.pdf";
name = "Tutorial.pdf";
sha256 = "1knpirjbz3rv8p8n03p39vv8vi5imvxakjsssqgly09g0cnsikkw";
})
(fetchurl {
url = "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${lib.versions.majorMinor version}&type=data&os=Sources&downloadFile=ParaViewGettingStarted-${version}.pdf";
name = "GettingStarted.pdf";
sha256 = "14xhlvg7s7d5amqf4qfyamx2a6b66zf4cmlfm3s7iw3jq01x1lx6";
})
(fetchurl {
url = "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${lib.versions.majorMinor version}&type=data&os=Sources&downloadFile=ParaViewCatalystGuide-${version}.pdf";
name = "CatalystGuide.pdf";
sha256 = "133vcfrbg2nh15igl51ns6gnfn1is20vq6j0rg37wha697pmcr4a";
})
];
in mkDerivation rec {
pname = "paraview";
version = "5.8.0";
inherit version;
src = fetchFromGitHub {
owner = "Kitware";
repo = "ParaView";
src = fetchFromGitLab {
domain = "gitlab.kitware.com";
owner = "paraview";
repo = "paraview";
rev = "v${version}";
sha256 = "1mka6wwg9mbkqi3phs29mvxq6qbc44sspbm4awwamqhilh4grhrj";
sha256 = "0pzic95br0vr785jnpxqmfxcljw3wk7bhm2xy0jfmwm1dh2b7xac";
fetchSubmodules = true;
};
# Avoid error: format not a string literal and
# no format arguments [-Werror=format-security]
preConfigure = ''
substituteInPlace VTK/Common/Core/vtkLogger.h \
--replace 'vtkLogScopeF(verbosity_name, __func__)' 'vtkLogScopeF(verbosity_name, "%s", __func__)'
substituteInPlace VTK/Common/Core/vtkLogger.h \
--replace 'vtkVLogScopeF(level, __func__)' 'vtkVLogScopeF(level, "%s", __func__)'
'';
# Find the Qt platform plugin "minimal"
patchPhase = ''
preConfigure = ''
export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
'';
@ -63,7 +78,8 @@ mkDerivation rec {
];
buildInputs = [
libGLU libGL
libGLU
libGL
libXt
mpi
tbb
@ -77,6 +93,14 @@ mkDerivation rec {
qtsvg
];
postInstall = let docDir = "$out/share/paraview-${lib.versions.majorMinor version}/doc"; in
lib.optionalString withDocs ''
mkdir -p ${docDir};
for docFile in ${lib.concatStringsSep " " docFiles}; do
cp $docFile ${docDir}/$(stripHash $docFile);
done;
'';
propagatedBuildInputs = [
(python3.withPackages (ps: with ps; [ numpy matplotlib mpi4py ]))
];
@ -84,7 +108,7 @@ mkDerivation rec {
meta = with lib; {
homepage = "https://www.paraview.org/";
description = "3D Data analysis and visualization application";
license = licenses.free;
license = licenses.bsd3;
maintainers = with maintainers; [ guibert ];
platforms = platforms.linux;
};

View file

@ -0,0 +1,56 @@
{ lib
, buildPythonApplication
, fetchPypi
, requests
, mypy-extensions
, django_3
, django_extensions
, dateparser
, youtube-dl
, python-crontab
, croniter
, w3lib
, ipython
}:
let
django_3' = django_3.overridePythonAttrs (old: rec {
pname = "Django";
version = "3.1.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Ms55Lum2oMu+w0ASPiKayfdl3/jCpK6SR6FLK6OjZac=";
};
});
in
buildPythonApplication rec {
pname = "archivebox";
version = "0.6.2";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-zHty7lTra6yab9d0q3EqsPG3F+lrnZL6PjQAbL1A2NY=";
};
propagatedBuildInputs = [
requests
mypy-extensions
django_3'
django_extensions
dateparser
youtube-dl
python-crontab
croniter
w3lib
ipython
];
meta = with lib; {
description = "Open source self-hosted web archiving";
homepage = "https://archivebox.io";
license = licenses.mit;
maintainers = with maintainers; [ siraben ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,29 @@
{ lib, stdenv, fetchFromGitHub, ncurses }:
stdenv.mkDerivation rec {
pname = "bklk";
version = "unstable-2020-12-29";
src = fetchFromGitHub {
owner = "Ruunyox";
repo = pname;
rev = "26f3420aa5726e152a745278ddb98dc99c0a935e";
sha256 = "sha256-R3H6tv6fzQG41Y2rui0K8fdQ/+Ywnc5hqTPFjktrhF8=";
};
buildInputs = [ ncurses ];
installPhase = ''
mkdir -p $out/bin
cp bklk $out/bin
'';
meta = with lib; {
description = "Ncurses Binary Clock";
longDescription = "bklk is a simple binary clock for your terminal.";
homepage = "https://github.com/Ruunyox/bklk";
license = licenses.mit;
maintainers = with maintainers; [ j0hax ];
platforms = platforms.all;
};
}

View file

@ -5,13 +5,13 @@
buildGoModule rec {
pname = "dasel";
version = "1.16.1";
version = "1.17.0";
src = fetchFromGitHub {
owner = "TomWright";
repo = pname;
rev = "v${version}";
sha256 = "sha256-BrtTBy/Tb4xfs7UHk1acRzKZWNZJqhufHG1ItcM8TPs=";
sha256 = "sha256-VZsYwsYec6Q9T8xkb60F0CvPVFd2WJgyOfegm5GuN8c=";
};
vendorSha256 = "sha256-BdX4DO77mIf/+aBdkNVFUzClsIml1UMcgvikDbbdgcY=";

View file

@ -1,22 +1,19 @@
{ lib, stdenv, fetchurl, openssl }:
let
version = "6.4.20";
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "fetchmail";
inherit version;
version = "6.4.21";
src = fetchurl {
url = "mirror://sourceforge/fetchmail/fetchmail-${version}.tar.xz";
sha256 = "0xk171sbxcwjh1ibpipryw5sv4sy7jjfvhn5n373j04g5sp428f8";
sha256 = "sha256-akWcHK/XodqlzRNxQNpgwYyEtWmc2OckmnnDM0LJnR0=";
};
buildInputs = [ openssl ];
configureFlags = [ "--with-ssl=${openssl.dev}" ];
meta = {
meta = with lib; {
homepage = "https://www.fetchmail.info/";
description = "A full-featured remote-mail retrieval and forwarding utility";
longDescription = ''
@ -27,9 +24,8 @@ stdenv.mkDerivation {
all flavors of IMAP, ETRN, and ODMR. It can even support IPv6 and
IPSEC.
'';
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.peti ];
license = lib.licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = [ maintainers.peti ];
license = licenses.gpl2Plus;
};
}

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

@ -100,13 +100,13 @@ in {
application = mkSweetHome3D rec {
pname = lib.toLower module + "-application";
version = "6.5.2";
version = "6.6";
module = "SweetHome3D";
description = "Design and visualize your future home";
license = lib.licenses.gpl2Plus;
src = fetchurl {
url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
sha256 = "1j0xm2vmcxxjmf12k8rfnisq9hd7hqaiyxrfbrbjxis9iq3kycp3";
sha256 = "sha256-CnVXpmodmyoZdqmt7OgRyzuLeDhkPhrAS/CldFM8SQs=";
};
desktopName = "Sweet Home 3D";
icons = {

View file

@ -99,14 +99,14 @@ in {
};
furniture-editor = mkEditorProject rec {
version = "1.27";
version = "1.28";
module = "FurnitureLibraryEditor";
pname = module;
description = "Quickly create SH3F files and edit the properties of the 3D models it contain";
license = lib.licenses.gpl2;
src = fetchurl {
url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
sha256 = "1zxbcn9awgax8lalzkc05f5yfwbgnrayc17fkyv5i19j4qb3r2a0";
sha256 = "sha256-r5xJlUctUdcknJfm8rbz+bdzFhqgHsHpHwxEC4mItws=";
};
desktopName = "Sweet Home 3D - Furniture Library Editor";
};

View file

@ -1,50 +1,64 @@
{ stdenv
, lib
, fetchgit
, fetchFromGitea
, pkg-config
, meson
, ninja
, pkg-config
, git
, scdoc
, cairo
, fcft
, libpng
, librsvg
, libxkbcommon
, pixman
, tllist
, wayland
, wayland-scanner
, wayland-protocols
, wlroots
, enablePNG ? true
, enableJPEG ? true
# Optional dependencies
, libpng
, libjpeg
}:
let
# Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54
mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}";
in
stdenv.mkDerivation rec {
pname = "wbg";
version = "unstable-2020-08-01";
version = "1.0.2";
src = fetchgit {
url = "https://codeberg.org/dnkl/wbg";
rev = "1b05bd80d0f40e3ba1e977002d0653f532649269";
sha256 = "0i1j7aqvj0vl2ww5cvffqci1kjqjn0sw6sp2j0ljblaif6qk9asc";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "dnkl";
repo = "wbg";
rev = version;
sha256 = "sha256-PKEOWRcSAB4Uv5TfameQIEZh6s6xCGdyoZ13etL1TKA=";
};
nativeBuildInputs = [ pkg-config meson ninja scdoc git ];
nativeBuildInputs = [
pkg-config
meson
ninja
wayland-scanner
];
buildInputs = [
cairo
fcft
libpng
librsvg
libxkbcommon
pixman
tllist
wayland
wayland-protocols
wlroots
] ++ lib.optional enablePNG libpng
++ lib.optional enableJPEG libjpeg;
mesonBuildType = "release";
mesonFlags = [
(mesonFeatureFlag "png" enablePNG)
(mesonFeatureFlag "jpeg" enableJPEG)
];
meta = with lib; {
description = "Wallpaper application for Wayland compositors";
homepage = "https://codeberg.org/dnkl/wbg";
changelog = "https://codeberg.org/dnkl/wbg/releases/tag/${version}";
license = licenses.isc;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; linux;

View file

@ -0,0 +1,115 @@
{ autoPatchelfHook, makeDesktopItem, lib, stdenv, wrapGAppsHook
, alsa-lib, at-spi2-atk, at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig
, freetype, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid
, libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence
, mesa, nspr, nss, pango, systemd, libappindicator-gtk3, libdbusmenu
, fetchurl, fetchFromGitHub, imagemagick, copyDesktopItems
}:
let
binaryName = "AetherP2P";
in
stdenv.mkDerivation rec {
pname = "aether";
version = "2.0.0-dev.15";
srcs = [
(fetchurl {
url = "https://static.getaether.net/Releases/Aether-${version}/2011262249.19338c93/linux/Aether-${version}%2B2011262249.19338c93.tar.gz";
sha256 = "1hi8w83zal3ciyzg2m62shkbyh6hj7gwsidg3dn88mhfy68himf7";
# % in the url / canonical filename causes an error
name = "aether-tarball.tar.gz";
})
(fetchFromGitHub {
owner = "aethereans";
repo = "aether-app";
rev = "53b6c8b2a9253cbf056ea3ebb077e0e08cbc5b1d";
sha256 = "1kgkzh7ih2q9dsckdkinh5dbzvr7gdykf8yz6h8pyhvzyjhk1v0r";
})
];
sourceRoot = "Aether-${version}+2011262249.19338c93";
# there is no logo in the tarball so we grab it from github and convert it in the build phase
buildPhase = ''
convert ../source/aether-core/aether/client/src/app/ext_dep/images/Linux-Windows-App-Icon.png -resize 512x512 aether.png
'';
dontWrapGApps = true;
buildInputs = [
alsa-lib
cups
libdrm
libuuid
libXdamage
libX11
libXScrnSaver
libXtst
libxcb
libxshmfence
mesa
nss
];
nativeBuildInputs = [
imagemagick
autoPatchelfHook
wrapGAppsHook
copyDesktopItems
];
desktopItems = [
(makeDesktopItem {
name = pname;
exec = binaryName;
icon = pname;
desktopName = "Aether";
genericName = meta.description;
categories = "Network;";
mimeType = "x-scheme-handler/aether";
})
];
installPhase =
let
libPath = lib.makeLibraryPath [
libcxx systemd libpulseaudio libdrm mesa
stdenv.cc.cc alsa-lib atk at-spi2-atk at-spi2-core cairo cups dbus expat fontconfig freetype
gdk-pixbuf glib gtk3 libnotify libX11 libXcomposite libuuid
libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
libXtst nspr nss libxcb pango systemd libXScrnSaver
libappindicator-gtk3 libdbusmenu
];
in
''
mkdir -p $out/{bin,opt/${binaryName},share/icons/hicolor/512x512/apps}
mv * $out/opt/${binaryName}
chmod +x $out/opt/${binaryName}/${binaryName}
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
$out/opt/${binaryName}/${binaryName}
wrapProgram $out/opt/${binaryName}/${binaryName} \
"''${gappsWrapperArgs[@]}" \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}" \
--prefix LD_LIBRARY_PATH : ${libPath}
ln -s $out/opt/${binaryName}/${binaryName} $out/bin/
ln -s $out/opt/${binaryName}/aether.png $out/share/icons/hicolor/512x512/apps/
runHook postInstall
'';
meta = with lib; {
description = "Peer-to-peer ephemeral public communities";
homepage = "https://getaether.net/";
downloadPage = "https://getaether.net/download/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ maxhille ];
# other platforms could be supported by building from source
platforms = [ "x86_64-linux" ];
};
}

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

@ -50,11 +50,11 @@
stdenv.mkDerivation rec {
pname = "yandex-browser";
version = "21.5.3.753-1";
version = "21.6.2.817-1";
src = fetchurl {
url = "http://repo.yandex.ru/yandex-browser/deb/pool/main/y/${pname}-beta/${pname}-beta_${version}_amd64.deb";
sha256 = "sha256-sI2p/fCaruUJ3qPMyy+12Bh5I1SH8m7sYX5yDex2rwg=";
sha256 = "sha256-xeZkQzVPPNABxa3/YBLoZl1obbFdzxdqIgLyoA4PN8U=";
};
nativeBuildInputs = [

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "cloudflared";
version = "2021.8.1";
version = "2021.8.2";
src = fetchFromGitHub {
owner = "cloudflare";
repo = "cloudflared";
rev = version;
sha256 = "sha256-92Uq7hSqfsiES6dSCw4cotfLJ8TLRRO6QPkwQ8iv124=";
sha256 = "sha256-5PMKVWBOWkUhmCSttbhu7UdS3dLqr0epJpQL1jfS31c=";
};
vendorSha256 = null;

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

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "starboard-octant-plugin";
version = "0.10.3";
version = "0.11.0";
src = fetchFromGitHub {
owner = "aquasecurity";
repo = pname;
rev = "v${version}";
sha256 = "sha256-9vl068ZTw6Czf+cWQ0k1lU0pqh7P0YZgLguHkk3M918=";
sha256 = "sha256-XHc/1rqTEVOjCm0kFniUmmjVeRsr9Npt0OpQ6Oy7Rxo=";
};
vendorSha256 = "sha256-HOvZPDVKZEoL91yyaJRuKThHirY77xlKOtLKARthxn8=";
vendorSha256 = "sha256-EM0lPwwWJuLD+aqZWshz1ILaeEtUU4wJ0Puwv1Ikgf4=";
preBuild = ''
buildFlagsArray+=("-ldflags" "-s -w")

View file

@ -1,16 +1,16 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "terraform-docs";
version = "0.14.1";
version = "0.15.0";
src = fetchFromGitHub {
owner = "terraform-docs";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Jm0ySxn4GFW4iAH3tOIvclcDGJMKzH7m7fhWnAf4+gs=";
sha256 = "sha256-PzGlEEhootf2SCOy7+11aST7NMTNhNMQWeZO40mrMYQ=";
};
vendorSha256 = "sha256-IzmAlthE6SVvGHj72wrY1/KLehOv8Ck9VaTv5jMpt48=";
vendorSha256 = "sha256-T/jgFPBUQMATX7DoWsDR/VFjka7Vxk7F4taE25cdnTk=";
subPackages = [ "." ];

View file

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "terraform-provider-cloudfoundry";
version = "0.12.6";
version = "0.14.2";
src = fetchFromGitHub {
owner = "cloudfoundry-community";
repo = pname;
rev = "v${version}";
sha256 = "0n5ybpzk6zkrnd9vpmbjlkm8fdp7nbfr046wih0jk72pmiyrcygi";
sha256 = "12mx87dip6vn10zvkf4rgrd27k708lnl149j9xj7bmb8v9m1082v";
};
vendorSha256 = "01lfsd9aw9w3kr1a2a5b7ac6d8jaij83lhxl4y4qsnjlqk86fbxq";
vendorSha256 = "0kydjnwzj0fylizvk1vg42zyiy17qhz40z3iwa1r5bb20qkrlz93";
# needs a running cloudfoundry
doCheck = false;

View file

@ -3,6 +3,7 @@
, buildGoPackage
, fetchFromGitHub
, callPackage
, config
}:
let
list = lib.importJSON ./providers.json;
@ -50,12 +51,13 @@ let
cloudfoundry = callPackage ./cloudfoundry {};
gandi = callPackage ./gandi {};
hcloud = callPackage ./hcloud {};
kubernetes-alpha = throw "This has been merged as beta into the kubernetes provider. See https://www.hashicorp.com/blog/beta-support-for-crds-in-the-terraform-provider-for-kubernetes for details";
libvirt = callPackage ./libvirt {};
linuxbox = callPackage ./linuxbox {};
lxd = callPackage ./lxd {};
vpsadmin = callPackage ./vpsadmin {};
vercel = callPackage ./vercel {};
};
} // (lib.optionalAttrs (config.allowAliases or false) {
kubernetes-alpha = throw "This has been merged as beta into the kubernetes provider. See https://www.hashicorp.com/blog/beta-support-for-crds-in-the-terraform-provider-for-kubernetes for details";
});
in
automated-providers // special-providers

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

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "catgirl";
version = "1.8";
version = "1.9";
src = fetchurl {
url = "https://git.causal.agency/catgirl/snapshot/${pname}-${version}.tar.gz";
sha256 = "0svpd2nqsr55ac98vczyhihs6pvgw7chspf6bdlwl98gch39dxif";
sha256 = "182l7yryqm1ffxqgz3i4lcnzwzpbpm2qvadddmj0xc8dh8513s0w";
};
nativeBuildInputs = [ ctags pkg-config ];

View file

@ -1,7 +1,6 @@
{ stdenv
, lib
, rustPlatform
, fetchpatch
, fetchFromGitHub
, pkg-config
, dbus
@ -11,23 +10,20 @@
rustPlatform.buildRustPackage rec {
pname = "tiny";
version = "0.8.0";
version = "0.9.0";
src = fetchFromGitHub {
owner = "osa1";
repo = pname;
rev = "v${version}";
sha256 = "07a50shv6k4fwl2gmv4j0maxaqqkjpwwmqkxkqs0gvx38lc5f7m7";
sha256 = "gKyHR3FZHDybaP38rqB8/gvr8T+mDO4QQxoTtWS+TlE=";
};
cargoSha256 = "0npkcprcqy2pn7k64jzwg41vk9id6yzw211xw203h80cc5444igr";
cargoSha256 = "0ChfW8vaqC2kCp4lpS0HOvhuihPw9G5TOmgwKzVDfws=";
# Fix Cargo.lock version. Remove with the next release.
cargoPatches = [
# Fix Cargo.lock version. Remove with the next release.
(fetchpatch {
url = "https://github.com/osa1/tiny/commit/b1caf48a6399dad8875de1d965d1ad445e49585d.patch";
sha256 = "1zkjhx94nwmd69cfwwwzg51ipcwq01wyvgsmn0vq7iaa2h0d286i";
})
./fix-Cargo.lock.patch
];
nativeBuildInputs = lib.optional stdenv.isLinux pkg-config;
@ -38,6 +34,6 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/osa1/tiny";
changelog = "https://github.com/osa1/tiny/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ Br1ght0ne ];
maintainers = with maintainers; [ Br1ght0ne vyp ];
};
}

View file

@ -0,0 +1,13 @@
diff --git a/Cargo.lock b/Cargo.lock
index 3a184dc..0e58cb1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1023,7 +1023,7 @@ dependencies = [
[[package]]
name = "tiny"
-version = "0.8.0"
+version = "0.9.0"
dependencies = [
"clap",
"dirs 3.0.1",

View file

@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
pname = "evolution-ews";
version = "3.40.1";
version = "3.40.3";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1kgxdacqqcq8yfkij6vyqlk5r4yqvw7gh7mxqii670hrn1mb2s50";
sha256 = "ZAIE5rpPOyZT3VSPYOR143bP8Na7Kv0NQRhQ+p2oxJY=";
};
nativeBuildInputs = [ cmake gettext intltool pkg-config ];

View file

@ -7,6 +7,7 @@
python3Packages.buildPythonApplication rec {
pname = "zerobin";
version = "1.0.5";
src = fetchFromGitHub {
owner = "Tygs";
repo = "0bin";
@ -21,6 +22,7 @@ python3Packages.buildPythonApplication rec {
python3Packages.pyscss
nodePackages.uglify-js
];
propagatedBuildInputs = with python3Packages; [
appdirs
beaker
@ -30,16 +32,19 @@ python3Packages.buildPythonApplication rec {
lockfile
paste
];
prePatch = ''
# replace /bin/bash in compress.sh
patchShebangs .
# relax version constraints of some dependencies
substituteInPlace setup.cfg \
--replace "clize==4.1.1" "clize" \
--replace "bleach==3.1.5" "bleach>=3.1.5,<4" \
--replace "bottle==0.12.18" "bottle>=0.12.18,<1" \
--replace "Paste==3.4.3" "Paste>=3.4.3,<4"
'';
buildPhase = ''
runHook preBuild
doit build
@ -51,6 +56,8 @@ python3Packages.buildPythonApplication rec {
# See https://github.com/NixOS/nixpkgs/pull/98734#discussion_r495823510
doCheck = false;
pythonImportsCheck = [ "zerobin" ];
meta = with lib; {
description = "A client side encrypted pastebin";
homepage = "https://0bin.net/";

View file

@ -7,12 +7,12 @@
}:
stdenv.mkDerivation rec {
version = "1.2.6";
version = "1.2.7";
pname = "fllog";
src = fetchurl {
url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz";
sha256 = "18nwqbbg5khpkwlr7dn41g6zf7ms2wzxykd42fwdsj4m4z0ysyyg";
sha256 = "sha256-HxToZ+f1IJgDKGPHBeVuS7rRkh3+KfpyoYPBwfyqsC8=";
};
buildInputs = [

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

@ -17,14 +17,14 @@ let
};
in
stdenv.mkDerivation rec {
version = "14.31.46";
version = "14.31.49";
pname = "jmol";
src = let
baseVersion = "${lib.versions.major version}.${lib.versions.minor version}";
in fetchurl {
url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
sha256 = "sha256-U8k8xQws0vIJ3ZICzZXxSbtl7boCzRqG9mFSTXvmCvg=";
sha256 = "sha256-P+bzimBVammX5LxE6Yd6CmvmBeG8WdyA1T9bHXd+ifI=";
};
patchPhase = ''

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,37 +1,39 @@
{lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind}:
{ lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind }:
# gcc and valgrind are not strict dependencies, they could be made
# optional. They are here because plm can only help you learn C if you
# have them installed.
stdenv.mkDerivation rec {
major = "2";
minor = "5";
version = "${major}-${minor}";
pname = "plm";
version = "2.9.3";
src = fetchurl {
url = "http://webloria.loria.fr/~quinson/Teaching/PLM/plm-${major}_${minor}.jar";
sha256 = "0m17cxa3nxi2cbswqvlfzp0mlfi3wrkw8ry2xhkxy6aqzm2mlgcc";
url = "https://github.com/BuggleInc/PLM/releases/download/v${version}/plm-${version}.jar";
sha256 = "0i9ghx9pm3kpn9x9n1hl10zdr36v5mv3drx8lvhsqwhlsvz42p5i";
name = "${pname}-${version}.jar";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre gcc valgrind ];
phases = [ "installPhase" ];
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p "$prefix/bin"
makeWrapper ${jre}/bin/java $out/bin/plm \
--add-flags "-jar $src" \
--prefix PATH : "$PATH"
runHook postInstall
'';
meta = with lib; {
description = "Free cross-platform programming exerciser";
homepage = "http://people.irisa.fr/Martin.Quinson/Teaching/PLM/";
license = licenses.gpl3;
maintainers = [ ];
platforms = lib.platforms.all;
broken = true;
};
}

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,16 +2,16 @@
buildGoModule rec {
pname = "glab";
version = "1.18.1";
version = "1.19.0";
src = fetchFromGitHub {
owner = "profclems";
repo = pname;
rev = "v${version}";
sha256 = "sha256-ahP5y5i0SMj2+mP4RYc7MLZGElX5eLgKwiVhBYGOX2g=";
sha256 = "sha256-bg0uLivvLYnDS8h13RkmU8gSEa8q2yxUWN9TN19qjxQ=";
};
vendorSha256 = "sha256-ssVmqcJ/DxUqAkHm9tn4RwWuKzTHvxoqJquXPIRy4b8=";
vendorSha256 = "sha256-9+WBKc8PI0v6bnkC+78Ygv/eocQ3D7+xBb8lcv16QTE=";
runVend = true;
# Tests are trying to access /homeless-shelter

View file

@ -1,16 +1,23 @@
{ lib, stdenv, appimageTools, gsettings-desktop-schemas, gtk3, autoPatchelfHook, zlib, fetchurl }:
{ lib, stdenv, appimageTools, gsettings-desktop-schemas, gtk3, autoPatchelfHook, zlib, fetchurl, undmg }:
let
pname = "radicle-upstream";
version = "0.2.3";
version = "0.2.9";
name = "${pname}-${version}";
src = fetchurl {
url = "https://releases.radicle.xyz/radicle-upstream-${version}.AppImage";
sha256 = "sha256-SL6plXZ+o7JchY/t/1702FK57fVjxllHqB8ZOma/43c=";
srcs = {
x86_64-linux = fetchurl {
url = "https://releases.radicle.xyz/radicle-upstream-${version}.AppImage";
sha256 = "sha256-chju3ZEFFLOzE9FakUK2izm/5ejELdL/iWMtM3bRpWY=";
};
x86_64-darwin = fetchurl {
url = "https://releases.radicle.xyz/radicle-upstream-${version}.dmg";
sha256 = "sha256-OOqe4diRcJWHHOa6jBpljPoA3FQOKlghMhKGQ242GnM=";
};
};
src = srcs.${stdenv.hostPlatform.system};
contents = appimageTools.extractType2 { inherit name src; };
contents = appimageTools.extract { inherit name src; };
git-remote-rad = stdenv.mkDerivation rec {
pname = "git-remote-rad";
@ -25,40 +32,56 @@ let
cp ${contents}/resources/git-remote-rad $out/bin/git-remote-rad
'';
};
in
# FIXME: a dependency of the `proxy` component of radicle-upstream (radicle-macros
# v0.1.0) uses unstable rust features, making a from source build impossible at
# this time. See this PR for discussion: https://github.com/NixOS/nixpkgs/pull/105674
appimageTools.wrapType2 {
inherit name src;
# FIXME: a dependency of the `proxy` component of radicle-upstream (radicle-macros
# v0.1.0) uses unstable rust features, making a from source build impossible at
# this time. See this PR for discussion: https://github.com/NixOS/nixpkgs/pull/105674
linux = appimageTools.wrapType2 {
inherit name src meta;
profile = ''
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
'';
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}
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
# this automatically adds the git-remote-rad binary to the users `PATH` so
# they don't need to mess around with shell profiles...
ln -s ${git-remote-rad}/bin/git-remote-rad $out/bin/git-remote-rad
# this automatically adds the git-remote-rad binary to the users `PATH` so
# they don't need to mess around with shell profiles...
ln -s ${git-remote-rad}/bin/git-remote-rad $out/bin/git-remote-rad
# desktop item
install -m 444 -D ${contents}/${pname}.desktop $out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
# desktop item
install -m 444 -D ${contents}/${pname}.desktop $out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
# icon
install -m 444 -D ${contents}/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
'';
# icon
install -m 444 -D ${contents}/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
'';
};
darwin = stdenv.mkDerivation {
inherit pname version src meta;
nativeBuildInputs = [ undmg ];
sourceRoot = ".";
installPhase = ''
mkdir -p $out/Applications
cp -r *.app $out/Applications
'';
};
meta = with lib; {
description = "A decentralized app for code collaboration";
homepage = "https://radicle.xyz/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ d-xo ];
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
};
}
in
if stdenv.isDarwin
then darwin
else linux

View file

@ -16,12 +16,12 @@ with lib;
buildGoPackage rec {
pname = "gitea";
version = "1.14.5";
version = "1.14.6";
# not fetching directly from the git repo, because that lacks several vendor files for the web UI
src = fetchurl {
url = "https://github.com/go-gitea/gitea/releases/download/v${version}/gitea-src-${version}.tar.gz";
sha256 = "sha256-8nwLVpe/5IjXJqO179lN80B/3WGUL3LKM8OWdh/bYOE=";
sha256 = "sha256-IIoOJlafMD6Kg8Zde3LcoK97PKLmqOUMQN3nmIgqe1o=";
};
unpackPhase = ''

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,6 @@
{ config, lib, stdenv
{ config
, lib
, stdenv
, mkDerivation
, fetchFromGitHub
, addOpenGLRunpath
@ -41,7 +43,8 @@
let
inherit (lib) optional optionals;
in mkDerivation rec {
in
mkDerivation rec {
pname = "obs-studio";
version = "27.0.0";
@ -61,7 +64,13 @@ in mkDerivation rec {
./Change-product_version-to-user_agent_product.patch
];
nativeBuildInputs = [ addOpenGLRunpath cmake pkg-config ];
nativeBuildInputs = [
addOpenGLRunpath
cmake
pkg-config
makeWrapper
]
++ optional scriptingSupport swig;
buildInputs = [
curl
@ -81,10 +90,9 @@ in mkDerivation rec {
wayland
x264
libvlc
makeWrapper
mbedtls
]
++ optionals scriptingSupport [ luajit swig python3 ]
++ optionals scriptingSupport [ luajit python3 ]
++ optional alsaSupport alsa-lib
++ optional pulseaudioSupport libpulseaudio
++ optional pipewireSupport pipewire;
@ -132,7 +140,7 @@ in mkDerivation rec {
'';
homepage = "https://obsproject.com";
maintainers = with maintainers; [ jb55 MP2E V ];
license = licenses.gpl2;
platforms = [ "x86_64-linux" "i686-linux" ];
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
};
}

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "obs-multi-rtmp";
version = "0.2.6";
version = "0.2.6.1";
src = fetchFromGitHub {
owner = "sorayuki";
repo = "obs-multi-rtmp";
rev = version;
sha256 = "sha256-SMcVL54HwFIc7/wejEol2XiZhlZCMVCwHHtIKJ/CoYY=";
sha256 = "sha256-ZcvmiE9gbDUHAO36QAIaUdjV14ZfPabD9CW7Ogeqdro=";
};
nativeBuildInputs = [ cmake ];

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