Merge master into staging-next
This commit is contained in:
commit
52095e171f
93 changed files with 7540 additions and 4932 deletions
26
.github/workflows/pending-clear.yml
vendored
26
.github/workflows/pending-clear.yml
vendored
|
@ -12,24 +12,10 @@ jobs:
|
|||
if: github.repository_owner == 'NixOS' && github.event.check_suite.app.name == 'OfBorg'
|
||||
env:
|
||||
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: |
|
||||
curl -sSf -O -L -C - \
|
||||
"$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \
|
||||
if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then
|
||||
echo "checksum mismatch"
|
||||
exit 1
|
||||
fi
|
||||
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 }}"
|
||||
curl \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-d '{"state": "success", "target_url": " ", "description": " ", "context": "Wait for ofborg"}' \
|
||||
"https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.check_suite.head_sha }}"
|
||||
|
|
26
.github/workflows/pending-set.yml
vendored
26
.github/workflows/pending-set.yml
vendored
|
@ -11,24 +11,10 @@ jobs:
|
|||
if: github.repository_owner == 'NixOS'
|
||||
env:
|
||||
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: |
|
||||
curl -sSf -O -L -C - \
|
||||
"$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \
|
||||
if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then
|
||||
echo "checksum mismatch"
|
||||
exit 1
|
||||
fi
|
||||
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 }}"
|
||||
curl \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-d '{"state": "failure", "target_url": " ", "description": "This failed status will be cleared when ofborg finishes eval.", "context": "Wait for ofborg"}' \
|
||||
"https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.pull_request.head.sha }}"
|
||||
|
|
|
@ -2717,6 +2717,12 @@
|
|||
githubId = 857308;
|
||||
name = "Joe Hermaszewski";
|
||||
};
|
||||
extends = {
|
||||
email = "sharosari@gmail.com";
|
||||
github = "ImExtends";
|
||||
githubId = 55919390;
|
||||
name = "Vincent VILLIAUMEY";
|
||||
};
|
||||
eyjhb = {
|
||||
email = "eyjhbb@gmail.com";
|
||||
github = "eyJhb";
|
||||
|
@ -9474,4 +9480,14 @@
|
|||
github = "yevhenshymotiuk";
|
||||
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";
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -22,9 +22,9 @@ rec {
|
|||
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
|
||||
|
||||
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";
|
||||
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";
|
||||
}
|
||||
|
|
|
@ -1,19 +1,13 @@
|
|||
#! /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 atexit
|
||||
import base64
|
||||
import codecs
|
||||
import io
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
import ptpython.repl
|
||||
import pty
|
||||
import queue
|
||||
import re
|
||||
import shlex
|
||||
import shutil
|
||||
|
@ -21,9 +15,12 @@ import socket
|
|||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import _thread
|
||||
import time
|
||||
import traceback
|
||||
import unicodedata
|
||||
from contextlib import contextmanager
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple
|
||||
|
||||
import ptpython.repl
|
||||
|
||||
CHAR_TO_KEY = {
|
||||
"A": "shift-a",
|
||||
|
@ -88,13 +85,17 @@ CHAR_TO_KEY = {
|
|||
")": "shift-0x0B",
|
||||
}
|
||||
|
||||
# Forward references
|
||||
log: "Logger"
|
||||
# Forward reference
|
||||
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:
|
||||
|
@ -102,8 +103,7 @@ def make_command(args: list) -> str:
|
|||
|
||||
|
||||
def create_vlan(vlan_nr: str) -> Tuple[str, str, "subprocess.Popen[bytes]", Any]:
|
||||
global log
|
||||
log.log("starting VDE switch for network {}".format(vlan_nr))
|
||||
logger.info(f"starting VDE switch for network {vlan_nr}")
|
||||
vde_socket = tempfile.mkdtemp(
|
||||
prefix="nixos-test-vde-", suffix="-vde{}.ctl".format(vlan_nr)
|
||||
)
|
||||
|
@ -142,70 +142,6 @@ def retry(fn: Callable) -> None:
|
|||
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:
|
||||
def __init__(self, args: Dict[str, Any]) -> None:
|
||||
if "name" in args:
|
||||
|
@ -235,8 +171,8 @@ class Machine:
|
|||
self.pid: Optional[int] = None
|
||||
self.socket = None
|
||||
self.monitor: Optional[socket.socket] = None
|
||||
self.logger: Logger = args["log"]
|
||||
self.allow_reboot = args.get("allowReboot", False)
|
||||
self.logger = MachineLogAdapter(logger, extra=dict(machine=self.name))
|
||||
|
||||
@staticmethod
|
||||
def create_startcommand(args: Dict[str, str]) -> str:
|
||||
|
@ -292,14 +228,6 @@ class Machine:
|
|||
def is_up(self) -> bool:
|
||||
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:
|
||||
assert self.monitor is not None
|
||||
answer = ""
|
||||
|
@ -314,7 +242,7 @@ class Machine:
|
|||
|
||||
def send_monitor_command(self, command: str) -> str:
|
||||
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
|
||||
self.monitor.send(message)
|
||||
return self.wait_for_monitor_prompt()
|
||||
|
@ -381,16 +309,19 @@ class Machine:
|
|||
return self.execute("systemctl {}".format(q))
|
||||
|
||||
def require_unit_state(self, unit: str, require_state: str = "active") -> None:
|
||||
with self.nested(
|
||||
"checking if unit ‘{}’ has reached state '{}'".format(unit, require_state)
|
||||
):
|
||||
info = self.get_unit_info(unit)
|
||||
state = info["ActiveState"]
|
||||
if state != require_state:
|
||||
raise Exception(
|
||||
"Expected unit ‘{}’ to to be in state ".format(unit)
|
||||
+ "'{}' but it is in state ‘{}’".format(require_state, state)
|
||||
)
|
||||
self.logger.info(
|
||||
f"checking if unit ‘{unit}’ has reached state '{require_state}'"
|
||||
)
|
||||
info = self.get_unit_info(unit)
|
||||
state = info["ActiveState"]
|
||||
if state != require_state:
|
||||
raise Exception(
|
||||
"Expected unit ‘{}’ to to be in state ".format(unit)
|
||||
+ "'{}' 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]:
|
||||
self.connect()
|
||||
|
@ -414,27 +345,25 @@ class Machine:
|
|||
"""Execute each command and check that it succeeds."""
|
||||
output = ""
|
||||
for command in commands:
|
||||
with self.nested("must succeed: {}".format(command)):
|
||||
(status, out) = self.execute(command)
|
||||
if status != 0:
|
||||
self.log("output: {}".format(out))
|
||||
raise Exception(
|
||||
"command `{}` failed (exit code {})".format(command, status)
|
||||
)
|
||||
output += out
|
||||
self.logger.info(f"must succeed: {command}")
|
||||
(status, out) = self.execute(command)
|
||||
if status != 0:
|
||||
self.logger.info(f"output: {out}")
|
||||
raise Exception(
|
||||
"command `{}` failed (exit code {})".format(command, status)
|
||||
)
|
||||
output += out
|
||||
return output
|
||||
|
||||
def fail(self, *commands: str) -> str:
|
||||
"""Execute each command and check that it fails."""
|
||||
output = ""
|
||||
for command in commands:
|
||||
with self.nested("must fail: {}".format(command)):
|
||||
(status, out) = self.execute(command)
|
||||
if status == 0:
|
||||
raise Exception(
|
||||
"command `{}` unexpectedly succeeded".format(command)
|
||||
)
|
||||
output += out
|
||||
self.logger.info(f"must fail: {command}")
|
||||
(status, out) = self.execute(command)
|
||||
if status == 0:
|
||||
raise Exception("command `{}` unexpectedly succeeded".format(command))
|
||||
output += out
|
||||
return output
|
||||
|
||||
def wait_until_succeeds(self, command: str) -> str:
|
||||
|
@ -448,9 +377,9 @@ class Machine:
|
|||
status, output = self.execute(command)
|
||||
return status == 0
|
||||
|
||||
with self.nested("waiting for success: {}".format(command)):
|
||||
retry(check_success)
|
||||
return output
|
||||
self.logger.info(f"waiting for success: {command}")
|
||||
retry(check_success)
|
||||
return output
|
||||
|
||||
def wait_until_fails(self, command: str) -> str:
|
||||
"""Wait until a command returns failure.
|
||||
|
@ -463,21 +392,21 @@ class Machine:
|
|||
status, output = self.execute(command)
|
||||
return status != 0
|
||||
|
||||
with self.nested("waiting for failure: {}".format(command)):
|
||||
retry(check_failure)
|
||||
return output
|
||||
self.logger.info(f"waiting for failure: {command}")
|
||||
retry(check_failure)
|
||||
return output
|
||||
|
||||
def wait_for_shutdown(self) -> None:
|
||||
if not self.booted:
|
||||
return
|
||||
|
||||
with self.nested("waiting for the VM to power off"):
|
||||
sys.stdout.flush()
|
||||
self.process.wait()
|
||||
self.logger.info("waiting for the VM to power off")
|
||||
sys.stdout.flush()
|
||||
self.process.wait()
|
||||
|
||||
self.pid = None
|
||||
self.booted = False
|
||||
self.connected = False
|
||||
self.pid = None
|
||||
self.booted = False
|
||||
self.connected = False
|
||||
|
||||
def get_tty_text(self, tty: str) -> str:
|
||||
status, output = self.execute(
|
||||
|
@ -495,19 +424,19 @@ class Machine:
|
|||
def tty_matches(last: bool) -> bool:
|
||||
text = self.get_tty_text(tty)
|
||||
if last:
|
||||
self.log(
|
||||
self.logger.info(
|
||||
f"Last chance to match /{regexp}/ on TTY{tty}, "
|
||||
f"which currently contains: {text}"
|
||||
)
|
||||
return len(matcher.findall(text)) > 0
|
||||
|
||||
with self.nested("waiting for {} to appear on tty {}".format(regexp, tty)):
|
||||
retry(tty_matches)
|
||||
self.logger.info(f"waiting for {regexp} to appear on tty {tty}")
|
||||
retry(tty_matches)
|
||||
|
||||
def send_chars(self, chars: List[str]) -> None:
|
||||
with self.nested("sending keys ‘{}‘".format(chars)):
|
||||
for char in chars:
|
||||
self.send_key(char)
|
||||
self.logger.info(f"sending keys ‘{chars}‘")
|
||||
for char in chars:
|
||||
self.send_key(char)
|
||||
|
||||
def wait_for_file(self, filename: str) -> None:
|
||||
"""Waits until the file exists in machine's file system."""
|
||||
|
@ -516,16 +445,16 @@ class Machine:
|
|||
status, _ = self.execute("test -e {}".format(filename))
|
||||
return status == 0
|
||||
|
||||
with self.nested("waiting for file ‘{}‘".format(filename)):
|
||||
retry(check_file)
|
||||
self.logger.info(f"waiting for file ‘{filename}‘")
|
||||
retry(check_file)
|
||||
|
||||
def wait_for_open_port(self, port: int) -> None:
|
||||
def port_is_open(_: Any) -> bool:
|
||||
status, _ = self.execute("nc -z localhost {}".format(port))
|
||||
return status == 0
|
||||
|
||||
with self.nested("waiting for TCP port {}".format(port)):
|
||||
retry(port_is_open)
|
||||
self.logger.info(f"waiting for TCP port {port}")
|
||||
retry(port_is_open)
|
||||
|
||||
def wait_for_closed_port(self, port: int) -> None:
|
||||
def port_is_closed(_: Any) -> bool:
|
||||
|
@ -547,17 +476,17 @@ class Machine:
|
|||
if self.connected:
|
||||
return
|
||||
|
||||
with self.nested("waiting for the VM to finish booting"):
|
||||
self.start()
|
||||
self.logger.info("waiting for the VM to finish booting")
|
||||
self.start()
|
||||
|
||||
tic = time.time()
|
||||
self.shell.recv(1024)
|
||||
# TODO: Timeout
|
||||
toc = time.time()
|
||||
tic = time.time()
|
||||
self.shell.recv(1024)
|
||||
# TODO: Timeout
|
||||
toc = time.time()
|
||||
|
||||
self.log("connected to guest root shell")
|
||||
self.log("(connecting took {:.2f} seconds)".format(toc - tic))
|
||||
self.connected = True
|
||||
self.logger.info("connected to guest root shell")
|
||||
self.logger.info(f"(connecting took {toc - tic:.2f} seconds)")
|
||||
self.connected = True
|
||||
|
||||
def screenshot(self, filename: str) -> None:
|
||||
out_dir = os.environ.get("out", os.getcwd())
|
||||
|
@ -566,15 +495,12 @@ class Machine:
|
|||
filename = os.path.join(out_dir, "{}.png".format(filename))
|
||||
tmp = "{}.ppm".format(filename)
|
||||
|
||||
with self.nested(
|
||||
"making screenshot {}".format(filename),
|
||||
{"image": os.path.basename(filename)},
|
||||
):
|
||||
self.send_monitor_command("screendump {}".format(tmp))
|
||||
ret = subprocess.run("pnmtopng {} > {}".format(tmp, filename), shell=True)
|
||||
os.unlink(tmp)
|
||||
if ret.returncode != 0:
|
||||
raise Exception("Cannot convert screenshot")
|
||||
self.logger.info(f"making screenshot {filename}")
|
||||
self.send_monitor_command("screendump {}".format(tmp))
|
||||
ret = subprocess.run("pnmtopng {} > {}".format(tmp, filename), shell=True)
|
||||
os.unlink(tmp)
|
||||
if ret.returncode != 0:
|
||||
raise Exception("Cannot convert screenshot")
|
||||
|
||||
def copy_from_host_via_shell(self, source: str, target: str) -> None:
|
||||
"""Copy a file from the host into the guest by piping it over the
|
||||
|
@ -650,20 +576,18 @@ class Machine:
|
|||
|
||||
tess_args = "-c debug_file=/dev/null --psm 11 --oem 2"
|
||||
|
||||
with self.nested("performing optical character recognition"):
|
||||
with tempfile.NamedTemporaryFile() as tmpin:
|
||||
self.send_monitor_command("screendump {}".format(tmpin.name))
|
||||
self.logger.info("performing optical character recognition")
|
||||
with tempfile.NamedTemporaryFile() as tmpin:
|
||||
self.send_monitor_command("screendump {}".format(tmpin.name))
|
||||
|
||||
cmd = "convert {} {} tiff:- | tesseract - - {}".format(
|
||||
magick_args, tmpin.name, tess_args
|
||||
)
|
||||
ret = subprocess.run(cmd, shell=True, capture_output=True)
|
||||
if ret.returncode != 0:
|
||||
raise Exception(
|
||||
"OCR failed with exit code {}".format(ret.returncode)
|
||||
)
|
||||
cmd = "convert {} {} tiff:- | tesseract - - {}".format(
|
||||
magick_args, tmpin.name, tess_args
|
||||
)
|
||||
ret = subprocess.run(cmd, shell=True, capture_output=True)
|
||||
if ret.returncode != 0:
|
||||
raise Exception("OCR failed with exit code {}".format(ret.returncode))
|
||||
|
||||
return ret.stdout.decode("utf-8")
|
||||
return ret.stdout.decode("utf-8")
|
||||
|
||||
def wait_for_text(self, regex: str) -> None:
|
||||
def screen_matches(last: bool) -> bool:
|
||||
|
@ -671,15 +595,15 @@ class Machine:
|
|||
matches = re.search(regex, text) is not None
|
||||
|
||||
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
|
||||
|
||||
with self.nested("waiting for {} to appear on screen".format(regex)):
|
||||
retry(screen_matches)
|
||||
self.logger.info(f"waiting for {regex} to appear on screen")
|
||||
retry(screen_matches)
|
||||
|
||||
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
|
||||
# to match multiline regexes.
|
||||
console = io.StringIO()
|
||||
|
@ -702,7 +626,7 @@ class Machine:
|
|||
if self.booted:
|
||||
return
|
||||
|
||||
self.log("starting vm")
|
||||
self.logger.info("starting vm")
|
||||
|
||||
def create_socket(path: str) -> socket.socket:
|
||||
if os.path.exists(path):
|
||||
|
@ -759,7 +683,7 @@ class Machine:
|
|||
|
||||
# Store last serial console lines for use
|
||||
# of wait_for_console_text
|
||||
self.last_lines: Queue = Queue()
|
||||
self.last_lines: queue.Queue = queue.Queue()
|
||||
|
||||
def process_serial_output() -> None:
|
||||
assert self.process.stdout is not None
|
||||
|
@ -767,8 +691,7 @@ class Machine:
|
|||
# Ignore undecodable bytes that may occur in boot menus
|
||||
line = _line.decode(errors="ignore").replace("\r", "").rstrip()
|
||||
self.last_lines.put(line)
|
||||
eprint("{} # {}".format(self.name, line))
|
||||
self.logger.enqueue({"msg": line, "machine": self.name})
|
||||
self.logger.info(line)
|
||||
|
||||
_thread.start_new_thread(process_serial_output, ())
|
||||
|
||||
|
@ -777,10 +700,10 @@ class Machine:
|
|||
self.pid = self.process.pid
|
||||
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:
|
||||
self.log("delete the VM state directory")
|
||||
self.logger.info("delete the VM state directory")
|
||||
if os.path.isfile(self.state_dir):
|
||||
shutil.rmtree(self.state_dir)
|
||||
|
||||
|
@ -795,7 +718,7 @@ class Machine:
|
|||
if not self.booted:
|
||||
return
|
||||
|
||||
self.log("forced crash")
|
||||
self.logger.info("forced crash")
|
||||
self.send_monitor_command("quit")
|
||||
self.wait_for_shutdown()
|
||||
|
||||
|
@ -815,8 +738,8 @@ class Machine:
|
|||
status, _ = self.execute("[ -e /tmp/.X11-unix/X0 ]")
|
||||
return status == 0
|
||||
|
||||
with self.nested("waiting for the X11 server"):
|
||||
retry(check_x)
|
||||
self.logger.info("waiting for the X11 server")
|
||||
retry(check_x)
|
||||
|
||||
def get_window_names(self) -> List[str]:
|
||||
return self.succeed(
|
||||
|
@ -829,15 +752,14 @@ class Machine:
|
|||
def window_is_visible(last_try: bool) -> bool:
|
||||
names = self.get_window_names()
|
||||
if last_try:
|
||||
self.log(
|
||||
"Last chance to match {} on the window list,".format(regexp)
|
||||
+ " which currently contains: "
|
||||
+ ", ".join(names)
|
||||
self.logger.info(
|
||||
f"Last chance to match {regexp} on the window list, "
|
||||
+ f"which currently contains: {', '.join(names)}"
|
||||
)
|
||||
return any(pattern.search(name) for name in names)
|
||||
|
||||
with self.nested("Waiting for a window to appear"):
|
||||
retry(window_is_visible)
|
||||
self.logger.info("Waiting for a window to appear")
|
||||
retry(window_is_visible)
|
||||
|
||||
def sleep(self, secs: int) -> None:
|
||||
time.sleep(secs)
|
||||
|
@ -865,23 +787,22 @@ class Machine:
|
|||
|
||||
def create_machine(args: Dict[str, Any]) -> Machine:
|
||||
global log
|
||||
args["log"] = log
|
||||
args["redirectSerial"] = os.environ.get("USE_SERIAL", "0") == "1"
|
||||
return Machine(args)
|
||||
|
||||
|
||||
def start_all() -> None:
|
||||
global machines
|
||||
with log.nested("starting all VMs"):
|
||||
for machine in machines:
|
||||
machine.start()
|
||||
logger.info("starting all VMs")
|
||||
for machine in machines:
|
||||
machine.start()
|
||||
|
||||
|
||||
def join_all() -> None:
|
||||
global machines
|
||||
with log.nested("waiting for all VMs to finish"):
|
||||
for machine in machines:
|
||||
machine.wait_for_shutdown()
|
||||
logger.info("waiting for all VMs to finish")
|
||||
for machine in machines:
|
||||
machine.wait_for_shutdown()
|
||||
|
||||
|
||||
def test_script() -> None:
|
||||
|
@ -892,13 +813,12 @@ def run_tests() -> None:
|
|||
global machines
|
||||
tests = os.environ.get("tests", None)
|
||||
if tests is not None:
|
||||
with log.nested("running the VM test script"):
|
||||
try:
|
||||
exec(tests, globals())
|
||||
except Exception as e:
|
||||
eprint("error: ")
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
logger.info("running the VM test script")
|
||||
try:
|
||||
exec(tests, globals())
|
||||
except Exception:
|
||||
logging.exception("error:")
|
||||
sys.exit(1)
|
||||
else:
|
||||
ptpython.repl.embed(locals(), globals())
|
||||
|
||||
|
@ -911,18 +831,19 @@ def run_tests() -> None:
|
|||
|
||||
@contextmanager
|
||||
def subtest(name: str) -> Iterator[None]:
|
||||
with log.nested(name):
|
||||
try:
|
||||
yield
|
||||
return True
|
||||
except Exception as e:
|
||||
log.log(f'Test "{name}" failed with error: "{e}"')
|
||||
raise e
|
||||
logger.info(name)
|
||||
try:
|
||||
yield
|
||||
return True
|
||||
except Exception as e:
|
||||
logger.info(f'Test "{name}" failed with error: "{e}"')
|
||||
raise e
|
||||
|
||||
return False
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main() -> None:
|
||||
global machines
|
||||
arg_parser = argparse.ArgumentParser()
|
||||
arg_parser.add_argument(
|
||||
"-K",
|
||||
|
@ -932,8 +853,6 @@ if __name__ == "__main__":
|
|||
)
|
||||
(cli_args, vm_scripts) = arg_parser.parse_known_args()
|
||||
|
||||
log = Logger()
|
||||
|
||||
vlan_nrs = list(dict.fromkeys(os.environ.get("VLANS", "").split()))
|
||||
vde_sockets = [create_vlan(v) for v in vlan_nrs]
|
||||
for nr, vde_socket, _, _ in vde_sockets:
|
||||
|
@ -944,23 +863,27 @@ if __name__ == "__main__":
|
|||
if not cli_args.keep_vm_state:
|
||||
machine.cleanup_statedir()
|
||||
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))
|
||||
|
||||
@atexit.register
|
||||
def clean_up() -> None:
|
||||
with log.nested("cleaning up"):
|
||||
for machine in machines:
|
||||
if machine.pid is None:
|
||||
continue
|
||||
log.log("killing {} (pid {})".format(machine.name, machine.pid))
|
||||
machine.process.kill()
|
||||
for _, _, process, _ in vde_sockets:
|
||||
process.terminate()
|
||||
log.close()
|
||||
logger.info("cleaning up")
|
||||
for machine in machines:
|
||||
if machine.pid is None:
|
||||
continue
|
||||
logger.info(f"killing {machine.name} (pid {machine.pid})")
|
||||
machine.process.kill()
|
||||
for _, _, process, _ in vde_sockets:
|
||||
process.terminate()
|
||||
|
||||
tic = time.time()
|
||||
run_tests()
|
||||
toc = time.time()
|
||||
print("test script finished in {:.2f}s".format(toc - tic))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
@ -62,7 +62,7 @@ rec {
|
|||
''
|
||||
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
|
||||
mkdir -p $out/coverage-data
|
||||
|
|
|
@ -178,8 +178,6 @@ in
|
|||
type = types.nullOr types.attrs; # TODO utilize lib.systems.parsedPlatform
|
||||
default = null;
|
||||
example = { system = "aarch64-linux"; config = "aarch64-unknown-linux-gnu"; };
|
||||
defaultText = literalExample
|
||||
''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
|
||||
description = ''
|
||||
Specifies the platform for which NixOS should be
|
||||
built. Specify this only if it is different from
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# A profile with most (vanilla) hardening options enabled by default,
|
||||
# potentially at the cost of features and performance.
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -27,6 +27,9 @@ with lib;
|
|||
|
||||
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.apparmor.enable = mkDefault true;
|
||||
|
|
|
@ -51,7 +51,7 @@ in
|
|||
};
|
||||
|
||||
secretKeyFile = mkOption {
|
||||
type = types.path;
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
A file containing your secret key. The security of your Duo application is tied to the security of your secret key.
|
||||
|
|
|
@ -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 {
|
||||
type = types.bool;
|
||||
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 {
|
||||
# Disable hibernation (allows replacing the running kernel)
|
||||
boot.kernelParams = [ "nohibernate" ];
|
||||
|
|
|
@ -47,7 +47,7 @@ in {
|
|||
enable = mkEnableOption "Icecast server";
|
||||
|
||||
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.";
|
||||
default = config.networking.domain;
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@ in{
|
|||
|
||||
config = mkOption {
|
||||
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.";
|
||||
example = ''
|
||||
# Configuration file generated by pwmconfig
|
||||
|
|
|
@ -172,7 +172,7 @@ in {
|
|||
};
|
||||
|
||||
database = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Database name to store sms data";
|
||||
};
|
||||
|
|
|
@ -83,14 +83,14 @@ in {
|
|||
};
|
||||
|
||||
dataStorageSpace = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "/data/storage";
|
||||
description = "Directory for data storage.";
|
||||
};
|
||||
|
||||
metadataStorageSpace = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "/data/meta";
|
||||
description = "Directory for meta data storage.";
|
||||
|
|
|
@ -87,7 +87,7 @@ in
|
|||
};
|
||||
|
||||
rpc.password = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Password for RPC connections.
|
||||
|
|
|
@ -89,7 +89,7 @@ in
|
|||
};
|
||||
|
||||
rpc.password = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Password for RPC connections.
|
||||
|
|
|
@ -11,8 +11,13 @@ let
|
|||
method = cfg.encryptionMethod;
|
||||
mode = cfg.mode;
|
||||
user = "nobody";
|
||||
fast_open = true;
|
||||
} // optionalAttrs (cfg.password != null) { password = cfg.password; };
|
||||
fast_open = cfg.fastOpen;
|
||||
} // 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);
|
||||
|
||||
|
@ -74,6 +79,14 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
fastOpen = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
use TCP fast-open
|
||||
'';
|
||||
};
|
||||
|
||||
encryptionMethod = mkOption {
|
||||
type = types.str;
|
||||
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";
|
||||
after = [ "network.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;
|
||||
script = ''
|
||||
${optionalString (cfg.passwordFile != null) ''
|
||||
|
|
|
@ -641,7 +641,7 @@ in
|
|||
credential = mkOption {
|
||||
default = null;
|
||||
example = "f1d00200d8dc783f7fb1e10ace8da27f8312d72692abfca2f7e4960a73f48e82e1f7571f6ebfcee9fb434f9886ccc8fcc52a6614d8d2";
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
description = "The FIDO2 credential ID.";
|
||||
};
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ in
|
|||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
type = types.nullOr types.package;
|
||||
default = config.boot.kernelPackages.prl-tools;
|
||||
defaultText = "config.boot.kernelPackages.prl-tools";
|
||||
example = literalExample "config.boot.kernelPackages.prl-tools";
|
||||
|
|
|
@ -307,6 +307,7 @@ in
|
|||
sanoid = handleTest ./sanoid.nix {};
|
||||
sddm = handleTest ./sddm.nix {};
|
||||
service-runner = handleTest ./service-runner.nix {};
|
||||
shadowsocks = handleTest ./shadowsocks.nix {};
|
||||
shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
|
||||
shiori = handleTest ./shiori.nix {};
|
||||
signal-desktop = handleTest ./signal-desktop.nix {};
|
||||
|
|
|
@ -74,7 +74,7 @@ let
|
|||
throw "Non-EFI boot methods are only supported on i686 / x86_64"
|
||||
else ''
|
||||
def assemble_qemu_flags():
|
||||
flags = "-cpu host"
|
||||
flags = "-cpu max"
|
||||
${if system == "x86_64-linux"
|
||||
then ''flags += " -m 768"''
|
||||
else ''flags += " -m 512 -enable-kvm -machine virt,gic-version=host"''
|
||||
|
@ -317,6 +317,7 @@ let
|
|||
texinfo
|
||||
unionfs-fuse
|
||||
xorg.lndir
|
||||
(lvm2.override { udev = null; }) # for initrd (extra-utils)
|
||||
|
||||
# add curl so that rather than seeing the test attempt to download
|
||||
# curl's tarball, we see what it's trying to download
|
||||
|
|
|
@ -1,103 +1,111 @@
|
|||
{ system ? builtins.currentSystem
|
||||
, config ? { }
|
||||
, pkgs ? import ../.. { inherit system config; } }:
|
||||
|
||||
with import ../lib/testing.nix { inherit system pkgs; };
|
||||
with pkgs.lib;
|
||||
|
||||
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";
|
||||
replicationUser = "wal_receiver_user";
|
||||
replicationSlot = "wal_receiver_slot";
|
||||
replicationConn = "postgresql://${replicationUser}@localhost";
|
||||
baseBackupDir = "/tmp/pg_basebackup";
|
||||
walBackupDir = "/tmp/pg_wal";
|
||||
atLeast12 = versionAtLeast postgresqlPackage.version "12.0";
|
||||
restoreCommand = ''
|
||||
restore_command = 'cp ${walBackupDir}/%f %p'
|
||||
'';
|
||||
|
||||
recoveryFile = if atLeast12
|
||||
then pkgs.writeTextDir "recovery.signal" ""
|
||||
else pkgs.writeTextDir "recovery.conf" "${restoreCommand}";
|
||||
|
||||
in makeTest {
|
||||
name = "postgresql-wal-receiver-${subTestName}";
|
||||
meta.maintainers = with maintainers; [ pacien ];
|
||||
|
||||
machine = { ... }: {
|
||||
# Needed because this test uses a non-default 'services.postgresql.dataDir'.
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/db/postgresql 0700 postgres postgres"
|
||||
];
|
||||
services.postgresql = {
|
||||
package = postgresqlPackage;
|
||||
enable = true;
|
||||
dataDir = postgresqlDataDir;
|
||||
extraConfig = ''
|
||||
wal_level = archive # alias for replica on pg >= 9.6
|
||||
max_wal_senders = 10
|
||||
max_replication_slots = 10
|
||||
'' + optionalString atLeast12 ''
|
||||
${restoreCommand}
|
||||
recovery_end_command = 'touch recovery.done'
|
||||
pkg = pkgs."${postgresqlPackage}";
|
||||
postgresqlDataDir = "/var/lib/postgresql/${pkg.psqlSchema}";
|
||||
replicationUser = "wal_receiver_user";
|
||||
replicationSlot = "wal_receiver_slot";
|
||||
replicationConn = "postgresql://${replicationUser}@localhost";
|
||||
baseBackupDir = "/tmp/pg_basebackup";
|
||||
walBackupDir = "/tmp/pg_wal";
|
||||
atLeast12 = lib.versionAtLeast pkg.version "12.0";
|
||||
restoreCommand = ''
|
||||
restore_command = 'cp ${walBackupDir}/%f %p'
|
||||
'';
|
||||
authentication = ''
|
||||
host replication ${replicationUser} all trust
|
||||
'';
|
||||
initialScript = pkgs.writeText "init.sql" ''
|
||||
create user ${replicationUser} replication;
|
||||
select * from pg_create_physical_replication_slot('${replicationSlot}');
|
||||
'';
|
||||
};
|
||||
|
||||
services.postgresqlWalReceiver.receivers.main = {
|
||||
inherit postgresqlPackage;
|
||||
connection = replicationConn;
|
||||
slot = replicationSlot;
|
||||
directory = walBackupDir;
|
||||
};
|
||||
# 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
|
||||
systemd.services.postgresql-wal-receiver-main.serviceConfig.RestartSec = mkForce 5;
|
||||
recoveryFile = if atLeast12
|
||||
then pkgs.writeTextDir "recovery.signal" ""
|
||||
else pkgs.writeTextDir "recovery.conf" "${restoreCommand}";
|
||||
|
||||
in {
|
||||
name = "postgresql-wal-receiver-${postgresqlPackage}";
|
||||
meta.maintainers = with lib.maintainers; [ pacien ];
|
||||
|
||||
machine = { ... }: {
|
||||
services.postgresql = {
|
||||
package = pkg;
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
wal_level = archive # alias for replica on pg >= 9.6
|
||||
max_wal_senders = 10
|
||||
max_replication_slots = 10
|
||||
'' + lib.optionalString atLeast12 ''
|
||||
${restoreCommand}
|
||||
recovery_end_command = 'touch recovery.done'
|
||||
'';
|
||||
authentication = ''
|
||||
host replication ${replicationUser} all trust
|
||||
'';
|
||||
initialScript = pkgs.writeText "init.sql" ''
|
||||
create user ${replicationUser} replication;
|
||||
select * from pg_create_physical_replication_slot('${replicationSlot}');
|
||||
'';
|
||||
};
|
||||
|
||||
services.postgresqlWalReceiver.receivers.main = {
|
||||
postgresqlPackage = pkg;
|
||||
connection = replicationConn;
|
||||
slot = replicationSlot;
|
||||
directory = walBackupDir;
|
||||
};
|
||||
# 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
|
||||
systemd.services.postgresql-wal-receiver-main.serviceConfig.RestartSec = lib.mkForce 5;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
# make an initial base backup
|
||||
machine.wait_for_unit("postgresql")
|
||||
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
|
||||
# required only for 9.4
|
||||
machine.sleep(5)
|
||||
machine.succeed(
|
||||
"${pkg}/bin/pg_basebackup --dbname=${replicationConn} --pgdata=${baseBackupDir}"
|
||||
)
|
||||
|
||||
# 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;'"
|
||||
)
|
||||
|
||||
# stop postgres and destroy data
|
||||
machine.systemctl("stop postgresql")
|
||||
machine.systemctl("stop postgresql-wal-receiver-main")
|
||||
machine.succeed("rm -r ${postgresqlDataDir}/{base,global,pg_*}")
|
||||
|
||||
# restore the base backup
|
||||
machine.succeed(
|
||||
"cp -r ${baseBackupDir}/* ${postgresqlDataDir} && chown postgres:postgres -R ${postgresqlDataDir}"
|
||||
)
|
||||
|
||||
# prepare WAL and recovery
|
||||
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.succeed(
|
||||
"cp ${recoveryFile}/* ${postgresqlDataDir}/ && chmod 666 ${postgresqlDataDir}/recovery*"
|
||||
)
|
||||
|
||||
# replay WAL
|
||||
machine.systemctl("start postgresql")
|
||||
machine.wait_for_file("${postgresqlDataDir}/recovery.done")
|
||||
machine.systemctl("restart postgresql")
|
||||
machine.wait_for_unit("postgresql")
|
||||
|
||||
# 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"
|
||||
)
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
# make an initial base backup
|
||||
$machine->waitForUnit('postgresql');
|
||||
$machine->waitForUnit('postgresql-wal-receiver-main');
|
||||
# WAL receiver healthchecks PG every 5 seconds, so let's be sure they have connected each other
|
||||
# required only for 9.4
|
||||
$machine->sleep(5);
|
||||
$machine->succeed('${postgresqlPackage}/bin/pg_basebackup --dbname=${replicationConn} --pgdata=${baseBackupDir}');
|
||||
|
||||
# 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;"');
|
||||
|
||||
# stop postgres and destroy data
|
||||
$machine->systemctl('stop postgresql');
|
||||
$machine->systemctl('stop postgresql-wal-receiver-main');
|
||||
$machine->succeed('rm -r ${postgresqlDataDir}/{base,global,pg_*}');
|
||||
|
||||
# restore the base backup
|
||||
$machine->succeed('cp -r ${baseBackupDir}/* ${postgresqlDataDir} && chown postgres:postgres -R ${postgresqlDataDir}');
|
||||
|
||||
# prepare WAL and recovery
|
||||
$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->succeed('cp ${recoveryFile}/* ${postgresqlDataDir}/ && chmod 666 ${postgresqlDataDir}/recovery*');
|
||||
|
||||
# replay WAL
|
||||
$machine->systemctl('start postgresql');
|
||||
$machine->waitForFile('${postgresqlDataDir}/recovery.done');
|
||||
$machine->systemctl('restart postgresql');
|
||||
$machine->waitForUnit('postgresql');
|
||||
|
||||
# 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');
|
||||
'';
|
||||
};
|
||||
|
||||
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 { })))
|
||||
|
|
80
nixos/tests/shadowsocks.nix
Normal file
80
nixos/tests/shadowsocks.nix
Normal 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"
|
||||
'';
|
||||
}
|
||||
)
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
assert use64bitGuest -> useKvmNestedVirt;
|
||||
|
||||
with import ../lib/testing.nix { inherit system pkgs; };
|
||||
with import ../lib/testing-python.nix { inherit system pkgs; };
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
|
@ -91,13 +91,15 @@ let
|
|||
(isYes "SERIAL_8250_CONSOLE")
|
||||
(isYes "SERIAL_8250")
|
||||
];
|
||||
|
||||
networking.usePredictableInterfaceNames = false;
|
||||
};
|
||||
|
||||
mkLog = logfile: tag: let
|
||||
rotated = map (i: "${logfile}.${toString i}") (range 1 9);
|
||||
all = concatMapStringsSep " " (f: "\"${f}\"") ([logfile] ++ rotated);
|
||||
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
|
||||
cfg = (import ../lib/eval-config.nix {
|
||||
|
@ -204,96 +206,105 @@ let
|
|||
};
|
||||
|
||||
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} {
|
||||
$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}");
|
||||
}
|
||||
${name}_sharepath = "${sharePath}"
|
||||
|
||||
sub createVM_${name} {
|
||||
vbm("createvm --name ${name} ${createFlags}");
|
||||
vbm("modifyvm ${name} ${vmFlags}");
|
||||
vbm("setextradata ${name} VBoxInternal/PDM/HaltOnReset 1");
|
||||
vbm("storagectl ${name} ${controllerFlags}");
|
||||
vbm("storageattach ${name} ${diskFlags}");
|
||||
vbm("sharedfolder add ${name} ${sharedFlags}");
|
||||
vbm("sharedfolder add ${name} ${nixstoreFlags}");
|
||||
cleanup_${name};
|
||||
|
||||
${mkLog "$HOME/VirtualBox VMs/${name}/Logs/VBox.log" "HOST-${name}"}
|
||||
}
|
||||
def check_running_${name}():
|
||||
cmd = "VBoxManage list runningvms | grep -q '^\"${name}\"'"
|
||||
(status, _) = machine.execute(ru(cmd))
|
||||
return status == 0
|
||||
|
||||
sub destroyVM_${name} {
|
||||
cleanup_${name};
|
||||
vbm("unregistervm ${name} --delete");
|
||||
}
|
||||
|
||||
sub waitForVMBoot_${name} {
|
||||
$machine->execute(ru(
|
||||
'set -e; i=0; '.
|
||||
'while ! test -e ${sharePath}/boot-done; do '.
|
||||
'sleep 10; i=$(($i + 10)); [ $i -le 3600 ]; '.
|
||||
'VBoxManage list runningvms | grep -q "^\"${name}\""; '.
|
||||
'done'
|
||||
));
|
||||
}
|
||||
def 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}")
|
||||
|
||||
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} {
|
||||
for (my $i = 0; $i <= 120; $i += 10) {
|
||||
$machine->sleep(10);
|
||||
return if checkRunning_${name};
|
||||
eval { $_[0]->() } if defined $_[0];
|
||||
}
|
||||
die "VirtualBox VM didn't start up within 2 minutes";
|
||||
}
|
||||
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}()
|
||||
|
||||
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";
|
||||
}
|
||||
${mkLog "$HOME/VirtualBox VMs/${name}/Logs/VBox.log" "HOST-${name}"}
|
||||
# fmt: on
|
||||
|
||||
sub shutdownVM_${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'
|
||||
);
|
||||
waitForShutdown_${name};
|
||||
}
|
||||
|
||||
def destroy_vm_${name}():
|
||||
cleanup_${name}()
|
||||
vbm("unregistervm ${name} --delete")
|
||||
|
||||
|
||||
def wait_for_vm_boot_${name}():
|
||||
machine.execute(
|
||||
ru(
|
||||
"set -e; i=0; "
|
||||
"while ! test -e ${sharePath}/boot-done; do "
|
||||
"sleep 10; i=$(($i + 10)); [ $i -le 3600 ]; "
|
||||
"VBoxManage list runningvms | grep -q '^\"${name}\"'; "
|
||||
"done"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def wait_for_ip_${name}(interface):
|
||||
property = f"/VirtualBox/GuestInfo/Net/{interface}/V4/IP"
|
||||
# fmt: off
|
||||
getip = f"VBoxManage guestproperty get ${name} {property} | sed -n -e 's/^Value: //p'"
|
||||
# fmt: on
|
||||
|
||||
ip = machine.succeed(
|
||||
ru(
|
||||
"for i in $(seq 1000); do "
|
||||
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 = ''
|
||||
sub ru ($) {
|
||||
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";
|
||||
}
|
||||
|
||||
from shlex import quote
|
||||
${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"}
|
||||
# fmt: on
|
||||
|
||||
${testScript}
|
||||
# (keep black happy)
|
||||
'';
|
||||
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
|
@ -393,133 +409,129 @@ let
|
|||
|
||||
unfreeTests = mapAttrs (mkVBoxTest true vboxVMsWithExtpack) {
|
||||
enable-extension-pack = ''
|
||||
createVM_testExtensionPack;
|
||||
vbm("startvm testExtensionPack");
|
||||
waitForStartup_testExtensionPack;
|
||||
$machine->screenshot("cli_started");
|
||||
waitForVMBoot_testExtensionPack;
|
||||
$machine->screenshot("cli_booted");
|
||||
create_vm_testExtensionPack()
|
||||
vbm("startvm testExtensionPack")
|
||||
wait_for_startup_testExtensionPack()
|
||||
machine.screenshot("cli_started")
|
||||
wait_for_vm_boot_testExtensionPack()
|
||||
machine.screenshot("cli_booted")
|
||||
|
||||
$machine->nest("Checking for privilege escalation", sub {
|
||||
$machine->fail("test -e '/root/VirtualBox VMs'");
|
||||
$machine->fail("test -e '/root/.config/VirtualBox'");
|
||||
$machine->succeed("test -e '/home/alice/VirtualBox VMs'");
|
||||
});
|
||||
with machine.nested("Checking for privilege escalation"):
|
||||
machine.fail("test -e '/root/VirtualBox VMs'")
|
||||
machine.fail("test -e '/root/.config/VirtualBox'")
|
||||
machine.succeed("test -e '/home/alice/VirtualBox VMs'")
|
||||
|
||||
shutdownVM_testExtensionPack;
|
||||
destroyVM_testExtensionPack;
|
||||
shutdown_vm_testExtensionPack()
|
||||
destroy_vm_testExtensionPack()
|
||||
'';
|
||||
};
|
||||
|
||||
in mapAttrs (mkVBoxTest false vboxVMs) {
|
||||
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.
|
||||
$machine->sendKeys("home");
|
||||
$machine->sendKeys("down");
|
||||
$machine->sendKeys("ret");
|
||||
$machine->screenshot("gui_manager_sent_startup");
|
||||
waitForStartup_simple (sub {
|
||||
$machine->sendKeys("home");
|
||||
$machine->sendKeys("down");
|
||||
$machine->sendKeys("ret");
|
||||
});
|
||||
$machine->screenshot("gui_started");
|
||||
waitForVMBoot_simple;
|
||||
$machine->screenshot("gui_booted");
|
||||
shutdownVM_simple;
|
||||
$machine->sleep(5);
|
||||
$machine->screenshot("gui_stopped");
|
||||
$machine->sendKeys("ctrl-q");
|
||||
$machine->sleep(5);
|
||||
$machine->screenshot("gui_manager_stopped");
|
||||
destroyVM_simple;
|
||||
def send_vm_startup():
|
||||
machine.send_key("home")
|
||||
machine.send_key("down")
|
||||
machine.send_key("ret")
|
||||
|
||||
|
||||
create_vm_simple()
|
||||
machine.succeed(ru("VirtualBox &"))
|
||||
machine.wait_until_succeeds(ru("xprop -name 'Oracle VM VirtualBox Manager'"))
|
||||
machine.sleep(5)
|
||||
machine.screenshot("gui_manager_started")
|
||||
send_vm_startup()
|
||||
machine.screenshot("gui_manager_sent_startup")
|
||||
wait_for_startup_simple(send_vm_startup)
|
||||
machine.screenshot("gui_started")
|
||||
wait_for_vm_boot_simple()
|
||||
machine.screenshot("gui_booted")
|
||||
shutdown_vm_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 = ''
|
||||
createVM_simple;
|
||||
vbm("startvm simple");
|
||||
waitForStartup_simple;
|
||||
$machine->screenshot("cli_started");
|
||||
waitForVMBoot_simple;
|
||||
$machine->screenshot("cli_booted");
|
||||
create_vm_simple()
|
||||
vbm("startvm simple")
|
||||
wait_for_startup_simple()
|
||||
machine.screenshot("cli_started")
|
||||
wait_for_vm_boot_simple()
|
||||
machine.screenshot("cli_booted")
|
||||
|
||||
$machine->nest("Checking for privilege escalation", sub {
|
||||
$machine->fail("test -e '/root/VirtualBox VMs'");
|
||||
$machine->fail("test -e '/root/.config/VirtualBox'");
|
||||
$machine->succeed("test -e '/home/alice/VirtualBox VMs'");
|
||||
});
|
||||
with machine.nested("Checking for privilege escalation"):
|
||||
machine.fail("test -e '/root/VirtualBox VMs'")
|
||||
machine.fail("test -e '/root/.config/VirtualBox'")
|
||||
machine.succeed("test -e '/home/alice/VirtualBox VMs'")
|
||||
|
||||
shutdownVM_simple;
|
||||
destroyVM_simple;
|
||||
shutdown_vm_simple()
|
||||
destroy_vm_simple()
|
||||
'';
|
||||
|
||||
headless = ''
|
||||
createVM_headless;
|
||||
$machine->succeed(ru("VBoxHeadless --startvm headless & disown %1"));
|
||||
waitForStartup_headless;
|
||||
waitForVMBoot_headless;
|
||||
shutdownVM_headless;
|
||||
destroyVM_headless;
|
||||
create_vm_headless()
|
||||
machine.succeed(ru("VBoxHeadless --startvm headless & disown %1"))
|
||||
wait_for_startup_headless()
|
||||
wait_for_vm_boot_headless()
|
||||
shutdown_vm_headless()
|
||||
destroy_vm_headless()
|
||||
'';
|
||||
|
||||
host-usb-permissions = ''
|
||||
my $userUSB = removeUUIDs vbm("list usbhost");
|
||||
print STDERR $userUSB;
|
||||
my $rootUSB = removeUUIDs $machine->succeed("VBoxManage list usbhost");
|
||||
print STDERR $rootUSB;
|
||||
user_usb = remove_uuids(vbm("list usbhost"))
|
||||
print(user_usb, file=sys.stderr)
|
||||
root_usb = remove_uuids(machine.succeed("VBoxManage list usbhost"))
|
||||
print(root_usb, file=sys.stderr)
|
||||
|
||||
die "USB host devices differ for root and normal user"
|
||||
if $userUSB ne $rootUSB;
|
||||
die "No USB host devices found" if $userUSB =~ /<none>/;
|
||||
if user_usb != root_usb:
|
||||
raise Exception("USB host devices differ for root and normal user")
|
||||
if "<none>" in user_usb:
|
||||
raise Exception("No USB host devices found")
|
||||
'';
|
||||
|
||||
systemd-detect-virt = ''
|
||||
createVM_detectvirt;
|
||||
vbm("startvm detectvirt");
|
||||
waitForStartup_detectvirt;
|
||||
waitForVMBoot_detectvirt;
|
||||
shutdownVM_detectvirt;
|
||||
my $result = $machine->succeed("cat '$detectvirt_sharepath/result'");
|
||||
chomp $result;
|
||||
destroyVM_detectvirt;
|
||||
die "systemd-detect-virt returned \"$result\" instead of \"oracle\""
|
||||
if $result ne "oracle";
|
||||
create_vm_detectvirt()
|
||||
vbm("startvm detectvirt")
|
||||
wait_for_startup_detectvirt()
|
||||
wait_for_vm_boot_detectvirt()
|
||||
shutdown_vm_detectvirt()
|
||||
result = machine.succeed(f"cat '{detectvirt_sharepath}/result'").strip()
|
||||
destroy_vm_detectvirt()
|
||||
if result != "oracle":
|
||||
raise Exception(f'systemd-detect-virt returned "{result}" instead of "oracle"')
|
||||
'';
|
||||
|
||||
net-hostonlyif = ''
|
||||
createVM_test1;
|
||||
createVM_test2;
|
||||
create_vm_test1()
|
||||
create_vm_test2()
|
||||
|
||||
vbm("startvm test1");
|
||||
waitForStartup_test1;
|
||||
waitForVMBoot_test1;
|
||||
vbm("startvm test1")
|
||||
wait_for_startup_test1()
|
||||
wait_for_vm_boot_test1()
|
||||
|
||||
vbm("startvm test2");
|
||||
waitForStartup_test2;
|
||||
waitForVMBoot_test2;
|
||||
vbm("startvm test2")
|
||||
wait_for_startup_test2()
|
||||
wait_for_vm_boot_test2()
|
||||
|
||||
$machine->screenshot("net_booted");
|
||||
machine.screenshot("net_booted")
|
||||
|
||||
my $test1IP = waitForIP_test1 1;
|
||||
my $test2IP = waitForIP_test2 1;
|
||||
test1_ip = wait_for_ip_test1(1)
|
||||
test2_ip = wait_for_ip_test2(1)
|
||||
|
||||
$machine->succeed("echo '$test2IP' | nc -N '$test1IP' 1234");
|
||||
$machine->succeed("echo '$test1IP' | nc -N '$test2IP' 1234");
|
||||
machine.succeed(f"echo '{test2_ip}' | nc -N '{test1_ip}' 1234")
|
||||
machine.succeed(f"echo '{test1_ip}' | nc -N '{test2_ip}' 1234")
|
||||
|
||||
$machine->waitUntilSucceeds("nc -N '$test1IP' 5678 < /dev/null >&2");
|
||||
$machine->waitUntilSucceeds("nc -N '$test2IP' 5678 < /dev/null >&2");
|
||||
machine.wait_until_succeeds(f"nc -N '{test1_ip}' 5678 < /dev/null >&2")
|
||||
machine.wait_until_succeeds(f"nc -N '{test2_ip}' 5678 < /dev/null >&2")
|
||||
|
||||
shutdownVM_test1;
|
||||
shutdownVM_test2;
|
||||
shutdown_vm_test1()
|
||||
shutdown_vm_test2()
|
||||
|
||||
destroyVM_test1;
|
||||
destroyVM_test2;
|
||||
destroy_vm_test1()
|
||||
destroy_vm_test2()
|
||||
'';
|
||||
} // (if enableUnfree then unfreeTests else {})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, cmake, eigen, libav_all }:
|
||||
{ stdenv, fetchFromGitHub, cmake, eigen, libav }:
|
||||
stdenv.mkDerivation {
|
||||
pname = "musly";
|
||||
version = "unstable-2017-04-26";
|
||||
|
@ -9,7 +9,7 @@ stdenv.mkDerivation {
|
|||
sha256 = "1q42wvdwy2pac7bhfraqqj2czw7w2m33ms3ifjl8phm7d87i8825";
|
||||
};
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ eigen (libav_all.override { vaapiSupport = stdenv.isLinux; }).libav_11 ];
|
||||
buildInputs = [ eigen (libav.override { vaapiSupport = stdenv.isLinux; }) ];
|
||||
fixupPhase = if stdenv.isDarwin then ''
|
||||
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
|
||||
|
|
|
@ -10,13 +10,13 @@ assert pcreSupport -> pcre != null;
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ncmpc";
|
||||
version = "0.38";
|
||||
version = "0.39";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MusicPlayerDaemon";
|
||||
repo = "ncmpc";
|
||||
rev = "v${version}";
|
||||
sha256 = "1kidpd1xrfax3v31q93r9g9b7jd841476q47wgd94h1a86b70gs9";
|
||||
sha256 = "08xrcinfm1a7hjycf8la7gnsxbp3six70ks987dr7j42kd42irfq";
|
||||
};
|
||||
|
||||
buildInputs = [ glib ncurses mpd_clientlib boost ]
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "go-ethereum";
|
||||
version = "1.9.19";
|
||||
version = "1.9.20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ethereum";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "08wf7qklk31dky2z0l2j9vbyr8721gkvy4dsc60afwrwihwd8lrp";
|
||||
sha256 = "031cbl8yqw5g5yrm5h1x8s5ckdw2xkym46009l579zvafn2vcnj7";
|
||||
};
|
||||
|
||||
runVend = true;
|
||||
|
@ -42,6 +42,6 @@ buildGoModule rec {
|
|||
homepage = "https://geth.ethereum.org/";
|
||||
description = "Official golang implementation of the Ethereum protocol";
|
||||
license = with licenses; [ lgpl3 gpl3 ];
|
||||
maintainers = with maintainers; [ adisbladis lionello xrelkd ];
|
||||
maintainers = with maintainers; [ adisbladis lionello xrelkd RaghavSood ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
{ stdenv, pkgconfig, qt5, fetchFromGitHub }:
|
||||
|
||||
with qt5;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.10.0";
|
||||
{ stdenv, mkDerivation, pkgconfig, qmake, qttools, qtbase, qtsvg, qtx11extras, fetchFromGitHub }:
|
||||
mkDerivation rec {
|
||||
pname = "featherpad";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tsujan";
|
||||
repo = "FeatherPad";
|
||||
rev = "V${version}";
|
||||
sha256 = "1wrbs6kni9s3x39cckm9kzpglryxn5vyarilvh9pafbzpc6rc57p";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake pkgconfig qttools ];
|
||||
buildInputs = [ qtbase qtsvg qtx11extras ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Lightweight Qt5 Plain-Text Editor for Linux";
|
||||
homepage = "https://github.com/tsujan/FeatherPad";
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
, desktop-file-utils, libSM, imagemagick }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "20.03";
|
||||
version = "20.08";
|
||||
pname = "mediainfo-gui";
|
||||
src = fetchurl {
|
||||
url = "https://mediaarea.net/download/source/mediainfo/${version}/mediainfo_${version}.tar.xz";
|
||||
sha256 = "1f1shnycf0f1fwka9k9s250l228xjkg0k4k73h8bpld8msighgnw";
|
||||
sha256 = "1baf2dj5s3g1x4ssqli1b2r1203syk42m09zhp36qcinmfixv11l";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||
|
|
|
@ -1,114 +1,171 @@
|
|||
{ pkgs, stdenv, lib, fetchFromGitHub, python3
|
||||
# To include additional plugins, pass them here as an overlay.
|
||||
{ pkgs
|
||||
, stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
# To include additional plugins, pass them here as an overlay.
|
||||
, packageOverrides ? self: super: {}
|
||||
}:
|
||||
let
|
||||
mkOverride = attrname: version: sha256:
|
||||
self: super: {
|
||||
${attrname} = super.${attrname}.overridePythonAttrs (oldAttrs: {
|
||||
self: super: {
|
||||
${attrname} = super.${attrname}.overridePythonAttrs (
|
||||
oldAttrs: {
|
||||
inherit version;
|
||||
src = oldAttrs.src.override {
|
||||
inherit version sha256;
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
py = python3.override {
|
||||
self = py;
|
||||
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([
|
||||
(mkOverride "flask" "0.12.5" "fac2b9d443e49f7e7358a444a3db5950bdd0324674d92ba67f8f1f15f876b14f")
|
||||
(mkOverride "flask_assets" "0.12" "0ivqsihk994rxw58vdgzrx4d77d7lpzjm4qxb38hjdgvi5xm4cb0")
|
||||
(mkOverride "flaskbabel" "0.12.2" "11jwp8vvq1gnm31qh6ihy2h393hy18yn9yjp569g60r0wj1x2sii")
|
||||
(mkOverride "flask_login" "0.4.1" "1v2j8zd558xfmgn3rfbw0xz4vizjcnk8kqw52q4f4d9ygfnc25f8")
|
||||
(mkOverride "markdown" "3.1.1" "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a")
|
||||
(mkOverride "tornado" "4.5.3" "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d")
|
||||
(mkOverride "psutil" "5.6.7" "ffad8eb2ac614518bbe3c0b8eb9dffdb3a8d2e3a7d5da51c5b974fb723a5c5aa")
|
||||
(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")
|
||||
packageOverrides = lib.foldr lib.composeExtensions (self: super: {}) (
|
||||
[
|
||||
# the following dependencies are non trivial to update since later versions introduce backwards incompatible
|
||||
# changes that might affect plugins, or due to other observed problems
|
||||
(mkOverride "markupsafe" "1.1.1" "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b")
|
||||
(mkOverride "rsa" "4.0" "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487")
|
||||
(mkOverride "markdown" "3.1.1" "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a")
|
||||
(mkOverride "tornado" "5.1.1" "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409")
|
||||
(mkOverride "unidecode" "0.04.21" "280a6ab88e1f2eb5af79edff450021a0d3f0448952847cd79677e55e58bad051")
|
||||
|
||||
# Octoprint holds back jinja2 to 2.8.1 due to breaking changes.
|
||||
# This old version does not have updated test config for pytest 4,
|
||||
# and pypi tarball doesn't contain tests dir anyways.
|
||||
(self: super: {
|
||||
jinja2 = super.jinja2.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "2.8.1";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "14aqmhkc9rw5w0v311jhixdm6ym8vsm29dhyxyrjfqxljwx1yd1m";
|
||||
};
|
||||
doCheck = false;
|
||||
});
|
||||
# Built-in dependency
|
||||
(
|
||||
self: super: {
|
||||
octoprint-filecheck = self.buildPythonPackage rec {
|
||||
pname = "OctoPrint-FileCheck";
|
||||
version = "2020.08.07";
|
||||
|
||||
httpretty = super.httpretty.overridePythonAttrs (oldAttrs: rec {
|
||||
doCheck = false;
|
||||
});
|
||||
src = fetchFromGitHub {
|
||||
owner = "OctoPrint";
|
||||
repo = "OctoPrint-FileCheck";
|
||||
rev = version;
|
||||
sha256 = "05ys05l5x7d2bkg3yqrga6m65v3g5fcnnzbfab7j9w2pzjdapx5b";
|
||||
};
|
||||
doCheck = false;
|
||||
};
|
||||
}
|
||||
)
|
||||
|
||||
celery = super.celery.overridePythonAttrs (oldAttrs: rec {
|
||||
doCheck = false;
|
||||
});
|
||||
})
|
||||
(self: super: {
|
||||
octoprint = self.buildPythonPackage rec {
|
||||
pname = "OctoPrint";
|
||||
version = "1.4.0";
|
||||
# Built-in dependency
|
||||
(
|
||||
self: super: {
|
||||
octoprint-firmwarecheck = self.buildPythonPackage rec {
|
||||
pname = "OctoPrint-FirmwareCheck";
|
||||
version = "2020.06.22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "foosel";
|
||||
repo = "OctoPrint";
|
||||
rev = version;
|
||||
sha256 = "0387228544v28d69dcdg2zr5gp6qavkfr6dydpjgj5awxv3w25d5";
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
owner = "OctoPrint";
|
||||
repo = "OctoPrint-FirmwareCheck";
|
||||
rev = version;
|
||||
sha256 = "19y7hrgg9z8hl7cwqkvg8nc8bk0wwrsfvjd1wawy33wn60psqv1h";
|
||||
};
|
||||
doCheck = false;
|
||||
};
|
||||
}
|
||||
)
|
||||
|
||||
propagatedBuildInputs = with super; [
|
||||
awesome-slugify flask flask_assets rsa requests pkginfo watchdog
|
||||
semantic-version werkzeug flaskbabel tornado
|
||||
psutil pyserial flask_login netaddr markdown
|
||||
pylru pyyaml sarge feedparser netifaces click websocket_client
|
||||
scandir chainmap future wrapt monotonic emoji jinja2
|
||||
frozendict cachelib sentry-sdk filetype markupsafe
|
||||
] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ];
|
||||
(
|
||||
self: super: {
|
||||
octoprint = self.buildPythonPackage rec {
|
||||
pname = "OctoPrint";
|
||||
version = "1.4.2";
|
||||
|
||||
checkInputs = with super; [ pytestCheckHook mock ddt ];
|
||||
src = fetchFromGitHub {
|
||||
owner = "OctoPrint";
|
||||
repo = "OctoPrint";
|
||||
rev = version;
|
||||
sha256 = "1bblrjwkccy1ifw7lf55g3k9lq1sqzwd49vj8bfzj2w07a7qda62";
|
||||
};
|
||||
|
||||
postPatch = let
|
||||
ignoreVersionConstraints = [
|
||||
"sentry-sdk"
|
||||
];
|
||||
in ''
|
||||
sed -r -i \
|
||||
${lib.concatStringsSep "\n" (map (e:
|
||||
''-e 's@${e}[<>=]+.*@${e}",@g' \''
|
||||
) ignoreVersionConstraints)}
|
||||
setup.py
|
||||
'';
|
||||
propagatedBuildInputs = with super; [
|
||||
octoprint-firmwarecheck
|
||||
octoprint-filecheck
|
||||
markupsafe
|
||||
tornado
|
||||
markdown
|
||||
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 ];
|
||||
|
||||
dontUseSetuptoolsCheck = true;
|
||||
checkInputs = with super; [ pytestCheckHook mock ddt ];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
rm pytest.ini
|
||||
'';
|
||||
postPatch = let
|
||||
ignoreVersionConstraints = [
|
||||
"sentry-sdk"
|
||||
];
|
||||
in
|
||||
''
|
||||
sed -r -i \
|
||||
${lib.concatStringsSep "\n" (
|
||||
map (
|
||||
e:
|
||||
''-e 's@${e}[<>=]+.*@${e}",@g' \''
|
||||
) ignoreVersionConstraints
|
||||
)}
|
||||
setup.py
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
"test_check_setup" # Why should it be able to call pip?
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"test_set_external_modification"
|
||||
];
|
||||
dontUseSetuptoolsCheck = true;
|
||||
|
||||
passthru.python = self.python;
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
rm pytest.ini
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://octoprint.org/";
|
||||
description = "The snappy web interface for your 3D printer";
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ abbradar gebner WhittlesJr ];
|
||||
};
|
||||
};
|
||||
})
|
||||
(import ./plugins.nix {inherit pkgs;})
|
||||
packageOverrides
|
||||
]);
|
||||
disabledTests = [
|
||||
"test_check_setup" # Why should it be able to call pip?
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"test_set_external_modification"
|
||||
];
|
||||
|
||||
passthru.python = self.python;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://octoprint.org/";
|
||||
description = "The snappy web interface for your 3D printer";
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ abbradar gebner WhittlesJr ];
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
(import ./plugins.nix { inherit pkgs; })
|
||||
packageOverrides
|
||||
]
|
||||
);
|
||||
};
|
||||
in with py.pkgs; toPythonApplication octoprint
|
||||
in
|
||||
with py.pkgs; toPythonApplication octoprint
|
||||
|
|
27
pkgs/applications/misc/tty-solitaire/default.nix
Normal file
27
pkgs/applications/misc/tty-solitaire/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -90,6 +90,5 @@ mkChromiumDerivation (base: rec {
|
|||
platforms = platforms.linux;
|
||||
hydraPlatforms = if channel == "stable" then ["aarch64-linux" "x86_64-linux"] else [];
|
||||
timeout = 172800; # 48 hours
|
||||
broken = channel == "dev"; # Requires LLVM 11
|
||||
};
|
||||
})
|
||||
|
|
|
@ -144,8 +144,9 @@ let
|
|||
++ optional pulseSupport libpulseaudio
|
||||
++ optionals useOzone [ libdrm wayland mesa_drivers libxkbcommon ];
|
||||
|
||||
patches = [
|
||||
patches = optionals (versionRange "68" "86") [
|
||||
./patches/nix_plugin_paths_68.patch
|
||||
] ++ [
|
||||
./patches/remove-webp-include-69.patch
|
||||
./patches/no-build-timestamps.patch
|
||||
./patches/widevine-79.patch
|
||||
|
@ -159,12 +160,18 @@ let
|
|||
#
|
||||
# ++ optionals (channel == "dev") [ ( 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-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
|
||||
substituteInPlace sandbox/linux/suid/client/setuid_sandbox_host.cc \
|
||||
--replace \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ newScope, config, stdenv, llvmPackages_9, llvmPackages_10
|
||||
{ newScope, config, stdenv, llvmPackages_10, llvmPackages_11
|
||||
, makeWrapper, ed, gnugrep, coreutils
|
||||
, glib, gtk3, gnome3, gsettings-desktop-schemas, gn, fetchgit
|
||||
, libva ? null
|
||||
|
@ -28,7 +28,7 @@ let
|
|||
|
||||
callPackage = newScope chromium;
|
||||
|
||||
chromium = {
|
||||
chromium = rec {
|
||||
inherit stdenv llvmPackages;
|
||||
|
||||
upstream-info = (callPackage ./update.nix {}).getChannel channel;
|
||||
|
@ -36,15 +36,6 @@ let
|
|||
mkChromiumDerivation = callPackage ./common.nix ({
|
||||
inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useOzone;
|
||||
# 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: {
|
||||
version = "2020-05-19";
|
||||
src = fetchgit {
|
||||
|
@ -53,7 +44,8 @@ let
|
|||
sha256 = "0197msabskgfbxvhzq73gc3wlr3n9cr4bzrhy5z5irbvy05lxk17";
|
||||
};
|
||||
});
|
||||
} // lib.optionalAttrs (channel == "dev") {
|
||||
} // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "86") {
|
||||
llvmPackages = llvmPackages_11;
|
||||
gnChromium = gn.overrideAttrs (oldAttrs: {
|
||||
version = "2020-07-20";
|
||||
src = fetchgit {
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
# This file is autogenerated from update.sh in the same directory.
|
||||
{
|
||||
beta = {
|
||||
sha256 = "0i7vd0w1swvxw46wiy1xrni02xa7yvccw4cp9v2dc2lm5r43dw5q";
|
||||
sha256bin64 = "0by3fgmd54zj5q5znazrl3vf42ik3rhirwy5815i7isqiq7bb6lq";
|
||||
version = "85.0.4183.69";
|
||||
sha256 = "0fz781bxx1rnjwfix2dgzq5w1lg3x6a9vd9k49gh4z5q092slr10";
|
||||
sha256bin64 = "12nm7h70pbzwc5rc7kcwfwgjs0h8cdnys5wlfjkbq6irwb6m1lm6";
|
||||
version = "85.0.4183.83";
|
||||
};
|
||||
dev = {
|
||||
sha256 = "1yasmx3alal3gygyjvvjk799z0b6p6nm7q10m0qyls2mpfvxpcyw";
|
||||
sha256bin64 = "0lp93z9qwdbjblmj0d514plk44hs0yqw1v7vr5mnrrx6l9gm0yg0";
|
||||
version = "86.0.4229.0";
|
||||
sha256 = "16yj47x580i8p88m88f5bcs85qmrfwmyp9na7yrnk0lnq06wbj4i";
|
||||
sha256bin64 = "0i81xcfdn65j2i4vfx52v4a9vlar8y9ykqdhshymqfz4qqqk37d1";
|
||||
version = "86.0.4238.0";
|
||||
};
|
||||
stable = {
|
||||
sha256 = "1n4n95gllqmsrzxmcp9p4gz95gndq2v3vknfvm8p1qfhjqah0hfx";
|
||||
sha256bin64 = "1ak903wm8zq6pri88md2wdij3izr6kz9d4avyqnpmd68ch16vfnj";
|
||||
version = "84.0.4147.135";
|
||||
sha256 = "0fz781bxx1rnjwfix2dgzq5w1lg3x6a9vd9k49gh4z5q092slr10";
|
||||
sha256bin64 = "0fa3la2nvqr0w40j2qkbwnh36924fsp2ajsla6aky6hz08mq2q1g";
|
||||
version = "85.0.4183.83";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
, gnused
|
||||
, gnugrep
|
||||
, gnupg
|
||||
, ffmpeg_3
|
||||
, ffmpeg
|
||||
, runtimeShell
|
||||
, mesa # firefox wants gbm for drm+dmabuf
|
||||
, systemLocale ? config.i18n.defaultLocale or "en-US"
|
||||
|
@ -130,7 +130,7 @@ stdenv.mkDerivation {
|
|||
libpulseaudio
|
||||
(lib.getDev libpulseaudio)
|
||||
systemd
|
||||
ffmpeg_3
|
||||
ffmpeg
|
||||
] + ":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" [
|
||||
stdenv.cc.cc
|
||||
];
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "istioctl";
|
||||
version = "1.6.7";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "istio";
|
||||
repo = "istio";
|
||||
rev = version;
|
||||
sha256 = "0zqp78ilr39j4pyqyk8a0rc0dlmkgzdd2ksfjd7vyjns5mrrjfj7";
|
||||
sha256 = "0541j1wdhlbm2spl1w3m0hig7lqn05xk1xws8748wfzbr8wkir31";
|
||||
};
|
||||
vendorSha256 = "0cc0lmjsxrn3f78k95wklf3yn5k7h8slwnwmssy1i1h0bkcg1bai";
|
||||
vendorSha256 = "0sz92nspfclqxnx0mf80jxqqwxanqsx9nl9hg7f9izks7jw544vx";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "k9s";
|
||||
version = "0.21.2";
|
||||
version = "0.21.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "derailed";
|
||||
repo = "k9s";
|
||||
rev = "v${version}";
|
||||
sha256 = "06yjc4lrqr3y7428xkfcgfg3aal71r437ij2hqd2yjxsq8r7zvif";
|
||||
sha256 = "1rw1vzxfjzklzdpcxz7mplvlmggavaym260s7vzvbgvd1snf38cb";
|
||||
};
|
||||
|
||||
buildFlagsArray = ''
|
||||
|
@ -18,7 +18,7 @@ buildGoModule rec {
|
|||
-X github.com/derailed/k9s/cmd.commit=${src.rev}
|
||||
'';
|
||||
|
||||
vendorSha256 = "1hmqvcvlffd8cpqcnn2f9mnyiwdhw8k46sl2p6rk16yrj06la9mr";
|
||||
vendorSha256 = "05rsbi40pihdh212d5zn6cchnkrqd6rsyl3vfsw77ksybwakrbf7";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "node-problem-detector";
|
||||
version = "0.8.2";
|
||||
version = "0.8.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kubernetes";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0cphlaf9k2va879jgqd6fzdgkscpwg29j1cpr677i3zj3hfgaw1g";
|
||||
sha256 = "1sga5l8bvqgm0j71yj3l1ykqvchxa7cg8pkfvjsrqlikgrfb54f3";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ stdenv, fetchurl, makeWrapper, jre }:
|
||||
|
||||
let
|
||||
version = "2020.2.1.2";
|
||||
version = "2020.2.3.1";
|
||||
majorVersion = builtins.substring 0 6 version;
|
||||
in
|
||||
|
||||
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "http://download.flexibee.eu/download/${majorVersion}/${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1a382lwyscvl5gdax5vs0shzmbnhjgggrv0hcwid8kf2s98diw5n";
|
||||
sha256 = "05wzg7f6mzz7r6azzb8k2g5fakkqh6762y4q9qkmrzbixvxh4lz9";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
|
|
@ -4,12 +4,12 @@ with stdenv.lib;
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "marvin";
|
||||
version = "20.16.0";
|
||||
version = "20.17.0";
|
||||
|
||||
src = fetchurl {
|
||||
name = "marvin-${version}.deb";
|
||||
url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb";
|
||||
sha256 = "0wfg5zd8dvjy6x6al58jd5d53gar3ds326q3b6771h5p5jzv0x2g";
|
||||
sha256 = "0ip6ma9ivk5b74s9najn2rrkiha7hya1rjhgyrc71kwsj5gqgli0";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper ];
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gerrit";
|
||||
version = "3.2.2";
|
||||
version = "3.2.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://gerrit-releases.storage.googleapis.com/gerrit-${version}.war";
|
||||
sha256 = "08i6rb8hawj44gg57mbhwjjmfn7mc45racl8gjsyrcyb8jm6zj1s";
|
||||
sha256 = "0hdxbn5qqqjzpqfcydz33nc351zanxp0j2k0ivizx4dn40fnavd7";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
|
|
33
pkgs/applications/video/electronplayer/electronplayer.nix
Normal file
33
pkgs/applications/video/electronplayer/electronplayer.nix
Normal 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" ];
|
||||
};
|
||||
}
|
|
@ -95,12 +95,33 @@ stdenv.mkDerivation rec {
|
|||
cd ..
|
||||
done
|
||||
''}
|
||||
${lib.optionalString (lib.versionAtLeast version "10.1") ''
|
||||
${lib.optionalString (lib.versionAtLeast version "10.1" && lib.versionOlder version "11") ''
|
||||
cd pkg/builds/cuda-toolkit
|
||||
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") ''
|
||||
# let's remove the 32-bit libraries, they confuse the lib64->lib mover
|
||||
|
@ -152,7 +173,7 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
postInstall = ''
|
||||
for b in nvvp nsight; do
|
||||
for b in nvvp ${lib.optionalString (lib.versionOlder version "11") "nsight"}; do
|
||||
wrapProgram "$out/bin/$b" \
|
||||
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
||||
done
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
, gcc48
|
||||
, gcc6
|
||||
, gcc7
|
||||
, gcc9
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -136,4 +137,14 @@ in rec {
|
|||
};
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "fasm-bin";
|
||||
|
||||
version = "1.73.24";
|
||||
version = "1.73.25";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://flatassembler.net/fasm-${version}.tgz";
|
||||
sha256 = "142vxhs8mh8isvlzq7ir0asmqda410phzxmk9gk9b43dldskkj7k";
|
||||
sha256 = "0k3h61mfwslyb34kf4dnapfwl8jxlmrp4dv666wc057hkj047knn";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -95,6 +95,9 @@ in stdenv.mkDerivation (rec {
|
|||
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; [
|
||||
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||
|
|
|
@ -96,7 +96,7 @@ in makePackage {
|
|||
postFixup = ''
|
||||
# Remove references to bootstrap.
|
||||
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"
|
||||
done
|
||||
'';
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "intel-gmmlib";
|
||||
version = "20.2.3";
|
||||
version = "20.2.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "gmmlib";
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "1gsjcsad70pxafhw0jhxdrnfqwv8ffp5sawbgylvc009jlzxh5l8";
|
||||
sha256 = "0jg3kc74iqmbclx77a6dp4h85va8wi210x4zf5jypiq35c57r8hh";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libmatroska";
|
||||
version = "1.6.1";
|
||||
version = "1.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Matroska-Org";
|
||||
repo = "libmatroska";
|
||||
rev = "release-${version}";
|
||||
sha256 = "1ws07ldcm5gy8z8p627vknqcb8iw1hxdby24g0xi6hbfy66p6qxs";
|
||||
sha256 = "0yhr9hhgljva1fx3b0r4s3wkkypdfgsysbl35a4g3krkbhaa9rsd";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
|
|
@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
|
|||
version = "4.3";
|
||||
|
||||
src = let
|
||||
rev_version = stdenv.lib.replaceStrings ["-"] ["_"] version;
|
||||
rev_version = stdenv.lib.replaceStrings ["."] ["_"] version;
|
||||
in fetchFromGitHub {
|
||||
owner = "adah1972";
|
||||
repo = pname;
|
||||
|
|
|
@ -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
|
||||
generic = args: callPackage (import ./generic.nix (removeAttrs args ["cudatoolkit"])) {
|
||||
|
@ -80,4 +80,13 @@ in rec {
|
|||
};
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,13 @@ stdenv.mkDerivation {
|
|||
mkdir -p $out
|
||||
cp -a include $out/include
|
||||
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.
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nccl-${version}-cuda-${cudatoolkit.majorVersion}";
|
||||
version = "2.4.8-1";
|
||||
version = "2.7.8-1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NVIDIA";
|
||||
repo = "nccl";
|
||||
rev = "v${version}";
|
||||
sha256 = "05m66y64rgsdyybvjybhy6clikwv438b1m484ikai78fb2b7mvyq";
|
||||
sha256 = "0xxiwaw239dc9g015fka3k1nvm5zyl00dzgxnwzkang61dys9wln";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
|
|
@ -122,6 +122,7 @@
|
|||
, "mocha"
|
||||
, "multi-file-swagger"
|
||||
, "neovim"
|
||||
, "netlify-cli"
|
||||
, "nijs"
|
||||
, "node-gyp"
|
||||
, "node-gyp-build"
|
||||
|
|
10008
pkgs/development/node-packages/node-packages.nix
generated
10008
pkgs/development/node-packages/node-packages.nix
generated
File diff suppressed because it is too large
Load diff
|
@ -1,20 +1,20 @@
|
|||
{ stdenv, fetchFromGitHub, ocaml, findlib }:
|
||||
{ stdenv, fetchFromGitHub, which, ocaml, findlib }:
|
||||
|
||||
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
||||
then throw "camlpdf is not available for OCaml ${ocaml.version}"
|
||||
else
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.3";
|
||||
version = "2.3.1";
|
||||
name = "ocaml${ocaml.version}-camlpdf-${version}";
|
||||
src = fetchFromGitHub {
|
||||
owner = "johnwhitington";
|
||||
repo = "camlpdf";
|
||||
rev = "v${version}";
|
||||
sha256 = "1z8h6bjzmlscr6h6kdvzj8kspifb4n9dg7zi54z1cv2qi03kr8dk";
|
||||
sha256 = "1q69hhk63z836jbkv4wsng27w35w0qpz01c7ax0mqm8d8kmnr0v4";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml findlib ];
|
||||
buildInputs = [ which ocaml findlib ];
|
||||
|
||||
# Version number in META file is wrong
|
||||
patchPhase = ''
|
||||
|
@ -26,7 +26,9 @@ stdenv.mkDerivation rec {
|
|||
EOF
|
||||
'';
|
||||
|
||||
createFindlibDestdir = true;
|
||||
preInstall = ''
|
||||
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "An OCaml library for reading, writing and modifying PDF files";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchFromGitHub, ocaml, findlib, camlpdf, ncurses }:
|
||||
|
||||
let version = "2.3"; in
|
||||
let version = "2.3.1"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ocaml${ocaml.version}-cpdf-${version}";
|
||||
|
@ -9,9 +9,13 @@ stdenv.mkDerivation {
|
|||
owner = "johnwhitington";
|
||||
repo = "cpdf-source";
|
||||
rev = "v${version}";
|
||||
sha256 = "0i976y1v0l7x7k2n8k6v0h4bw9zlxsv04y4fdxss6dzpsfz49w23";
|
||||
sha256 = "1gwz0iy28f67kbqap2q10nf98dalwbi03vv5j893z2an7pb4w68z";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace META --replace 'version="1.7"' 'version="${version}"'
|
||||
'';
|
||||
|
||||
buildInputs = [ ocaml findlib ncurses ];
|
||||
propagatedBuildInputs = [ camlpdf ];
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-api-python-client";
|
||||
version = "1.10.0";
|
||||
version = "1.10.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "01zzlr21rgl1skl7ayppp0qwn6s883i50xcvxs8jxzr4c5zz097s";
|
||||
sha256 = "0v4yzrmrp1l3nlkw9ibllgblwy8y45anzfkkky2vghkl6w8411xa";
|
||||
};
|
||||
|
||||
# No tests included in archive
|
||||
|
|
37
pkgs/development/python-modules/jupyterlab-git/default.nix
Normal file
37
pkgs/development/python-modules/jupyterlab-git/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
59
pkgs/development/python-modules/pipx/default.nix
Normal file
59
pkgs/development/python-modules/pipx/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -1,8 +1,10 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, debugger
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, Mako
|
||||
, makeWrapper
|
||||
, packaging
|
||||
, pysocks
|
||||
, pygments
|
||||
|
@ -58,10 +60,15 @@ buildPythonPackage rec {
|
|||
|
||||
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; {
|
||||
homepage = "http://pwntools.com";
|
||||
description = "CTF framework and exploit development library";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ bennofs kristoff3r ];
|
||||
maintainers = with maintainers; [ bennofs kristoff3r pamplemousse ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "radare2-cutter";
|
||||
version = "1.11.0";
|
||||
version = "1.11.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "radareorg";
|
||||
repo = "cutter";
|
||||
rev = "v${version}";
|
||||
sha256 = "1xvdap7hpkjz6rg0ngnql1p18p93b8w9gv130g818nwcjsh9i2y5";
|
||||
sha256 = "0kscl0yf5qxacqnz3pp47r94yiwnc4rwirnr2x580z10fwhsivki";
|
||||
};
|
||||
|
||||
postUnpack = "export sourceRoot=$sourceRoot/src";
|
||||
|
|
|
@ -10,12 +10,15 @@
|
|||
|
||||
buildPythonApplication rec {
|
||||
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 {
|
||||
inherit version;
|
||||
pname = "cmake_format";
|
||||
sha256 = "1wvmv8242xjkxgr266dkn4vrn5wm94fwn333pn7sxm5warhhwgda";
|
||||
inherit version format;
|
||||
python = "py3";
|
||||
pname = "cmakelang";
|
||||
sha256 = "0kmggnfbv6bba75l3zfzqwk0swi90brjka307m2kcz2w35kr8jvn";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ autopep8 flake8 jinja2 pylint pyyaml ];
|
||||
|
|
37
pkgs/development/tools/dt-schema/default.nix
Normal file
37
pkgs/development/tools/dt-schema/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
||||
|
27
pkgs/development/tools/misc/kpack/default.nix
Normal file
27
pkgs/development/tools/misc/kpack/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, nix, makeWrapper }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, makeWrapper }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "nix-build-uncached";
|
||||
|
@ -17,11 +17,6 @@ buildGoModule rec {
|
|||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/nix-build-uncached \
|
||||
--prefix PATH ":" ${lib.makeBinPath [ nix ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A CI friendly wrapper around nix-build";
|
||||
license = licenses.mit;
|
||||
|
|
|
@ -24,7 +24,7 @@ in
|
|||
lib.makeScope pkgs.newScope (self: {
|
||||
|
||||
# Poetry2nix version
|
||||
version = "1.11.0";
|
||||
version = "1.12.0";
|
||||
|
||||
/*
|
||||
Returns an attrset { python, poetryPackages, pyProject, poetryLock } for the given pyproject/lockfile.
|
||||
|
@ -114,7 +114,7 @@ lib.makeScope pkgs.newScope (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
|
||||
|
@ -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 {
|
||||
inherit pkgs lib poetryLib editablePackageSources;
|
||||
inherit (py) pyProject python;
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -49,4 +49,16 @@ in
|
|||
} ./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
|
||||
) { };
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
|
@ -47,10 +47,16 @@ pythonPackages.callPackage
|
|||
isGit = isSource && source.type == "git";
|
||||
isLocal = isSource && source.type == "directory";
|
||||
localDepPath = toPath source.url;
|
||||
pyProject = poetryLib.readTOML (localDepPath + "/pyproject.toml");
|
||||
buildSystemPkgs = poetryLib.getBuildSystemPkgs {
|
||||
inherit pythonPackages pyProject;
|
||||
};
|
||||
|
||||
buildSystemPkgs =
|
||||
let
|
||||
pyProjectPath = localDepPath + "/pyproject.toml";
|
||||
pyProject = poetryLib.readTOML pyProjectPath;
|
||||
in
|
||||
if builtins.pathExists pyProjectPath then poetryLib.getBuildSystemPkgs {
|
||||
inherit pythonPackages pyProject;
|
||||
} else [ ];
|
||||
|
||||
fileInfo =
|
||||
let
|
||||
isBdist = f: lib.strings.hasSuffix "whl" f.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 (
|
||||
old: rec {
|
||||
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 (
|
||||
old:
|
||||
if old.format != "wheel" then rec {
|
||||
|
@ -324,6 +367,13 @@ self: super:
|
|||
pkgs.pkgconfig
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
cat > setup.cfg <<EOF
|
||||
[libs]
|
||||
system_freetype = True
|
||||
EOF
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
pkgs.libpng
|
||||
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 (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [
|
||||
|
@ -451,12 +518,16 @@ self: super:
|
|||
|
||||
psycopg2 = super.psycopg2.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs
|
||||
++ lib.optional stdenv.isDarwin pkgs.openssl;
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.postgresql ];
|
||||
}
|
||||
);
|
||||
|
||||
psycopg2-binary = super.psycopg2-binary.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs
|
||||
++ lib.optional stdenv.isDarwin pkgs.openssl;
|
||||
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 (
|
||||
old: {
|
||||
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 (
|
||||
old: {
|
||||
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 (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ lib.optionals stdenv.isDarwin [
|
||||
|
@ -907,17 +997,34 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
|
||||
# Stop infinite recursion by using bootstrapped pkg from nixpkgs
|
||||
wheel = (
|
||||
pkgs.python3.pkgs.override {
|
||||
bootstrapped-pip = super.bootstrapped-pip.override {
|
||||
wheel = (pkgs.python3.pkgs.override {
|
||||
python = self.python;
|
||||
}
|
||||
).wheel.overridePythonAttrs (
|
||||
old:
|
||||
if old.format == "other" then old else {
|
||||
inherit (super.wheel) pname name version src;
|
||||
}
|
||||
);
|
||||
}).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 {
|
||||
python = self.python;
|
||||
}
|
||||
).wheel.overridePythonAttrs (
|
||||
old: {
|
||||
inherit (super.wheel) pname name version src;
|
||||
}
|
||||
);
|
||||
in
|
||||
if isWheel then wheelPackage else sourcePackage;
|
||||
|
||||
zipp =
|
||||
(
|
||||
|
|
|
@ -62,7 +62,7 @@ let
|
|||
selectWheel = files:
|
||||
let
|
||||
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.
|
||||
python.passthru.implementation == "cpython" &&
|
||||
builtins.elemAt (lib.splitString "." python.version) 0 == "3" &&
|
||||
|
|
|
@ -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)}
|
||||
'';
|
||||
}
|
|
@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
|
|||
meta = with stdenv.lib; {
|
||||
description = "Free touch typing tutor program";
|
||||
homepage = "http://klavaro.sourceforge.net/";
|
||||
changelog = "https://sourceforge.net/p/klavaro/code/HEAD/tree/trunk/ChangeLog";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ mimame davidak ];
|
||||
|
|
|
@ -65,12 +65,12 @@ let
|
|||
|
||||
ale = buildVimPluginFrom2Nix {
|
||||
pname = "ale";
|
||||
version = "2020-08-20";
|
||||
version = "2020-08-24";
|
||||
src = fetchFromGitHub {
|
||||
owner = "dense-analysis";
|
||||
repo = "ale";
|
||||
rev = "2b785688ead505dcbc1007374d3dca9914aa247a";
|
||||
sha256 = "1n91vm354fd45vvg4skvx7s9mpjpsk1l61n2x5ylqr8dlm7vgjkw";
|
||||
rev = "3e2abe3f25493af63af91a6013447e378e09f6ec";
|
||||
sha256 = "1lxcwvjxrr2wdz5rzai2wd96zxhxmf81jyd62pcqhr5l9jil9ry7";
|
||||
};
|
||||
meta.homepage = "https://github.com/dense-analysis/ale/";
|
||||
};
|
||||
|
@ -401,12 +401,12 @@ let
|
|||
|
||||
coc-eslint = buildVimPluginFrom2Nix {
|
||||
pname = "coc-eslint";
|
||||
version = "2020-05-21";
|
||||
version = "2020-08-22";
|
||||
src = fetchFromGitHub {
|
||||
owner = "neoclide";
|
||||
repo = "coc-eslint";
|
||||
rev = "eed42192dab175bbf249e21c18c85cbd5afdd92a";
|
||||
sha256 = "1a9csiyj7abksar917acfjgypmc28rcfsqga0p1550mjxvkjr2ia";
|
||||
rev = "ba4d02c324e3eb5d5f111fe510f623ef14ee340c";
|
||||
sha256 = "1badkyfa8zznwlb9a6kqxnyylcjb72rfjrzb48pvx2dr7s631x8g";
|
||||
};
|
||||
meta.homepage = "https://github.com/neoclide/coc-eslint/";
|
||||
};
|
||||
|
@ -425,12 +425,12 @@ let
|
|||
|
||||
coc-fzf = buildVimPluginFrom2Nix {
|
||||
pname = "coc-fzf";
|
||||
version = "2020-08-20";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "antoinemadec";
|
||||
repo = "coc-fzf";
|
||||
rev = "341ea7db0ab85a2ecb3a067ca721c1327fcd7013";
|
||||
sha256 = "0gqs6xdnmg33xraxqv10jl7dhaca19dlidmc86zdki2hg1bckr9b";
|
||||
rev = "606b437c4b6de1910c325eb631ee6b0f9bff8dd6";
|
||||
sha256 = "0a3vrimi87i6y6nc79smh2jiya2ciafxj0aifn6xhqnklj46isdh";
|
||||
};
|
||||
meta.homepage = "https://github.com/antoinemadec/coc-fzf/";
|
||||
};
|
||||
|
@ -449,12 +449,12 @@ let
|
|||
|
||||
coc-go = buildVimPluginFrom2Nix {
|
||||
pname = "coc-go";
|
||||
version = "2020-08-12";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "josa42";
|
||||
repo = "coc-go";
|
||||
rev = "b068394634189ede2fb96b742cadcaa852bf46b0";
|
||||
sha256 = "099dgk3kc814hgnpd0jhc6sz3d7512i86i99n6hq6yswsg7n1d51";
|
||||
rev = "fbac3db20cc5e728b6f1c86bbb73414254c3dce3";
|
||||
sha256 = "1d9izf0ypnpbwg15kz3fd62gzz6c5h5568ydc7h5hxh4zj5qfg5h";
|
||||
};
|
||||
meta.homepage = "https://github.com/josa42/coc-go/";
|
||||
};
|
||||
|
@ -557,12 +557,12 @@ let
|
|||
|
||||
coc-metals = buildVimPluginFrom2Nix {
|
||||
pname = "coc-metals";
|
||||
version = "2020-08-19";
|
||||
version = "2020-08-21";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ckipp01";
|
||||
repo = "coc-metals";
|
||||
rev = "14c820dad44b057e2b8343f7d8896529cd973ee6";
|
||||
sha256 = "0569by8x73dpb3hapbx73x9fg2wzzb965mkkifqgdq4wdg6wizkx";
|
||||
rev = "e2f5e3c2bc6a8226cea5a607585f6db554e15846";
|
||||
sha256 = "0kp8q5ds9b64acmkc006664460lfcahly65bx5x95rvy0wy8z5b1";
|
||||
};
|
||||
meta.homepage = "https://github.com/ckipp01/coc-metals/";
|
||||
};
|
||||
|
@ -641,12 +641,12 @@ let
|
|||
|
||||
coc-rust-analyzer = buildVimPluginFrom2Nix {
|
||||
pname = "coc-rust-analyzer";
|
||||
version = "2020-08-20";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "fannheyward";
|
||||
repo = "coc-rust-analyzer";
|
||||
rev = "ac57b7b3cdaee3cfb56b76a8fc13444337f09276";
|
||||
sha256 = "0n26d63qifhnsrpwq8x587mh9y83rmayc2car222hjqbrg705r28";
|
||||
rev = "fff876cee397d0d696cba74907e33aadfba4d601";
|
||||
sha256 = "0318a19qbp3rpcgqwqshzhrpcbsqcskl993yjxmgmpjxh4r85kh2";
|
||||
};
|
||||
meta.homepage = "https://github.com/fannheyward/coc-rust-analyzer/";
|
||||
};
|
||||
|
@ -749,24 +749,24 @@ let
|
|||
|
||||
coc-tsserver = buildVimPluginFrom2Nix {
|
||||
pname = "coc-tsserver";
|
||||
version = "2020-08-20";
|
||||
version = "2020-08-21";
|
||||
src = fetchFromGitHub {
|
||||
owner = "neoclide";
|
||||
repo = "coc-tsserver";
|
||||
rev = "e4f3ab555b35a0057d22dcc8bb7b7af7e43546d6";
|
||||
sha256 = "0i1fpvbl228jhh50fbz8cppv2v20zy0zywb1qgh9hsmw6pfgjg1w";
|
||||
rev = "516f2bd75afee70bb8668aa2ecbc00ebfd5984a0";
|
||||
sha256 = "1qdgm9w9d9n0aq5y77zlhxzjdilxky7n4ipl6y6gr2pirxw5idw5";
|
||||
};
|
||||
meta.homepage = "https://github.com/neoclide/coc-tsserver/";
|
||||
};
|
||||
|
||||
coc-vetur = buildVimPluginFrom2Nix {
|
||||
pname = "coc-vetur";
|
||||
version = "2020-06-28";
|
||||
version = "2020-08-22";
|
||||
src = fetchFromGitHub {
|
||||
owner = "neoclide";
|
||||
repo = "coc-vetur";
|
||||
rev = "37c70071a93aeacf23ac651cd6e9f7ed11582033";
|
||||
sha256 = "037p3zkavfyh75wclibd2iwd1ds8kzi72q8zy7rwdchwxw57xwhj";
|
||||
rev = "217251dd0fe87d951e630e8fa9d4cde84da0ec91";
|
||||
sha256 = "13ni7j70pcz9w856hrgnbm0jsv7a22f1r42wnvif5lvhrcfw3y9d";
|
||||
};
|
||||
meta.homepage = "https://github.com/neoclide/coc-vetur/";
|
||||
};
|
||||
|
@ -833,12 +833,12 @@ let
|
|||
|
||||
coc-nvim = buildVimPluginFrom2Nix {
|
||||
pname = "coc-nvim";
|
||||
version = "2020-08-08";
|
||||
version = "2020-08-26";
|
||||
src = fetchFromGitHub {
|
||||
owner = "neoclide";
|
||||
repo = "coc.nvim";
|
||||
rev = "806ce47583d66d0b574a3c993526033971e700cf";
|
||||
sha256 = "1v29l7jrp1n141q8lywas5jflbjid6rryym732ga41yjqkrmlvip";
|
||||
rev = "52c18cefd06879924a8469fc493af58fb3e7f1f4";
|
||||
sha256 = "1ddcmfy6mgmmqmj7a5v1dhz5z43wz2wfyzaxbg6hchb3j0h8dmc5";
|
||||
};
|
||||
meta.homepage = "https://github.com/neoclide/coc.nvim/";
|
||||
};
|
||||
|
@ -882,12 +882,12 @@ let
|
|||
|
||||
committia-vim = buildVimPluginFrom2Nix {
|
||||
pname = "committia-vim";
|
||||
version = "2020-05-14";
|
||||
version = "2020-08-26";
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhysd";
|
||||
repo = "committia.vim";
|
||||
rev = "2cded48477a5e308c77a0d289cc9b540669b701f";
|
||||
sha256 = "1g6ykdh7d16q6nvpvmxx4ss8w7cisx5r8qmbrrvhpwmbb3894pxp";
|
||||
rev = "6c8e22b24283a4cc3f05339520e990af8e803915";
|
||||
sha256 = "05rjwn6fjwxd07c5imddkmxxpl8gq09iys385drrsvsqdx9f93vw";
|
||||
};
|
||||
meta.homepage = "https://github.com/rhysd/committia.vim/";
|
||||
};
|
||||
|
@ -1280,12 +1280,12 @@ let
|
|||
|
||||
deoplete-lsp = buildVimPluginFrom2Nix {
|
||||
pname = "deoplete-lsp";
|
||||
version = "2020-07-13";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Shougo";
|
||||
repo = "deoplete-lsp";
|
||||
rev = "ae0b7d023a33f0692652a21f532051e8718e1800";
|
||||
sha256 = "00008andpp08l6fm8qadp8ycm59s8gx2m1vskmzg3lw905fk0gra";
|
||||
rev = "4fd2507dd295d9c114febabb0c9cf31da87df008";
|
||||
sha256 = "1alwf8gjvgj5q3sbrqxrm0f2nbf6drk6dxqipk9pmvbj50iadyf1";
|
||||
};
|
||||
meta.homepage = "https://github.com/Shougo/deoplete-lsp/";
|
||||
};
|
||||
|
@ -1350,6 +1350,18 @@ let
|
|||
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 {
|
||||
pname = "deoplete-zsh";
|
||||
version = "2019-11-10";
|
||||
|
@ -1364,12 +1376,12 @@ let
|
|||
|
||||
deoplete-nvim = buildVimPluginFrom2Nix {
|
||||
pname = "deoplete-nvim";
|
||||
version = "2020-08-10";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Shougo";
|
||||
repo = "deoplete.nvim";
|
||||
rev = "ba3913cc52b457877836f7423b0929b770dda42b";
|
||||
sha256 = "16hn83ns278x9p280b0gpk4b4vhg50004bpnff7d3inf3x6pli4j";
|
||||
rev = "7ab4c1bde7f9bd8824219594b07e4c1aa0814d4e";
|
||||
sha256 = "13p59bxad46pxcihsns2vybjv8m6vhka9vbjvsvn6nwgck4rs1w3";
|
||||
};
|
||||
meta.homepage = "https://github.com/Shougo/deoplete.nvim/";
|
||||
};
|
||||
|
@ -2592,12 +2604,12 @@ let
|
|||
|
||||
neoformat = buildVimPluginFrom2Nix {
|
||||
pname = "neoformat";
|
||||
version = "2020-08-16";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "sbdchd";
|
||||
repo = "neoformat";
|
||||
rev = "56a9d6259981d0d9c2b33a4d65ccbb674af70baa";
|
||||
sha256 = "0kn35l7kfqa0zvh1l8mdl3755hv1rx6xp5wjib9acsbk2czhg5nx";
|
||||
rev = "491d83c50c9b17c896850bbd7ec00f2019e2f110";
|
||||
sha256 = "0mj20dyf2hj9wr1df6rv7yn3mcb8z20bivclm8ircni2gi64bdb9";
|
||||
};
|
||||
meta.homepage = "https://github.com/sbdchd/neoformat/";
|
||||
};
|
||||
|
@ -2832,12 +2844,12 @@ let
|
|||
|
||||
nvim-gdb = buildVimPluginFrom2Nix {
|
||||
pname = "nvim-gdb";
|
||||
version = "2020-08-16";
|
||||
version = "2020-08-22";
|
||||
src = fetchFromGitHub {
|
||||
owner = "sakhnik";
|
||||
repo = "nvim-gdb";
|
||||
rev = "47b0828287b410b56ff1a31906c4d5709d143d4a";
|
||||
sha256 = "0kl2d58plpnlz2w9haadmbpmkb04bjwgfrs1scwi04mcc8dfpbmn";
|
||||
rev = "004dc3cfa93fb56baeaed55291cf356dd1b18f9b";
|
||||
sha256 = "0x4r0s9rm2zk8rrvw2m1rfmagmy68d88bmxiqps2c3fb9zd1c7ny";
|
||||
};
|
||||
meta.homepage = "https://github.com/sakhnik/nvim-gdb/";
|
||||
};
|
||||
|
@ -2880,12 +2892,12 @@ let
|
|||
|
||||
nvim-treesitter = buildVimPluginFrom2Nix {
|
||||
pname = "nvim-treesitter";
|
||||
version = "2020-08-20";
|
||||
version = "2020-08-26";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvim-treesitter";
|
||||
repo = "nvim-treesitter";
|
||||
rev = "5c0ca925af3332769f04c122ecb5bb9a5ca36dd0";
|
||||
sha256 = "0fmciqdmg5fy1jx2wind0vyykfdvdbls0lyrn85xi4c7d8yg74h2";
|
||||
rev = "e8fa0d0b31954314528bb88de3b8357af75d21fd";
|
||||
sha256 = "0rczmzzcc82499bbbvz4bfpv8llkzz21hx7i2pz3471c2c97s3hn";
|
||||
};
|
||||
meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter/";
|
||||
};
|
||||
|
@ -3577,12 +3589,12 @@ let
|
|||
|
||||
syntastic = buildVimPluginFrom2Nix {
|
||||
pname = "syntastic";
|
||||
version = "2020-08-14";
|
||||
version = "2020-08-24";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vim-syntastic";
|
||||
repo = "syntastic";
|
||||
rev = "25b816d9b0016eff68e7025fe52fb67ef253920e";
|
||||
sha256 = "1hb9f1p7sqpb7kc0rih9kaixwg4s9a6z86ycnc6kxp1iz97d6ai1";
|
||||
rev = "9041bc76b4084dda00933744c0dce4bdf43d15c7";
|
||||
sha256 = "076z5cs7gjl4hl92fzplabl0wq87hxzsgvmdna6vrzkh7ki2m3cb";
|
||||
};
|
||||
meta.homepage = "https://github.com/vim-syntastic/syntastic/";
|
||||
};
|
||||
|
@ -3625,12 +3637,12 @@ let
|
|||
|
||||
tagbar = buildVimPluginFrom2Nix {
|
||||
pname = "tagbar";
|
||||
version = "2020-08-17";
|
||||
version = "2020-08-26";
|
||||
src = fetchFromGitHub {
|
||||
owner = "majutsushi";
|
||||
repo = "tagbar";
|
||||
rev = "a81c01c29406df6aa59be221a17953c18ed57ccc";
|
||||
sha256 = "1amqxazfjnljylkj5jz3in927mkkhbvchs9pb5cnijfbvrf3dh5s";
|
||||
rev = "40413d8760146471757c69f08be68b24431f9474";
|
||||
sha256 = "1194kp8qzpjvv64lplb49n64ksyv5dbn25sng448b2fgd6wqk9ji";
|
||||
};
|
||||
meta.homepage = "https://github.com/majutsushi/tagbar/";
|
||||
};
|
||||
|
@ -3661,12 +3673,12 @@ let
|
|||
|
||||
tcomment_vim = buildVimPluginFrom2Nix {
|
||||
pname = "tcomment_vim";
|
||||
version = "2020-06-18";
|
||||
version = "2020-08-23";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tomtom";
|
||||
repo = "tcomment_vim";
|
||||
rev = "920d465b56bcf96c976fa22e9558d51aa55dcd9c";
|
||||
sha256 = "0n7gwdyzim4f92mxnjz4zwfiyapyjhbf21b1l3dq9b07x9m40365";
|
||||
rev = "25bdb50a6c5934d4ac9313cef0d7d2168d84803b";
|
||||
sha256 = "04dmdydrc4v055qkjn5gfvibyzd30fg00abnk8ijvabfcmhvlh40";
|
||||
};
|
||||
meta.homepage = "https://github.com/tomtom/tcomment_vim/";
|
||||
};
|
||||
|
@ -4142,24 +4154,24 @@ let
|
|||
|
||||
vim-airline = buildVimPluginFrom2Nix {
|
||||
pname = "vim-airline";
|
||||
version = "2020-08-20";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vim-airline";
|
||||
repo = "vim-airline";
|
||||
rev = "ef4666bd86ea1d6ac06a709cde0cde3df537c9e3";
|
||||
sha256 = "0rql6vbfr78pnjpbavpkdh47bh4jlzcg5pjf7xcl0273v03b6rbf";
|
||||
rev = "5d3cfa40453fd8216be6ca68e9bd3846eed05176";
|
||||
sha256 = "150mdgmbyqp263rzmhp09a07547whalkbvzr9mi4jaq7paj21762";
|
||||
};
|
||||
meta.homepage = "https://github.com/vim-airline/vim-airline/";
|
||||
};
|
||||
|
||||
vim-airline-themes = buildVimPluginFrom2Nix {
|
||||
pname = "vim-airline-themes";
|
||||
version = "2020-06-26";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vim-airline";
|
||||
repo = "vim-airline-themes";
|
||||
rev = "04fa4fc40f21d9490954213c1ee06c7fdea66a6d";
|
||||
sha256 = "0dzckj0449rw37v5kwmfm5wa9spfhsbfr56i30mb063zmv8wk551";
|
||||
rev = "fd855c601c3d53b68f3971e1191f84c728d4d651";
|
||||
sha256 = "07s45ck4001lxrzpxcvqsyqfg6j61js4131gxi150y7jb2wwyjjd";
|
||||
};
|
||||
meta.homepage = "https://github.com/vim-airline/vim-airline-themes/";
|
||||
};
|
||||
|
@ -4238,12 +4250,12 @@ let
|
|||
|
||||
vim-bazel = buildVimPluginFrom2Nix {
|
||||
pname = "vim-bazel";
|
||||
version = "2019-08-14";
|
||||
version = "2020-08-22";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bazelbuild";
|
||||
repo = "vim-bazel";
|
||||
rev = "7c4987b4266d117a9f1d4c7fe7f4dfba33dfc8c8";
|
||||
sha256 = "182w8ibr34z86nmx6byabkah0q9fgrzml8m2ardaqzqjqr2ya5yg";
|
||||
rev = "85a044d854e5e48f72414726c255112be31e2cac";
|
||||
sha256 = "1hcfbl958v39w00kyfg75rcxs9xzaqnd98i4y322ayqfgrhd95n8";
|
||||
};
|
||||
meta.homepage = "https://github.com/bazelbuild/vim-bazel/";
|
||||
};
|
||||
|
@ -4922,12 +4934,12 @@ let
|
|||
|
||||
vim-floaterm = buildVimPluginFrom2Nix {
|
||||
pname = "vim-floaterm";
|
||||
version = "2020-08-21";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "voldikss";
|
||||
repo = "vim-floaterm";
|
||||
rev = "2de1b9bdea54baeb40bc6f3fe761309b4435d156";
|
||||
sha256 = "09m31j8cgd8pnyd4p2rh7bj74gh27df98cjy13diljaa56jd6grr";
|
||||
rev = "cc2ff0a07af75cd752afebbf3be62e6ebe234f2d";
|
||||
sha256 = "1q1jmbmx79ii5g991hcp6xd2nzcdqlv4m065vwc8hdpk3ghgc9d4";
|
||||
};
|
||||
meta.homepage = "https://github.com/voldikss/vim-floaterm/";
|
||||
};
|
||||
|
@ -5306,12 +5318,12 @@ let
|
|||
|
||||
vim-illuminate = buildVimPluginFrom2Nix {
|
||||
pname = "vim-illuminate";
|
||||
version = "2020-06-09";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "RRethy";
|
||||
repo = "vim-illuminate";
|
||||
rev = "0778289e391c419f7a3af9de8229f798ee292013";
|
||||
sha256 = "1l5s5f4fw96w437rdf85lym7g75hnz8sb2fdj9hygyg0sp42r0cf";
|
||||
rev = "56e7df8f402a8302fa7f6cb21760d366a105d94c";
|
||||
sha256 = "0j4986pdh06q5d0bq4k6lq0b6bgi1fazng106ykhg3aaxjqqhs37";
|
||||
};
|
||||
meta.homepage = "https://github.com/RRethy/vim-illuminate/";
|
||||
};
|
||||
|
@ -5665,6 +5677,18 @@ let
|
|||
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 {
|
||||
pname = "vim-maktaba";
|
||||
version = "2020-08-06";
|
||||
|
@ -6159,12 +6183,12 @@ let
|
|||
|
||||
vim-polyglot = buildVimPluginFrom2Nix {
|
||||
pname = "vim-polyglot";
|
||||
version = "2020-08-18";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "sheerun";
|
||||
repo = "vim-polyglot";
|
||||
rev = "0df1bfa0c5f3efb6688566d5656a330034772037";
|
||||
sha256 = "1ba96gk3qs1d2zaxs24dk624z9b9ip7yx4vg0klasf4xq8s6kwjs";
|
||||
rev = "f0d6ecff07c88e7a406bc082d1ce98a5282b451c";
|
||||
sha256 = "1a8z7753a4g4zyi9dr24mkwhpi18r2wbnf9djjl4r4hr0hc7qcc1";
|
||||
};
|
||||
meta.homepage = "https://github.com/sheerun/vim-polyglot/";
|
||||
};
|
||||
|
@ -6291,12 +6315,12 @@ let
|
|||
|
||||
vim-quickrun = buildVimPluginFrom2Nix {
|
||||
pname = "vim-quickrun";
|
||||
version = "2020-07-25";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "thinca";
|
||||
repo = "vim-quickrun";
|
||||
rev = "3f49e05fb6072d6b7bc7fe20d0356cf15ef3b9de";
|
||||
sha256 = "02kyp6l6m1nybfqx3d88yi34isrid355wiln6cskvxz2hpx532g8";
|
||||
rev = "c688f336a4aeb002319994f4fb4a8873f204f0ab";
|
||||
sha256 = "1wzcvshwn4gvjbcmni1r473001m5ipamggkcpwsa7xr74sj4rn73";
|
||||
};
|
||||
meta.homepage = "https://github.com/thinca/vim-quickrun/";
|
||||
};
|
||||
|
@ -6327,12 +6351,12 @@ let
|
|||
|
||||
vim-rails = buildVimPluginFrom2Nix {
|
||||
pname = "vim-rails";
|
||||
version = "2020-06-19";
|
||||
version = "2020-08-22";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tpope";
|
||||
repo = "vim-rails";
|
||||
rev = "187742a3c18d93e6968f024d7db0f4fc5548408e";
|
||||
sha256 = "132rvyn5pwg5xkm6q64k33vm6q9hfpng0wq25387l8l8a7hvj3az";
|
||||
rev = "858a379bcb389d67abdb7e0eb1b0a1fa78d8ba39";
|
||||
sha256 = "077jxka05w452g7vrlx1dly85ddqv8z8fh3xklq6dvz016x306m4";
|
||||
};
|
||||
meta.homepage = "https://github.com/tpope/vim-rails/";
|
||||
};
|
||||
|
@ -6387,12 +6411,12 @@ let
|
|||
|
||||
vim-ruby = buildVimPluginFrom2Nix {
|
||||
pname = "vim-ruby";
|
||||
version = "2020-08-03";
|
||||
version = "2020-08-22";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vim-ruby";
|
||||
repo = "vim-ruby";
|
||||
rev = "fe2e520c62dfe10b9bc192b6c2651ef0519b1070";
|
||||
sha256 = "1xh6h5wg242mzqshka5m3693r25www46p29cr92yi995a2izm2fw";
|
||||
rev = "35dce70cdc2d7bf3c2031cc5eac2a47ddfb8c17b";
|
||||
sha256 = "0cc36cnqaz2q45287pfdkfxpb91dlhqi5a8kf8ghz61dny2xnv8r";
|
||||
};
|
||||
meta.homepage = "https://github.com/vim-ruby/vim-ruby/";
|
||||
};
|
||||
|
@ -6844,12 +6868,12 @@ let
|
|||
|
||||
vim-test = buildVimPluginFrom2Nix {
|
||||
pname = "vim-test";
|
||||
version = "2020-08-12";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vim-test";
|
||||
repo = "vim-test";
|
||||
rev = "edacfbe57fdbba4788e8c280d37606470b9b70ca";
|
||||
sha256 = "1bi2rsszdpv7vj1xk536lzm54dzk1z41hfp0qr1pzz9lv8fa4sgv";
|
||||
rev = "45c495d78143f73fc034781601ff44ca90e05687";
|
||||
sha256 = "0h3yjc5g8cklq988bilqjp8wv19yb16rmjphjhifa1c2fp23n7nk";
|
||||
};
|
||||
meta.homepage = "https://github.com/vim-test/vim-test/";
|
||||
};
|
||||
|
@ -6928,12 +6952,12 @@ let
|
|||
|
||||
vim-themis = buildVimPluginFrom2Nix {
|
||||
pname = "vim-themis";
|
||||
version = "2020-07-29";
|
||||
version = "2020-08-23";
|
||||
src = fetchFromGitHub {
|
||||
owner = "thinca";
|
||||
repo = "vim-themis";
|
||||
rev = "47bc9855d7c2b1452d8a0abda91bda35837f8552";
|
||||
sha256 = "083k1v9gmmmhmll61kywgd1cn1l2qkfk6sqjjkcv6az01rkrm521";
|
||||
rev = "51bec3386b661d28fda7736006475b8b2ebe343d";
|
||||
sha256 = "05988ila63kj1r62v7ii76972fgw2300h4dbaml81i643yw0p81p";
|
||||
};
|
||||
meta.homepage = "https://github.com/thinca/vim-themis/";
|
||||
};
|
||||
|
@ -7120,12 +7144,12 @@ let
|
|||
|
||||
vim-vsnip = buildVimPluginFrom2Nix {
|
||||
pname = "vim-vsnip";
|
||||
version = "2020-08-21";
|
||||
version = "2020-08-23";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hrsh7th";
|
||||
repo = "vim-vsnip";
|
||||
rev = "bf0d6c142721d3c1e3ce1f35b205655657db13c9";
|
||||
sha256 = "1z90g90h0yc9xiwl4bwbq3nawks0rzsbxr1ryy07w3qjcg7kwrdp";
|
||||
rev = "28867f3dd99efdae7f56b18f6555fc78f30e043b";
|
||||
sha256 = "1av7cvpb8iqnpjbq1cg667k5yhgr8m4vkj6c030a82cy1j49m931";
|
||||
};
|
||||
meta.homepage = "https://github.com/hrsh7th/vim-vsnip/";
|
||||
};
|
||||
|
@ -7376,8 +7400,8 @@ let
|
|||
src = fetchFromGitHub {
|
||||
owner = "lervag";
|
||||
repo = "vimtex";
|
||||
rev = "e14617591fcf59b638d25320215a80f437009119";
|
||||
sha256 = "10nlqbqfna5lvlk6rd4zsr5056vx2d22n6hm8sdpxp094nrqbdic";
|
||||
rev = "e27836fdf5b919ba8f4357abe16561ca4d0f60b1";
|
||||
sha256 = "1i5w7yijxa37jpn7k4whr3ri2d4nrmlrv94inanlpff006938fdd";
|
||||
};
|
||||
meta.homepage = "https://github.com/lervag/vimtex/";
|
||||
};
|
||||
|
@ -7553,12 +7577,12 @@ let
|
|||
|
||||
YouCompleteMe = buildVimPluginFrom2Nix {
|
||||
pname = "YouCompleteMe";
|
||||
version = "2020-08-05";
|
||||
version = "2020-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ycm-core";
|
||||
repo = "YouCompleteMe";
|
||||
rev = "bcfd153813ac1f99947b706991eba2861f54a8a2";
|
||||
sha256 = "1mqgqzfx6v7ps8gk7qgs8mihb35i3q100m39sd8wl1ihgcsq3w1r";
|
||||
rev = "2afee9d9771cf53eec63ab854bcd491fe277109e";
|
||||
sha256 = "08dmzy789zg8s9m5gm4rlg9jrs9fv546x6lvziiamn70jbrfrrlg";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
meta.homepage = "https://github.com/ycm-core/YouCompleteMe/";
|
||||
|
@ -7590,12 +7614,12 @@ let
|
|||
|
||||
zenburn = buildVimPluginFrom2Nix {
|
||||
pname = "zenburn";
|
||||
version = "2020-01-23";
|
||||
version = "2020-08-24";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jnurmine";
|
||||
repo = "zenburn";
|
||||
rev = "ec6f369a000602e37e7c066b725f9d6bd12538f4";
|
||||
sha256 = "1ff5ac8lp7fq854kgf03c5h695lm60giw0qda5z428mmzwq0xask";
|
||||
rev = "de2cc6c93593938b9628e03eb424e318e5ec7959";
|
||||
sha256 = "17kvlbb49l3alqdd2bf6llvvhs0c9p75qn7i1kb1qavyipxi38a3";
|
||||
};
|
||||
meta.homepage = "https://github.com/jnurmine/zenburn/";
|
||||
};
|
||||
|
|
|
@ -249,6 +249,7 @@ lepture/vim-jinja
|
|||
lervag/vimtex
|
||||
lfilho/cosco.vim
|
||||
lifepillar/vim-mucomplete
|
||||
lighttiger2505/deoplete-vim-lsp
|
||||
lilydjwg/colorizer
|
||||
liuchengxu/vim-clap
|
||||
liuchengxu/vim-which-key
|
||||
|
@ -420,6 +421,7 @@ ponko2/deoplete-fish
|
|||
posva/vim-vue
|
||||
powerman/vim-plugin-AnsiEsc
|
||||
PProvost/vim-ps1
|
||||
prabirshrestha/vim-lsp
|
||||
preservim/nerdcommenter
|
||||
preservim/nerdtree
|
||||
psliwka/vim-smoothie
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ stdenv, fetchurl, libv4l, gd }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fswebcam-20140113";
|
||||
name = "fswebcam-20200725";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.sanslogic.co.uk/fswebcam/files/${name}.tar.gz";
|
||||
sha256 = "3ee389f72a7737700d22e0c954720b1e3bbadc8a0daad6426c25489ba9dc3199";
|
||||
sha256 = "1dazsrcaw9s30zz3jpxamk9lkff5dkmflp1s0jjjvdbwa0k6k6ii";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
|
|
|
@ -11,18 +11,15 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "intel-compute-runtime";
|
||||
version = "20.02.15268";
|
||||
version = "20.33.17675";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "compute-runtime";
|
||||
rev = version;
|
||||
sha256 = "138gi92w85bn6haw5x38k39pgiyvvzfhiwpvz6hqlx2j03n8cs2k";
|
||||
sha256 = "1ckzspf05skdrjh947gv96finxbv5dpgc84hppm5pdsp5q70iyxp";
|
||||
};
|
||||
|
||||
# Build script tries to write the ICD to /etc
|
||||
patches = [ ./etc-dir.patch ];
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
buildInputs = [ intel-gmmlib intel-graphics-compiler libva ];
|
||||
|
@ -31,7 +28,7 @@ stdenv.mkDerivation rec {
|
|||
"-DSKIP_UNIT_TESTS=1"
|
||||
|
||||
"-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
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
|
|
|
@ -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()
|
|
@ -3,7 +3,7 @@
|
|||
with stdenv.lib;
|
||||
|
||||
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 = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
|
||||
|
@ -13,6 +13,6 @@ buildLinux (args // rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "1q7ssi2790bqjn8s8ra5ihma70hmxykahink7iq5h78738id191y";
|
||||
sha256 = "08d08la3h48fbdlr3h8zbvdghydx3x9cwb4yrnm0n93hhrwjhkrr";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
with stdenv.lib;
|
||||
|
||||
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 = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
|
||||
|
@ -13,6 +13,6 @@ buildLinux (args // rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "0511vb9rfpy5l6cz69v0v97rw2rk2pscc4hkz2pfmgikagm1shm4";
|
||||
sha256 = "19372sri4962dqf5rbr211lrfpckmj11kxsginfcwwid4hfdn4k9";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
|
||||
|
||||
buildLinux (args // rec {
|
||||
version = "4.4.233";
|
||||
version = "4.4.234";
|
||||
extraMeta.branch = "4.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "1z77dikgkvkp9ggwxp07hl8vxsf9kq57rhfdpbvhny1x13fqkrlp";
|
||||
sha256 = "123354h05fip161rzlxc8h0cn5lh0d1gz06gc5b7zyz9i2lxv539";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
|
||||
|
||||
buildLinux (args // rec {
|
||||
version = "4.9.233";
|
||||
version = "4.9.234";
|
||||
extraMeta.branch = "4.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "19dcwylhy5iqq3dmppqf7s9wy9d16m103djn1n183c9acnqclv9a";
|
||||
sha256 = "1qw26x2qc29yr094c7scw68m9yz4j0b2c4f92rvi3s31s928avvm";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
with stdenv.lib;
|
||||
|
||||
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 = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
|
||||
|
@ -13,6 +13,6 @@ buildLinux (args // rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||
sha256 = "08x2a78n23371k7l5p677mihnl58dpjh7r7bvyiwj3y4hlisplmd";
|
||||
sha256 = "197y2yb60m1k8i7mig4pa9wsrklfxq81ba3zfahwb2b31w2kvwc6";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
with stdenv.lib;
|
||||
|
||||
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 = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
|
||||
|
@ -13,6 +13,6 @@ buildLinux (args // rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||
sha256 = "09ajavdyvr0025rwvwfp9yv2z8q779nan1i6dck2kkdxr48kd36c";
|
||||
sha256 = "0p54icpxacrx8k09qam2hx22azh9xz9fzyif2z73qagk3syz5pd4";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
with stdenv.lib;
|
||||
|
||||
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 = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
|
||||
|
@ -13,6 +13,6 @@ buildLinux (args // rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||
sha256 = "0y8prifvkywqsx5lk80bh31m505vinmicpvdrirgg0c9scg7x8lf";
|
||||
sha256 = "15hyz92wsk6fxqr1rq0k77qw76jka2igpc9xviwa0j4a5qrr43fv";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
|
|
|
@ -8,11 +8,11 @@ assert withMysql -> (mysql_jdbc != null);
|
|||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "atlassian-confluence";
|
||||
version = "7.6.1";
|
||||
version = "7.7.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://product-downloads.atlassian.com/software/confluence/downloads/${pname}-${version}.tar.gz";
|
||||
sha256 = "0ipkr0d4mwsah698fg320h9g5il9xcnwlifbfvfnsijs60y9ps8x";
|
||||
sha256 = "12ay2y7ixaxzj12pw66k65743ic3iccicn49cnjmas51c5ww09h1";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lftp";
|
||||
version = "4.9.1";
|
||||
version = "4.9.2";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
|
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
|||
"https://ftp.st.ryukoku.ac.jp/pub/network/ftp/lftp/${pname}-${version}.tar.xz"
|
||||
"https://lftp.yar.ru/ftp/${pname}-${version}.tar.xz"
|
||||
];
|
||||
sha256 = "0jq2g8h1bx06ya9fsja748vwb2qrca4wsfrgi3fmaa8hznpgqsar";
|
||||
sha256 = "03b7y0h3mf4jfq5y8zw6hv9v44z3n6i8hc1iswax96y3z7sc85y5";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "nfpm";
|
||||
version = "1.6.0";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "goreleaser";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1q4fzjlaiwsm028cwcw7xgcbdkccw18f2mf1vh7lz42l1bxy8bk4";
|
||||
sha256 = "0jmxafvxzqg65zg5cnjd2nsz1mmw06mc7qz3lbs5h2gkxiah8264";
|
||||
};
|
||||
|
||||
vendorSha256 = "1bsb05qhr9zm8yar8mdi3mw0i5ak1s5x0i8qkz5fd6wcqnsw2jjw";
|
||||
vendorSha256 = "0yvzwbm0xb1h45x96h658avbjz9w79aaa6z042xpvjqc4wsr8155";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "poedit";
|
||||
version = "2.3.1";
|
||||
version = "2.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/vslavik/poedit/archive/v${version}-oss.tar.gz";
|
||||
sha256 = "04f9za35rwyr7mabk8f8izc0fgvc3sfx45v8dml1xmi634n174ds";
|
||||
sha256 = "0pvd903j2x3h9wh38fhlcn23d0jkjlqnfbdpbvnbhy6al1ngx72w";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoconf automake asciidoc wrapGAppsHook
|
||||
|
|
|
@ -579,7 +579,10 @@ in
|
|||
|
||||
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;
|
||||
|
||||
|
@ -1852,6 +1855,8 @@ in
|
|||
|
||||
eksctl = callPackage ../tools/admin/eksctl { };
|
||||
|
||||
electronplayer = callPackage ../applications/video/electronplayer/electronplayer.nix { };
|
||||
|
||||
element-desktop = callPackage ../applications/networking/instant-messengers/element/element-desktop.nix { };
|
||||
|
||||
element-web = callPackage ../applications/networking/instant-messengers/element/element-web.nix {
|
||||
|
@ -2913,7 +2918,9 @@ in
|
|||
cudatoolkit_10
|
||||
cudatoolkit_10_0
|
||||
cudatoolkit_10_1
|
||||
cudatoolkit_10_2;
|
||||
cudatoolkit_10_2
|
||||
cudatoolkit_11
|
||||
cudatoolkit_11_0;
|
||||
|
||||
cudatoolkit = cudatoolkit_10;
|
||||
|
||||
|
@ -2930,7 +2937,9 @@ in
|
|||
cudnn_cudatoolkit_10
|
||||
cudnn_cudatoolkit_10_0
|
||||
cudnn_cudatoolkit_10_1
|
||||
cudnn_cudatoolkit_10_2;
|
||||
cudnn_cudatoolkit_10_2
|
||||
cudnn_cudatoolkit_11
|
||||
cudnn_cudatoolkit_11_0;
|
||||
|
||||
cudnn = cudnn_cudatoolkit_10;
|
||||
|
||||
|
@ -3178,6 +3187,8 @@ in
|
|||
|
||||
dtc = callPackage ../development/compilers/dtc { };
|
||||
|
||||
dt-schema = python3Packages.callPackage ../development/tools/dt-schema { };
|
||||
|
||||
dub = callPackage ../development/tools/build-managers/dub { };
|
||||
|
||||
duc = callPackage ../tools/misc/duc { };
|
||||
|
@ -3551,7 +3562,7 @@ in
|
|||
|
||||
fdtools = callPackage ../tools/misc/fdtools { };
|
||||
|
||||
featherpad = callPackage ../applications/editors/featherpad {};
|
||||
featherpad = qt5.callPackage ../applications/editors/featherpad {};
|
||||
|
||||
feedreader = callPackage ../applications/networking/feedreaders/feedreader {};
|
||||
|
||||
|
@ -5562,9 +5573,8 @@ in
|
|||
xnbd = callPackage ../tools/networking/xnbd { };
|
||||
|
||||
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_11 = nccl.override { cudatoolkit = cudatoolkit_11; };
|
||||
|
||||
ndjbdns = callPackage ../tools/networking/ndjbdns { };
|
||||
|
||||
|
@ -5614,6 +5624,8 @@ in
|
|||
|
||||
netkittftp = callPackage ../tools/networking/netkit/tftp { };
|
||||
|
||||
netlify-cli = nodePackages.netlify-cli;
|
||||
|
||||
netpbm = callPackage ../tools/graphics/netpbm { };
|
||||
|
||||
netrw = callPackage ../tools/networking/netrw { };
|
||||
|
@ -11037,6 +11049,8 @@ in
|
|||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
|
||||
kpack = callPackage ../development/tools/misc/kpack { };
|
||||
|
||||
kustomize = callPackage ../development/tools/kustomize { };
|
||||
|
||||
ktlint = callPackage ../development/tools/ktlint { };
|
||||
|
@ -13087,7 +13101,7 @@ in
|
|||
libaudclient = callPackage ../development/libraries/libaudclient { };
|
||||
|
||||
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;
|
||||
|
||||
libavc1394 = callPackage ../development/libraries/libavc1394 { };
|
||||
|
@ -23145,6 +23159,8 @@ in
|
|||
|
||||
terminus = callPackage ../applications/misc/terminus { };
|
||||
|
||||
tty-solitaire = callPackage ../applications/misc/tty-solitaire { };
|
||||
|
||||
lxterminal = callPackage ../applications/misc/lxterminal { };
|
||||
|
||||
aminal = callPackage ../applications/misc/aminal {
|
||||
|
@ -26945,6 +26961,8 @@ in
|
|||
|
||||
pyload = callPackage ../applications/networking/pyload {};
|
||||
|
||||
pwntools = with python3Packages; toPythonApplication pwntools;
|
||||
|
||||
uae = callPackage ../misc/emulators/uae { };
|
||||
|
||||
fsuae = callPackage ../misc/emulators/fs-uae { };
|
||||
|
|
|
@ -3361,6 +3361,8 @@ in {
|
|||
|
||||
jupyterlab = callPackage ../development/python-modules/jupyterlab {};
|
||||
|
||||
jupyterlab-git = callPackage ../development/python-modules/jupyterlab-git {};
|
||||
|
||||
jupyter-sphinx = callPackage ../development/python-modules/jupyter-sphinx { };
|
||||
|
||||
jupytext = callPackage ../development/python-modules/jupytext { };
|
||||
|
@ -5360,6 +5362,8 @@ in {
|
|||
|
||||
pip = callPackage ../development/python-modules/pip { };
|
||||
|
||||
pipx = callPackage ../development/python-modules/pipx { };
|
||||
|
||||
pip-tools = callPackage ../development/python-modules/pip-tools {
|
||||
git = pkgs.gitMinimal;
|
||||
glibcLocales = pkgs.glibcLocales;
|
||||
|
@ -7481,7 +7485,7 @@ in {
|
|||
|
||||
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 { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue