Merge master into staging-next

This commit is contained in:
Frederik Rietdijk 2020-08-27 08:36:41 +02:00
commit 52095e171f
93 changed files with 7540 additions and 4932 deletions

View File

@ -12,24 +12,10 @@ jobs:
if: github.repository_owner == 'NixOS' && github.event.check_suite.app.name == 'OfBorg' if: github.repository_owner == 'NixOS' && github.event.check_suite.app.name == 'OfBorg'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GSU_VERSION: "0.5.0"
GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6"
GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download"
run: | run: |
curl -sSf -O -L -C - \ curl \
"$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \ -X POST \
if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then -H "Accept: application/vnd.github.v3+json" \
echo "checksum mismatch" -H "Authorization: token $GITHUB_TOKEN" \
exit 1 -d '{"state": "success", "target_url": " ", "description": " ", "context": "Wait for ofborg"}' \
fi "https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.check_suite.head_sha }}"
chmod +x github-status-updater_linux_amd64 && \
./github-status-updater_linux_amd64 \
-action update_state \
-token "$GITHUB_TOKEN" \
-owner NixOS \
-repo nixpkgs \
-state success \
-context "Wait for ofborg" \
-description " " \
-url " " \
-ref "${{ github.event.check_suite.head_sha }}"

View File

@ -11,24 +11,10 @@ jobs:
if: github.repository_owner == 'NixOS' if: github.repository_owner == 'NixOS'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GSU_VERSION: "0.5.0"
GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6"
GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download"
run: | run: |
curl -sSf -O -L -C - \ curl \
"$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \ -X POST \
if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then -H "Accept: application/vnd.github.v3+json" \
echo "checksum mismatch" -H "Authorization: token $GITHUB_TOKEN" \
exit 1 -d '{"state": "failure", "target_url": " ", "description": "This failed status will be cleared when ofborg finishes eval.", "context": "Wait for ofborg"}' \
fi "https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.pull_request.head.sha }}"
chmod +x github-status-updater_linux_amd64 && \
./github-status-updater_linux_amd64 \
-action update_state \
-token "$GITHUB_TOKEN" \
-owner NixOS \
-repo nixpkgs \
-state failure \
-context "Wait for ofborg" \
-description "This failed status will be cleared when ofborg finishes eval." \
-url " " \
-ref "${{ github.event.pull_request.head.sha }}"

View File

@ -2717,6 +2717,12 @@
githubId = 857308; githubId = 857308;
name = "Joe Hermaszewski"; name = "Joe Hermaszewski";
}; };
extends = {
email = "sharosari@gmail.com";
github = "ImExtends";
githubId = 55919390;
name = "Vincent VILLIAUMEY";
};
eyjhb = { eyjhb = {
email = "eyjhbb@gmail.com"; email = "eyjhbb@gmail.com";
github = "eyJhb"; github = "eyJhb";
@ -9474,4 +9480,14 @@
github = "yevhenshymotiuk"; github = "yevhenshymotiuk";
githubId = 44244245; githubId = 44244245;
}; };
hmenke = {
name = "Henri Menke";
email = "henri@henrimenke.de";
github = "hmenke";
githubId = 1903556;
keys = [{
longkeyid = "rsa4096/0xD65C9AFB4C224DA3";
fingerprint = "F1C5 760E 45B9 9A44 72E9 6BFB D65C 9AFB 4C22 4DA3";
}];
};
} }

View File

@ -22,9 +22,9 @@ rec {
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
qemuBinary = qemuPkg: { qemuBinary = qemuPkg: {
x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu host"; x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu max";
armv7l-linux = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; armv7l-linux = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu host"; x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu max";
}.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm"; }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm";
} }

View File

@ -1,19 +1,13 @@
#! /somewhere/python3 #! /somewhere/python3
from contextlib import contextmanager, _GeneratorContextManager
from queue import Queue, Empty
from typing import Tuple, Any, Callable, Dict, Iterator, Optional, List
from xml.sax.saxutils import XMLGenerator
import queue
import io
import _thread
import argparse import argparse
import atexit import atexit
import base64 import base64
import codecs import io
import logging
import os import os
import pathlib import pathlib
import ptpython.repl
import pty import pty
import queue
import re import re
import shlex import shlex
import shutil import shutil
@ -21,9 +15,12 @@ import socket
import subprocess import subprocess
import sys import sys
import tempfile import tempfile
import _thread
import time import time
import traceback from contextlib import contextmanager
import unicodedata from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple
import ptpython.repl
CHAR_TO_KEY = { CHAR_TO_KEY = {
"A": "shift-a", "A": "shift-a",
@ -88,13 +85,17 @@ CHAR_TO_KEY = {
")": "shift-0x0B", ")": "shift-0x0B",
} }
# Forward references # Forward reference
log: "Logger"
machines: "List[Machine]" machines: "List[Machine]"
logging.basicConfig(format="%(message)s")
logger = logging.getLogger("test-driver")
logger.setLevel(logging.INFO)
def eprint(*args: object, **kwargs: Any) -> None:
print(*args, file=sys.stderr, **kwargs) class MachineLogAdapter(logging.LoggerAdapter):
def process(self, msg: str, kwargs: Any) -> Tuple[str, Any]:
return f"{self.extra['machine']}: {msg}", kwargs
def make_command(args: list) -> str: def make_command(args: list) -> str:
@ -102,8 +103,7 @@ def make_command(args: list) -> str:
def create_vlan(vlan_nr: str) -> Tuple[str, str, "subprocess.Popen[bytes]", Any]: def create_vlan(vlan_nr: str) -> Tuple[str, str, "subprocess.Popen[bytes]", Any]:
global log logger.info(f"starting VDE switch for network {vlan_nr}")
log.log("starting VDE switch for network {}".format(vlan_nr))
vde_socket = tempfile.mkdtemp( vde_socket = tempfile.mkdtemp(
prefix="nixos-test-vde-", suffix="-vde{}.ctl".format(vlan_nr) prefix="nixos-test-vde-", suffix="-vde{}.ctl".format(vlan_nr)
) )
@ -142,70 +142,6 @@ def retry(fn: Callable) -> None:
raise Exception("action timed out") raise Exception("action timed out")
class Logger:
def __init__(self) -> None:
self.logfile = os.environ.get("LOGFILE", "/dev/null")
self.logfile_handle = codecs.open(self.logfile, "wb")
self.xml = XMLGenerator(self.logfile_handle, encoding="utf-8")
self.queue: "Queue[Dict[str, str]]" = Queue()
self.xml.startDocument()
self.xml.startElement("logfile", attrs={})
def close(self) -> None:
self.xml.endElement("logfile")
self.xml.endDocument()
self.logfile_handle.close()
def sanitise(self, message: str) -> str:
return "".join(ch for ch in message if unicodedata.category(ch)[0] != "C")
def maybe_prefix(self, message: str, attributes: Dict[str, str]) -> str:
if "machine" in attributes:
return "{}: {}".format(attributes["machine"], message)
return message
def log_line(self, message: str, attributes: Dict[str, str]) -> None:
self.xml.startElement("line", attributes)
self.xml.characters(message)
self.xml.endElement("line")
def log(self, message: str, attributes: Dict[str, str] = {}) -> None:
eprint(self.maybe_prefix(message, attributes))
self.drain_log_queue()
self.log_line(message, attributes)
def enqueue(self, message: Dict[str, str]) -> None:
self.queue.put(message)
def drain_log_queue(self) -> None:
try:
while True:
item = self.queue.get_nowait()
attributes = {"machine": item["machine"], "type": "serial"}
self.log_line(self.sanitise(item["msg"]), attributes)
except Empty:
pass
@contextmanager
def nested(self, message: str, attributes: Dict[str, str] = {}) -> Iterator[None]:
eprint(self.maybe_prefix(message, attributes))
self.xml.startElement("nest", attrs={})
self.xml.startElement("head", attributes)
self.xml.characters(message)
self.xml.endElement("head")
tic = time.time()
self.drain_log_queue()
yield
self.drain_log_queue()
toc = time.time()
self.log("({:.2f} seconds)".format(toc - tic))
self.xml.endElement("nest")
class Machine: class Machine:
def __init__(self, args: Dict[str, Any]) -> None: def __init__(self, args: Dict[str, Any]) -> None:
if "name" in args: if "name" in args:
@ -235,8 +171,8 @@ class Machine:
self.pid: Optional[int] = None self.pid: Optional[int] = None
self.socket = None self.socket = None
self.monitor: Optional[socket.socket] = None self.monitor: Optional[socket.socket] = None
self.logger: Logger = args["log"]
self.allow_reboot = args.get("allowReboot", False) self.allow_reboot = args.get("allowReboot", False)
self.logger = MachineLogAdapter(logger, extra=dict(machine=self.name))
@staticmethod @staticmethod
def create_startcommand(args: Dict[str, str]) -> str: def create_startcommand(args: Dict[str, str]) -> str:
@ -292,14 +228,6 @@ class Machine:
def is_up(self) -> bool: def is_up(self) -> bool:
return self.booted and self.connected return self.booted and self.connected
def log(self, msg: str) -> None:
self.logger.log(msg, {"machine": self.name})
def nested(self, msg: str, attrs: Dict[str, str] = {}) -> _GeneratorContextManager:
my_attrs = {"machine": self.name}
my_attrs.update(attrs)
return self.logger.nested(msg, my_attrs)
def wait_for_monitor_prompt(self) -> str: def wait_for_monitor_prompt(self) -> str:
assert self.monitor is not None assert self.monitor is not None
answer = "" answer = ""
@ -314,7 +242,7 @@ class Machine:
def send_monitor_command(self, command: str) -> str: def send_monitor_command(self, command: str) -> str:
message = ("{}\n".format(command)).encode() message = ("{}\n".format(command)).encode()
self.log("sending monitor command: {}".format(command)) self.logger.info(f"sending monitor command: {command}")
assert self.monitor is not None assert self.monitor is not None
self.monitor.send(message) self.monitor.send(message)
return self.wait_for_monitor_prompt() return self.wait_for_monitor_prompt()
@ -381,9 +309,9 @@ class Machine:
return self.execute("systemctl {}".format(q)) return self.execute("systemctl {}".format(q))
def require_unit_state(self, unit: str, require_state: str = "active") -> None: def require_unit_state(self, unit: str, require_state: str = "active") -> None:
with self.nested( self.logger.info(
"checking if unit {} has reached state '{}'".format(unit, require_state) f"checking if unit {unit} has reached state '{require_state}'"
): )
info = self.get_unit_info(unit) info = self.get_unit_info(unit)
state = info["ActiveState"] state = info["ActiveState"]
if state != require_state: if state != require_state:
@ -392,6 +320,9 @@ class Machine:
+ "'{}' but it is in state {}".format(require_state, state) + "'{}' but it is in state {}".format(require_state, state)
) )
def log(self, message: str) -> None:
self.logger.info(message)
def execute(self, command: str) -> Tuple[int, str]: def execute(self, command: str) -> Tuple[int, str]:
self.connect() self.connect()
@ -414,10 +345,10 @@ class Machine:
"""Execute each command and check that it succeeds.""" """Execute each command and check that it succeeds."""
output = "" output = ""
for command in commands: for command in commands:
with self.nested("must succeed: {}".format(command)): self.logger.info(f"must succeed: {command}")
(status, out) = self.execute(command) (status, out) = self.execute(command)
if status != 0: if status != 0:
self.log("output: {}".format(out)) self.logger.info(f"output: {out}")
raise Exception( raise Exception(
"command `{}` failed (exit code {})".format(command, status) "command `{}` failed (exit code {})".format(command, status)
) )
@ -428,12 +359,10 @@ class Machine:
"""Execute each command and check that it fails.""" """Execute each command and check that it fails."""
output = "" output = ""
for command in commands: for command in commands:
with self.nested("must fail: {}".format(command)): self.logger.info(f"must fail: {command}")
(status, out) = self.execute(command) (status, out) = self.execute(command)
if status == 0: if status == 0:
raise Exception( raise Exception("command `{}` unexpectedly succeeded".format(command))
"command `{}` unexpectedly succeeded".format(command)
)
output += out output += out
return output return output
@ -448,7 +377,7 @@ class Machine:
status, output = self.execute(command) status, output = self.execute(command)
return status == 0 return status == 0
with self.nested("waiting for success: {}".format(command)): self.logger.info(f"waiting for success: {command}")
retry(check_success) retry(check_success)
return output return output
@ -463,7 +392,7 @@ class Machine:
status, output = self.execute(command) status, output = self.execute(command)
return status != 0 return status != 0
with self.nested("waiting for failure: {}".format(command)): self.logger.info(f"waiting for failure: {command}")
retry(check_failure) retry(check_failure)
return output return output
@ -471,7 +400,7 @@ class Machine:
if not self.booted: if not self.booted:
return return
with self.nested("waiting for the VM to power off"): self.logger.info("waiting for the VM to power off")
sys.stdout.flush() sys.stdout.flush()
self.process.wait() self.process.wait()
@ -495,17 +424,17 @@ class Machine:
def tty_matches(last: bool) -> bool: def tty_matches(last: bool) -> bool:
text = self.get_tty_text(tty) text = self.get_tty_text(tty)
if last: if last:
self.log( self.logger.info(
f"Last chance to match /{regexp}/ on TTY{tty}, " f"Last chance to match /{regexp}/ on TTY{tty}, "
f"which currently contains: {text}" f"which currently contains: {text}"
) )
return len(matcher.findall(text)) > 0 return len(matcher.findall(text)) > 0
with self.nested("waiting for {} to appear on tty {}".format(regexp, tty)): self.logger.info(f"waiting for {regexp} to appear on tty {tty}")
retry(tty_matches) retry(tty_matches)
def send_chars(self, chars: List[str]) -> None: def send_chars(self, chars: List[str]) -> None:
with self.nested("sending keys {}".format(chars)): self.logger.info(f"sending keys {chars}")
for char in chars: for char in chars:
self.send_key(char) self.send_key(char)
@ -516,7 +445,7 @@ class Machine:
status, _ = self.execute("test -e {}".format(filename)) status, _ = self.execute("test -e {}".format(filename))
return status == 0 return status == 0
with self.nested("waiting for file {}".format(filename)): self.logger.info(f"waiting for file {filename}")
retry(check_file) retry(check_file)
def wait_for_open_port(self, port: int) -> None: def wait_for_open_port(self, port: int) -> None:
@ -524,7 +453,7 @@ class Machine:
status, _ = self.execute("nc -z localhost {}".format(port)) status, _ = self.execute("nc -z localhost {}".format(port))
return status == 0 return status == 0
with self.nested("waiting for TCP port {}".format(port)): self.logger.info(f"waiting for TCP port {port}")
retry(port_is_open) retry(port_is_open)
def wait_for_closed_port(self, port: int) -> None: def wait_for_closed_port(self, port: int) -> None:
@ -547,7 +476,7 @@ class Machine:
if self.connected: if self.connected:
return return
with self.nested("waiting for the VM to finish booting"): self.logger.info("waiting for the VM to finish booting")
self.start() self.start()
tic = time.time() tic = time.time()
@ -555,8 +484,8 @@ class Machine:
# TODO: Timeout # TODO: Timeout
toc = time.time() toc = time.time()
self.log("connected to guest root shell") self.logger.info("connected to guest root shell")
self.log("(connecting took {:.2f} seconds)".format(toc - tic)) self.logger.info(f"(connecting took {toc - tic:.2f} seconds)")
self.connected = True self.connected = True
def screenshot(self, filename: str) -> None: def screenshot(self, filename: str) -> None:
@ -566,10 +495,7 @@ class Machine:
filename = os.path.join(out_dir, "{}.png".format(filename)) filename = os.path.join(out_dir, "{}.png".format(filename))
tmp = "{}.ppm".format(filename) tmp = "{}.ppm".format(filename)
with self.nested( self.logger.info(f"making screenshot {filename}")
"making screenshot {}".format(filename),
{"image": os.path.basename(filename)},
):
self.send_monitor_command("screendump {}".format(tmp)) self.send_monitor_command("screendump {}".format(tmp))
ret = subprocess.run("pnmtopng {} > {}".format(tmp, filename), shell=True) ret = subprocess.run("pnmtopng {} > {}".format(tmp, filename), shell=True)
os.unlink(tmp) os.unlink(tmp)
@ -650,7 +576,7 @@ class Machine:
tess_args = "-c debug_file=/dev/null --psm 11 --oem 2" tess_args = "-c debug_file=/dev/null --psm 11 --oem 2"
with self.nested("performing optical character recognition"): self.logger.info("performing optical character recognition")
with tempfile.NamedTemporaryFile() as tmpin: with tempfile.NamedTemporaryFile() as tmpin:
self.send_monitor_command("screendump {}".format(tmpin.name)) self.send_monitor_command("screendump {}".format(tmpin.name))
@ -659,9 +585,7 @@ class Machine:
) )
ret = subprocess.run(cmd, shell=True, capture_output=True) ret = subprocess.run(cmd, shell=True, capture_output=True)
if ret.returncode != 0: if ret.returncode != 0:
raise Exception( raise Exception("OCR failed with exit code {}".format(ret.returncode))
"OCR failed with exit code {}".format(ret.returncode)
)
return ret.stdout.decode("utf-8") return ret.stdout.decode("utf-8")
@ -671,15 +595,15 @@ class Machine:
matches = re.search(regex, text) is not None matches = re.search(regex, text) is not None
if last and not matches: if last and not matches:
self.log("Last OCR attempt failed. Text was: {}".format(text)) self.logger.info(f"Last OCR attempt failed. Text was: {text}")
return matches return matches
with self.nested("waiting for {} to appear on screen".format(regex)): self.logger.info(f"waiting for {regex} to appear on screen")
retry(screen_matches) retry(screen_matches)
def wait_for_console_text(self, regex: str) -> None: def wait_for_console_text(self, regex: str) -> None:
self.log("waiting for {} to appear on console".format(regex)) self.logger.info(f"waiting for {regex} to appear on console")
# Buffer the console output, this is needed # Buffer the console output, this is needed
# to match multiline regexes. # to match multiline regexes.
console = io.StringIO() console = io.StringIO()
@ -702,7 +626,7 @@ class Machine:
if self.booted: if self.booted:
return return
self.log("starting vm") self.logger.info("starting vm")
def create_socket(path: str) -> socket.socket: def create_socket(path: str) -> socket.socket:
if os.path.exists(path): if os.path.exists(path):
@ -759,7 +683,7 @@ class Machine:
# Store last serial console lines for use # Store last serial console lines for use
# of wait_for_console_text # of wait_for_console_text
self.last_lines: Queue = Queue() self.last_lines: queue.Queue = queue.Queue()
def process_serial_output() -> None: def process_serial_output() -> None:
assert self.process.stdout is not None assert self.process.stdout is not None
@ -767,8 +691,7 @@ class Machine:
# Ignore undecodable bytes that may occur in boot menus # Ignore undecodable bytes that may occur in boot menus
line = _line.decode(errors="ignore").replace("\r", "").rstrip() line = _line.decode(errors="ignore").replace("\r", "").rstrip()
self.last_lines.put(line) self.last_lines.put(line)
eprint("{} # {}".format(self.name, line)) self.logger.info(line)
self.logger.enqueue({"msg": line, "machine": self.name})
_thread.start_new_thread(process_serial_output, ()) _thread.start_new_thread(process_serial_output, ())
@ -777,10 +700,10 @@ class Machine:
self.pid = self.process.pid self.pid = self.process.pid
self.booted = True self.booted = True
self.log("QEMU running (pid {})".format(self.pid)) self.logger.info(f"QEMU running (pid {self.pid})")
def cleanup_statedir(self) -> None: def cleanup_statedir(self) -> None:
self.log("delete the VM state directory") self.logger.info("delete the VM state directory")
if os.path.isfile(self.state_dir): if os.path.isfile(self.state_dir):
shutil.rmtree(self.state_dir) shutil.rmtree(self.state_dir)
@ -795,7 +718,7 @@ class Machine:
if not self.booted: if not self.booted:
return return
self.log("forced crash") self.logger.info("forced crash")
self.send_monitor_command("quit") self.send_monitor_command("quit")
self.wait_for_shutdown() self.wait_for_shutdown()
@ -815,7 +738,7 @@ class Machine:
status, _ = self.execute("[ -e /tmp/.X11-unix/X0 ]") status, _ = self.execute("[ -e /tmp/.X11-unix/X0 ]")
return status == 0 return status == 0
with self.nested("waiting for the X11 server"): self.logger.info("waiting for the X11 server")
retry(check_x) retry(check_x)
def get_window_names(self) -> List[str]: def get_window_names(self) -> List[str]:
@ -829,14 +752,13 @@ class Machine:
def window_is_visible(last_try: bool) -> bool: def window_is_visible(last_try: bool) -> bool:
names = self.get_window_names() names = self.get_window_names()
if last_try: if last_try:
self.log( self.logger.info(
"Last chance to match {} on the window list,".format(regexp) f"Last chance to match {regexp} on the window list, "
+ " which currently contains: " + f"which currently contains: {', '.join(names)}"
+ ", ".join(names)
) )
return any(pattern.search(name) for name in names) return any(pattern.search(name) for name in names)
with self.nested("Waiting for a window to appear"): self.logger.info("Waiting for a window to appear")
retry(window_is_visible) retry(window_is_visible)
def sleep(self, secs: int) -> None: def sleep(self, secs: int) -> None:
@ -865,21 +787,20 @@ class Machine:
def create_machine(args: Dict[str, Any]) -> Machine: def create_machine(args: Dict[str, Any]) -> Machine:
global log global log
args["log"] = log
args["redirectSerial"] = os.environ.get("USE_SERIAL", "0") == "1" args["redirectSerial"] = os.environ.get("USE_SERIAL", "0") == "1"
return Machine(args) return Machine(args)
def start_all() -> None: def start_all() -> None:
global machines global machines
with log.nested("starting all VMs"): logger.info("starting all VMs")
for machine in machines: for machine in machines:
machine.start() machine.start()
def join_all() -> None: def join_all() -> None:
global machines global machines
with log.nested("waiting for all VMs to finish"): logger.info("waiting for all VMs to finish")
for machine in machines: for machine in machines:
machine.wait_for_shutdown() machine.wait_for_shutdown()
@ -892,12 +813,11 @@ def run_tests() -> None:
global machines global machines
tests = os.environ.get("tests", None) tests = os.environ.get("tests", None)
if tests is not None: if tests is not None:
with log.nested("running the VM test script"): logger.info("running the VM test script")
try: try:
exec(tests, globals()) exec(tests, globals())
except Exception as e: except Exception:
eprint("error: ") logging.exception("error:")
traceback.print_exc()
sys.exit(1) sys.exit(1)
else: else:
ptpython.repl.embed(locals(), globals()) ptpython.repl.embed(locals(), globals())
@ -911,18 +831,19 @@ def run_tests() -> None:
@contextmanager @contextmanager
def subtest(name: str) -> Iterator[None]: def subtest(name: str) -> Iterator[None]:
with log.nested(name): logger.info(name)
try: try:
yield yield
return True return True
except Exception as e: except Exception as e:
log.log(f'Test "{name}" failed with error: "{e}"') logger.info(f'Test "{name}" failed with error: "{e}"')
raise e raise e
return False return False
if __name__ == "__main__": def main() -> None:
global machines
arg_parser = argparse.ArgumentParser() arg_parser = argparse.ArgumentParser()
arg_parser.add_argument( arg_parser.add_argument(
"-K", "-K",
@ -932,8 +853,6 @@ if __name__ == "__main__":
) )
(cli_args, vm_scripts) = arg_parser.parse_known_args() (cli_args, vm_scripts) = arg_parser.parse_known_args()
log = Logger()
vlan_nrs = list(dict.fromkeys(os.environ.get("VLANS", "").split())) vlan_nrs = list(dict.fromkeys(os.environ.get("VLANS", "").split()))
vde_sockets = [create_vlan(v) for v in vlan_nrs] vde_sockets = [create_vlan(v) for v in vlan_nrs]
for nr, vde_socket, _, _ in vde_sockets: for nr, vde_socket, _, _ in vde_sockets:
@ -944,23 +863,27 @@ if __name__ == "__main__":
if not cli_args.keep_vm_state: if not cli_args.keep_vm_state:
machine.cleanup_statedir() machine.cleanup_statedir()
machine_eval = [ machine_eval = [
"{0} = machines[{1}]".format(m.name, idx) for idx, m in enumerate(machines) "global {0}; {0} = machines[{1}]".format(m.name, idx)
for idx, m in enumerate(machines)
] ]
exec("\n".join(machine_eval)) exec("\n".join(machine_eval))
@atexit.register @atexit.register
def clean_up() -> None: def clean_up() -> None:
with log.nested("cleaning up"): logger.info("cleaning up")
for machine in machines: for machine in machines:
if machine.pid is None: if machine.pid is None:
continue continue
log.log("killing {} (pid {})".format(machine.name, machine.pid)) logger.info(f"killing {machine.name} (pid {machine.pid})")
machine.process.kill() machine.process.kill()
for _, _, process, _ in vde_sockets: for _, _, process, _ in vde_sockets:
process.terminate() process.terminate()
log.close()
tic = time.time() tic = time.time()
run_tests() run_tests()
toc = time.time() toc = time.time()
print("test script finished in {:.2f}s".format(toc - tic)) print("test script finished in {:.2f}s".format(toc - tic))
if __name__ == "__main__":
main()

View File

@ -62,7 +62,7 @@ rec {
'' ''
mkdir -p $out mkdir -p $out
LOGFILE=/dev/null tests='exec(os.environ["testScript"])' ${driver}/bin/nixos-test-driver tests='exec(os.environ["testScript"])' ${driver}/bin/nixos-test-driver
for i in */xchg/coverage-data; do for i in */xchg/coverage-data; do
mkdir -p $out/coverage-data mkdir -p $out/coverage-data

View File

@ -178,8 +178,6 @@ in
type = types.nullOr types.attrs; # TODO utilize lib.systems.parsedPlatform type = types.nullOr types.attrs; # TODO utilize lib.systems.parsedPlatform
default = null; default = null;
example = { system = "aarch64-linux"; config = "aarch64-unknown-linux-gnu"; }; example = { system = "aarch64-linux"; config = "aarch64-unknown-linux-gnu"; };
defaultText = literalExample
''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
description = '' description = ''
Specifies the platform for which NixOS should be Specifies the platform for which NixOS should be
built. Specify this only if it is different from built. Specify this only if it is different from

View File

@ -1,7 +1,7 @@
# A profile with most (vanilla) hardening options enabled by default, # A profile with most (vanilla) hardening options enabled by default,
# potentially at the cost of features and performance. # potentially at the cost of features and performance.
{ lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
@ -27,6 +27,9 @@ with lib;
security.forcePageTableIsolation = mkDefault true; security.forcePageTableIsolation = mkDefault true;
# This is required by podman to run containers in rootless mode.
security.unprivilegedUsernsClone = mkDefault config.virtualisation.containers.enable;
security.virtualisation.flushL1DataCache = mkDefault "always"; security.virtualisation.flushL1DataCache = mkDefault "always";
security.apparmor.enable = mkDefault true; security.apparmor.enable = mkDefault true;

View File

@ -51,7 +51,7 @@ in
}; };
secretKeyFile = mkOption { secretKeyFile = mkOption {
type = types.path; type = types.nullOr types.path;
default = null; default = null;
description = '' description = ''
A file containing your secret key. The security of your Duo application is tied to the security of your secret key. A file containing your secret key. The security of your Duo application is tied to the security of your secret key.

View File

@ -27,6 +27,16 @@ with lib;
''; '';
}; };
security.unprivilegedUsernsClone = mkOption {
type = types.bool;
default = false;
description = ''
When disabled, unprivileged users will not be able to create new namespaces.
By default unprivileged user namespaces are disabled.
This option only works in a hardened profile.
'';
};
security.protectKernelImage = mkOption { security.protectKernelImage = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -115,6 +125,10 @@ with lib;
]; ];
}) })
(mkIf config.security.unprivilegedUsernsClone {
boot.kernel.sysctl."kernel.unprivileged_userns_clone" = mkDefault true;
})
(mkIf config.security.protectKernelImage { (mkIf config.security.protectKernelImage {
# Disable hibernation (allows replacing the running kernel) # Disable hibernation (allows replacing the running kernel)
boot.kernelParams = [ "nohibernate" ]; boot.kernelParams = [ "nohibernate" ];

View File

@ -47,7 +47,7 @@ in {
enable = mkEnableOption "Icecast server"; enable = mkEnableOption "Icecast server";
hostname = mkOption { hostname = mkOption {
type = types.str; type = types.nullOr types.str;
description = "DNS name or IP address that will be used for the stream directory lookups or possibily the playlist generation if a Host header is not provided."; description = "DNS name or IP address that will be used for the stream directory lookups or possibily the playlist generation if a Host header is not provided.";
default = config.networking.domain; default = config.networking.domain;
}; };

View File

@ -12,7 +12,7 @@ in{
config = mkOption { config = mkOption {
default = null; default = null;
type = types.lines; type = types.nullOr types.lines;
description = "Fancontrol configuration file content. See <citerefentry><refentrytitle>pwmconfig</refentrytitle><manvolnum>8</manvolnum></citerefentry> from the lm_sensors package."; description = "Fancontrol configuration file content. See <citerefentry><refentrytitle>pwmconfig</refentrytitle><manvolnum>8</manvolnum></citerefentry> from the lm_sensors package.";
example = '' example = ''
# Configuration file generated by pwmconfig # Configuration file generated by pwmconfig

View File

@ -172,7 +172,7 @@ in {
}; };
database = mkOption { database = mkOption {
type = types.str; type = types.nullOr types.str;
default = null; default = null;
description = "Database name to store sms data"; description = "Database name to store sms data";
}; };

View File

@ -83,14 +83,14 @@ in {
}; };
dataStorageSpace = mkOption { dataStorageSpace = mkOption {
type = types.str; type = types.nullOr types.str;
default = null; default = null;
example = "/data/storage"; example = "/data/storage";
description = "Directory for data storage."; description = "Directory for data storage.";
}; };
metadataStorageSpace = mkOption { metadataStorageSpace = mkOption {
type = types.str; type = types.nullOr types.str;
default = null; default = null;
example = "/data/meta"; example = "/data/meta";
description = "Directory for meta data storage."; description = "Directory for meta data storage.";

View File

@ -87,7 +87,7 @@ in
}; };
rpc.password = mkOption { rpc.password = mkOption {
type = types.str; type = types.nullOr types.str;
default = null; default = null;
description = '' description = ''
Password for RPC connections. Password for RPC connections.

View File

@ -89,7 +89,7 @@ in
}; };
rpc.password = mkOption { rpc.password = mkOption {
type = types.str; type = types.nullOr types.str;
default = null; default = null;
description = '' description = ''
Password for RPC connections. Password for RPC connections.

View File

@ -11,8 +11,13 @@ let
method = cfg.encryptionMethod; method = cfg.encryptionMethod;
mode = cfg.mode; mode = cfg.mode;
user = "nobody"; user = "nobody";
fast_open = true; fast_open = cfg.fastOpen;
} // optionalAttrs (cfg.password != null) { password = cfg.password; }; } // optionalAttrs (cfg.plugin != null) {
plugin = cfg.plugin;
plugin_opts = cfg.pluginOpts;
} // optionalAttrs (cfg.password != null) {
password = cfg.password;
};
configFile = pkgs.writeText "shadowsocks.json" (builtins.toJSON opts); configFile = pkgs.writeText "shadowsocks.json" (builtins.toJSON opts);
@ -74,6 +79,14 @@ in
''; '';
}; };
fastOpen = mkOption {
type = types.bool;
default = true;
description = ''
use TCP fast-open
'';
};
encryptionMethod = mkOption { encryptionMethod = mkOption {
type = types.str; type = types.str;
default = "chacha20-ietf-poly1305"; default = "chacha20-ietf-poly1305";
@ -82,6 +95,23 @@ in
''; '';
}; };
plugin = mkOption {
type = types.nullOr types.str;
default = null;
example = "\${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin";
description = ''
SIP003 plugin for shadowsocks
'';
};
pluginOpts = mkOption {
type = types.str;
default = "";
example = "server;host=example.com";
description = ''
Options to pass to the plugin if one was specified
'';
};
}; };
}; };
@ -99,7 +129,7 @@ in
description = "shadowsocks-libev Daemon"; description = "shadowsocks-libev Daemon";
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [ pkgs.shadowsocks-libev ] ++ optional (cfg.passwordFile != null) pkgs.jq; path = [ pkgs.shadowsocks-libev cfg.plugin ] ++ optional (cfg.passwordFile != null) pkgs.jq;
serviceConfig.PrivateTmp = true; serviceConfig.PrivateTmp = true;
script = '' script = ''
${optionalString (cfg.passwordFile != null) '' ${optionalString (cfg.passwordFile != null) ''

View File

@ -641,7 +641,7 @@ in
credential = mkOption { credential = mkOption {
default = null; default = null;
example = "f1d00200d8dc783f7fb1e10ace8da27f8312d72692abfca2f7e4960a73f48e82e1f7571f6ebfcee9fb434f9886ccc8fcc52a6614d8d2"; example = "f1d00200d8dc783f7fb1e10ace8da27f8312d72692abfca2f7e4960a73f48e82e1f7571f6ebfcee9fb434f9886ccc8fcc52a6614d8d2";
type = types.str; type = types.nullOr types.str;
description = "The FIDO2 credential ID."; description = "The FIDO2 credential ID.";
}; };

View File

@ -32,7 +32,7 @@ in
}; };
package = mkOption { package = mkOption {
type = types.package; type = types.nullOr types.package;
default = config.boot.kernelPackages.prl-tools; default = config.boot.kernelPackages.prl-tools;
defaultText = "config.boot.kernelPackages.prl-tools"; defaultText = "config.boot.kernelPackages.prl-tools";
example = literalExample "config.boot.kernelPackages.prl-tools"; example = literalExample "config.boot.kernelPackages.prl-tools";

View File

@ -307,6 +307,7 @@ in
sanoid = handleTest ./sanoid.nix {}; sanoid = handleTest ./sanoid.nix {};
sddm = handleTest ./sddm.nix {}; sddm = handleTest ./sddm.nix {};
service-runner = handleTest ./service-runner.nix {}; service-runner = handleTest ./service-runner.nix {};
shadowsocks = handleTest ./shadowsocks.nix {};
shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {}; shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
shiori = handleTest ./shiori.nix {}; shiori = handleTest ./shiori.nix {};
signal-desktop = handleTest ./signal-desktop.nix {}; signal-desktop = handleTest ./signal-desktop.nix {};

View File

@ -74,7 +74,7 @@ let
throw "Non-EFI boot methods are only supported on i686 / x86_64" throw "Non-EFI boot methods are only supported on i686 / x86_64"
else '' else ''
def assemble_qemu_flags(): def assemble_qemu_flags():
flags = "-cpu host" flags = "-cpu max"
${if system == "x86_64-linux" ${if system == "x86_64-linux"
then ''flags += " -m 768"'' then ''flags += " -m 768"''
else ''flags += " -m 512 -enable-kvm -machine virt,gic-version=host"'' else ''flags += " -m 512 -enable-kvm -machine virt,gic-version=host"''
@ -317,6 +317,7 @@ let
texinfo texinfo
unionfs-fuse unionfs-fuse
xorg.lndir xorg.lndir
(lvm2.override { udev = null; }) # for initrd (extra-utils)
# add curl so that rather than seeing the test attempt to download # add curl so that rather than seeing the test attempt to download
# curl's tarball, we see what it's trying to download # curl's tarball, we see what it's trying to download

View File

@ -1,20 +1,19 @@
{ system ? builtins.currentSystem
, config ? { }
, pkgs ? import ../.. { inherit system config; } }:
with import ../lib/testing.nix { inherit system pkgs; };
with pkgs.lib;
let let
makePostgresqlWalReceiverTest = subTestName: postgresqlPackage: let # Makes a test for a PostgreSQL package, given by name and looked up from `pkgs`.
makePostgresqlWalReceiverTest = postgresqlPackage:
{
name = postgresqlPackage;
value =
import ./make-test-python.nix ({ pkgs, lib, ... }: let
postgresqlDataDir = "/var/db/postgresql/test"; pkg = pkgs."${postgresqlPackage}";
postgresqlDataDir = "/var/lib/postgresql/${pkg.psqlSchema}";
replicationUser = "wal_receiver_user"; replicationUser = "wal_receiver_user";
replicationSlot = "wal_receiver_slot"; replicationSlot = "wal_receiver_slot";
replicationConn = "postgresql://${replicationUser}@localhost"; replicationConn = "postgresql://${replicationUser}@localhost";
baseBackupDir = "/tmp/pg_basebackup"; baseBackupDir = "/tmp/pg_basebackup";
walBackupDir = "/tmp/pg_wal"; walBackupDir = "/tmp/pg_wal";
atLeast12 = versionAtLeast postgresqlPackage.version "12.0"; atLeast12 = lib.versionAtLeast pkg.version "12.0";
restoreCommand = '' restoreCommand = ''
restore_command = 'cp ${walBackupDir}/%f %p' restore_command = 'cp ${walBackupDir}/%f %p'
''; '';
@ -23,24 +22,19 @@ let
then pkgs.writeTextDir "recovery.signal" "" then pkgs.writeTextDir "recovery.signal" ""
else pkgs.writeTextDir "recovery.conf" "${restoreCommand}"; else pkgs.writeTextDir "recovery.conf" "${restoreCommand}";
in makeTest { in {
name = "postgresql-wal-receiver-${subTestName}"; name = "postgresql-wal-receiver-${postgresqlPackage}";
meta.maintainers = with maintainers; [ pacien ]; meta.maintainers = with lib.maintainers; [ pacien ];
machine = { ... }: { machine = { ... }: {
# Needed because this test uses a non-default 'services.postgresql.dataDir'.
systemd.tmpfiles.rules = [
"d /var/db/postgresql 0700 postgres postgres"
];
services.postgresql = { services.postgresql = {
package = postgresqlPackage; package = pkg;
enable = true; enable = true;
dataDir = postgresqlDataDir;
extraConfig = '' extraConfig = ''
wal_level = archive # alias for replica on pg >= 9.6 wal_level = archive # alias for replica on pg >= 9.6
max_wal_senders = 10 max_wal_senders = 10
max_replication_slots = 10 max_replication_slots = 10
'' + optionalString atLeast12 '' '' + lib.optionalString atLeast12 ''
${restoreCommand} ${restoreCommand}
recovery_end_command = 'touch recovery.done' recovery_end_command = 'touch recovery.done'
''; '';
@ -54,50 +48,64 @@ let
}; };
services.postgresqlWalReceiver.receivers.main = { services.postgresqlWalReceiver.receivers.main = {
inherit postgresqlPackage; postgresqlPackage = pkg;
connection = replicationConn; connection = replicationConn;
slot = replicationSlot; slot = replicationSlot;
directory = walBackupDir; directory = walBackupDir;
}; };
# This is only to speedup test, it isn't time racing. Service is set to autorestart always, # This is only to speedup test, it isn't time racing. Service is set to autorestart always,
# default 60sec is fine for real system, but is too much for a test # default 60sec is fine for real system, but is too much for a test
systemd.services.postgresql-wal-receiver-main.serviceConfig.RestartSec = mkForce 5; systemd.services.postgresql-wal-receiver-main.serviceConfig.RestartSec = lib.mkForce 5;
}; };
testScript = '' testScript = ''
# make an initial base backup # make an initial base backup
$machine->waitForUnit('postgresql'); machine.wait_for_unit("postgresql")
$machine->waitForUnit('postgresql-wal-receiver-main'); machine.wait_for_unit("postgresql-wal-receiver-main")
# WAL receiver healthchecks PG every 5 seconds, so let's be sure they have connected each other # WAL receiver healthchecks PG every 5 seconds, so let's be sure they have connected each other
# required only for 9.4 # required only for 9.4
$machine->sleep(5); machine.sleep(5)
$machine->succeed('${postgresqlPackage}/bin/pg_basebackup --dbname=${replicationConn} --pgdata=${baseBackupDir}'); machine.succeed(
"${pkg}/bin/pg_basebackup --dbname=${replicationConn} --pgdata=${baseBackupDir}"
)
# create a dummy table with 100 records # create a dummy table with 100 records
$machine->succeed('sudo -u postgres psql --command="create table dummy as select * from generate_series(1, 100) as val;"'); machine.succeed(
"sudo -u postgres psql --command='create table dummy as select * from generate_series(1, 100) as val;'"
)
# stop postgres and destroy data # stop postgres and destroy data
$machine->systemctl('stop postgresql'); machine.systemctl("stop postgresql")
$machine->systemctl('stop postgresql-wal-receiver-main'); machine.systemctl("stop postgresql-wal-receiver-main")
$machine->succeed('rm -r ${postgresqlDataDir}/{base,global,pg_*}'); machine.succeed("rm -r ${postgresqlDataDir}/{base,global,pg_*}")
# restore the base backup # restore the base backup
$machine->succeed('cp -r ${baseBackupDir}/* ${postgresqlDataDir} && chown postgres:postgres -R ${postgresqlDataDir}'); machine.succeed(
"cp -r ${baseBackupDir}/* ${postgresqlDataDir} && chown postgres:postgres -R ${postgresqlDataDir}"
)
# prepare WAL and recovery # prepare WAL and recovery
$machine->succeed('chmod a+rX -R ${walBackupDir}'); machine.succeed("chmod a+rX -R ${walBackupDir}")
$machine->execute('for part in ${walBackupDir}/*.partial; do mv $part ''${part%%.*}; done'); # make use of partial segments too machine.execute(
$machine->succeed('cp ${recoveryFile}/* ${postgresqlDataDir}/ && chmod 666 ${postgresqlDataDir}/recovery*'); "for part in ${walBackupDir}/*.partial; do mv $part ''${part%%.*}; done"
) # make use of partial segments too
machine.succeed(
"cp ${recoveryFile}/* ${postgresqlDataDir}/ && chmod 666 ${postgresqlDataDir}/recovery*"
)
# replay WAL # replay WAL
$machine->systemctl('start postgresql'); machine.systemctl("start postgresql")
$machine->waitForFile('${postgresqlDataDir}/recovery.done'); machine.wait_for_file("${postgresqlDataDir}/recovery.done")
$machine->systemctl('restart postgresql'); machine.systemctl("restart postgresql")
$machine->waitForUnit('postgresql'); machine.wait_for_unit("postgresql")
# check that our records have been restored # check that our records have been restored
$machine->succeed('test $(sudo -u postgres psql --pset="pager=off" --tuples-only --command="select count(distinct val) from dummy;") -eq 100'); machine.succeed(
"test $(sudo -u postgres psql --pset='pager=off' --tuples-only --command='select count(distinct val) from dummy;') -eq 100"
)
''; '';
});
}; };
in mapAttrs makePostgresqlWalReceiverTest (import ../../pkgs/servers/sql/postgresql pkgs) # Maps the generic function over all attributes of PostgreSQL packages
in builtins.listToAttrs (map makePostgresqlWalReceiverTest (builtins.attrNames (import ../../pkgs/servers/sql/postgresql { })))

View File

@ -0,0 +1,80 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "shadowsocks";
meta = {
maintainers = with lib.maintainers; [ hmenke ];
};
nodes = {
server = {
boot.kernel.sysctl."net.ipv4.ip_forward" = "1";
networking.useDHCP = false;
networking.interfaces.eth1.ipv4.addresses = [
{ address = "192.168.0.1"; prefixLength = 24; }
];
networking.firewall.rejectPackets = true;
networking.firewall.allowedTCPPorts = [ 8488 ];
networking.firewall.allowedUDPPorts = [ 8488 ];
services.shadowsocks = {
enable = true;
encryptionMethod = "chacha20-ietf-poly1305";
password = "pa$$w0rd";
localAddress = [ "0.0.0.0" ];
port = 8488;
fastOpen = false;
mode = "tcp_and_udp";
plugin = "${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin";
pluginOpts = "server;host=nixos.org";
};
services.nginx = {
enable = true;
virtualHosts.server = {
locations."/".root = pkgs.writeTextDir "index.html" "It works!";
};
};
};
client = {
networking.useDHCP = false;
networking.interfaces.eth1.ipv4.addresses = [
{ address = "192.168.0.2"; prefixLength = 24; }
];
systemd.services.shadowsocks-client = {
description = "connect to shadowsocks";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = with pkgs; [
shadowsocks-libev
shadowsocks-v2ray-plugin
];
script = ''
exec ss-local \
-s 192.168.0.1 \
-p 8488 \
-l 1080 \
-k 'pa$$w0rd' \
-m chacha20-ietf-poly1305 \
-a nobody \
--plugin "${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin" \
--plugin-opts "host=nixos.org"
'';
};
};
};
testScript = ''
start_all()
server.wait_for_unit("shadowsocks-libev.service")
client.wait_for_unit("shadowsocks-client.service")
client.fail(
"${pkgs.curl}/bin/curl 192.168.0.1:80"
)
msg = client.succeed(
"${pkgs.curl}/bin/curl --socks5 localhost:1080 192.168.0.1:80"
)
assert msg == "It works!", "Could not connect through shadowsocks"
'';
}
)

View File

@ -15,7 +15,7 @@
assert use64bitGuest -> useKvmNestedVirt; assert use64bitGuest -> useKvmNestedVirt;
with import ../lib/testing.nix { inherit system pkgs; }; with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib; with pkgs.lib;
let let
@ -91,13 +91,15 @@ let
(isYes "SERIAL_8250_CONSOLE") (isYes "SERIAL_8250_CONSOLE")
(isYes "SERIAL_8250") (isYes "SERIAL_8250")
]; ];
networking.usePredictableInterfaceNames = false;
}; };
mkLog = logfile: tag: let mkLog = logfile: tag: let
rotated = map (i: "${logfile}.${toString i}") (range 1 9); rotated = map (i: "${logfile}.${toString i}") (range 1 9);
all = concatMapStringsSep " " (f: "\"${f}\"") ([logfile] ++ rotated); all = concatMapStringsSep " " (f: "\"${f}\"") ([logfile] ++ rotated);
logcmd = "tail -F ${all} 2> /dev/null | logger -t \"${tag}\""; logcmd = "tail -F ${all} 2> /dev/null | logger -t \"${tag}\"";
in optionalString debug "$machine->execute(ru '${logcmd} & disown');"; in if debug then "machine.execute(ru('${logcmd} & disown'))" else "pass";
testVM = vmName: vmScript: let testVM = vmName: vmScript: let
cfg = (import ../lib/eval-config.nix { cfg = (import ../lib/eval-config.nix {
@ -204,96 +206,105 @@ let
}; };
testSubs = '' testSubs = ''
my ${"$" + name}_sharepath = '${sharePath}';
sub checkRunning_${name} {
my $cmd = 'VBoxManage list runningvms | grep -q "^\"${name}\""';
my ($status, $out) = $machine->execute(ru $cmd);
return $status == 0;
}
sub cleanup_${name} { ${name}_sharepath = "${sharePath}"
$machine->execute(ru "VBoxManage controlvm ${name} poweroff")
if checkRunning_${name};
$machine->succeed("rm -rf ${sharePath}");
$machine->succeed("mkdir -p ${sharePath}");
$machine->succeed("chown alice.users ${sharePath}");
}
sub createVM_${name} {
vbm("createvm --name ${name} ${createFlags}"); def check_running_${name}():
vbm("modifyvm ${name} ${vmFlags}"); cmd = "VBoxManage list runningvms | grep -q '^\"${name}\"'"
vbm("setextradata ${name} VBoxInternal/PDM/HaltOnReset 1"); (status, _) = machine.execute(ru(cmd))
vbm("storagectl ${name} ${controllerFlags}"); return status == 0
vbm("storageattach ${name} ${diskFlags}");
vbm("sharedfolder add ${name} ${sharedFlags}");
vbm("sharedfolder add ${name} ${nixstoreFlags}"); def cleanup_${name}():
cleanup_${name}; if check_running_${name}():
machine.execute(ru("VBoxManage controlvm ${name} poweroff"))
machine.succeed("rm -rf ${sharePath}")
machine.succeed("mkdir -p ${sharePath}")
machine.succeed("chown alice.users ${sharePath}")
def create_vm_${name}():
# fmt: off
vbm(f"createvm --name ${name} ${createFlags}")
vbm(f"modifyvm ${name} ${vmFlags}")
vbm(f"setextradata ${name} VBoxInternal/PDM/HaltOnReset 1")
vbm(f"storagectl ${name} ${controllerFlags}")
vbm(f"storageattach ${name} ${diskFlags}")
vbm(f"sharedfolder add ${name} ${sharedFlags}")
vbm(f"sharedfolder add ${name} ${nixstoreFlags}")
cleanup_${name}()
${mkLog "$HOME/VirtualBox VMs/${name}/Logs/VBox.log" "HOST-${name}"} ${mkLog "$HOME/VirtualBox VMs/${name}/Logs/VBox.log" "HOST-${name}"}
} # fmt: on
sub destroyVM_${name} {
cleanup_${name};
vbm("unregistervm ${name} --delete");
}
sub waitForVMBoot_${name} { def destroy_vm_${name}():
$machine->execute(ru( cleanup_${name}()
'set -e; i=0; '. vbm("unregistervm ${name} --delete")
'while ! test -e ${sharePath}/boot-done; do '.
'sleep 10; i=$(($i + 10)); [ $i -le 3600 ]; '.
'VBoxManage list runningvms | grep -q "^\"${name}\""; '.
'done'
));
}
sub waitForIP_${name} ($) {
my $property = "/VirtualBox/GuestInfo/Net/$_[0]/V4/IP";
my $getip = "VBoxManage guestproperty get ${name} $property | ".
"sed -n -e 's/^Value: //p'";
my $ip = $machine->succeed(ru(
'for i in $(seq 1000); do '.
'if ipaddr="$('.$getip.')" && [ -n "$ipaddr" ]; then '.
'echo "$ipaddr"; exit 0; '.
'fi; '.
'sleep 1; '.
'done; '.
'echo "Could not get IPv4 address for ${name}!" >&2; '.
'exit 1'
));
chomp $ip;
return $ip;
}
sub waitForStartup_${name} { def wait_for_vm_boot_${name}():
for (my $i = 0; $i <= 120; $i += 10) { machine.execute(
$machine->sleep(10); ru(
return if checkRunning_${name}; "set -e; i=0; "
eval { $_[0]->() } if defined $_[0]; "while ! test -e ${sharePath}/boot-done; do "
} "sleep 10; i=$(($i + 10)); [ $i -le 3600 ]; "
die "VirtualBox VM didn't start up within 2 minutes"; "VBoxManage list runningvms | grep -q '^\"${name}\"'; "
} "done"
)
)
sub waitForShutdown_${name} {
for (my $i = 0; $i <= 120; $i += 10) {
$machine->sleep(10);
return unless checkRunning_${name};
}
die "VirtualBox VM didn't shut down within 2 minutes";
}
sub shutdownVM_${name} { def wait_for_ip_${name}(interface):
$machine->succeed(ru "touch ${sharePath}/shutdown"); property = f"/VirtualBox/GuestInfo/Net/{interface}/V4/IP"
$machine->execute( # fmt: off
'set -e; i=0; '. getip = f"VBoxManage guestproperty get ${name} {property} | sed -n -e 's/^Value: //p'"
'while test -e ${sharePath}/shutdown '. # fmt: on
' -o -e ${sharePath}/boot-done; do '.
'sleep 1; i=$(($i + 1)); [ $i -le 3600 ]; '. ip = machine.succeed(
'done' ru(
); "for i in $(seq 1000); do "
waitForShutdown_${name}; f'if ipaddr="$({getip})" && [ -n "$ipaddr" ]; then '
} 'echo "$ipaddr"; exit 0; '
"fi; "
"sleep 1; "
"done; "
"echo 'Could not get IPv4 address for ${name}!' >&2; "
"exit 1"
)
).strip()
return ip
def wait_for_startup_${name}(nudge=lambda: None):
for _ in range(0, 130, 10):
machine.sleep(10)
if check_running_${name}():
return
nudge()
raise Exception("VirtualBox VM didn't start up within 2 minutes")
def wait_for_shutdown_${name}():
for _ in range(0, 130, 10):
machine.sleep(10)
if not check_running_${name}():
return
raise Exception("VirtualBox VM didn't shut down within 2 minutes")
def shutdown_vm_${name}():
machine.succeed(ru("touch ${sharePath}/shutdown"))
machine.execute(
"set -e; i=0; "
"while test -e ${sharePath}/shutdown "
" -o -e ${sharePath}/boot-done; do "
"sleep 1; i=$(($i + 1)); [ $i -le 3600 ]; "
"done"
)
wait_for_shutdown_${name}()
''; '';
}; };
@ -364,26 +375,31 @@ let
}; };
testScript = '' testScript = ''
sub ru ($) { from shlex import quote
my $esc = $_[0] =~ s/'/'\\${"'"}'/gr;
return "su - alice -c '$esc'";
}
sub vbm {
$machine->succeed(ru("VBoxManage ".$_[0]));
};
sub removeUUIDs {
return join("\n", grep { $_ !~ /^UUID:/ } split(/\n/, $_[0]))."\n";
}
${concatStrings (mapAttrsToList (_: getAttr "testSubs") vms)} ${concatStrings (mapAttrsToList (_: getAttr "testSubs") vms)}
$machine->waitForX; def ru(cmd: str) -> str:
return f"su - alice -c {quote(cmd)}"
def vbm(cmd: str) -> str:
return machine.succeed(ru(f"VBoxManage {cmd}"))
def remove_uuids(output: str) -> str:
return "\n".join(
[line for line in (output or "").splitlines() if not line.startswith("UUID:")]
)
machine.wait_for_x()
# fmt: off
${mkLog "$HOME/.config/VirtualBox/VBoxSVC.log" "HOST-SVC"} ${mkLog "$HOME/.config/VirtualBox/VBoxSVC.log" "HOST-SVC"}
# fmt: on
${testScript} ${testScript}
# (keep black happy)
''; '';
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
@ -393,133 +409,129 @@ let
unfreeTests = mapAttrs (mkVBoxTest true vboxVMsWithExtpack) { unfreeTests = mapAttrs (mkVBoxTest true vboxVMsWithExtpack) {
enable-extension-pack = '' enable-extension-pack = ''
createVM_testExtensionPack; create_vm_testExtensionPack()
vbm("startvm testExtensionPack"); vbm("startvm testExtensionPack")
waitForStartup_testExtensionPack; wait_for_startup_testExtensionPack()
$machine->screenshot("cli_started"); machine.screenshot("cli_started")
waitForVMBoot_testExtensionPack; wait_for_vm_boot_testExtensionPack()
$machine->screenshot("cli_booted"); machine.screenshot("cli_booted")
$machine->nest("Checking for privilege escalation", sub { with machine.nested("Checking for privilege escalation"):
$machine->fail("test -e '/root/VirtualBox VMs'"); machine.fail("test -e '/root/VirtualBox VMs'")
$machine->fail("test -e '/root/.config/VirtualBox'"); machine.fail("test -e '/root/.config/VirtualBox'")
$machine->succeed("test -e '/home/alice/VirtualBox VMs'"); machine.succeed("test -e '/home/alice/VirtualBox VMs'")
});
shutdownVM_testExtensionPack; shutdown_vm_testExtensionPack()
destroyVM_testExtensionPack; destroy_vm_testExtensionPack()
''; '';
}; };
in mapAttrs (mkVBoxTest false vboxVMs) { in mapAttrs (mkVBoxTest false vboxVMs) {
simple-gui = '' simple-gui = ''
createVM_simple;
$machine->succeed(ru "VirtualBox &");
$machine->waitUntilSucceeds(
ru "xprop -name 'Oracle VM VirtualBox Manager'"
);
$machine->sleep(5);
$machine->screenshot("gui_manager_started");
# Home to select Tools, down to move to the VM, enter to start it. # Home to select Tools, down to move to the VM, enter to start it.
$machine->sendKeys("home"); def send_vm_startup():
$machine->sendKeys("down"); machine.send_key("home")
$machine->sendKeys("ret"); machine.send_key("down")
$machine->screenshot("gui_manager_sent_startup"); machine.send_key("ret")
waitForStartup_simple (sub {
$machine->sendKeys("home");
$machine->sendKeys("down"); create_vm_simple()
$machine->sendKeys("ret"); machine.succeed(ru("VirtualBox &"))
}); machine.wait_until_succeeds(ru("xprop -name 'Oracle VM VirtualBox Manager'"))
$machine->screenshot("gui_started"); machine.sleep(5)
waitForVMBoot_simple; machine.screenshot("gui_manager_started")
$machine->screenshot("gui_booted"); send_vm_startup()
shutdownVM_simple; machine.screenshot("gui_manager_sent_startup")
$machine->sleep(5); wait_for_startup_simple(send_vm_startup)
$machine->screenshot("gui_stopped"); machine.screenshot("gui_started")
$machine->sendKeys("ctrl-q"); wait_for_vm_boot_simple()
$machine->sleep(5); machine.screenshot("gui_booted")
$machine->screenshot("gui_manager_stopped"); shutdown_vm_simple()
destroyVM_simple; machine.sleep(5)
machine.screenshot("gui_stopped")
machine.send_key("ctrl-q")
machine.sleep(5)
machine.screenshot("gui_manager_stopped")
destroy_vm_simple()
''; '';
simple-cli = '' simple-cli = ''
createVM_simple; create_vm_simple()
vbm("startvm simple"); vbm("startvm simple")
waitForStartup_simple; wait_for_startup_simple()
$machine->screenshot("cli_started"); machine.screenshot("cli_started")
waitForVMBoot_simple; wait_for_vm_boot_simple()
$machine->screenshot("cli_booted"); machine.screenshot("cli_booted")
$machine->nest("Checking for privilege escalation", sub { with machine.nested("Checking for privilege escalation"):
$machine->fail("test -e '/root/VirtualBox VMs'"); machine.fail("test -e '/root/VirtualBox VMs'")
$machine->fail("test -e '/root/.config/VirtualBox'"); machine.fail("test -e '/root/.config/VirtualBox'")
$machine->succeed("test -e '/home/alice/VirtualBox VMs'"); machine.succeed("test -e '/home/alice/VirtualBox VMs'")
});
shutdownVM_simple; shutdown_vm_simple()
destroyVM_simple; destroy_vm_simple()
''; '';
headless = '' headless = ''
createVM_headless; create_vm_headless()
$machine->succeed(ru("VBoxHeadless --startvm headless & disown %1")); machine.succeed(ru("VBoxHeadless --startvm headless & disown %1"))
waitForStartup_headless; wait_for_startup_headless()
waitForVMBoot_headless; wait_for_vm_boot_headless()
shutdownVM_headless; shutdown_vm_headless()
destroyVM_headless; destroy_vm_headless()
''; '';
host-usb-permissions = '' host-usb-permissions = ''
my $userUSB = removeUUIDs vbm("list usbhost"); user_usb = remove_uuids(vbm("list usbhost"))
print STDERR $userUSB; print(user_usb, file=sys.stderr)
my $rootUSB = removeUUIDs $machine->succeed("VBoxManage list usbhost"); root_usb = remove_uuids(machine.succeed("VBoxManage list usbhost"))
print STDERR $rootUSB; print(root_usb, file=sys.stderr)
die "USB host devices differ for root and normal user" if user_usb != root_usb:
if $userUSB ne $rootUSB; raise Exception("USB host devices differ for root and normal user")
die "No USB host devices found" if $userUSB =~ /<none>/; if "<none>" in user_usb:
raise Exception("No USB host devices found")
''; '';
systemd-detect-virt = '' systemd-detect-virt = ''
createVM_detectvirt; create_vm_detectvirt()
vbm("startvm detectvirt"); vbm("startvm detectvirt")
waitForStartup_detectvirt; wait_for_startup_detectvirt()
waitForVMBoot_detectvirt; wait_for_vm_boot_detectvirt()
shutdownVM_detectvirt; shutdown_vm_detectvirt()
my $result = $machine->succeed("cat '$detectvirt_sharepath/result'"); result = machine.succeed(f"cat '{detectvirt_sharepath}/result'").strip()
chomp $result; destroy_vm_detectvirt()
destroyVM_detectvirt; if result != "oracle":
die "systemd-detect-virt returned \"$result\" instead of \"oracle\"" raise Exception(f'systemd-detect-virt returned "{result}" instead of "oracle"')
if $result ne "oracle";
''; '';
net-hostonlyif = '' net-hostonlyif = ''
createVM_test1; create_vm_test1()
createVM_test2; create_vm_test2()
vbm("startvm test1"); vbm("startvm test1")
waitForStartup_test1; wait_for_startup_test1()
waitForVMBoot_test1; wait_for_vm_boot_test1()
vbm("startvm test2"); vbm("startvm test2")
waitForStartup_test2; wait_for_startup_test2()
waitForVMBoot_test2; wait_for_vm_boot_test2()
$machine->screenshot("net_booted"); machine.screenshot("net_booted")
my $test1IP = waitForIP_test1 1; test1_ip = wait_for_ip_test1(1)
my $test2IP = waitForIP_test2 1; test2_ip = wait_for_ip_test2(1)
$machine->succeed("echo '$test2IP' | nc -N '$test1IP' 1234"); machine.succeed(f"echo '{test2_ip}' | nc -N '{test1_ip}' 1234")
$machine->succeed("echo '$test1IP' | nc -N '$test2IP' 1234"); machine.succeed(f"echo '{test1_ip}' | nc -N '{test2_ip}' 1234")
$machine->waitUntilSucceeds("nc -N '$test1IP' 5678 < /dev/null >&2"); machine.wait_until_succeeds(f"nc -N '{test1_ip}' 5678 < /dev/null >&2")
$machine->waitUntilSucceeds("nc -N '$test2IP' 5678 < /dev/null >&2"); machine.wait_until_succeeds(f"nc -N '{test2_ip}' 5678 < /dev/null >&2")
shutdownVM_test1; shutdown_vm_test1()
shutdownVM_test2; shutdown_vm_test2()
destroyVM_test1; destroy_vm_test1()
destroyVM_test2; destroy_vm_test2()
''; '';
} // (if enableUnfree then unfreeTests else {}) } // (if enableUnfree then unfreeTests else {})

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, eigen, libav_all }: { stdenv, fetchFromGitHub, cmake, eigen, libav }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "musly"; pname = "musly";
version = "unstable-2017-04-26"; version = "unstable-2017-04-26";
@ -9,7 +9,7 @@ stdenv.mkDerivation {
sha256 = "1q42wvdwy2pac7bhfraqqj2czw7w2m33ms3ifjl8phm7d87i8825"; sha256 = "1q42wvdwy2pac7bhfraqqj2czw7w2m33ms3ifjl8phm7d87i8825";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ eigen (libav_all.override { vaapiSupport = stdenv.isLinux; }).libav_11 ]; buildInputs = [ eigen (libav.override { vaapiSupport = stdenv.isLinux; }) ];
fixupPhase = if stdenv.isDarwin then '' fixupPhase = if stdenv.isDarwin then ''
install_name_tool -change libmusly.dylib $out/lib/libmusly.dylib $out/bin/musly install_name_tool -change libmusly.dylib $out/lib/libmusly.dylib $out/bin/musly
install_name_tool -change libmusly_resample.dylib $out/lib/libmusly_resample.dylib $out/bin/musly install_name_tool -change libmusly_resample.dylib $out/lib/libmusly_resample.dylib $out/bin/musly

View File

@ -10,13 +10,13 @@ assert pcreSupport -> pcre != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ncmpc"; pname = "ncmpc";
version = "0.38"; version = "0.39";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "MusicPlayerDaemon"; owner = "MusicPlayerDaemon";
repo = "ncmpc"; repo = "ncmpc";
rev = "v${version}"; rev = "v${version}";
sha256 = "1kidpd1xrfax3v31q93r9g9b7jd841476q47wgd94h1a86b70gs9"; sha256 = "08xrcinfm1a7hjycf8la7gnsxbp3six70ks987dr7j42kd42irfq";
}; };
buildInputs = [ glib ncurses mpd_clientlib boost ] buildInputs = [ glib ncurses mpd_clientlib boost ]

View File

@ -2,13 +2,13 @@
buildGoModule rec { buildGoModule rec {
pname = "go-ethereum"; pname = "go-ethereum";
version = "1.9.19"; version = "1.9.20";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ethereum"; owner = "ethereum";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "08wf7qklk31dky2z0l2j9vbyr8721gkvy4dsc60afwrwihwd8lrp"; sha256 = "031cbl8yqw5g5yrm5h1x8s5ckdw2xkym46009l579zvafn2vcnj7";
}; };
runVend = true; runVend = true;
@ -42,6 +42,6 @@ buildGoModule rec {
homepage = "https://geth.ethereum.org/"; homepage = "https://geth.ethereum.org/";
description = "Official golang implementation of the Ethereum protocol"; description = "Official golang implementation of the Ethereum protocol";
license = with licenses; [ lgpl3 gpl3 ]; license = with licenses; [ lgpl3 gpl3 ];
maintainers = with maintainers; [ adisbladis lionello xrelkd ]; maintainers = with maintainers; [ adisbladis lionello xrelkd RaghavSood ];
}; };
} }

View File

@ -1,18 +1,18 @@
{ stdenv, pkgconfig, qt5, fetchFromGitHub }: { stdenv, mkDerivation, pkgconfig, qmake, qttools, qtbase, qtsvg, qtx11extras, fetchFromGitHub }:
mkDerivation rec {
with qt5;
stdenv.mkDerivation rec {
version = "0.10.0";
pname = "featherpad"; pname = "featherpad";
version = "0.10.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "tsujan"; owner = "tsujan";
repo = "FeatherPad"; repo = "FeatherPad";
rev = "V${version}"; rev = "V${version}";
sha256 = "1wrbs6kni9s3x39cckm9kzpglryxn5vyarilvh9pafbzpc6rc57p"; sha256 = "1wrbs6kni9s3x39cckm9kzpglryxn5vyarilvh9pafbzpc6rc57p";
}; };
nativeBuildInputs = [ qmake pkgconfig qttools ]; nativeBuildInputs = [ qmake pkgconfig qttools ];
buildInputs = [ qtbase qtsvg qtx11extras ]; buildInputs = [ qtbase qtsvg qtx11extras ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Lightweight Qt5 Plain-Text Editor for Linux"; description = "Lightweight Qt5 Plain-Text Editor for Linux";
homepage = "https://github.com/tsujan/FeatherPad"; homepage = "https://github.com/tsujan/FeatherPad";

View File

@ -2,11 +2,11 @@
, desktop-file-utils, libSM, imagemagick }: , desktop-file-utils, libSM, imagemagick }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "20.03"; version = "20.08";
pname = "mediainfo-gui"; pname = "mediainfo-gui";
src = fetchurl { src = fetchurl {
url = "https://mediaarea.net/download/source/mediainfo/${version}/mediainfo_${version}.tar.xz"; url = "https://mediaarea.net/download/source/mediainfo/${version}/mediainfo_${version}.tar.xz";
sha256 = "1f1shnycf0f1fwka9k9s250l228xjkg0k4k73h8bpld8msighgnw"; sha256 = "1baf2dj5s3g1x4ssqli1b2r1203syk42m09zhp36qcinmfixv11l";
}; };
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];

View File

@ -1,73 +1,123 @@
{ pkgs, stdenv, lib, fetchFromGitHub, python3 { pkgs
, stdenv
, lib
, fetchFromGitHub
, python3
# To include additional plugins, pass them here as an overlay. # To include additional plugins, pass them here as an overlay.
, packageOverrides ? self: super: {} , packageOverrides ? self: super: {}
}: }:
let let
mkOverride = attrname: version: sha256: mkOverride = attrname: version: sha256:
self: super: { self: super: {
${attrname} = super.${attrname}.overridePythonAttrs (oldAttrs: { ${attrname} = super.${attrname}.overridePythonAttrs (
oldAttrs: {
inherit version; inherit version;
src = oldAttrs.src.override { src = oldAttrs.src.override {
inherit version sha256; inherit version sha256;
}; };
}); }
);
}; };
py = python3.override { py = python3.override {
self = py; self = py;
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([ packageOverrides = lib.foldr lib.composeExtensions (self: super: {}) (
(mkOverride "flask" "0.12.5" "fac2b9d443e49f7e7358a444a3db5950bdd0324674d92ba67f8f1f15f876b14f") [
(mkOverride "flask_assets" "0.12" "0ivqsihk994rxw58vdgzrx4d77d7lpzjm4qxb38hjdgvi5xm4cb0") # the following dependencies are non trivial to update since later versions introduce backwards incompatible
(mkOverride "flaskbabel" "0.12.2" "11jwp8vvq1gnm31qh6ihy2h393hy18yn9yjp569g60r0wj1x2sii") # changes that might affect plugins, or due to other observed problems
(mkOverride "flask_login" "0.4.1" "1v2j8zd558xfmgn3rfbw0xz4vizjcnk8kqw52q4f4d9ygfnc25f8") (mkOverride "markupsafe" "1.1.1" "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b")
(mkOverride "rsa" "4.0" "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487")
(mkOverride "markdown" "3.1.1" "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a") (mkOverride "markdown" "3.1.1" "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a")
(mkOverride "tornado" "4.5.3" "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d") (mkOverride "tornado" "5.1.1" "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409")
(mkOverride "psutil" "5.6.7" "ffad8eb2ac614518bbe3c0b8eb9dffdb3a8d2e3a7d5da51c5b974fb723a5c5aa") (mkOverride "unidecode" "0.04.21" "280a6ab88e1f2eb5af79edff450021a0d3f0448952847cd79677e55e58bad051")
(mkOverride "watchdog" "0.9.0" "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn")
(mkOverride "werkzeug" "0.16.1" "010zmhyfbp4d56c1rgalwi188imjlkv9g7rm25jrvify6xnqalxk")
(mkOverride "websocket_client" "0.56.0" "0fpxjyr74klnyis3yf6m54askl0h5dchxcwbfjsq92xng0455m8z")
(mkOverride "wrapt" "1.11.2" "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn")
# Octoprint holds back jinja2 to 2.8.1 due to breaking changes. # Built-in dependency
# This old version does not have updated test config for pytest 4, (
# and pypi tarball doesn't contain tests dir anyways. self: super: {
(self: super: { octoprint-filecheck = self.buildPythonPackage rec {
jinja2 = super.jinja2.overridePythonAttrs (oldAttrs: rec { pname = "OctoPrint-FileCheck";
version = "2.8.1"; version = "2020.08.07";
src = oldAttrs.src.override {
inherit version;
sha256 = "14aqmhkc9rw5w0v311jhixdm6ym8vsm29dhyxyrjfqxljwx1yd1m";
};
doCheck = false;
});
httpretty = super.httpretty.overridePythonAttrs (oldAttrs: rec {
doCheck = false;
});
celery = super.celery.overridePythonAttrs (oldAttrs: rec {
doCheck = false;
});
})
(self: super: {
octoprint = self.buildPythonPackage rec {
pname = "OctoPrint";
version = "1.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "foosel"; owner = "OctoPrint";
repo = "OctoPrint-FileCheck";
rev = version;
sha256 = "05ys05l5x7d2bkg3yqrga6m65v3g5fcnnzbfab7j9w2pzjdapx5b";
};
doCheck = false;
};
}
)
# Built-in dependency
(
self: super: {
octoprint-firmwarecheck = self.buildPythonPackage rec {
pname = "OctoPrint-FirmwareCheck";
version = "2020.06.22";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint-FirmwareCheck";
rev = version;
sha256 = "19y7hrgg9z8hl7cwqkvg8nc8bk0wwrsfvjd1wawy33wn60psqv1h";
};
doCheck = false;
};
}
)
(
self: super: {
octoprint = self.buildPythonPackage rec {
pname = "OctoPrint";
version = "1.4.2";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint"; repo = "OctoPrint";
rev = version; rev = version;
sha256 = "0387228544v28d69dcdg2zr5gp6qavkfr6dydpjgj5awxv3w25d5"; sha256 = "1bblrjwkccy1ifw7lf55g3k9lq1sqzwd49vj8bfzj2w07a7qda62";
}; };
propagatedBuildInputs = with super; [ propagatedBuildInputs = with super; [
awesome-slugify flask flask_assets rsa requests pkginfo watchdog octoprint-firmwarecheck
semantic-version werkzeug flaskbabel tornado octoprint-filecheck
psutil pyserial flask_login netaddr markdown markupsafe
pylru pyyaml sarge feedparser netifaces click websocket_client tornado
scandir chainmap future wrapt monotonic emoji jinja2 markdown
frozendict cachelib sentry-sdk filetype markupsafe rsa
regex
flask
jinja2
flask_login
flask-babel
flask_assets
werkzeug
itsdangerous
cachelib
pyyaml
pyserial
netaddr
watchdog
sarge
netifaces
pylru
pkginfo
requests
semantic-version
psutil
click
feedparser
future
websocket_client
wrapt
emoji
frozendict
sentry-sdk
filetype
unidecode
blinker
] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ]; ] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ];
checkInputs = with super; [ pytestCheckHook mock ddt ]; checkInputs = with super; [ pytestCheckHook mock ddt ];
@ -76,11 +126,15 @@ let
ignoreVersionConstraints = [ ignoreVersionConstraints = [
"sentry-sdk" "sentry-sdk"
]; ];
in '' in
''
sed -r -i \ sed -r -i \
${lib.concatStringsSep "\n" (map (e: ${lib.concatStringsSep "\n" (
map (
e:
''-e 's@${e}[<>=]+.*@${e}",@g' \'' ''-e 's@${e}[<>=]+.*@${e}",@g' \''
) ignoreVersionConstraints)} ) ignoreVersionConstraints
)}
setup.py setup.py
''; '';
@ -106,9 +160,12 @@ let
maintainers = with maintainers; [ abbradar gebner WhittlesJr ]; maintainers = with maintainers; [ abbradar gebner WhittlesJr ];
}; };
}; };
}) }
)
(import ./plugins.nix { inherit pkgs; }) (import ./plugins.nix { inherit pkgs; })
packageOverrides packageOverrides
]); ]
);
}; };
in with py.pkgs; toPythonApplication octoprint in
with py.pkgs; toPythonApplication octoprint

View File

@ -0,0 +1,27 @@
{ stdenv, fetchFromGitHub, ncurses }:
stdenv.mkDerivation rec {
pname = "tty-solitaire";
version = "1.3.0";
src = fetchFromGitHub {
owner = "mpereira";
repo = pname;
rev = "v${version}";
sha256 = "0kix7wfy2bda8cw5kfm7bm5acd5fqmdl9g52ms9bza4kf2jnb754";
};
buildInputs = [ ncurses ];
patchPhase = "sed -i -e '/^CFLAGS *?= *-g *$/d' Makefile";
makeFlags = [ "CC=cc" "PREFIX=${placeholder "out"}" ];
meta = with stdenv.lib; {
description = "Klondike Solitaire in your ncurses terminal";
license = licenses.mit;
homepage = "https://github.com/mpereira/tty-solitaire";
platforms = ncurses.meta.platforms;
maintainers = [ maintainers.AndersonTorres ];
};
}

View File

@ -90,6 +90,5 @@ mkChromiumDerivation (base: rec {
platforms = platforms.linux; platforms = platforms.linux;
hydraPlatforms = if channel == "stable" then ["aarch64-linux" "x86_64-linux"] else []; hydraPlatforms = if channel == "stable" then ["aarch64-linux" "x86_64-linux"] else [];
timeout = 172800; # 48 hours timeout = 172800; # 48 hours
broken = channel == "dev"; # Requires LLVM 11
}; };
}) })

View File

@ -144,8 +144,9 @@ let
++ optional pulseSupport libpulseaudio ++ optional pulseSupport libpulseaudio
++ optionals useOzone [ libdrm wayland mesa_drivers libxkbcommon ]; ++ optionals useOzone [ libdrm wayland mesa_drivers libxkbcommon ];
patches = [ patches = optionals (versionRange "68" "86") [
./patches/nix_plugin_paths_68.patch ./patches/nix_plugin_paths_68.patch
] ++ [
./patches/remove-webp-include-69.patch ./patches/remove-webp-include-69.patch
./patches/no-build-timestamps.patch ./patches/no-build-timestamps.patch
./patches/widevine-79.patch ./patches/widevine-79.patch
@ -159,12 +160,18 @@ let
# #
# ++ optionals (channel == "dev") [ ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" ) ] # ++ optionals (channel == "dev") [ ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" ) ]
# ++ optional (versionRange "68" "72") ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" ) # ++ optional (versionRange "68" "72") ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" )
] ++ optionals (useVaapi) [ # Improvements for the VA-API build: ] ++ optionals (useVaapi && versionRange "68" "86") [ # Improvements for the VA-API build:
./patches/enable-vdpau-support-for-nvidia.patch # https://aur.archlinux.org/cgit/aur.git/tree/vdpau-support.patch?h=chromium-vaapi ./patches/enable-vdpau-support-for-nvidia.patch # https://aur.archlinux.org/cgit/aur.git/tree/vdpau-support.patch?h=chromium-vaapi
./patches/enable-video-acceleration-on-linux.patch # Can be controlled at runtime (i.e. without rebuilding Chromium) ./patches/enable-video-acceleration-on-linux.patch # Can be controlled at runtime (i.e. without rebuilding Chromium)
]; ];
postPatch = '' postPatch = optionalString (!versionRange "0" "86") ''
# Required for patchShebangs (unsupported interpreter directive, basename: invalid option -- '*', etc.):
substituteInPlace native_client/SConstruct \
--replace "#! -*- python -*-" ""
substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \
--replace "/usr/bin/env -S make -f" "/usr/bin/make -f"
'' + ''
# We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX # We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX
substituteInPlace sandbox/linux/suid/client/setuid_sandbox_host.cc \ substituteInPlace sandbox/linux/suid/client/setuid_sandbox_host.cc \
--replace \ --replace \

View File

@ -1,4 +1,4 @@
{ newScope, config, stdenv, llvmPackages_9, llvmPackages_10 { newScope, config, stdenv, llvmPackages_10, llvmPackages_11
, makeWrapper, ed, gnugrep, coreutils , makeWrapper, ed, gnugrep, coreutils
, glib, gtk3, gnome3, gsettings-desktop-schemas, gn, fetchgit , glib, gtk3, gnome3, gsettings-desktop-schemas, gn, fetchgit
, libva ? null , libva ? null
@ -28,7 +28,7 @@ let
callPackage = newScope chromium; callPackage = newScope chromium;
chromium = { chromium = rec {
inherit stdenv llvmPackages; inherit stdenv llvmPackages;
upstream-info = (callPackage ./update.nix {}).getChannel channel; upstream-info = (callPackage ./update.nix {}).getChannel channel;
@ -36,15 +36,6 @@ let
mkChromiumDerivation = callPackage ./common.nix ({ mkChromiumDerivation = callPackage ./common.nix ({
inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useOzone; inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useOzone;
# TODO: Remove after we can update gn for the stable channel (backward incompatible changes): # TODO: Remove after we can update gn for the stable channel (backward incompatible changes):
gnChromium = gn.overrideAttrs (oldAttrs: {
version = "2020-03-23";
src = fetchgit {
url = "https://gn.googlesource.com/gn";
rev = "5ed3c9cc67b090d5e311e4bd2aba072173e82db9";
sha256 = "00y2d35wvqmx9glaqhfb62wdgbfpwr77v0934nnvh9ks71vnsjqy";
};
});
} // lib.optionalAttrs (channel == "beta") {
gnChromium = gn.overrideAttrs (oldAttrs: { gnChromium = gn.overrideAttrs (oldAttrs: {
version = "2020-05-19"; version = "2020-05-19";
src = fetchgit { src = fetchgit {
@ -53,7 +44,8 @@ let
sha256 = "0197msabskgfbxvhzq73gc3wlr3n9cr4bzrhy5z5irbvy05lxk17"; sha256 = "0197msabskgfbxvhzq73gc3wlr3n9cr4bzrhy5z5irbvy05lxk17";
}; };
}); });
} // lib.optionalAttrs (channel == "dev") { } // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "86") {
llvmPackages = llvmPackages_11;
gnChromium = gn.overrideAttrs (oldAttrs: { gnChromium = gn.overrideAttrs (oldAttrs: {
version = "2020-07-20"; version = "2020-07-20";
src = fetchgit { src = fetchgit {

View File

@ -1,18 +1,18 @@
# This file is autogenerated from update.sh in the same directory. # This file is autogenerated from update.sh in the same directory.
{ {
beta = { beta = {
sha256 = "0i7vd0w1swvxw46wiy1xrni02xa7yvccw4cp9v2dc2lm5r43dw5q"; sha256 = "0fz781bxx1rnjwfix2dgzq5w1lg3x6a9vd9k49gh4z5q092slr10";
sha256bin64 = "0by3fgmd54zj5q5znazrl3vf42ik3rhirwy5815i7isqiq7bb6lq"; sha256bin64 = "12nm7h70pbzwc5rc7kcwfwgjs0h8cdnys5wlfjkbq6irwb6m1lm6";
version = "85.0.4183.69"; version = "85.0.4183.83";
}; };
dev = { dev = {
sha256 = "1yasmx3alal3gygyjvvjk799z0b6p6nm7q10m0qyls2mpfvxpcyw"; sha256 = "16yj47x580i8p88m88f5bcs85qmrfwmyp9na7yrnk0lnq06wbj4i";
sha256bin64 = "0lp93z9qwdbjblmj0d514plk44hs0yqw1v7vr5mnrrx6l9gm0yg0"; sha256bin64 = "0i81xcfdn65j2i4vfx52v4a9vlar8y9ykqdhshymqfz4qqqk37d1";
version = "86.0.4229.0"; version = "86.0.4238.0";
}; };
stable = { stable = {
sha256 = "1n4n95gllqmsrzxmcp9p4gz95gndq2v3vknfvm8p1qfhjqah0hfx"; sha256 = "0fz781bxx1rnjwfix2dgzq5w1lg3x6a9vd9k49gh4z5q092slr10";
sha256bin64 = "1ak903wm8zq6pri88md2wdij3izr6kz9d4avyqnpmd68ch16vfnj"; sha256bin64 = "0fa3la2nvqr0w40j2qkbwnh36924fsp2ajsla6aky6hz08mq2q1g";
version = "84.0.4147.135"; version = "85.0.4183.83";
}; };
} }

View File

@ -45,7 +45,7 @@
, gnused , gnused
, gnugrep , gnugrep
, gnupg , gnupg
, ffmpeg_3 , ffmpeg
, runtimeShell , runtimeShell
, mesa # firefox wants gbm for drm+dmabuf , mesa # firefox wants gbm for drm+dmabuf
, systemLocale ? config.i18n.defaultLocale or "en-US" , systemLocale ? config.i18n.defaultLocale or "en-US"
@ -130,7 +130,7 @@ stdenv.mkDerivation {
libpulseaudio libpulseaudio
(lib.getDev libpulseaudio) (lib.getDev libpulseaudio)
systemd systemd
ffmpeg_3 ffmpeg
] + ":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" [ ] + ":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" [
stdenv.cc.cc stdenv.cc.cc
]; ];

View File

@ -2,15 +2,15 @@
buildGoModule rec { buildGoModule rec {
pname = "istioctl"; pname = "istioctl";
version = "1.6.7"; version = "1.7.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "istio"; owner = "istio";
repo = "istio"; repo = "istio";
rev = version; rev = version;
sha256 = "0zqp78ilr39j4pyqyk8a0rc0dlmkgzdd2ksfjd7vyjns5mrrjfj7"; sha256 = "0541j1wdhlbm2spl1w3m0hig7lqn05xk1xws8748wfzbr8wkir31";
}; };
vendorSha256 = "0cc0lmjsxrn3f78k95wklf3yn5k7h8slwnwmssy1i1h0bkcg1bai"; vendorSha256 = "0sz92nspfclqxnx0mf80jxqqwxanqsx9nl9hg7f9izks7jw544vx";
doCheck = false; doCheck = false;

View File

@ -2,13 +2,13 @@
buildGoModule rec { buildGoModule rec {
pname = "k9s"; pname = "k9s";
version = "0.21.2"; version = "0.21.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "derailed"; owner = "derailed";
repo = "k9s"; repo = "k9s";
rev = "v${version}"; rev = "v${version}";
sha256 = "06yjc4lrqr3y7428xkfcgfg3aal71r437ij2hqd2yjxsq8r7zvif"; sha256 = "1rw1vzxfjzklzdpcxz7mplvlmggavaym260s7vzvbgvd1snf38cb";
}; };
buildFlagsArray = '' buildFlagsArray = ''
@ -18,7 +18,7 @@ buildGoModule rec {
-X github.com/derailed/k9s/cmd.commit=${src.rev} -X github.com/derailed/k9s/cmd.commit=${src.rev}
''; '';
vendorSha256 = "1hmqvcvlffd8cpqcnn2f9mnyiwdhw8k46sl2p6rk16yrj06la9mr"; vendorSha256 = "05rsbi40pihdh212d5zn6cchnkrqd6rsyl3vfsw77ksybwakrbf7";
doCheck = false; doCheck = false;

View File

@ -2,13 +2,13 @@
buildGoModule rec { buildGoModule rec {
pname = "node-problem-detector"; pname = "node-problem-detector";
version = "0.8.2"; version = "0.8.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kubernetes"; owner = "kubernetes";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "0cphlaf9k2va879jgqd6fzdgkscpwg29j1cpr677i3zj3hfgaw1g"; sha256 = "1sga5l8bvqgm0j71yj3l1ykqvchxa7cg8pkfvjsrqlikgrfb54f3";
}; };
vendorSha256 = null; vendorSha256 = null;

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, makeWrapper, jre }: { stdenv, fetchurl, makeWrapper, jre }:
let let
version = "2020.2.1.2"; version = "2020.2.3.1";
majorVersion = builtins.substring 0 6 version; majorVersion = builtins.substring 0 6 version;
in in
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "http://download.flexibee.eu/download/${majorVersion}/${version}/${pname}-${version}.tar.gz"; url = "http://download.flexibee.eu/download/${majorVersion}/${version}/${pname}-${version}.tar.gz";
sha256 = "1a382lwyscvl5gdax5vs0shzmbnhjgggrv0hcwid8kf2s98diw5n"; sha256 = "05wzg7f6mzz7r6azzb8k2g5fakkqh6762y4q9qkmrzbixvxh4lz9";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];

View File

@ -4,12 +4,12 @@ with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "marvin"; pname = "marvin";
version = "20.16.0"; version = "20.17.0";
src = fetchurl { src = fetchurl {
name = "marvin-${version}.deb"; name = "marvin-${version}.deb";
url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb"; url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb";
sha256 = "0wfg5zd8dvjy6x6al58jd5d53gar3ds326q3b6771h5p5jzv0x2g"; sha256 = "0ip6ma9ivk5b74s9najn2rrkiha7hya1rjhgyrc71kwsj5gqgli0";
}; };
nativeBuildInputs = [ dpkg makeWrapper ]; nativeBuildInputs = [ dpkg makeWrapper ];

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gerrit"; pname = "gerrit";
version = "3.2.2"; version = "3.2.3";
src = fetchurl { src = fetchurl {
url = "https://gerrit-releases.storage.googleapis.com/gerrit-${version}.war"; url = "https://gerrit-releases.storage.googleapis.com/gerrit-${version}.war";
sha256 = "08i6rb8hawj44gg57mbhwjjmfn7mc45racl8gjsyrcyb8jm6zj1s"; sha256 = "0hdxbn5qqqjzpqfcydz33nc351zanxp0j2k0ivizx4dn40fnavd7";
}; };
buildCommand = '' buildCommand = ''

View File

@ -0,0 +1,33 @@
{ appimageTools, stdenv, fetchurl }:
let
pname = "electronplayer";
version = "2.0.8";
name = "${pname}-${version}";
#TODO: remove the -rc4 from the tag in the url when possible
src = fetchurl {
url = "https://github.com/oscartbeaumont/ElectronPlayer/releases/download/v${version}-rc4/${name}.AppImage";
sha256 = "wAsmSFdbRPnYnDyWQSbtyj+GLJLN7ibksUE7cegfkhI=";
};
appimageContents = appimageTools.extractType2 { inherit name src; };
in appimageTools.wrapType2 {
inherit name src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=ElectronPlayer'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
meta = with stdenv.lib; {
description = "An electron based web video services player";
homepage = "https://github.com/oscartbeaumont/ElectronPlayer";
license = licenses.mit;
maintainers = with maintainers; [ extends ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -95,12 +95,33 @@ stdenv.mkDerivation rec {
cd .. cd ..
done done
''} ''}
${lib.optionalString (lib.versionAtLeast version "10.1") '' ${lib.optionalString (lib.versionAtLeast version "10.1" && lib.versionOlder version "11") ''
cd pkg/builds/cuda-toolkit cd pkg/builds/cuda-toolkit
mv * $out/ mv * $out/
''} ''}
${lib.optionalString (lib.versionAtLeast version "11") ''
mkdir -p $out/bin $out/lib64 $out/include $out/doc
for dir in pkg/builds/* pkg/builds/cuda_nvcc/nvvm pkg/builds/cuda_cupti/extras/CUPTI; do
if [ -d $dir/bin ]; then
mv $dir/bin/* $out/bin
fi
if [ -d $dir/doc ]; then
(cd $dir/doc && find . -type d -exec mkdir -p $out/doc/\{} \;)
(cd $dir/doc && find . \( -type f -o -type l \) -exec mv \{} $out/doc/\{} \;)
fi
if [ -L $dir/include ] || [ -d $dir/include ]; then
(cd $dir/include && find . -type d -exec mkdir -p $out/include/\{} \;)
(cd $dir/include && find . \( -type f -o -type l \) -exec mv \{} $out/include/\{} \;)
fi
if [ -L $dir/lib64 ] || [ -d $dir/lib64 ]; then
(cd $dir/lib64 && find . -type d -exec mkdir -p $out/lib64/\{} \;)
(cd $dir/lib64 && find . \( -type f -o -type l \) -exec mv \{} $out/lib64/\{} \;)
fi
done
mv pkg/builds/cuda_nvcc/nvvm $out/nvvm
''}
rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why? rm -f $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?
${lib.optionalString (lib.versionOlder version "10.1") '' ${lib.optionalString (lib.versionOlder version "10.1") ''
# let's remove the 32-bit libraries, they confuse the lib64->lib mover # let's remove the 32-bit libraries, they confuse the lib64->lib mover
@ -152,7 +173,7 @@ stdenv.mkDerivation rec {
''; '';
postInstall = '' postInstall = ''
for b in nvvp nsight; do for b in nvvp ${lib.optionalString (lib.versionOlder version "11") "nsight"}; do
wrapProgram "$out/bin/$b" \ wrapProgram "$out/bin/$b" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
done done

View File

@ -4,6 +4,7 @@
, gcc48 , gcc48
, gcc6 , gcc6
, gcc7 , gcc7
, gcc9
}: }:
let let
@ -136,4 +137,14 @@ in rec {
}; };
cudatoolkit_10 = cudatoolkit_10_2; cudatoolkit_10 = cudatoolkit_10_2;
cudatoolkit_11_0 = common {
version = "11.0.3";
url = "https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run";
sha256 = "1h4c69nfrgm09jzv8xjnjcvpq8n4gnlii17v3wzqry5d13jc8ydh";
gcc = gcc9;
};
cudatoolkit_11 = cudatoolkit_11_0;
} }

View File

@ -3,11 +3,11 @@
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "fasm-bin"; pname = "fasm-bin";
version = "1.73.24"; version = "1.73.25";
src = fetchurl { src = fetchurl {
url = "https://flatassembler.net/fasm-${version}.tgz"; url = "https://flatassembler.net/fasm-${version}.tgz";
sha256 = "142vxhs8mh8isvlzq7ir0asmqda410phzxmk9gk9b43dldskkj7k"; sha256 = "0k3h61mfwslyb34kf4dnapfwl8jxlmrp4dv666wc057hkj047knn";
}; };
installPhase = '' installPhase = ''

View File

@ -95,6 +95,9 @@ in stdenv.mkDerivation (rec {
ln -sv $PWD/lib $out ln -sv $PWD/lib $out
''; '';
# E.g. mesa.drivers use the build-id as a cache key (see #93946):
LDFLAGS = optionalString enableSharedLibraries "-Wl,--build-id=sha1";
cmakeFlags = with stdenv; [ cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc

View File

@ -96,7 +96,7 @@ in makePackage {
postFixup = '' postFixup = ''
# Remove references to bootstrap. # Remove references to bootstrap.
find "$out" -name \*.so | while read lib; do find "$out" -name \*.so | while read lib; do
new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${openjdk11_headless}[^:]*,,')" new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${lib.escape ["+"] openjdk11_headless.outPath}[^:]*,,')"
patchelf --set-rpath "$new_refs" "$lib" patchelf --set-rpath "$new_refs" "$lib"
done done
''; '';

View File

@ -4,13 +4,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "intel-gmmlib"; pname = "intel-gmmlib";
version = "20.2.3"; version = "20.2.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "intel"; owner = "intel";
repo = "gmmlib"; repo = "gmmlib";
rev = "${pname}-${version}"; rev = "${pname}-${version}";
sha256 = "1gsjcsad70pxafhw0jhxdrnfqwv8ffp5sawbgylvc009jlzxh5l8"; sha256 = "0jg3kc74iqmbclx77a6dp4h85va8wi210x4zf5jypiq35c57r8hh";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libmatroska"; pname = "libmatroska";
version = "1.6.1"; version = "1.6.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Matroska-Org"; owner = "Matroska-Org";
repo = "libmatroska"; repo = "libmatroska";
rev = "release-${version}"; rev = "release-${version}";
sha256 = "1ws07ldcm5gy8z8p627vknqcb8iw1hxdby24g0xi6hbfy66p6qxs"; sha256 = "0yhr9hhgljva1fx3b0r4s3wkkypdfgsysbl35a4g3krkbhaa9rsd";
}; };
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
version = "4.3"; version = "4.3";
src = let src = let
rev_version = stdenv.lib.replaceStrings ["-"] ["_"] version; rev_version = stdenv.lib.replaceStrings ["."] ["_"] version;
in fetchFromGitHub { in fetchFromGitHub {
owner = "adah1972"; owner = "adah1972";
repo = pname; repo = pname;

View File

@ -1,4 +1,4 @@
{ callPackage, cudatoolkit_7, cudatoolkit_7_5, cudatoolkit_8, cudatoolkit_9_0, cudatoolkit_9_1, cudatoolkit_9_2, cudatoolkit_10_0, cudatoolkit_10_1, cudatoolkit_10_2 }: { callPackage, cudatoolkit_7, cudatoolkit_7_5, cudatoolkit_8, cudatoolkit_9_0, cudatoolkit_9_1, cudatoolkit_9_2, cudatoolkit_10_0, cudatoolkit_10_1, cudatoolkit_10_2, cudatoolkit_11_0 }:
let let
generic = args: callPackage (import ./generic.nix (removeAttrs args ["cudatoolkit"])) { generic = args: callPackage (import ./generic.nix (removeAttrs args ["cudatoolkit"])) {
@ -80,4 +80,13 @@ in rec {
}; };
cudnn_cudatoolkit_10 = cudnn_cudatoolkit_10_1; cudnn_cudatoolkit_10 = cudnn_cudatoolkit_10_1;
cudnn_cudatoolkit_11_0 = generic rec {
version = "8.0.2";
cudatoolkit = cudatoolkit_11_0;
srcName = "cudnn-${cudatoolkit.majorVersion}-linux-x64-v8.0.2.39.tgz";
sha256 = "0ib3v3bgcdxarqapkxngw1nwl0c2a7zz392ns7w9ipcficl4cbv7";
};
cudnn_cudatoolkit_11 = cudnn_cudatoolkit_11_0;
} }

View File

@ -32,6 +32,13 @@ stdenv.mkDerivation {
mkdir -p $out mkdir -p $out
cp -a include $out/include cp -a include $out/include
cp -a lib64 $out/lib64 cp -a lib64 $out/lib64
${lib.optionalString (lib.versionAtLeast version "8") ''
# patchelf fails on libcudnn_cnn_infer due to it being too big.
# I'm hoping it's not needed for most programs.
# (https://github.com/NixOS/patchelf/issues/222)
rm -f $out/lib64/libcudnn_cnn_infer*
''}
''; '';
# Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found. # Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found.

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "nccl-${version}-cuda-${cudatoolkit.majorVersion}"; name = "nccl-${version}-cuda-${cudatoolkit.majorVersion}";
version = "2.4.8-1"; version = "2.7.8-1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "NVIDIA"; owner = "NVIDIA";
repo = "nccl"; repo = "nccl";
rev = "v${version}"; rev = "v${version}";
sha256 = "05m66y64rgsdyybvjybhy6clikwv438b1m484ikai78fb2b7mvyq"; sha256 = "0xxiwaw239dc9g015fka3k1nvm5zyl00dzgxnwzkang61dys9wln";
}; };
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];

View File

@ -122,6 +122,7 @@
, "mocha" , "mocha"
, "multi-file-swagger" , "multi-file-swagger"
, "neovim" , "neovim"
, "netlify-cli"
, "nijs" , "nijs"
, "node-gyp" , "node-gyp"
, "node-gyp-build" , "node-gyp-build"

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,20 @@
{ stdenv, fetchFromGitHub, ocaml, findlib }: { stdenv, fetchFromGitHub, which, ocaml, findlib }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02" if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "camlpdf is not available for OCaml ${ocaml.version}" then throw "camlpdf is not available for OCaml ${ocaml.version}"
else else
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.3"; version = "2.3.1";
name = "ocaml${ocaml.version}-camlpdf-${version}"; name = "ocaml${ocaml.version}-camlpdf-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "johnwhitington"; owner = "johnwhitington";
repo = "camlpdf"; repo = "camlpdf";
rev = "v${version}"; rev = "v${version}";
sha256 = "1z8h6bjzmlscr6h6kdvzj8kspifb4n9dg7zi54z1cv2qi03kr8dk"; sha256 = "1q69hhk63z836jbkv4wsng27w35w0qpz01c7ax0mqm8d8kmnr0v4";
}; };
buildInputs = [ ocaml findlib ]; buildInputs = [ which ocaml findlib ];
# Version number in META file is wrong # Version number in META file is wrong
patchPhase = '' patchPhase = ''
@ -26,7 +26,9 @@ stdenv.mkDerivation rec {
EOF EOF
''; '';
createFindlibDestdir = true; preInstall = ''
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "An OCaml library for reading, writing and modifying PDF files"; description = "An OCaml library for reading, writing and modifying PDF files";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, camlpdf, ncurses }: { stdenv, fetchFromGitHub, ocaml, findlib, camlpdf, ncurses }:
let version = "2.3"; in let version = "2.3.1"; in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "ocaml${ocaml.version}-cpdf-${version}"; name = "ocaml${ocaml.version}-cpdf-${version}";
@ -9,9 +9,13 @@ stdenv.mkDerivation {
owner = "johnwhitington"; owner = "johnwhitington";
repo = "cpdf-source"; repo = "cpdf-source";
rev = "v${version}"; rev = "v${version}";
sha256 = "0i976y1v0l7x7k2n8k6v0h4bw9zlxsv04y4fdxss6dzpsfz49w23"; sha256 = "1gwz0iy28f67kbqap2q10nf98dalwbi03vv5j893z2an7pb4w68z";
}; };
prePatch = ''
substituteInPlace META --replace 'version="1.7"' 'version="${version}"'
'';
buildInputs = [ ocaml findlib ncurses ]; buildInputs = [ ocaml findlib ncurses ];
propagatedBuildInputs = [ camlpdf ]; propagatedBuildInputs = [ camlpdf ];

View File

@ -4,11 +4,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "google-api-python-client"; pname = "google-api-python-client";
version = "1.10.0"; version = "1.10.1";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "01zzlr21rgl1skl7ayppp0qwn6s883i50xcvxs8jxzr4c5zz097s"; sha256 = "0v4yzrmrp1l3nlkw9ibllgblwy8y45anzfkkky2vghkl6w8411xa";
}; };
# No tests included in archive # No tests included in archive

View File

@ -0,0 +1,37 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, notebook
, nbdime
, git
, pytest
}:
buildPythonPackage rec {
pname = "jupyterlab_git";
version = "0.20.0";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "0qs3wrcils07xlz698xr7giqf9v63n2qb338mlh7wql93rmjg45i";
};
propagatedBuildInputs = [ notebook nbdime git ];
checkInputs = [ pytest ];
checkPhase = ''
pytest jupyterlab_git/ --ignore=jupyterlab_git/tests/test_handlers.py
'';
pythonImportsCheck = [ "jupyterlab_git" ];
meta = with lib; {
description = "Jupyter lab extension for version control with Git.";
license = with licenses; [ bsd3 ];
homepage = "https://github.com/jupyterlab/jupyterlab-git";
maintainers = with maintainers; [ chiroptical ];
};
}

View File

@ -0,0 +1,59 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, userpath
, argcomplete
, packaging
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pipx";
version = "0.15.5.0";
disabled = pythonOlder "3.6";
# no tests in the pypi tarball, so we directly fetch from github
src = fetchFromGitHub {
owner = "pipxproject";
repo = pname;
rev = version;
sha256 = "13z032i8r9f6d09hssvyjpxjacb4wgms5bh2i37da2ili9bh72m6";
};
propagatedBuildInputs = [ userpath argcomplete packaging ];
# avoid inconclusive venv assertion, see https://github.com/pipxproject/pipx/pull/477
# remove after PR is merged
postPatch = ''
substituteInPlace tests/helpers.py \
--replace 'assert getattr(sys, "base_prefix", sys.prefix) != sys.prefix, "Tests require venv"' ""
'';
checkInputs = [ pytestCheckHook ];
preCheck = ''
export HOME=$(mktemp -d)
'';
# disable tests, which require internet connection
disabledTests = [
"install"
"inject"
"ensure_null_pythonpath"
"missing_interpreter"
"cache"
"internet"
"runpip"
"upgrade"
];
meta = with lib; {
description =
"Install and Run Python Applications in Isolated Environments";
homepage = "https://github.com/pipxproject/pipx";
license = licenses.mit;
maintainers = with maintainers; [ yevhenshymotiuk ];
};
}

View File

@ -1,8 +1,10 @@
{ stdenv { stdenv
, buildPythonPackage , buildPythonPackage
, debugger
, fetchPypi , fetchPypi
, isPy3k , isPy3k
, Mako , Mako
, makeWrapper
, packaging , packaging
, pysocks , pysocks
, pygments , pygments
@ -58,10 +60,15 @@ buildPythonPackage rec {
doCheck = false; # no setuptools tests for the package doCheck = false; # no setuptools tests for the package
postFixup = ''
mkdir -p "$out/bin"
makeWrapper "${debugger}/bin/${stdenv.lib.strings.getName debugger}" "$out/bin/pwntools-gdb"
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "http://pwntools.com"; homepage = "http://pwntools.com";
description = "CTF framework and exploit development library"; description = "CTF framework and exploit development library";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ bennofs kristoff3r ]; maintainers = with maintainers; [ bennofs kristoff3r pamplemousse ];
}; };
} }

View File

@ -10,13 +10,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "radare2-cutter"; pname = "radare2-cutter";
version = "1.11.0"; version = "1.11.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "radareorg"; owner = "radareorg";
repo = "cutter"; repo = "cutter";
rev = "v${version}"; rev = "v${version}";
sha256 = "1xvdap7hpkjz6rg0ngnql1p18p93b8w9gv130g818nwcjsh9i2y5"; sha256 = "0kscl0yf5qxacqnz3pp47r94yiwnc4rwirnr2x580z10fwhsivki";
}; };
postUnpack = "export sourceRoot=$sourceRoot/src"; postUnpack = "export sourceRoot=$sourceRoot/src";

View File

@ -10,12 +10,15 @@
buildPythonApplication rec { buildPythonApplication rec {
pname = "cmake-format"; pname = "cmake-format";
version = "0.6.11"; version = "0.6.13";
# The source distribution does not build because of missing files.
format = "wheel";
src = fetchPypi { src = fetchPypi {
inherit version; inherit version format;
pname = "cmake_format"; python = "py3";
sha256 = "1wvmv8242xjkxgr266dkn4vrn5wm94fwn333pn7sxm5warhhwgda"; pname = "cmakelang";
sha256 = "0kmggnfbv6bba75l3zfzqwk0swi90brjka307m2kcz2w35kr8jvn";
}; };
propagatedBuildInputs = [ autopep8 flake8 jinja2 pylint pyyaml ]; propagatedBuildInputs = [ autopep8 flake8 jinja2 pylint pyyaml ];

View File

@ -0,0 +1,37 @@
{ lib
, buildPythonPackage
, fetchPypi
, git
, ruamel_yaml
, jsonschema
, rfc3987
, setuptools
, setuptools_scm
}:
buildPythonPackage rec {
pname = "dtschema";
version = "2020.6";
src = fetchPypi {
inherit pname version;
sha256 = "1zdm0zbn1dfk02yqghfvd0nb26hmzivb6mln6bvxjfdcv6n7pdqf";
};
nativeBuildInputs = [ setuptools_scm git ];
propagatedBuildInputs = [
setuptools
ruamel_yaml
jsonschema
rfc3987
];
meta = with lib; {
description = "Tooling for devicetree validation using YAML and jsonschema";
homepage = "https://github.com/devicetree-org/dt-schema/";
# all files have SPDX tags
license = with licenses; [ bsd2 gpl2 ];
maintainers = with maintainers; [ sorki ];
};
}

View File

@ -0,0 +1,27 @@
{ stdenv, fetchFromGitHub, cmake, asciidoc, libxslt, docbook_xsl }:
stdenv.mkDerivation rec {
pname = "kpack";
version = "1.1.0";
src = fetchFromGitHub {
owner = "KnightOS";
repo = "kpack";
rev = version;
sha256 = "0kakfbzdvq5ldv1gdzl473j73c9nfdyx4xzfkriglkrqmksqc329";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ asciidoc libxslt.bin docbook_xsl ];
hardeningDisable = [ "fortify" ];
meta = with stdenv.lib; {
homepage = "https://knightos.org/";
description = "A tool to create or extract KnightOS packages";
license = licenses.lgpl2Only;
maintainers = with maintainers; [ siraben ];
};
}

View File

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub, nix, makeWrapper }: { lib, buildGoModule, fetchFromGitHub, makeWrapper }:
buildGoModule rec { buildGoModule rec {
pname = "nix-build-uncached"; pname = "nix-build-uncached";
@ -17,11 +17,6 @@ buildGoModule rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/nix-build-uncached \
--prefix PATH ":" ${lib.makeBinPath [ nix ]}
'';
meta = with lib; { meta = with lib; {
description = "A CI friendly wrapper around nix-build"; description = "A CI friendly wrapper around nix-build";
license = licenses.mit; license = licenses.mit;

View File

@ -24,7 +24,7 @@ in
lib.makeScope pkgs.newScope (self: { lib.makeScope pkgs.newScope (self: {
# Poetry2nix version # Poetry2nix version
version = "1.11.0"; version = "1.12.0";
/* /*
Returns an attrset { python, poetryPackages, pyProject, poetryLock } for the given pyproject/lockfile. Returns an attrset { python, poetryPackages, pyProject, poetryLock } for the given pyproject/lockfile.
@ -114,7 +114,7 @@ lib.makeScope pkgs.newScope (self: {
__toPluginAble = toPluginAble self; __toPluginAble = toPluginAble self;
inherit (hooks) pipBuildHook removePathDependenciesHook poetry2nixFixupHook; inherit (hooks) pipBuildHook removePathDependenciesHook poetry2nixFixupHook wheelUnpackHook;
} }
) )
# Null out any filtered packages, we don't want python.pkgs from nixpkgs # Null out any filtered packages, we don't want python.pkgs from nixpkgs
@ -159,13 +159,28 @@ lib.makeScope pkgs.newScope (self: {
} }
); );
inherit (py) pyProject;
# Add executables from tool.poetry.scripts
scripts = pyProject.tool.poetry.scripts or { };
hasScripts = scripts != { };
scriptsPackage = import ./shell-scripts.nix {
inherit scripts lib;
inherit (py) python;
};
hasEditable = editablePackageSources != { };
editablePackage = import ./editable.nix { editablePackage = import ./editable.nix {
inherit pkgs lib poetryLib editablePackageSources; inherit pkgs lib poetryLib editablePackageSources;
inherit (py) pyProject python; inherit (py) pyProject python;
}; };
in in
py.python.withPackages (_: py.poetryPackages ++ lib.optional (editablePackageSources != { }) editablePackage); py.python.withPackages (
_: py.poetryPackages
++ lib.optional hasEditable editablePackage
++ lib.optional hasScripts scriptsPackage
);
/* Creates a Python application from pyproject.toml and poetry.lock /* Creates a Python application from pyproject.toml and poetry.lock

View File

@ -49,4 +49,16 @@ in
} ./fixup-hook.sh } ./fixup-hook.sh
) { }; ) { };
# When the "wheel" package itself is a wheel the nixpkgs hook (which pulls in "wheel") leads to infinite recursion
# It doesn't _really_ depend on wheel though, it just copies the wheel.
wheelUnpackHook = callPackage
({}:
makeSetupHook
{
name = "wheel-unpack-hook.sh";
deps = [ ];
} ./wheel-unpack-hook.sh
) { };
} }

View File

@ -0,0 +1,18 @@
# Setup hook to use in case a wheel is fetched
echo "Sourcing wheel setup hook"
wheelUnpackPhase(){
echo "Executing wheelUnpackPhase"
runHook preUnpack
mkdir -p dist
cp "$src" "dist/$(stripHash "$src")"
# runHook postUnpack # Calls find...?
echo "Finished executing wheelUnpackPhase"
}
if [ -z "${dontUseWheelUnpack-}" ] && [ -z "${unpackPhase-}" ]; then
echo "Using wheelUnpackPhase"
unpackPhase=wheelUnpackPhase
fi

View File

@ -47,10 +47,16 @@ pythonPackages.callPackage
isGit = isSource && source.type == "git"; isGit = isSource && source.type == "git";
isLocal = isSource && source.type == "directory"; isLocal = isSource && source.type == "directory";
localDepPath = toPath source.url; localDepPath = toPath source.url;
pyProject = poetryLib.readTOML (localDepPath + "/pyproject.toml");
buildSystemPkgs = poetryLib.getBuildSystemPkgs { buildSystemPkgs =
let
pyProjectPath = localDepPath + "/pyproject.toml";
pyProject = poetryLib.readTOML pyProjectPath;
in
if builtins.pathExists pyProjectPath then poetryLib.getBuildSystemPkgs {
inherit pythonPackages pyProject; inherit pythonPackages pyProject;
}; } else [ ];
fileInfo = fileInfo =
let let
isBdist = f: lib.strings.hasSuffix "whl" f.file; isBdist = f: lib.strings.hasSuffix "whl" f.file;

View File

@ -12,6 +12,40 @@ self: super:
} }
); );
ansible = super.ansible.overridePythonAttrs (
old: {
prePatch = pkgs.python.pkgs.ansible.prePatch or "";
postInstall = pkgs.python.pkgs.ansible.postInstall or "";
# Inputs copied from nixpkgs as ansible doesn't specify it's dependencies
# in a correct manner.
propagatedBuildInputs = old.propagatedBuildInputs ++ [
self.pycrypto
self.paramiko
self.jinja2
self.pyyaml
self.httplib2
self.six
self.netaddr
self.dnspython
self.jmespath
self.dopy
self.ncclient
];
}
);
ansible-lint = super.ansible-lint.overridePythonAttrs (
old: {
buildInputs = old.buildInputs ++ [ self.setuptools-scm-git-archive ];
preBuild = ''
export HOME=$(mktemp -d)
'';
}
);
astroid = super.astroid.overridePythonAttrs ( astroid = super.astroid.overridePythonAttrs (
old: rec { old: rec {
buildInputs = old.buildInputs ++ [ self.pytest-runner ]; buildInputs = old.buildInputs ++ [ self.pytest-runner ];
@ -135,6 +169,15 @@ self: super:
} }
); );
h3 = super.h3.overridePythonAttrs (
old: {
preBuild = (old.preBuild or "") + ''
substituteInPlace h3/h3.py \
--replace "'{}/{}'.format(_dirname, libh3_path)" '"${pkgs.h3}/lib/libh3${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}"'
'';
}
);
h5py = super.h5py.overridePythonAttrs ( h5py = super.h5py.overridePythonAttrs (
old: old:
if old.format != "wheel" then rec { if old.format != "wheel" then rec {
@ -324,6 +367,13 @@ self: super:
pkgs.pkgconfig pkgs.pkgconfig
]; ];
postPatch = ''
cat > setup.cfg <<EOF
[libs]
system_freetype = True
EOF
'';
propagatedBuildInputs = old.propagatedBuildInputs ++ [ propagatedBuildInputs = old.propagatedBuildInputs ++ [
pkgs.libpng pkgs.libpng
pkgs.freetype pkgs.freetype
@ -357,6 +407,23 @@ self: super:
} }
); );
molecule =
if lib.versionOlder super.molecule.version "3.0.0" then (super.molecule.overridePythonAttrs (
old: {
patches = (old.patches or [ ]) ++ [
# Fix build with more recent setuptools versions
(pkgs.fetchpatch {
url = "https://github.com/ansible-community/molecule/commit/c9fee498646a702c77b5aecf6497cff324acd056.patch";
sha256 = "1g1n45izdz0a3c9akgxx14zhdw6c3dkb48j8pq64n82fa6ndl1b7";
excludes = [ "pyproject.toml" ];
})
];
buildInputs = old.buildInputs ++ [ self.setuptools-scm-git-archive ];
}
)) else super.molecule.overridePythonAttrs (old: {
buildInputs = old.buildInputs ++ [ self.setuptools-scm-git-archive ];
});
netcdf4 = super.netcdf4.overridePythonAttrs ( netcdf4 = super.netcdf4.overridePythonAttrs (
old: { old: {
buildInputs = old.buildInputs ++ [ buildInputs = old.buildInputs ++ [
@ -451,12 +518,16 @@ self: super:
psycopg2 = super.psycopg2.overridePythonAttrs ( psycopg2 = super.psycopg2.overridePythonAttrs (
old: { old: {
buildInputs = old.buildInputs
++ lib.optional stdenv.isDarwin pkgs.openssl;
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.postgresql ]; nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.postgresql ];
} }
); );
psycopg2-binary = super.psycopg2-binary.overridePythonAttrs ( psycopg2-binary = super.psycopg2-binary.overridePythonAttrs (
old: { old: {
buildInputs = old.buildInputs
++ lib.optional stdenv.isDarwin pkgs.openssl;
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.postgresql ]; nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.postgresql ];
} }
); );
@ -753,6 +824,12 @@ self: super:
} }
); );
ffmpeg-python = super.ffmpeg-python.overridePythonAttrs (
old: {
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
}
);
python-prctl = super.python-prctl.overridePythonAttrs ( python-prctl = super.python-prctl.overridePythonAttrs (
old: { old: {
buildInputs = old.buildInputs ++ [ buildInputs = old.buildInputs ++ [
@ -882,6 +959,9 @@ self: super:
} }
); );
# nix uses a dash, poetry uses an underscore
typing_extensions = super.typing_extensions or self.typing-extensions;
urwidtrees = super.urwidtrees.overridePythonAttrs ( urwidtrees = super.urwidtrees.overridePythonAttrs (
old: { old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ [ propagatedBuildInputs = old.propagatedBuildInputs ++ [
@ -898,6 +978,16 @@ self: super:
} }
); );
vispy = super.vispy.overrideAttrs (
old: {
inherit (pkgs.python3.pkgs.vispy) patches;
nativeBuildInputs = old.nativeBuildInputs ++ [
self.cython
self.setuptools-scm-git-archive
];
}
);
uvloop = super.uvloop.overridePythonAttrs ( uvloop = super.uvloop.overridePythonAttrs (
old: { old: {
buildInputs = old.buildInputs ++ lib.optionals stdenv.isDarwin [ buildInputs = old.buildInputs ++ lib.optionals stdenv.isDarwin [
@ -907,17 +997,34 @@ self: super:
} }
); );
# Stop infinite recursion by using bootstrapped pkg from nixpkgs # Stop infinite recursion by using bootstrapped pkg from nixpkgs
wheel = ( bootstrapped-pip = super.bootstrapped-pip.override {
wheel = (pkgs.python3.pkgs.override {
python = self.python;
}).wheel;
};
wheel =
let
isWheel = super.wheel.src.isWheel or false;
# If "wheel" is a pre-built binary wheel
wheelPackage = super.buildPythonPackage {
inherit (super.wheel) pname name version src;
inherit (pkgs.python3.pkgs.wheel) meta;
format = "wheel";
};
# If "wheel" is built from source
sourcePackage = (
pkgs.python3.pkgs.override { pkgs.python3.pkgs.override {
python = self.python; python = self.python;
} }
).wheel.overridePythonAttrs ( ).wheel.overridePythonAttrs (
old: old: {
if old.format == "other" then old else {
inherit (super.wheel) pname name version src; inherit (super.wheel) pname name version src;
} }
); );
in
if isWheel then wheelPackage else sourcePackage;
zipp = zipp =
( (

View File

@ -62,7 +62,7 @@ let
selectWheel = files: selectWheel = files:
let let
filesWithoutSources = (builtins.filter (x: hasSuffix ".whl" x.file) files); filesWithoutSources = (builtins.filter (x: hasSuffix ".whl" x.file) files);
isPyAbiCompatible = pyabi: x: x == "none" || lib.hasPrefix pyabi x || ( isPyAbiCompatible = pyabi: x: x == "none" || lib.hasPrefix pyabi x || lib.hasPrefix x pyabi || (
# The CPython stable ABI is abi3 as in the shared library suffix. # The CPython stable ABI is abi3 as in the shared library suffix.
python.passthru.implementation == "cpython" && python.passthru.implementation == "cpython" &&
builtins.elemAt (lib.splitString "." python.version) 0 == "3" && builtins.elemAt (lib.splitString "." python.version) 0 == "3" &&

View File

@ -0,0 +1,41 @@
{ lib
, scripts
, python
}:
let
mkScript = bin: entrypoint:
let
elem = builtins.elemAt (builtins.split ":" entrypoint);
module = elem 0;
fn = elem 2;
in
''
cat << EOF >> $out/bin/${bin}
#!${python.interpreter}
import sys
import re
# Insert "" to add CWD to import path
sys.path.insert(0, "")
from ${module} import ${fn}
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', "", sys.argv[0])
sys.exit(${fn}())
EOF
chmod +x $out/bin/${bin}
'';
in
python.pkgs.buildPythonPackage {
name = "poetry2nix-env-scripts";
dontUnpack = true;
dontUseSetuptoolsBuild = true;
dontConfigure = true;
dontUseSetuptoolsCheck = true;
installPhase = ''
mkdir -p $out/bin
${lib.concatStringsSep "\n" (lib.mapAttrsToList mkScript scripts)}
'';
}

View File

@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Free touch typing tutor program"; description = "Free touch typing tutor program";
homepage = "http://klavaro.sourceforge.net/"; homepage = "http://klavaro.sourceforge.net/";
changelog = "https://sourceforge.net/p/klavaro/code/HEAD/tree/trunk/ChangeLog";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ mimame davidak ]; maintainers = with maintainers; [ mimame davidak ];

View File

@ -65,12 +65,12 @@ let
ale = buildVimPluginFrom2Nix { ale = buildVimPluginFrom2Nix {
pname = "ale"; pname = "ale";
version = "2020-08-20"; version = "2020-08-24";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "dense-analysis"; owner = "dense-analysis";
repo = "ale"; repo = "ale";
rev = "2b785688ead505dcbc1007374d3dca9914aa247a"; rev = "3e2abe3f25493af63af91a6013447e378e09f6ec";
sha256 = "1n91vm354fd45vvg4skvx7s9mpjpsk1l61n2x5ylqr8dlm7vgjkw"; sha256 = "1lxcwvjxrr2wdz5rzai2wd96zxhxmf81jyd62pcqhr5l9jil9ry7";
}; };
meta.homepage = "https://github.com/dense-analysis/ale/"; meta.homepage = "https://github.com/dense-analysis/ale/";
}; };
@ -401,12 +401,12 @@ let
coc-eslint = buildVimPluginFrom2Nix { coc-eslint = buildVimPluginFrom2Nix {
pname = "coc-eslint"; pname = "coc-eslint";
version = "2020-05-21"; version = "2020-08-22";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "neoclide"; owner = "neoclide";
repo = "coc-eslint"; repo = "coc-eslint";
rev = "eed42192dab175bbf249e21c18c85cbd5afdd92a"; rev = "ba4d02c324e3eb5d5f111fe510f623ef14ee340c";
sha256 = "1a9csiyj7abksar917acfjgypmc28rcfsqga0p1550mjxvkjr2ia"; sha256 = "1badkyfa8zznwlb9a6kqxnyylcjb72rfjrzb48pvx2dr7s631x8g";
}; };
meta.homepage = "https://github.com/neoclide/coc-eslint/"; meta.homepage = "https://github.com/neoclide/coc-eslint/";
}; };
@ -425,12 +425,12 @@ let
coc-fzf = buildVimPluginFrom2Nix { coc-fzf = buildVimPluginFrom2Nix {
pname = "coc-fzf"; pname = "coc-fzf";
version = "2020-08-20"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "antoinemadec"; owner = "antoinemadec";
repo = "coc-fzf"; repo = "coc-fzf";
rev = "341ea7db0ab85a2ecb3a067ca721c1327fcd7013"; rev = "606b437c4b6de1910c325eb631ee6b0f9bff8dd6";
sha256 = "0gqs6xdnmg33xraxqv10jl7dhaca19dlidmc86zdki2hg1bckr9b"; sha256 = "0a3vrimi87i6y6nc79smh2jiya2ciafxj0aifn6xhqnklj46isdh";
}; };
meta.homepage = "https://github.com/antoinemadec/coc-fzf/"; meta.homepage = "https://github.com/antoinemadec/coc-fzf/";
}; };
@ -449,12 +449,12 @@ let
coc-go = buildVimPluginFrom2Nix { coc-go = buildVimPluginFrom2Nix {
pname = "coc-go"; pname = "coc-go";
version = "2020-08-12"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "josa42"; owner = "josa42";
repo = "coc-go"; repo = "coc-go";
rev = "b068394634189ede2fb96b742cadcaa852bf46b0"; rev = "fbac3db20cc5e728b6f1c86bbb73414254c3dce3";
sha256 = "099dgk3kc814hgnpd0jhc6sz3d7512i86i99n6hq6yswsg7n1d51"; sha256 = "1d9izf0ypnpbwg15kz3fd62gzz6c5h5568ydc7h5hxh4zj5qfg5h";
}; };
meta.homepage = "https://github.com/josa42/coc-go/"; meta.homepage = "https://github.com/josa42/coc-go/";
}; };
@ -557,12 +557,12 @@ let
coc-metals = buildVimPluginFrom2Nix { coc-metals = buildVimPluginFrom2Nix {
pname = "coc-metals"; pname = "coc-metals";
version = "2020-08-19"; version = "2020-08-21";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ckipp01"; owner = "ckipp01";
repo = "coc-metals"; repo = "coc-metals";
rev = "14c820dad44b057e2b8343f7d8896529cd973ee6"; rev = "e2f5e3c2bc6a8226cea5a607585f6db554e15846";
sha256 = "0569by8x73dpb3hapbx73x9fg2wzzb965mkkifqgdq4wdg6wizkx"; sha256 = "0kp8q5ds9b64acmkc006664460lfcahly65bx5x95rvy0wy8z5b1";
}; };
meta.homepage = "https://github.com/ckipp01/coc-metals/"; meta.homepage = "https://github.com/ckipp01/coc-metals/";
}; };
@ -641,12 +641,12 @@ let
coc-rust-analyzer = buildVimPluginFrom2Nix { coc-rust-analyzer = buildVimPluginFrom2Nix {
pname = "coc-rust-analyzer"; pname = "coc-rust-analyzer";
version = "2020-08-20"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "fannheyward"; owner = "fannheyward";
repo = "coc-rust-analyzer"; repo = "coc-rust-analyzer";
rev = "ac57b7b3cdaee3cfb56b76a8fc13444337f09276"; rev = "fff876cee397d0d696cba74907e33aadfba4d601";
sha256 = "0n26d63qifhnsrpwq8x587mh9y83rmayc2car222hjqbrg705r28"; sha256 = "0318a19qbp3rpcgqwqshzhrpcbsqcskl993yjxmgmpjxh4r85kh2";
}; };
meta.homepage = "https://github.com/fannheyward/coc-rust-analyzer/"; meta.homepage = "https://github.com/fannheyward/coc-rust-analyzer/";
}; };
@ -749,24 +749,24 @@ let
coc-tsserver = buildVimPluginFrom2Nix { coc-tsserver = buildVimPluginFrom2Nix {
pname = "coc-tsserver"; pname = "coc-tsserver";
version = "2020-08-20"; version = "2020-08-21";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "neoclide"; owner = "neoclide";
repo = "coc-tsserver"; repo = "coc-tsserver";
rev = "e4f3ab555b35a0057d22dcc8bb7b7af7e43546d6"; rev = "516f2bd75afee70bb8668aa2ecbc00ebfd5984a0";
sha256 = "0i1fpvbl228jhh50fbz8cppv2v20zy0zywb1qgh9hsmw6pfgjg1w"; sha256 = "1qdgm9w9d9n0aq5y77zlhxzjdilxky7n4ipl6y6gr2pirxw5idw5";
}; };
meta.homepage = "https://github.com/neoclide/coc-tsserver/"; meta.homepage = "https://github.com/neoclide/coc-tsserver/";
}; };
coc-vetur = buildVimPluginFrom2Nix { coc-vetur = buildVimPluginFrom2Nix {
pname = "coc-vetur"; pname = "coc-vetur";
version = "2020-06-28"; version = "2020-08-22";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "neoclide"; owner = "neoclide";
repo = "coc-vetur"; repo = "coc-vetur";
rev = "37c70071a93aeacf23ac651cd6e9f7ed11582033"; rev = "217251dd0fe87d951e630e8fa9d4cde84da0ec91";
sha256 = "037p3zkavfyh75wclibd2iwd1ds8kzi72q8zy7rwdchwxw57xwhj"; sha256 = "13ni7j70pcz9w856hrgnbm0jsv7a22f1r42wnvif5lvhrcfw3y9d";
}; };
meta.homepage = "https://github.com/neoclide/coc-vetur/"; meta.homepage = "https://github.com/neoclide/coc-vetur/";
}; };
@ -833,12 +833,12 @@ let
coc-nvim = buildVimPluginFrom2Nix { coc-nvim = buildVimPluginFrom2Nix {
pname = "coc-nvim"; pname = "coc-nvim";
version = "2020-08-08"; version = "2020-08-26";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "neoclide"; owner = "neoclide";
repo = "coc.nvim"; repo = "coc.nvim";
rev = "806ce47583d66d0b574a3c993526033971e700cf"; rev = "52c18cefd06879924a8469fc493af58fb3e7f1f4";
sha256 = "1v29l7jrp1n141q8lywas5jflbjid6rryym732ga41yjqkrmlvip"; sha256 = "1ddcmfy6mgmmqmj7a5v1dhz5z43wz2wfyzaxbg6hchb3j0h8dmc5";
}; };
meta.homepage = "https://github.com/neoclide/coc.nvim/"; meta.homepage = "https://github.com/neoclide/coc.nvim/";
}; };
@ -882,12 +882,12 @@ let
committia-vim = buildVimPluginFrom2Nix { committia-vim = buildVimPluginFrom2Nix {
pname = "committia-vim"; pname = "committia-vim";
version = "2020-05-14"; version = "2020-08-26";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "rhysd"; owner = "rhysd";
repo = "committia.vim"; repo = "committia.vim";
rev = "2cded48477a5e308c77a0d289cc9b540669b701f"; rev = "6c8e22b24283a4cc3f05339520e990af8e803915";
sha256 = "1g6ykdh7d16q6nvpvmxx4ss8w7cisx5r8qmbrrvhpwmbb3894pxp"; sha256 = "05rjwn6fjwxd07c5imddkmxxpl8gq09iys385drrsvsqdx9f93vw";
}; };
meta.homepage = "https://github.com/rhysd/committia.vim/"; meta.homepage = "https://github.com/rhysd/committia.vim/";
}; };
@ -1280,12 +1280,12 @@ let
deoplete-lsp = buildVimPluginFrom2Nix { deoplete-lsp = buildVimPluginFrom2Nix {
pname = "deoplete-lsp"; pname = "deoplete-lsp";
version = "2020-07-13"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Shougo"; owner = "Shougo";
repo = "deoplete-lsp"; repo = "deoplete-lsp";
rev = "ae0b7d023a33f0692652a21f532051e8718e1800"; rev = "4fd2507dd295d9c114febabb0c9cf31da87df008";
sha256 = "00008andpp08l6fm8qadp8ycm59s8gx2m1vskmzg3lw905fk0gra"; sha256 = "1alwf8gjvgj5q3sbrqxrm0f2nbf6drk6dxqipk9pmvbj50iadyf1";
}; };
meta.homepage = "https://github.com/Shougo/deoplete-lsp/"; meta.homepage = "https://github.com/Shougo/deoplete-lsp/";
}; };
@ -1350,6 +1350,18 @@ let
meta.homepage = "https://github.com/carlitux/deoplete-ternjs/"; meta.homepage = "https://github.com/carlitux/deoplete-ternjs/";
}; };
deoplete-vim-lsp = buildVimPluginFrom2Nix {
pname = "deoplete-vim-lsp";
version = "2020-07-24";
src = fetchFromGitHub {
owner = "lighttiger2505";
repo = "deoplete-vim-lsp";
rev = "2ea06074dc07c67ccffc24b976b92e17e9d795d1";
sha256 = "03rpw1z5fgglba7vymi3ln810nh5x3x9hjqlm41shdik9pgmg867";
};
meta.homepage = "https://github.com/lighttiger2505/deoplete-vim-lsp/";
};
deoplete-zsh = buildVimPluginFrom2Nix { deoplete-zsh = buildVimPluginFrom2Nix {
pname = "deoplete-zsh"; pname = "deoplete-zsh";
version = "2019-11-10"; version = "2019-11-10";
@ -1364,12 +1376,12 @@ let
deoplete-nvim = buildVimPluginFrom2Nix { deoplete-nvim = buildVimPluginFrom2Nix {
pname = "deoplete-nvim"; pname = "deoplete-nvim";
version = "2020-08-10"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Shougo"; owner = "Shougo";
repo = "deoplete.nvim"; repo = "deoplete.nvim";
rev = "ba3913cc52b457877836f7423b0929b770dda42b"; rev = "7ab4c1bde7f9bd8824219594b07e4c1aa0814d4e";
sha256 = "16hn83ns278x9p280b0gpk4b4vhg50004bpnff7d3inf3x6pli4j"; sha256 = "13p59bxad46pxcihsns2vybjv8m6vhka9vbjvsvn6nwgck4rs1w3";
}; };
meta.homepage = "https://github.com/Shougo/deoplete.nvim/"; meta.homepage = "https://github.com/Shougo/deoplete.nvim/";
}; };
@ -2592,12 +2604,12 @@ let
neoformat = buildVimPluginFrom2Nix { neoformat = buildVimPluginFrom2Nix {
pname = "neoformat"; pname = "neoformat";
version = "2020-08-16"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sbdchd"; owner = "sbdchd";
repo = "neoformat"; repo = "neoformat";
rev = "56a9d6259981d0d9c2b33a4d65ccbb674af70baa"; rev = "491d83c50c9b17c896850bbd7ec00f2019e2f110";
sha256 = "0kn35l7kfqa0zvh1l8mdl3755hv1rx6xp5wjib9acsbk2czhg5nx"; sha256 = "0mj20dyf2hj9wr1df6rv7yn3mcb8z20bivclm8ircni2gi64bdb9";
}; };
meta.homepage = "https://github.com/sbdchd/neoformat/"; meta.homepage = "https://github.com/sbdchd/neoformat/";
}; };
@ -2832,12 +2844,12 @@ let
nvim-gdb = buildVimPluginFrom2Nix { nvim-gdb = buildVimPluginFrom2Nix {
pname = "nvim-gdb"; pname = "nvim-gdb";
version = "2020-08-16"; version = "2020-08-22";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sakhnik"; owner = "sakhnik";
repo = "nvim-gdb"; repo = "nvim-gdb";
rev = "47b0828287b410b56ff1a31906c4d5709d143d4a"; rev = "004dc3cfa93fb56baeaed55291cf356dd1b18f9b";
sha256 = "0kl2d58plpnlz2w9haadmbpmkb04bjwgfrs1scwi04mcc8dfpbmn"; sha256 = "0x4r0s9rm2zk8rrvw2m1rfmagmy68d88bmxiqps2c3fb9zd1c7ny";
}; };
meta.homepage = "https://github.com/sakhnik/nvim-gdb/"; meta.homepage = "https://github.com/sakhnik/nvim-gdb/";
}; };
@ -2880,12 +2892,12 @@ let
nvim-treesitter = buildVimPluginFrom2Nix { nvim-treesitter = buildVimPluginFrom2Nix {
pname = "nvim-treesitter"; pname = "nvim-treesitter";
version = "2020-08-20"; version = "2020-08-26";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nvim-treesitter"; owner = "nvim-treesitter";
repo = "nvim-treesitter"; repo = "nvim-treesitter";
rev = "5c0ca925af3332769f04c122ecb5bb9a5ca36dd0"; rev = "e8fa0d0b31954314528bb88de3b8357af75d21fd";
sha256 = "0fmciqdmg5fy1jx2wind0vyykfdvdbls0lyrn85xi4c7d8yg74h2"; sha256 = "0rczmzzcc82499bbbvz4bfpv8llkzz21hx7i2pz3471c2c97s3hn";
}; };
meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter/"; meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter/";
}; };
@ -3577,12 +3589,12 @@ let
syntastic = buildVimPluginFrom2Nix { syntastic = buildVimPluginFrom2Nix {
pname = "syntastic"; pname = "syntastic";
version = "2020-08-14"; version = "2020-08-24";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vim-syntastic"; owner = "vim-syntastic";
repo = "syntastic"; repo = "syntastic";
rev = "25b816d9b0016eff68e7025fe52fb67ef253920e"; rev = "9041bc76b4084dda00933744c0dce4bdf43d15c7";
sha256 = "1hb9f1p7sqpb7kc0rih9kaixwg4s9a6z86ycnc6kxp1iz97d6ai1"; sha256 = "076z5cs7gjl4hl92fzplabl0wq87hxzsgvmdna6vrzkh7ki2m3cb";
}; };
meta.homepage = "https://github.com/vim-syntastic/syntastic/"; meta.homepage = "https://github.com/vim-syntastic/syntastic/";
}; };
@ -3625,12 +3637,12 @@ let
tagbar = buildVimPluginFrom2Nix { tagbar = buildVimPluginFrom2Nix {
pname = "tagbar"; pname = "tagbar";
version = "2020-08-17"; version = "2020-08-26";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "majutsushi"; owner = "majutsushi";
repo = "tagbar"; repo = "tagbar";
rev = "a81c01c29406df6aa59be221a17953c18ed57ccc"; rev = "40413d8760146471757c69f08be68b24431f9474";
sha256 = "1amqxazfjnljylkj5jz3in927mkkhbvchs9pb5cnijfbvrf3dh5s"; sha256 = "1194kp8qzpjvv64lplb49n64ksyv5dbn25sng448b2fgd6wqk9ji";
}; };
meta.homepage = "https://github.com/majutsushi/tagbar/"; meta.homepage = "https://github.com/majutsushi/tagbar/";
}; };
@ -3661,12 +3673,12 @@ let
tcomment_vim = buildVimPluginFrom2Nix { tcomment_vim = buildVimPluginFrom2Nix {
pname = "tcomment_vim"; pname = "tcomment_vim";
version = "2020-06-18"; version = "2020-08-23";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "tomtom"; owner = "tomtom";
repo = "tcomment_vim"; repo = "tcomment_vim";
rev = "920d465b56bcf96c976fa22e9558d51aa55dcd9c"; rev = "25bdb50a6c5934d4ac9313cef0d7d2168d84803b";
sha256 = "0n7gwdyzim4f92mxnjz4zwfiyapyjhbf21b1l3dq9b07x9m40365"; sha256 = "04dmdydrc4v055qkjn5gfvibyzd30fg00abnk8ijvabfcmhvlh40";
}; };
meta.homepage = "https://github.com/tomtom/tcomment_vim/"; meta.homepage = "https://github.com/tomtom/tcomment_vim/";
}; };
@ -4142,24 +4154,24 @@ let
vim-airline = buildVimPluginFrom2Nix { vim-airline = buildVimPluginFrom2Nix {
pname = "vim-airline"; pname = "vim-airline";
version = "2020-08-20"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vim-airline"; owner = "vim-airline";
repo = "vim-airline"; repo = "vim-airline";
rev = "ef4666bd86ea1d6ac06a709cde0cde3df537c9e3"; rev = "5d3cfa40453fd8216be6ca68e9bd3846eed05176";
sha256 = "0rql6vbfr78pnjpbavpkdh47bh4jlzcg5pjf7xcl0273v03b6rbf"; sha256 = "150mdgmbyqp263rzmhp09a07547whalkbvzr9mi4jaq7paj21762";
}; };
meta.homepage = "https://github.com/vim-airline/vim-airline/"; meta.homepage = "https://github.com/vim-airline/vim-airline/";
}; };
vim-airline-themes = buildVimPluginFrom2Nix { vim-airline-themes = buildVimPluginFrom2Nix {
pname = "vim-airline-themes"; pname = "vim-airline-themes";
version = "2020-06-26"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vim-airline"; owner = "vim-airline";
repo = "vim-airline-themes"; repo = "vim-airline-themes";
rev = "04fa4fc40f21d9490954213c1ee06c7fdea66a6d"; rev = "fd855c601c3d53b68f3971e1191f84c728d4d651";
sha256 = "0dzckj0449rw37v5kwmfm5wa9spfhsbfr56i30mb063zmv8wk551"; sha256 = "07s45ck4001lxrzpxcvqsyqfg6j61js4131gxi150y7jb2wwyjjd";
}; };
meta.homepage = "https://github.com/vim-airline/vim-airline-themes/"; meta.homepage = "https://github.com/vim-airline/vim-airline-themes/";
}; };
@ -4238,12 +4250,12 @@ let
vim-bazel = buildVimPluginFrom2Nix { vim-bazel = buildVimPluginFrom2Nix {
pname = "vim-bazel"; pname = "vim-bazel";
version = "2019-08-14"; version = "2020-08-22";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "bazelbuild"; owner = "bazelbuild";
repo = "vim-bazel"; repo = "vim-bazel";
rev = "7c4987b4266d117a9f1d4c7fe7f4dfba33dfc8c8"; rev = "85a044d854e5e48f72414726c255112be31e2cac";
sha256 = "182w8ibr34z86nmx6byabkah0q9fgrzml8m2ardaqzqjqr2ya5yg"; sha256 = "1hcfbl958v39w00kyfg75rcxs9xzaqnd98i4y322ayqfgrhd95n8";
}; };
meta.homepage = "https://github.com/bazelbuild/vim-bazel/"; meta.homepage = "https://github.com/bazelbuild/vim-bazel/";
}; };
@ -4922,12 +4934,12 @@ let
vim-floaterm = buildVimPluginFrom2Nix { vim-floaterm = buildVimPluginFrom2Nix {
pname = "vim-floaterm"; pname = "vim-floaterm";
version = "2020-08-21"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "voldikss"; owner = "voldikss";
repo = "vim-floaterm"; repo = "vim-floaterm";
rev = "2de1b9bdea54baeb40bc6f3fe761309b4435d156"; rev = "cc2ff0a07af75cd752afebbf3be62e6ebe234f2d";
sha256 = "09m31j8cgd8pnyd4p2rh7bj74gh27df98cjy13diljaa56jd6grr"; sha256 = "1q1jmbmx79ii5g991hcp6xd2nzcdqlv4m065vwc8hdpk3ghgc9d4";
}; };
meta.homepage = "https://github.com/voldikss/vim-floaterm/"; meta.homepage = "https://github.com/voldikss/vim-floaterm/";
}; };
@ -5306,12 +5318,12 @@ let
vim-illuminate = buildVimPluginFrom2Nix { vim-illuminate = buildVimPluginFrom2Nix {
pname = "vim-illuminate"; pname = "vim-illuminate";
version = "2020-06-09"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "RRethy"; owner = "RRethy";
repo = "vim-illuminate"; repo = "vim-illuminate";
rev = "0778289e391c419f7a3af9de8229f798ee292013"; rev = "56e7df8f402a8302fa7f6cb21760d366a105d94c";
sha256 = "1l5s5f4fw96w437rdf85lym7g75hnz8sb2fdj9hygyg0sp42r0cf"; sha256 = "0j4986pdh06q5d0bq4k6lq0b6bgi1fazng106ykhg3aaxjqqhs37";
}; };
meta.homepage = "https://github.com/RRethy/vim-illuminate/"; meta.homepage = "https://github.com/RRethy/vim-illuminate/";
}; };
@ -5665,6 +5677,18 @@ let
meta.homepage = "https://github.com/natebosch/vim-lsc/"; meta.homepage = "https://github.com/natebosch/vim-lsc/";
}; };
vim-lsp = buildVimPluginFrom2Nix {
pname = "vim-lsp";
version = "2020-08-24";
src = fetchFromGitHub {
owner = "prabirshrestha";
repo = "vim-lsp";
rev = "69dc272277da464242bf729eb3b57ad79c5a0aed";
sha256 = "0vxkfwdsfsfc91vjhdfbph2287hhr14jr5kzyblk5f1aldgr8901";
};
meta.homepage = "https://github.com/prabirshrestha/vim-lsp/";
};
vim-maktaba = buildVimPluginFrom2Nix { vim-maktaba = buildVimPluginFrom2Nix {
pname = "vim-maktaba"; pname = "vim-maktaba";
version = "2020-08-06"; version = "2020-08-06";
@ -6159,12 +6183,12 @@ let
vim-polyglot = buildVimPluginFrom2Nix { vim-polyglot = buildVimPluginFrom2Nix {
pname = "vim-polyglot"; pname = "vim-polyglot";
version = "2020-08-18"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sheerun"; owner = "sheerun";
repo = "vim-polyglot"; repo = "vim-polyglot";
rev = "0df1bfa0c5f3efb6688566d5656a330034772037"; rev = "f0d6ecff07c88e7a406bc082d1ce98a5282b451c";
sha256 = "1ba96gk3qs1d2zaxs24dk624z9b9ip7yx4vg0klasf4xq8s6kwjs"; sha256 = "1a8z7753a4g4zyi9dr24mkwhpi18r2wbnf9djjl4r4hr0hc7qcc1";
}; };
meta.homepage = "https://github.com/sheerun/vim-polyglot/"; meta.homepage = "https://github.com/sheerun/vim-polyglot/";
}; };
@ -6291,12 +6315,12 @@ let
vim-quickrun = buildVimPluginFrom2Nix { vim-quickrun = buildVimPluginFrom2Nix {
pname = "vim-quickrun"; pname = "vim-quickrun";
version = "2020-07-25"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "thinca"; owner = "thinca";
repo = "vim-quickrun"; repo = "vim-quickrun";
rev = "3f49e05fb6072d6b7bc7fe20d0356cf15ef3b9de"; rev = "c688f336a4aeb002319994f4fb4a8873f204f0ab";
sha256 = "02kyp6l6m1nybfqx3d88yi34isrid355wiln6cskvxz2hpx532g8"; sha256 = "1wzcvshwn4gvjbcmni1r473001m5ipamggkcpwsa7xr74sj4rn73";
}; };
meta.homepage = "https://github.com/thinca/vim-quickrun/"; meta.homepage = "https://github.com/thinca/vim-quickrun/";
}; };
@ -6327,12 +6351,12 @@ let
vim-rails = buildVimPluginFrom2Nix { vim-rails = buildVimPluginFrom2Nix {
pname = "vim-rails"; pname = "vim-rails";
version = "2020-06-19"; version = "2020-08-22";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "tpope"; owner = "tpope";
repo = "vim-rails"; repo = "vim-rails";
rev = "187742a3c18d93e6968f024d7db0f4fc5548408e"; rev = "858a379bcb389d67abdb7e0eb1b0a1fa78d8ba39";
sha256 = "132rvyn5pwg5xkm6q64k33vm6q9hfpng0wq25387l8l8a7hvj3az"; sha256 = "077jxka05w452g7vrlx1dly85ddqv8z8fh3xklq6dvz016x306m4";
}; };
meta.homepage = "https://github.com/tpope/vim-rails/"; meta.homepage = "https://github.com/tpope/vim-rails/";
}; };
@ -6387,12 +6411,12 @@ let
vim-ruby = buildVimPluginFrom2Nix { vim-ruby = buildVimPluginFrom2Nix {
pname = "vim-ruby"; pname = "vim-ruby";
version = "2020-08-03"; version = "2020-08-22";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vim-ruby"; owner = "vim-ruby";
repo = "vim-ruby"; repo = "vim-ruby";
rev = "fe2e520c62dfe10b9bc192b6c2651ef0519b1070"; rev = "35dce70cdc2d7bf3c2031cc5eac2a47ddfb8c17b";
sha256 = "1xh6h5wg242mzqshka5m3693r25www46p29cr92yi995a2izm2fw"; sha256 = "0cc36cnqaz2q45287pfdkfxpb91dlhqi5a8kf8ghz61dny2xnv8r";
}; };
meta.homepage = "https://github.com/vim-ruby/vim-ruby/"; meta.homepage = "https://github.com/vim-ruby/vim-ruby/";
}; };
@ -6844,12 +6868,12 @@ let
vim-test = buildVimPluginFrom2Nix { vim-test = buildVimPluginFrom2Nix {
pname = "vim-test"; pname = "vim-test";
version = "2020-08-12"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vim-test"; owner = "vim-test";
repo = "vim-test"; repo = "vim-test";
rev = "edacfbe57fdbba4788e8c280d37606470b9b70ca"; rev = "45c495d78143f73fc034781601ff44ca90e05687";
sha256 = "1bi2rsszdpv7vj1xk536lzm54dzk1z41hfp0qr1pzz9lv8fa4sgv"; sha256 = "0h3yjc5g8cklq988bilqjp8wv19yb16rmjphjhifa1c2fp23n7nk";
}; };
meta.homepage = "https://github.com/vim-test/vim-test/"; meta.homepage = "https://github.com/vim-test/vim-test/";
}; };
@ -6928,12 +6952,12 @@ let
vim-themis = buildVimPluginFrom2Nix { vim-themis = buildVimPluginFrom2Nix {
pname = "vim-themis"; pname = "vim-themis";
version = "2020-07-29"; version = "2020-08-23";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "thinca"; owner = "thinca";
repo = "vim-themis"; repo = "vim-themis";
rev = "47bc9855d7c2b1452d8a0abda91bda35837f8552"; rev = "51bec3386b661d28fda7736006475b8b2ebe343d";
sha256 = "083k1v9gmmmhmll61kywgd1cn1l2qkfk6sqjjkcv6az01rkrm521"; sha256 = "05988ila63kj1r62v7ii76972fgw2300h4dbaml81i643yw0p81p";
}; };
meta.homepage = "https://github.com/thinca/vim-themis/"; meta.homepage = "https://github.com/thinca/vim-themis/";
}; };
@ -7120,12 +7144,12 @@ let
vim-vsnip = buildVimPluginFrom2Nix { vim-vsnip = buildVimPluginFrom2Nix {
pname = "vim-vsnip"; pname = "vim-vsnip";
version = "2020-08-21"; version = "2020-08-23";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "hrsh7th"; owner = "hrsh7th";
repo = "vim-vsnip"; repo = "vim-vsnip";
rev = "bf0d6c142721d3c1e3ce1f35b205655657db13c9"; rev = "28867f3dd99efdae7f56b18f6555fc78f30e043b";
sha256 = "1z90g90h0yc9xiwl4bwbq3nawks0rzsbxr1ryy07w3qjcg7kwrdp"; sha256 = "1av7cvpb8iqnpjbq1cg667k5yhgr8m4vkj6c030a82cy1j49m931";
}; };
meta.homepage = "https://github.com/hrsh7th/vim-vsnip/"; meta.homepage = "https://github.com/hrsh7th/vim-vsnip/";
}; };
@ -7376,8 +7400,8 @@ let
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "lervag"; owner = "lervag";
repo = "vimtex"; repo = "vimtex";
rev = "e14617591fcf59b638d25320215a80f437009119"; rev = "e27836fdf5b919ba8f4357abe16561ca4d0f60b1";
sha256 = "10nlqbqfna5lvlk6rd4zsr5056vx2d22n6hm8sdpxp094nrqbdic"; sha256 = "1i5w7yijxa37jpn7k4whr3ri2d4nrmlrv94inanlpff006938fdd";
}; };
meta.homepage = "https://github.com/lervag/vimtex/"; meta.homepage = "https://github.com/lervag/vimtex/";
}; };
@ -7553,12 +7577,12 @@ let
YouCompleteMe = buildVimPluginFrom2Nix { YouCompleteMe = buildVimPluginFrom2Nix {
pname = "YouCompleteMe"; pname = "YouCompleteMe";
version = "2020-08-05"; version = "2020-08-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ycm-core"; owner = "ycm-core";
repo = "YouCompleteMe"; repo = "YouCompleteMe";
rev = "bcfd153813ac1f99947b706991eba2861f54a8a2"; rev = "2afee9d9771cf53eec63ab854bcd491fe277109e";
sha256 = "1mqgqzfx6v7ps8gk7qgs8mihb35i3q100m39sd8wl1ihgcsq3w1r"; sha256 = "08dmzy789zg8s9m5gm4rlg9jrs9fv546x6lvziiamn70jbrfrrlg";
fetchSubmodules = true; fetchSubmodules = true;
}; };
meta.homepage = "https://github.com/ycm-core/YouCompleteMe/"; meta.homepage = "https://github.com/ycm-core/YouCompleteMe/";
@ -7590,12 +7614,12 @@ let
zenburn = buildVimPluginFrom2Nix { zenburn = buildVimPluginFrom2Nix {
pname = "zenburn"; pname = "zenburn";
version = "2020-01-23"; version = "2020-08-24";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jnurmine"; owner = "jnurmine";
repo = "zenburn"; repo = "zenburn";
rev = "ec6f369a000602e37e7c066b725f9d6bd12538f4"; rev = "de2cc6c93593938b9628e03eb424e318e5ec7959";
sha256 = "1ff5ac8lp7fq854kgf03c5h695lm60giw0qda5z428mmzwq0xask"; sha256 = "17kvlbb49l3alqdd2bf6llvvhs0c9p75qn7i1kb1qavyipxi38a3";
}; };
meta.homepage = "https://github.com/jnurmine/zenburn/"; meta.homepage = "https://github.com/jnurmine/zenburn/";
}; };

View File

@ -249,6 +249,7 @@ lepture/vim-jinja
lervag/vimtex lervag/vimtex
lfilho/cosco.vim lfilho/cosco.vim
lifepillar/vim-mucomplete lifepillar/vim-mucomplete
lighttiger2505/deoplete-vim-lsp
lilydjwg/colorizer lilydjwg/colorizer
liuchengxu/vim-clap liuchengxu/vim-clap
liuchengxu/vim-which-key liuchengxu/vim-which-key
@ -420,6 +421,7 @@ ponko2/deoplete-fish
posva/vim-vue posva/vim-vue
powerman/vim-plugin-AnsiEsc powerman/vim-plugin-AnsiEsc
PProvost/vim-ps1 PProvost/vim-ps1
prabirshrestha/vim-lsp
preservim/nerdcommenter preservim/nerdcommenter
preservim/nerdtree preservim/nerdtree
psliwka/vim-smoothie psliwka/vim-smoothie

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, libv4l, gd }: { stdenv, fetchurl, libv4l, gd }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "fswebcam-20140113"; name = "fswebcam-20200725";
src = fetchurl { src = fetchurl {
url = "https://www.sanslogic.co.uk/fswebcam/files/${name}.tar.gz"; url = "https://www.sanslogic.co.uk/fswebcam/files/${name}.tar.gz";
sha256 = "3ee389f72a7737700d22e0c954720b1e3bbadc8a0daad6426c25489ba9dc3199"; sha256 = "1dazsrcaw9s30zz3jpxamk9lkff5dkmflp1s0jjjvdbwa0k6k6ii";
}; };
buildInputs = buildInputs =

View File

@ -11,18 +11,15 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "intel-compute-runtime"; pname = "intel-compute-runtime";
version = "20.02.15268"; version = "20.33.17675";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "intel"; owner = "intel";
repo = "compute-runtime"; repo = "compute-runtime";
rev = version; rev = version;
sha256 = "138gi92w85bn6haw5x38k39pgiyvvzfhiwpvz6hqlx2j03n8cs2k"; sha256 = "1ckzspf05skdrjh947gv96finxbv5dpgc84hppm5pdsp5q70iyxp";
}; };
# Build script tries to write the ICD to /etc
patches = [ ./etc-dir.patch ];
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ intel-gmmlib intel-graphics-compiler libva ]; buildInputs = [ intel-gmmlib intel-graphics-compiler libva ];
@ -31,7 +28,7 @@ stdenv.mkDerivation rec {
"-DSKIP_UNIT_TESTS=1" "-DSKIP_UNIT_TESTS=1"
"-DIGC_DIR=${intel-graphics-compiler}" "-DIGC_DIR=${intel-graphics-compiler}"
"-DETC_DIR=${placeholder "out"}/etc" "-DOCL_ICD_VENDORDIR=${placeholder "out"}/etc/OpenCL/vendors"
# The install script assumes this path is relative to CMAKE_INSTALL_PREFIX # The install script assumes this path is relative to CMAKE_INSTALL_PREFIX
"-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_LIBDIR=lib"

View File

@ -1,15 +0,0 @@
diff --git a/package.cmake b/package.cmake
index 24960d5..e9a21e7 100644
--- a/package.cmake
+++ b/package.cmake
@@ -24,7 +24,9 @@ if(UNIX)
get_os_release_info(os_name os_version)
- if("${os_name}" STREQUAL "clear-linux-os")
+ if(DEFINED ETC_DIR)
+ set(_dir_etc ${ETC_DIR})
+ elseif("${os_name}" STREQUAL "clear-linux-os")
# clear-linux-os distribution avoids /etc for distribution defaults.
set(_dir_etc "/usr/share/defaults/etc")
else()

View File

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "4.14.194"; version = "4.14.195";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1q7ssi2790bqjn8s8ra5ihma70hmxykahink7iq5h78738id191y"; sha256 = "08d08la3h48fbdlr3h8zbvdghydx3x9cwb4yrnm0n93hhrwjhkrr";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "4.19.141"; version = "4.19.142";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "0511vb9rfpy5l6cz69v0v97rw2rk2pscc4hkz2pfmgikagm1shm4"; sha256 = "19372sri4962dqf5rbr211lrfpckmj11kxsginfcwwid4hfdn4k9";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -1,11 +1,11 @@
{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
buildLinux (args // rec { buildLinux (args // rec {
version = "4.4.233"; version = "4.4.234";
extraMeta.branch = "4.4"; extraMeta.branch = "4.4";
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1z77dikgkvkp9ggwxp07hl8vxsf9kq57rhfdpbvhny1x13fqkrlp"; sha256 = "123354h05fip161rzlxc8h0cn5lh0d1gz06gc5b7zyz9i2lxv539";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -1,11 +1,11 @@
{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
buildLinux (args // rec { buildLinux (args // rec {
version = "4.9.233"; version = "4.9.234";
extraMeta.branch = "4.9"; extraMeta.branch = "4.9";
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "19dcwylhy5iqq3dmppqf7s9wy9d16m103djn1n183c9acnqclv9a"; sha256 = "1qw26x2qc29yr094c7scw68m9yz4j0b2c4f92rvi3s31s928avvm";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "5.4.60"; version = "5.4.61";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "08x2a78n23371k7l5p677mihnl58dpjh7r7bvyiwj3y4hlisplmd"; sha256 = "197y2yb60m1k8i7mig4pa9wsrklfxq81ba3zfahwb2b31w2kvwc6";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "5.7.17"; version = "5.7.18";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "09ajavdyvr0025rwvwfp9yv2z8q779nan1i6dck2kkdxr48kd36c"; sha256 = "0p54icpxacrx8k09qam2hx22azh9xz9fzyif2z73qagk3syz5pd4";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "5.8.3"; version = "5.8.4";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "0y8prifvkywqsx5lk80bh31m505vinmicpvdrirgg0c9scg7x8lf"; sha256 = "15hyz92wsk6fxqr1rq0k77qw76jka2igpc9xviwa0j4a5qrr43fv";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -8,11 +8,11 @@ assert withMysql -> (mysql_jdbc != null);
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "atlassian-confluence"; pname = "atlassian-confluence";
version = "7.6.1"; version = "7.7.2";
src = fetchurl { src = fetchurl {
url = "https://product-downloads.atlassian.com/software/confluence/downloads/${pname}-${version}.tar.gz"; url = "https://product-downloads.atlassian.com/software/confluence/downloads/${pname}-${version}.tar.gz";
sha256 = "0ipkr0d4mwsah698fg320h9g5il9xcnwlifbfvfnsijs60y9ps8x"; sha256 = "12ay2y7ixaxzj12pw66k65743ic3iccicn49cnjmas51c5ww09h1";
}; };
buildPhase = '' buildPhase = ''

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "lftp"; pname = "lftp";
version = "4.9.1"; version = "4.9.2";
src = fetchurl { src = fetchurl {
urls = [ urls = [
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
"https://ftp.st.ryukoku.ac.jp/pub/network/ftp/lftp/${pname}-${version}.tar.xz" "https://ftp.st.ryukoku.ac.jp/pub/network/ftp/lftp/${pname}-${version}.tar.xz"
"https://lftp.yar.ru/ftp/${pname}-${version}.tar.xz" "https://lftp.yar.ru/ftp/${pname}-${version}.tar.xz"
]; ];
sha256 = "0jq2g8h1bx06ya9fsja748vwb2qrca4wsfrgi3fmaa8hznpgqsar"; sha256 = "03b7y0h3mf4jfq5y8zw6hv9v44z3n6i8hc1iswax96y3z7sc85y5";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];

View File

@ -2,16 +2,16 @@
buildGoModule rec { buildGoModule rec {
pname = "nfpm"; pname = "nfpm";
version = "1.6.0"; version = "1.7.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "goreleaser"; owner = "goreleaser";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "1q4fzjlaiwsm028cwcw7xgcbdkccw18f2mf1vh7lz42l1bxy8bk4"; sha256 = "0jmxafvxzqg65zg5cnjd2nsz1mmw06mc7qz3lbs5h2gkxiah8264";
}; };
vendorSha256 = "1bsb05qhr9zm8yar8mdi3mw0i5ak1s5x0i8qkz5fd6wcqnsw2jjw"; vendorSha256 = "0yvzwbm0xb1h45x96h658avbjz9w79aaa6z042xpvjqc4wsr8155";
doCheck = false; doCheck = false;

View File

@ -4,11 +4,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "poedit"; pname = "poedit";
version = "2.3.1"; version = "2.4.1";
src = fetchurl { src = fetchurl {
url = "https://github.com/vslavik/poedit/archive/v${version}-oss.tar.gz"; url = "https://github.com/vslavik/poedit/archive/v${version}-oss.tar.gz";
sha256 = "04f9za35rwyr7mabk8f8izc0fgvc3sfx45v8dml1xmi634n174ds"; sha256 = "0pvd903j2x3h9wh38fhlcn23d0jkjlqnfbdpbvnbhy6al1ngx72w";
}; };
nativeBuildInputs = [ autoconf automake asciidoc wrapGAppsHook nativeBuildInputs = [ autoconf automake asciidoc wrapGAppsHook

View File

@ -579,7 +579,10 @@ in
acpica-tools = callPackage ../tools/system/acpica-tools { }; acpica-tools = callPackage ../tools/system/acpica-tools { };
act = callPackage ../development/tools/misc/act {}; act = callPackage ../development/tools/misc/act {
# go 1.15 cannot connect to docker-for-mac https://github.com/docker/for-mac/issues/4855
buildGoModule = if stdenv.isDarwin then buildGo114Module else buildGoModule;
};
actdiag = with python3.pkgs; toPythonApplication actdiag; actdiag = with python3.pkgs; toPythonApplication actdiag;
@ -1852,6 +1855,8 @@ in
eksctl = callPackage ../tools/admin/eksctl { }; eksctl = callPackage ../tools/admin/eksctl { };
electronplayer = callPackage ../applications/video/electronplayer/electronplayer.nix { };
element-desktop = callPackage ../applications/networking/instant-messengers/element/element-desktop.nix { }; element-desktop = callPackage ../applications/networking/instant-messengers/element/element-desktop.nix { };
element-web = callPackage ../applications/networking/instant-messengers/element/element-web.nix { element-web = callPackage ../applications/networking/instant-messengers/element/element-web.nix {
@ -2913,7 +2918,9 @@ in
cudatoolkit_10 cudatoolkit_10
cudatoolkit_10_0 cudatoolkit_10_0
cudatoolkit_10_1 cudatoolkit_10_1
cudatoolkit_10_2; cudatoolkit_10_2
cudatoolkit_11
cudatoolkit_11_0;
cudatoolkit = cudatoolkit_10; cudatoolkit = cudatoolkit_10;
@ -2930,7 +2937,9 @@ in
cudnn_cudatoolkit_10 cudnn_cudatoolkit_10
cudnn_cudatoolkit_10_0 cudnn_cudatoolkit_10_0
cudnn_cudatoolkit_10_1 cudnn_cudatoolkit_10_1
cudnn_cudatoolkit_10_2; cudnn_cudatoolkit_10_2
cudnn_cudatoolkit_11
cudnn_cudatoolkit_11_0;
cudnn = cudnn_cudatoolkit_10; cudnn = cudnn_cudatoolkit_10;
@ -3178,6 +3187,8 @@ in
dtc = callPackage ../development/compilers/dtc { }; dtc = callPackage ../development/compilers/dtc { };
dt-schema = python3Packages.callPackage ../development/tools/dt-schema { };
dub = callPackage ../development/tools/build-managers/dub { }; dub = callPackage ../development/tools/build-managers/dub { };
duc = callPackage ../tools/misc/duc { }; duc = callPackage ../tools/misc/duc { };
@ -3551,7 +3562,7 @@ in
fdtools = callPackage ../tools/misc/fdtools { }; fdtools = callPackage ../tools/misc/fdtools { };
featherpad = callPackage ../applications/editors/featherpad {}; featherpad = qt5.callPackage ../applications/editors/featherpad {};
feedreader = callPackage ../applications/networking/feedreaders/feedreader {}; feedreader = callPackage ../applications/networking/feedreaders/feedreader {};
@ -5562,9 +5573,8 @@ in
xnbd = callPackage ../tools/networking/xnbd { }; xnbd = callPackage ../tools/networking/xnbd { };
nccl = callPackage ../development/libraries/science/math/nccl { }; nccl = callPackage ../development/libraries/science/math/nccl { };
nccl_cudatoolkit_9_0 = nccl.override { cudatoolkit = cudatoolkit_9_0; };
nccl_cudatoolkit_9 = nccl.override { cudatoolkit = cudatoolkit_9; };
nccl_cudatoolkit_10 = nccl.override { cudatoolkit = cudatoolkit_10; }; nccl_cudatoolkit_10 = nccl.override { cudatoolkit = cudatoolkit_10; };
nccl_cudatoolkit_11 = nccl.override { cudatoolkit = cudatoolkit_11; };
ndjbdns = callPackage ../tools/networking/ndjbdns { }; ndjbdns = callPackage ../tools/networking/ndjbdns { };
@ -5614,6 +5624,8 @@ in
netkittftp = callPackage ../tools/networking/netkit/tftp { }; netkittftp = callPackage ../tools/networking/netkit/tftp { };
netlify-cli = nodePackages.netlify-cli;
netpbm = callPackage ../tools/graphics/netpbm { }; netpbm = callPackage ../tools/graphics/netpbm { };
netrw = callPackage ../tools/networking/netrw { }; netrw = callPackage ../tools/networking/netrw { };
@ -11037,6 +11049,8 @@ in
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;
}; };
kpack = callPackage ../development/tools/misc/kpack { };
kustomize = callPackage ../development/tools/kustomize { }; kustomize = callPackage ../development/tools/kustomize { };
ktlint = callPackage ../development/tools/ktlint { }; ktlint = callPackage ../development/tools/ktlint { };
@ -13087,7 +13101,7 @@ in
libaudclient = callPackage ../development/libraries/libaudclient { }; libaudclient = callPackage ../development/libraries/libaudclient { };
libav = libav_11; # branch 11 is API-compatible with branch 10 libav = libav_11; # branch 11 is API-compatible with branch 10
libav_all = callPackage ../development/libraries/libav { }; libav_all = callPackages ../development/libraries/libav { };
inherit (libav_all) libav_0_8 libav_11 libav_12; inherit (libav_all) libav_0_8 libav_11 libav_12;
libavc1394 = callPackage ../development/libraries/libavc1394 { }; libavc1394 = callPackage ../development/libraries/libavc1394 { };
@ -23145,6 +23159,8 @@ in
terminus = callPackage ../applications/misc/terminus { }; terminus = callPackage ../applications/misc/terminus { };
tty-solitaire = callPackage ../applications/misc/tty-solitaire { };
lxterminal = callPackage ../applications/misc/lxterminal { }; lxterminal = callPackage ../applications/misc/lxterminal { };
aminal = callPackage ../applications/misc/aminal { aminal = callPackage ../applications/misc/aminal {
@ -26945,6 +26961,8 @@ in
pyload = callPackage ../applications/networking/pyload {}; pyload = callPackage ../applications/networking/pyload {};
pwntools = with python3Packages; toPythonApplication pwntools;
uae = callPackage ../misc/emulators/uae { }; uae = callPackage ../misc/emulators/uae { };
fsuae = callPackage ../misc/emulators/fs-uae { }; fsuae = callPackage ../misc/emulators/fs-uae { };

View File

@ -3361,6 +3361,8 @@ in {
jupyterlab = callPackage ../development/python-modules/jupyterlab {}; jupyterlab = callPackage ../development/python-modules/jupyterlab {};
jupyterlab-git = callPackage ../development/python-modules/jupyterlab-git {};
jupyter-sphinx = callPackage ../development/python-modules/jupyter-sphinx { }; jupyter-sphinx = callPackage ../development/python-modules/jupyter-sphinx { };
jupytext = callPackage ../development/python-modules/jupytext { }; jupytext = callPackage ../development/python-modules/jupytext { };
@ -5360,6 +5362,8 @@ in {
pip = callPackage ../development/python-modules/pip { }; pip = callPackage ../development/python-modules/pip { };
pipx = callPackage ../development/python-modules/pipx { };
pip-tools = callPackage ../development/python-modules/pip-tools { pip-tools = callPackage ../development/python-modules/pip-tools {
git = pkgs.gitMinimal; git = pkgs.gitMinimal;
glibcLocales = pkgs.glibcLocales; glibcLocales = pkgs.glibcLocales;
@ -7481,7 +7485,7 @@ in {
packet-python = callPackage ../development/python-modules/packet-python { }; packet-python = callPackage ../development/python-modules/packet-python { };
pwntools = callPackage ../development/python-modules/pwntools { }; pwntools = callPackage ../development/python-modules/pwntools { debugger = pkgs.gdb; };
ROPGadget = callPackage ../development/python-modules/ROPGadget { }; ROPGadget = callPackage ../development/python-modules/ROPGadget { };