Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-07-19 00:02:11 +00:00 committed by GitHub
commit 7f01b5d24b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 1350 additions and 734 deletions

View file

@ -738,6 +738,42 @@ rec {
sets:
zipAttrsWith (name: values: values) sets;
/*
Merge a list of attribute sets together using the `//` operator.
In case of duplicate attributes, values from later list elements take precedence over earlier ones.
The result is the same as `foldl mergeAttrs { }`, but the performance is better for large inputs.
For n list elements, each with an attribute set containing m unique attributes, the complexity of this operation is O(nm log n).
Type:
mergeAttrsList :: [ Attrs ] -> Attrs
Example:
mergeAttrsList [ { a = 0; b = 1; } { c = 2; d = 3; } ]
=> { a = 0; b = 1; c = 2; d = 3; }
mergeAttrsList [ { a = 0; } { a = 1; } ]
=> { a = 1; }
*/
mergeAttrsList = list:
let
# `binaryMerge start end` merges the elements at indices `index` of `list` such that `start <= index < end`
# Type: Int -> Int -> Attrs
binaryMerge = start: end:
# assert start < end; # Invariant
if end - start >= 2 then
# If there's at least 2 elements, split the range in two, recurse on each part and merge the result
# The invariant is satisfied because each half will have at least 1 element
binaryMerge start (start + (end - start) / 2)
// binaryMerge (start + (end - start) / 2) end
else
# Otherwise there will be exactly 1 element due to the invariant, in which case we just return it directly
elemAt list start;
in
if list == [ ] then
# Calling binaryMerge as below would not satisfy its invariant
{ }
else
binaryMerge 0 (length list);
/* Does the same as the update operator '//' except that attributes are
merged until the given predicate is verified. The predicate should

View file

@ -609,6 +609,31 @@ runTests {
};
};
testMergeAttrsListExample1 = {
expr = attrsets.mergeAttrsList [ { a = 0; b = 1; } { c = 2; d = 3; } ];
expected = { a = 0; b = 1; c = 2; d = 3; };
};
testMergeAttrsListExample2 = {
expr = attrsets.mergeAttrsList [ { a = 0; } { a = 1; } ];
expected = { a = 1; };
};
testMergeAttrsListExampleMany =
let
list = genList (n:
listToAttrs (genList (m:
let
# Integer divide n by two to create duplicate attributes
str = "halfn${toString (n / 2)}m${toString m}";
in
nameValuePair str str
) 100)
) 100;
in {
expr = attrsets.mergeAttrsList list;
expected = foldl' mergeAttrs { } list;
};
# code from the example
testRecursiveUpdateUntil = {
expr = recursiveUpdateUntil (path: l: r: path == ["foo"]) {

View file

@ -15847,6 +15847,12 @@
githubId = 16734772;
name = "Sumner Evans";
};
sund3RRR = {
email = "evenquantity@gmail.com";
github = "sund3RRR";
githubId = 73298492;
name = "Mikhail Kiselev";
};
suominen = {
email = "kimmo@suominen.com";
github = "suominen";

View file

@ -86,6 +86,7 @@ luuid,,,,,,
luv,,,,1.44.2-1,,
lush.nvim,https://github.com/rktjmp/lush.nvim,,,,,teto
lyaml,,,,,,lblasc
magick,,,,,,donovanglover
markdown,,,,,,
mediator_lua,,,,,,
mpack,,,,,,

1 name src ref server version luaversion maintainers
86 luv 1.44.2-1
87 lush.nvim https://github.com/rktjmp/lush.nvim teto
88 lyaml lblasc
89 magick donovanglover
90 markdown
91 mediator_lua
92 mpack

View file

@ -63,6 +63,9 @@ let
optionIdPrefix = "test-opt-";
};
testDriverMachineDocstrings = pkgs.callPackage
../../../nixos/lib/test-driver/nixos-test-driver-docstrings.nix {};
prepareManualFromMD = ''
cp -r --no-preserve=all $inputs/* .
@ -80,6 +83,8 @@ let
--replace \
'@NIXOS_TEST_OPTIONS_JSON@' \
${testOptionsDoc.optionsJSON}/share/doc/nixos/options.json
sed -e '/@PYTHON_MACHINE_METHODS@/ {' -e 'r ${testDriverMachineDocstrings}/machine-methods.md' -e 'd' -e '}' \
-i ./development/writing-nixos-tests.section.md
'';
in rec {

View file

@ -139,210 +139,7 @@ to Python as `machine_a`.
The following methods are available on machine objects:
`start`
: Start the virtual machine. This method is asynchronous --- it does
not wait for the machine to finish booting.
`shutdown`
: Shut down the machine, waiting for the VM to exit.
`crash`
: Simulate a sudden power failure, by telling the VM to exit
immediately.
`block`
: Simulate unplugging the Ethernet cable that connects the machine to
the other machines.
`unblock`
: Undo the effect of `block`.
`screenshot`
: Take a picture of the display of the virtual machine, in PNG format.
The screenshot is linked from the HTML log.
`get_screen_text_variants`
: Return a list of different interpretations of what is currently
visible on the machine's screen using optical character
recognition. The number and order of the interpretations is not
specified and is subject to change, but if no exception is raised at
least one will be returned.
::: {.note}
This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`.
:::
`get_screen_text`
: Return a textual representation of what is currently visible on the
machine's screen using optical character recognition.
::: {.note}
This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`.
:::
`send_monitor_command`
: Send a command to the QEMU monitor. This is rarely used, but allows
doing stuff such as attaching virtual USB disks to a running
machine.
`send_key`
: Simulate pressing keys on the virtual keyboard, e.g.,
`send_key("ctrl-alt-delete")`.
`send_chars`
: Simulate typing a sequence of characters on the virtual keyboard,
e.g., `send_chars("foobar\n")` will type the string `foobar`
followed by the Enter key.
`send_console`
: Send keys to the kernel console. This allows interaction with the systemd
emergency mode, for example. Takes a string that is sent, e.g.,
`send_console("\n\nsystemctl default\n")`.
`execute`
: Execute a shell command, returning a list `(status, stdout)`.
Commands are run with `set -euo pipefail` set:
- If several commands are separated by `;` and one fails, the
command as a whole will fail.
- For pipelines, the last non-zero exit status will be returned
(if there is one; otherwise zero will be returned).
- Dereferencing unset variables fails the command.
- It will wait for stdout to be closed.
If the command detaches, it must close stdout, as `execute` will wait
for this to consume all output reliably. This can be achieved by
redirecting stdout to stderr `>&2`, to `/dev/console`, `/dev/null` or
a file. Examples of detaching commands are `sleep 365d &`, where the
shell forks a new process that can write to stdout and `xclip -i`, where
the `xclip` command itself forks without closing stdout.
Takes an optional parameter `check_return` that defaults to `True`.
Setting this parameter to `False` will not check for the return code
and return -1 instead. This can be used for commands that shut down
the VM and would therefore break the pipe that would be used for
retrieving the return code.
A timeout for the command can be specified (in seconds) using the optional
`timeout` parameter, e.g., `execute(cmd, timeout=10)` or
`execute(cmd, timeout=None)`. The default is 900 seconds.
`succeed`
: Execute a shell command, raising an exception if the exit status is
not zero, otherwise returning the standard output. Similar to `execute`,
except that the timeout is `None` by default. See `execute` for details on
command execution.
`fail`
: Like `succeed`, but raising an exception if the command returns a zero
status.
`wait_until_succeeds`
: Repeat a shell command with 1-second intervals until it succeeds.
Has a default timeout of 900 seconds which can be modified, e.g.
`wait_until_succeeds(cmd, timeout=10)`. See `execute` for details on
command execution.
`wait_until_fails`
: Like `wait_until_succeeds`, but repeating the command until it fails.
`wait_for_unit`
: Wait until the specified systemd unit has reached the "active"
state.
`wait_for_file`
: Wait until the specified file exists.
`wait_for_open_port`
: Wait until a process is listening on the given TCP port and IP address
(default `localhost`).
`wait_for_closed_port`
: Wait until nobody is listening on the given TCP port and IP address
(default `localhost`).
`wait_for_x`
: Wait until the X11 server is accepting connections.
`wait_for_text`
: Wait until the supplied regular expressions matches the textual
contents of the screen by using optical character recognition (see
`get_screen_text` and `get_screen_text_variants`).
::: {.note}
This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`.
:::
`wait_for_console_text`
: Wait until the supplied regular expressions match a line of the
serial console output. This method is useful when OCR is not
possible or accurate enough.
`wait_for_window`
: Wait until an X11 window has appeared whose name matches the given
regular expression, e.g., `wait_for_window("Terminal")`.
`copy_from_host`
: Copies a file from host to machine, e.g.,
`copy_from_host("myfile", "/etc/my/important/file")`.
The first argument is the file on the host. The file needs to be
accessible while building the nix derivation. The second argument is
the location of the file on the machine.
`systemctl`
: Runs `systemctl` commands with optional support for
`systemctl --user`
```py
machine.systemctl("list-jobs --no-pager") # runs `systemctl list-jobs --no-pager`
machine.systemctl("list-jobs --no-pager", "any-user") # spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager`
```
`shell_interact`
: Allows you to directly interact with the guest shell. This should
only be used during test development, not in production tests.
Killing the interactive session with `Ctrl-d` or `Ctrl-c` also ends
the guest session.
`console_interact`
: Allows you to directly interact with QEMU's stdin. This should
only be used during test development, not in production tests.
Output from QEMU is only read line-wise. `Ctrl-c` kills QEMU and
`Ctrl-d` closes console and returns to the test runner.
@PYTHON_MACHINE_METHODS@
To test user units declared by `systemd.user.services` the optional
`user` argument can be used:

View file

@ -0,0 +1,66 @@
import ast
import sys
"""
This program takes all the Machine class methods and prints its methods in
markdown-style. These can then be included in the NixOS test driver
markdown style, assuming the docstrings themselves are also in markdown.
These are included in the test driver documentation in the NixOS manual.
See https://nixos.org/manual/nixos/stable/#ssec-machine-objects
The python input looks like this:
```py
...
class Machine(...):
...
def some_function(self, param1, param2):
""
documentation string of some_function.
foo bar baz.
""
...
```
Output will be:
```markdown
...
some_function(param1, param2)
: documentation string of some_function.
foo bar baz.
...
```
"""
assert len(sys.argv) == 2
with open(sys.argv[1], "r") as f:
module = ast.parse(f.read())
class_definitions = (node for node in module.body if isinstance(node, ast.ClassDef))
machine_class = next(filter(lambda x: x.name == "Machine", class_definitions))
assert machine_class is not None
function_definitions = [
node for node in machine_class.body if isinstance(node, ast.FunctionDef)
]
function_definitions.sort(key=lambda x: x.name)
for f in function_definitions:
docstr = ast.get_docstring(f)
if docstr is not None:
args = ", ".join((a.arg for a in f.args.args[1:]))
args = f"({args})"
docstr = "\n".join((f" {l}" for l in docstr.strip().splitlines()))
print(f"{f.name}{args}\n\n:{docstr[1:]}\n")

View file

@ -0,0 +1,13 @@
{ runCommand
, python3
}:
let
env = { nativeBuildInputs = [ python3 ]; };
in
runCommand "nixos-test-driver-docstrings" env ''
mkdir $out
python3 ${./extract-docstrings.py} ${./test_driver/machine.py} \
> $out/machine-methods.md
''

View file

@ -416,6 +416,10 @@ class Machine:
return answer
def send_monitor_command(self, command: str) -> str:
"""
Send a command to the QEMU monitor. This allows attaching
virtual USB disks to a running machine, among other things.
"""
self.run_callbacks()
message = f"{command}\n".encode()
assert self.monitor is not None
@ -425,9 +429,10 @@ class Machine:
def wait_for_unit(
self, unit: str, user: Optional[str] = None, timeout: int = 900
) -> None:
"""Wait for a systemd unit to get into "active" state.
Throws exceptions on "failed" and "inactive" states as well as
after timing out.
"""
Wait for a systemd unit to get into "active" state.
Throws exceptions on "failed" and "inactive" states as well as after
timing out.
"""
def check_active(_: Any) -> bool:
@ -476,6 +481,19 @@ class Machine:
)
def systemctl(self, q: str, user: Optional[str] = None) -> Tuple[int, str]:
"""
Runs `systemctl` commands with optional support for
`systemctl --user`
```py
# run `systemctl list-jobs --no-pager`
machine.systemctl("list-jobs --no-pager")
# spawn a shell for `any-user` and run
# `systemctl --user list-jobs --no-pager`
machine.systemctl("list-jobs --no-pager", "any-user")
```
"""
if user is not None:
q = q.replace("'", "\\'")
return self.execute(
@ -520,6 +538,38 @@ class Machine:
check_output: bool = True,
timeout: Optional[int] = 900,
) -> Tuple[int, str]:
"""
Execute a shell command, returning a list `(status, stdout)`.
Commands are run with `set -euo pipefail` set:
- If several commands are separated by `;` and one fails, the
command as a whole will fail.
- For pipelines, the last non-zero exit status will be returned
(if there is one; otherwise zero will be returned).
- Dereferencing unset variables fails the command.
- It will wait for stdout to be closed.
If the command detaches, it must close stdout, as `execute` will wait
for this to consume all output reliably. This can be achieved by
redirecting stdout to stderr `>&2`, to `/dev/console`, `/dev/null` or
a file. Examples of detaching commands are `sleep 365d &`, where the
shell forks a new process that can write to stdout and `xclip -i`, where
the `xclip` command itself forks without closing stdout.
Takes an optional parameter `check_return` that defaults to `True`.
Setting this parameter to `False` will not check for the return code
and return -1 instead. This can be used for commands that shut down
the VM and would therefore break the pipe that would be used for
retrieving the return code.
A timeout for the command can be specified (in seconds) using the optional
`timeout` parameter, e.g., `execute(cmd, timeout=10)` or
`execute(cmd, timeout=None)`. The default is 900 seconds.
"""
self.run_callbacks()
self.connect()
@ -555,10 +605,11 @@ class Machine:
return (rc, output.decode(errors="replace"))
def shell_interact(self, address: Optional[str] = None) -> None:
"""Allows you to interact with the guest shell for debugging purposes.
@address string passed to socat that will be connected to the guest shell.
Check the `Running Tests interactivly` chapter of NixOS manual for an example.
"""
Allows you to directly interact with the guest shell. This should
only be used during test development, not in production tests.
Killing the interactive session with `Ctrl-d` or `Ctrl-c` also ends
the guest session.
"""
self.connect()
@ -577,12 +628,14 @@ class Machine:
pass
def console_interact(self) -> None:
"""Allows you to interact with QEMU's stdin
The shell can be exited with Ctrl+D. Note that Ctrl+C is not allowed to be used.
QEMU's stdout is read line-wise.
Should only be used during test development, not in the production test."""
"""
Allows you to directly interact with QEMU's stdin, by forwarding
terminal input to the QEMU process.
This is for use with the interactive test driver, not for production
tests, which run unattended.
Output from QEMU is only read line-wise. `Ctrl-c` kills QEMU and
`Ctrl-d` closes console and returns to the test runner.
"""
self.log("Terminal is ready (there is no prompt):")
assert self.process
@ -599,7 +652,12 @@ class Machine:
self.send_console(char.decode())
def succeed(self, *commands: str, timeout: Optional[int] = None) -> str:
"""Execute each command and check that it succeeds."""
"""
Execute a shell command, raising an exception if the exit status is
not zero, otherwise returning the standard output. Similar to `execute`,
except that the timeout is `None` by default. See `execute` for details on
command execution.
"""
output = ""
for command in commands:
with self.nested(f"must succeed: {command}"):
@ -611,7 +669,10 @@ class Machine:
return output
def fail(self, *commands: str, timeout: Optional[int] = None) -> str:
"""Execute each command and check that it fails."""
"""
Like `succeed`, but raising an exception if the command returns a zero
status.
"""
output = ""
for command in commands:
with self.nested(f"must fail: {command}"):
@ -622,7 +683,11 @@ class Machine:
return output
def wait_until_succeeds(self, command: str, timeout: int = 900) -> str:
"""Wait until a command returns success and return its output.
"""
Repeat a shell command with 1-second intervals until it succeeds.
Has a default timeout of 900 seconds which can be modified, e.g.
`wait_until_succeeds(cmd, timeout=10)`. See `execute` for details on
command execution.
Throws an exception on timeout.
"""
output = ""
@ -637,8 +702,8 @@ class Machine:
return output
def wait_until_fails(self, command: str, timeout: int = 900) -> str:
"""Wait until a command returns failure.
Throws an exception on timeout.
"""
Like `wait_until_succeeds`, but repeating the command until it fails.
"""
output = ""
@ -690,12 +755,19 @@ class Machine:
retry(tty_matches)
def send_chars(self, chars: str, delay: Optional[float] = 0.01) -> None:
"""
Simulate typing a sequence of characters on the virtual keyboard,
e.g., `send_chars("foobar\n")` will type the string `foobar`
followed by the Enter key.
"""
with self.nested(f"sending keys {repr(chars)}"):
for char in chars:
self.send_key(char, delay, log=False)
def wait_for_file(self, filename: str) -> None:
"""Waits until the file exists in machine's file system."""
"""
Waits until the file exists in the machine's file system.
"""
def check_file(_: Any) -> bool:
status, _ = self.execute(f"test -e {filename}")
@ -705,6 +777,11 @@ class Machine:
retry(check_file)
def wait_for_open_port(self, port: int, addr: str = "localhost") -> None:
"""
Wait until a process is listening on the given TCP port and IP address
(default `localhost`).
"""
def port_is_open(_: Any) -> bool:
status, _ = self.execute(f"nc -z {addr} {port}")
return status == 0
@ -713,6 +790,11 @@ class Machine:
retry(port_is_open)
def wait_for_closed_port(self, port: int, addr: str = "localhost") -> None:
"""
Wait until nobody is listening on the given TCP port and IP address
(default `localhost`).
"""
def port_is_closed(_: Any) -> bool:
status, _ = self.execute(f"nc -z {addr} {port}")
return status != 0
@ -766,6 +848,10 @@ class Machine:
self.connected = True
def screenshot(self, filename: str) -> None:
"""
Take a picture of the display of the virtual machine, in PNG format.
The screenshot will be available in the derivation output.
"""
if "." not in filename:
filename += ".png"
if "/" not in filename:
@ -795,8 +881,21 @@ class Machine:
)
def copy_from_host(self, source: str, target: str) -> None:
"""Copy a file from the host into the guest via the `shared_dir` shared
among all the VMs (using a temporary directory).
"""
Copies a file from host to machine, e.g.,
`copy_from_host("myfile", "/etc/my/important/file")`.
The first argument is the file on the host. Note that the "host" refers
to the environment in which the test driver runs, which is typically the
Nix build sandbox.
The second argument is the location of the file on the machine that will
be written to.
The file is copied via the `shared_dir` directory which is shared among
all the VMs (using a temporary directory).
The access rights bits will mimic the ones from the host file and
user:group will be root:root.
"""
host_src = Path(source)
vm_target = Path(target)
@ -848,12 +947,41 @@ class Machine:
return _perform_ocr_on_screenshot(screenshot_path, model_ids)
def get_screen_text_variants(self) -> List[str]:
"""
Return a list of different interpretations of what is currently
visible on the machine's screen using optical character
recognition. The number and order of the interpretations is not
specified and is subject to change, but if no exception is raised at
least one will be returned.
::: {.note}
This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`.
:::
"""
return self._get_screen_text_variants([0, 1, 2])
def get_screen_text(self) -> str:
"""
Return a textual representation of what is currently visible on the
machine's screen using optical character recognition.
::: {.note}
This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`.
:::
"""
return self._get_screen_text_variants([2])[0]
def wait_for_text(self, regex: str) -> None:
"""
Wait until the supplied regular expressions matches the textual
contents of the screen by using optical character recognition (see
`get_screen_text` and `get_screen_text_variants`).
::: {.note}
This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`.
:::
"""
def screen_matches(last: bool) -> bool:
variants = self.get_screen_text_variants()
for text in variants:
@ -870,12 +998,9 @@ class Machine:
def wait_for_console_text(self, regex: str, timeout: int | None = None) -> None:
"""
Wait for the provided regex to appear on console.
For each reads,
If timeout is None, timeout is infinite.
`timeout` is in seconds.
Wait until the supplied regular expressions match a line of the
serial console output.
This method is useful when OCR is not possible or inaccurate.
"""
# Buffer the console output, this is needed
# to match multiline regexes.
@ -903,6 +1028,13 @@ class Machine:
def send_key(
self, key: str, delay: Optional[float] = 0.01, log: Optional[bool] = True
) -> None:
"""
Simulate pressing keys on the virtual keyboard, e.g.,
`send_key("ctrl-alt-delete")`.
Please also refer to the QEMU documentation for more information on the
input syntax: https://en.wikibooks.org/wiki/QEMU/Monitor#sendkey_keys
"""
key = CHAR_TO_KEY.get(key, key)
context = self.nested(f"sending key {repr(key)}") if log else nullcontext()
with context:
@ -911,12 +1043,21 @@ class Machine:
time.sleep(delay)
def send_console(self, chars: str) -> None:
r"""
Send keys to the kernel console. This allows interaction with the systemd
emergency mode, for example. Takes a string that is sent, e.g.,
`send_console("\n\nsystemctl default\n")`.
"""
assert self.process
assert self.process.stdin
self.process.stdin.write(chars.encode())
self.process.stdin.flush()
def start(self, allow_reboot: bool = False) -> None:
"""
Start the virtual machine. This method is asynchronous --- it does
not wait for the machine to finish booting.
"""
if self.booted:
return
@ -974,6 +1115,9 @@ class Machine:
rootlog.log("if you want to keep the VM state, pass --keep-vm-state")
def shutdown(self) -> None:
"""
Shut down the machine, waiting for the VM to exit.
"""
if not self.booted:
return
@ -982,6 +1126,9 @@ class Machine:
self.wait_for_shutdown()
def crash(self) -> None:
"""
Simulate a sudden power failure, by telling the VM to exit immediately.
"""
if not self.booted:
return
@ -999,8 +1146,8 @@ class Machine:
self.connected = False
def wait_for_x(self) -> None:
"""Wait until it is possible to connect to the X server. Note that
testing the existence of /tmp/.X11-unix/X0 is insufficient.
"""
Wait until it is possible to connect to the X server.
"""
def check_x(_: Any) -> bool:
@ -1023,6 +1170,10 @@ class Machine:
).splitlines()
def wait_for_window(self, regexp: str) -> None:
"""
Wait until an X11 window has appeared whose name matches the given
regular expression, e.g., `wait_for_window("Terminal")`.
"""
pattern = re.compile(regexp)
def window_is_visible(last_try: bool) -> bool:
@ -1043,20 +1194,26 @@ class Machine:
self.succeed(f"sleep {secs}")
def forward_port(self, host_port: int = 8080, guest_port: int = 80) -> None:
"""Forward a TCP port on the host to a TCP port on the guest.
"""
Forward a TCP port on the host to a TCP port on the guest.
Useful during interactive testing.
"""
self.send_monitor_command(f"hostfwd_add tcp::{host_port}-:{guest_port}")
def block(self) -> None:
"""Make the machine unreachable by shutting down eth1 (the multicast
interface used to talk to the other VMs). We keep eth0 up so that
the test driver can continue to talk to the machine.
"""
Simulate unplugging the Ethernet cable that connects the machine to
the other machines.
This happens by shutting down eth1 (the multicast interface used to talk
to the other VMs). eth0 is kept online to still enable the test driver
to communicate with the machine.
"""
self.send_monitor_command("set_link virtio-net-pci.1 off")
def unblock(self) -> None:
"""Make the machine reachable."""
"""
Undo the effect of `block`.
"""
self.send_monitor_command("set_link virtio-net-pci.1 on")
def release(self) -> None:

View file

@ -65,7 +65,8 @@ let
echo "${builtins.toString vlanNames}" >> testScriptWithTypes
echo -n "$testScript" >> testScriptWithTypes
cat -n testScriptWithTypes
echo "Running type check (enable/disable: config.skipTypeCheck)"
echo "See https://nixos.org/manual/nixos/stable/#test-opt-skipTypeCheck"
mypy --no-implicit-optional \
--pretty \
@ -79,6 +80,9 @@ let
${testDriver}/bin/generate-driver-symbols
${lib.optionalString (!config.skipLint) ''
echo "Linting test script (enable/disable: config.skipLint)"
echo "See https://nixos.org/manual/nixos/stable/#test-opt-skipLint"
PYFLAKES_BUILTINS="$(
echo -n ${lib.escapeShellArg (lib.concatStringsSep "," pythonizedNames)},
< ${lib.escapeShellArg "driver-symbols"}

View file

@ -0,0 +1,126 @@
{ stdenv
, fetchurl
, alsa-lib
, atk
, cairo
, dpkg
, ffmpeg
, freetype
, gdk-pixbuf
, glib
, gtk3
, harfbuzz
, lib
, libglvnd
, libjack2
, libjpeg
, libxkbcommon
, makeWrapper
, pango
, pipewire
, pulseaudio
, wrapGAppsHook
, xdg-utils
, xorg
, zlib
}:
stdenv.mkDerivation rec {
pname = "bitwig-studio";
version = "5.0";
src = fetchurl {
url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
sha256 = "sha256-0/S/aNoQA1nAdnr8nUWVLwzrDm+MHqmGIIjPW5YIr7s=";
};
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
unpackCmd = ''
mkdir -p root
dpkg-deb -x $curSrc root
'';
dontBuild = true;
dontWrapGApps = true; # we only want $gappsWrapperArgs here
buildInputs = with xorg; [
alsa-lib
atk
cairo
freetype
gdk-pixbuf
glib
gtk3
harfbuzz
libglvnd
libjack2
# libjpeg8 is required for converting jpeg's to colour palettes
libjpeg
libxcb
libXcursor
libX11
libXtst
libxkbcommon
pango
pipewire
pulseaudio
stdenv.cc.cc.lib
xcbutil
xcbutilwm
zlib
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r opt/bitwig-studio $out/libexec
ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
cp -r usr/share $out/share
substitute usr/share/applications/com.bitwig.BitwigStudio.desktop \
$out/share/applications/com.bitwig.BitwigStudio.desktop \
--replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
runHook postInstall
'';
postFixup = ''
# patchelf fails to set rpath on BitwigStudioEngine, so we use
# the LD_LIBRARY_PATH way
find $out -type f -executable \
-not -name '*.so.*' \
-not -name '*.so' \
-not -name '*.jar' \
-not -name 'jspawnhelper' \
-not -path '*/resources/*' | \
while IFS= read -r f ; do
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
# make xdg-open overrideable at runtime
wrapProgram $f \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
--suffix LD_LIBRARY_PATH : "${lib.strings.makeLibraryPath buildInputs}"
done
find $out -type f -executable -name 'jspawnhelper' | \
while IFS= read -r f ; do
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
done
'';
meta = with lib; {
description = "A digital audio workstation";
longDescription = ''
Bitwig Studio is a multi-platform music-creation system for
production, performance and DJing, with a focus on flexible
editing tools and a super-fast workflow.
'';
homepage = "https://www.bitwig.com/";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ bfortz michalrus mrVanDalo ];
};
}

File diff suppressed because it is too large Load diff

View file

@ -27,12 +27,12 @@
};
arduino = buildGrammar {
language = "arduino";
version = "0.0.0+rev=787bc6e";
version = "0.0.0+rev=4de2f3e";
src = fetchFromGitHub {
owner = "ObserverOfTime";
repo = "tree-sitter-arduino";
rev = "787bc6e1ca23092821231f6096438343f728ee6f";
hash = "sha256-PKjSNEy27Snu9B2eBZcOQYNXI/cnKhFdrBrePqcp7Rk=";
rev = "4de2f3e6235ee8659ecb7467c16ed13bde7fb272";
hash = "sha256-DeUp7M96PHQ652tvWSnsu1rSaQJyCCojAYfplccbJTc=";
};
meta.homepage = "https://github.com/ObserverOfTime/tree-sitter-arduino";
};
@ -126,12 +126,12 @@
};
c = buildGrammar {
language = "c";
version = "0.0.0+rev=a60f1dd";
version = "0.0.0+rev=6adee19";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-c";
rev = "a60f1ddef4702fc8a82a9bfc207d0cf453d748bb";
hash = "sha256-7MNTbIQT+7ksV2vmrIZzBZM1BlCdGI7P0DYw0sP6hvU=";
rev = "6adee194587678b250608cdb808544f06bcd26e7";
hash = "sha256-A3bLZxkCru7uAOtz9J3I/nsIoRRWmoUUiPGaLtljrqw=";
};
meta.homepage = "https://github.com/tree-sitter/tree-sitter-c";
};
@ -159,12 +159,12 @@
};
capnp = buildGrammar {
language = "capnp";
version = "0.0.0+rev=7d5fa4e";
version = "0.0.0+rev=dc28c9f";
src = fetchFromGitHub {
owner = "amaanq";
repo = "tree-sitter-capnp";
rev = "7d5fa4e94d3643ec15750106113be0d40f9fc1bb";
hash = "sha256-K83xouIGsv9EDLp4MSH9i6JE/GlAT72i3eJa58vR2gs=";
rev = "dc28c9f4212809eab74d10996086297853eb34e5";
hash = "sha256-4GcOBC5JJsfbdsIrQd33tSW2sz6ytjYGqWgFVFLH6sc=";
};
meta.homepage = "https://github.com/amaanq/tree-sitter-capnp";
};
@ -280,12 +280,12 @@
};
cuda = buildGrammar {
language = "cuda";
version = "0.0.0+rev=c9ba632";
version = "0.0.0+rev=c5befe0";
src = fetchFromGitHub {
owner = "theHamsta";
repo = "tree-sitter-cuda";
rev = "c9ba632aa68d24f32d2f97e356795f45f85e6c55";
hash = "sha256-2Wtkmlzhq+ShqFUnlofeFEN24toLaLD/O0/zSzbEZEE=";
rev = "c5befe09c99f5e88190574676ffa8eb29775d410";
hash = "sha256-wdv5TuNQl81n9CSyNkvAwCSPhfOs+DPwOT675WAphZE=";
};
meta.homepage = "https://github.com/theHamsta/tree-sitter-cuda";
};
@ -403,12 +403,12 @@
};
elixir = buildGrammar {
language = "elixir";
version = "0.0.0+rev=7be3905";
version = "0.0.0+rev=2616034";
src = fetchFromGitHub {
owner = "elixir-lang";
repo = "tree-sitter-elixir";
rev = "7be390548a870ca9cb1bd7f59ac92457bbec7bf5";
hash = "sha256-Id+c414ugW3PXOWx75ZMoN13qQdiyWs0cab9mNdT8/A=";
rev = "2616034f78ffa83ca6a521ebd7eee1868cb5c14c";
hash = "sha256-KY/qeIKWaXUCpA7hbK3ptfCg/cXoISa6mNYB7a0XY18=";
};
meta.homepage = "https://github.com/elixir-lang/tree-sitter-elixir";
};
@ -438,12 +438,12 @@
language = "elvish";
version = "0.0.0+rev=f32711e";
src = fetchFromGitHub {
owner = "ckafi";
owner = "elves";
repo = "tree-sitter-elvish";
rev = "f32711e31e987fd5c2c002f3daba02f25c68672f";
hash = "sha256-/3npcIfTH8w5ekLTb//ZCTxuSGhOXkUBaCq3WWcK2J4=";
};
meta.homepage = "https://github.com/ckafi/tree-sitter-elvish";
meta.homepage = "https://github.com/elves/tree-sitter-elvish";
};
embedded_template = buildGrammar {
language = "embedded_template";
@ -590,12 +590,12 @@
};
gitattributes = buildGrammar {
language = "gitattributes";
version = "0.0.0+rev=577a075";
version = "0.0.0+rev=19c716d";
src = fetchFromGitHub {
owner = "ObserverOfTime";
repo = "tree-sitter-gitattributes";
rev = "577a075d46ea109905c5cb6179809df88da61ce9";
hash = "sha256-gBfLmNf7aaqMY3yMF7svFuqif43BAmmY1yYkvVcNUhI=";
rev = "19c716d2f45eac9529703413dc12aa8c76d13adc";
hash = "sha256-4fevdvH+Mi+MRURUcoDb9v511oaxBgP9U/OOODS/G+o=";
};
meta.homepage = "https://github.com/ObserverOfTime/tree-sitter-gitattributes";
};
@ -645,23 +645,23 @@
};
glsl = buildGrammar {
language = "glsl";
version = "0.0.0+rev=53ca269";
version = "0.0.0+rev=7d76863";
src = fetchFromGitHub {
owner = "theHamsta";
repo = "tree-sitter-glsl";
rev = "53ca269cae2a47b1b75791e2bfe843baeb02e903";
hash = "sha256-qDysihoyGlzAFvhnu6qOjNTIRT9ii/A1B1wNiZNlJs8=";
rev = "7d76863f2126ed3b246fead68f9591760d546c94";
hash = "sha256-X0Lqq7xrKEFVRAOh1AfvzeJQ5zv6RNwv583p69VkEpY=";
};
meta.homepage = "https://github.com/theHamsta/tree-sitter-glsl";
};
go = buildGrammar {
language = "go";
version = "0.0.0+rev=7a4edcb";
version = "0.0.0+rev=8c8007e";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-go";
rev = "7a4edcbc376302efa8d6ba7e235070ab7ee3c4c8";
hash = "sha256-VvMsFU/HSccB7JetiuNj3O+K/vm6bmDwGWhozyec4Vc=";
rev = "8c8007eaee47702bb0291a3c7aeb004909baab4d";
hash = "sha256-K8mvDoQXSXwyyYQuwEcV6RBTZFbn4OSi7R1nGoQkDQU=";
};
meta.homepage = "https://github.com/tree-sitter/tree-sitter-go";
};
@ -722,12 +722,12 @@
};
groovy = buildGrammar {
language = "groovy";
version = "0.0.0+rev=54c7da8";
version = "0.0.0+rev=76e02db";
src = fetchFromGitHub {
owner = "Decodetalkers";
repo = "tree-sitter-groovy";
rev = "54c7da8b167261e76c79513c0364a01836093526";
hash = "sha256-83JIW+oOKbpqormWiNjU6uI2WAknVnUAXNFSAvdq83o=";
rev = "76e02db5866dd2b096512103ed4d8f630cc32980";
hash = "sha256-H6Gp7MqGxU1oONq/w8p8pNR3Vhi68dvO+2aHw8anBTs=";
};
meta.homepage = "https://github.com/Decodetalkers/tree-sitter-groovy";
};
@ -810,12 +810,12 @@
};
hlsl = buildGrammar {
language = "hlsl";
version = "0.0.0+rev=ddb6082";
version = "0.0.0+rev=b8fab02";
src = fetchFromGitHub {
owner = "theHamsta";
repo = "tree-sitter-hlsl";
rev = "ddb608219fa99d56ed98de2d60f396f575cc6590";
hash = "sha256-UQTXdrHg4OfHnRgSAoo2gGZenE35NOypNeqUCsc4zdM=";
rev = "b8fab02e808bab41c49829fb5e4fb0ce7eab8d1a";
hash = "sha256-b/8KKGFqYj0gwDo3EgrRAufvXeuAEz6xvIBHBeVW0KE=";
};
meta.homepage = "https://github.com/theHamsta/tree-sitter-hlsl";
};
@ -920,23 +920,23 @@
};
java = buildGrammar {
language = "java";
version = "0.0.0+rev=c194ee5";
version = "0.0.0+rev=6c8329e";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-java";
rev = "c194ee5e6ede5f26cf4799feead4a8f165dcf14d";
hash = "sha256-PNR1XajfELQuwYvCHm8778TzeUlxb9D+HrVF26lQk2E=";
rev = "6c8329e2da78fae78e87c3c6f5788a2b005a4afc";
hash = "sha256-pAo9hYhlLWjWB/n8nq/MzdMXbzOxcFzfrBCrj8xR/5g=";
};
meta.homepage = "https://github.com/tree-sitter/tree-sitter-java";
};
javascript = buildGrammar {
language = "javascript";
version = "0.0.0+rev=5720b24";
version = "0.0.0+rev=f772967";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-javascript";
rev = "5720b249490b3c17245ba772f6be4a43edb4e3b7";
hash = "sha256-rSkLSXdthOS9wzXsC8D1Z1P0vmOT+APzeesvlN7ta6U=";
rev = "f772967f7b7bc7c28f845be2420a38472b16a8ee";
hash = "sha256-rfOAn5S8E2RunlRyY1aTs7j0r6UGKH+732xdpk/5524=";
};
meta.homepage = "https://github.com/tree-sitter/tree-sitter-javascript";
};
@ -1008,12 +1008,12 @@
};
julia = buildGrammar {
language = "julia";
version = "0.0.0+rev=784364c";
version = "0.0.0+rev=d68ded9";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-julia";
rev = "784364cb9185ef8dc245de4b0b51e3a22503419d";
hash = "sha256-MPdDEVbIUsEQu84AB9k2Bhi3Oa47e9/tItGhKMfZLyU=";
rev = "d68ded9d5131878a2a06211ef0b47b72e70c6c08";
hash = "sha256-vPmZ9oA4t2LtQng88UNWkngwmpf2JLRlPOx/PM5mi80=";
};
meta.homepage = "https://github.com/tree-sitter/tree-sitter-julia";
};
@ -1253,12 +1253,12 @@
};
nix = buildGrammar {
language = "nix";
version = "0.0.0+rev=14b5361";
version = "0.0.0+rev=66e3e9c";
src = fetchFromGitHub {
owner = "cstrahan";
repo = "tree-sitter-nix";
rev = "14b53610c9038500066c509b2e67de04775b97fe";
hash = "sha256-FNq/+Voqg534Nnm7rnv2daPwc9uFxNi1ce0m091jmRk=";
rev = "66e3e9ce9180ae08fc57372061006ef83f0abde7";
hash = "sha256-+o+f1TlhcrcCB3TNw1RyCjVZ+37e11nL+GWBPo0Mxxg=";
};
meta.homepage = "https://github.com/cstrahan/tree-sitter-nix";
};
@ -1286,36 +1286,36 @@
};
ocaml = buildGrammar {
language = "ocaml";
version = "0.0.0+rev=3ad4d79";
version = "0.0.0+rev=ee871b5";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-ocaml";
rev = "3ad4d7988edf8b8a9780a1db7a5af657911dbfba";
hash = "sha256-OOBrAiKdw9dCy5oLPDzta0gQEkeRxNrJWmZFlDoENjg=";
rev = "ee871b50b845b6adaa22e85aa3c794a3fd49b1fb";
hash = "sha256-2WhK69OGHeQWQZPkBdfrybgxO2oDwHSn1c/AzQe9hAw=";
};
location = "ocaml";
meta.homepage = "https://github.com/tree-sitter/tree-sitter-ocaml";
};
ocaml_interface = buildGrammar {
language = "ocaml_interface";
version = "0.0.0+rev=3ad4d79";
version = "0.0.0+rev=ee871b5";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-ocaml";
rev = "3ad4d7988edf8b8a9780a1db7a5af657911dbfba";
hash = "sha256-OOBrAiKdw9dCy5oLPDzta0gQEkeRxNrJWmZFlDoENjg=";
rev = "ee871b50b845b6adaa22e85aa3c794a3fd49b1fb";
hash = "sha256-2WhK69OGHeQWQZPkBdfrybgxO2oDwHSn1c/AzQe9hAw=";
};
location = "interface";
meta.homepage = "https://github.com/tree-sitter/tree-sitter-ocaml";
};
ocamllex = buildGrammar {
language = "ocamllex";
version = "0.0.0+rev=fab854a";
version = "0.0.0+rev=c8f90e4";
src = fetchFromGitHub {
owner = "atom-ocaml";
repo = "tree-sitter-ocamllex";
rev = "fab854a2de25b2284582bf7ed7f9970d19988c73";
hash = "sha256-UmBTzWgjgp0EKAfZEY0uJhvYLHzeNtrMGEUPogx3Op8=";
rev = "c8f90e42e1b9cf9e30b1669c386b8d9de992d201";
hash = "sha256-cFzurSuO64PwOuJz1Fa0GTDZ2hnT0dHl4NwQhXWQWIw=";
};
generate = true;
meta.homepage = "https://github.com/atom-ocaml/tree-sitter-ocamllex";
@ -1377,12 +1377,12 @@
};
perl = buildGrammar {
language = "perl";
version = "0.0.0+rev=60aa138";
version = "0.0.0+rev=4a02376";
src = fetchFromGitHub {
owner = "ganezdragon";
repo = "tree-sitter-perl";
rev = "60aa138f9e1db15becad53070f4d5898b0e8a98c";
hash = "sha256-GpgUSm/kFFXgJOSBVBxPQiMfykZUgxLdmQfDfJE3Jq8=";
rev = "4a023763f54dec0a6f986f5bd238af788a3f0584";
hash = "sha256-8mLzXxkc8m69KOQtIT02MCKeTCuwERT3/Kegf48IEls=";
};
meta.homepage = "https://github.com/ganezdragon/tree-sitter-perl";
};
@ -1399,12 +1399,12 @@
};
phpdoc = buildGrammar {
language = "phpdoc";
version = "0.0.0+rev=2d20f39";
version = "0.0.0+rev=915a527";
src = fetchFromGitHub {
owner = "claytonrcarter";
repo = "tree-sitter-phpdoc";
rev = "2d20f39476348c2682761ce7251914031a7c013f";
hash = "sha256-uJEUAMIJ/Bq0YhcQ78UxWcK4LM6qoum+Ett03qli+Os=";
rev = "915a527d5aafa81b31acf67fab31b0ac6b6319c0";
hash = "sha256-DYNJ/i+VBuTOxuphJn4nklTLfV7GuNP1RCCuf5qAYR4=";
};
meta.homepage = "https://github.com/claytonrcarter/tree-sitter-phpdoc";
};
@ -1498,23 +1498,23 @@
};
puppet = buildGrammar {
language = "puppet";
version = "0.0.0+rev=843868b";
version = "0.0.0+rev=8e13a37";
src = fetchFromGitHub {
owner = "amaanq";
repo = "tree-sitter-puppet";
rev = "843868bfb909b734bfb63778a5685fae4bf2a33f";
hash = "sha256-6fJNADrLVsIoho9G8qCsMKNDB5a32gUntug7Nh8pKEg=";
rev = "8e13a3768091703ac27ef1e5763e542af7f6dead";
hash = "sha256-vBxCqFsSF2kwUK5uNWDPvl7F+mcD8rdTzsckcab4vUU=";
};
meta.homepage = "https://github.com/amaanq/tree-sitter-puppet";
};
python = buildGrammar {
language = "python";
version = "0.0.0+rev=db1d218";
version = "0.0.0+rev=7c8930b";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-python";
rev = "db1d218a4f8fb87145aabeb22ca3c35925c411fc";
hash = "sha256-v0pWQzO8M9w0ngTUO5eGoTTcBbVu7tRgA993zGfoNwI=";
rev = "7c8930b6388b5590ebef248853f144185a9eda1d";
hash = "sha256-6QXMocivEFGrmCFJdxz+z+FsAQ6MBd4kv7719gKO4Gg=";
};
meta.homepage = "https://github.com/tree-sitter/tree-sitter-python";
};
@ -1597,12 +1597,12 @@
};
regex = buildGrammar {
language = "regex";
version = "0.0.0+rev=e1cfca3";
version = "0.0.0+rev=17a3293";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-regex";
rev = "e1cfca3c79896ff79842f057ea13e529b66af636";
hash = "sha256-lDsr3sLrLf6wXu/juIA+bTtv1SBo+Jgwqw/6yBAE0kg=";
rev = "17a3293714312c691ef14217f60593a3d093381c";
hash = "sha256-3D+LOWRUamAdbegVfWD5yFcCjBucthPogOL/zWR78PY=";
};
meta.homepage = "https://github.com/tree-sitter/tree-sitter-regex";
};
@ -1628,6 +1628,17 @@
};
meta.homepage = "https://github.com/bamonroe/tree-sitter-rnoweb";
};
robot = buildGrammar {
language = "robot";
version = "0.0.0+rev=f1142bf";
src = fetchFromGitHub {
owner = "Hubro";
repo = "tree-sitter-robot";
rev = "f1142bfaa6acfce95e25d2c6d18d218f4f533927";
hash = "sha256-Nd38FJZsSEr3R7S6e8nyoJTqZbbDCtlcvwqWrjvz2d4=";
};
meta.homepage = "https://github.com/Hubro/tree-sitter-robot";
};
ron = buildGrammar {
language = "ron";
version = "0.0.0+rev=ce6086b";
@ -1762,12 +1773,12 @@
};
sql = buildGrammar {
language = "sql";
version = "0.0.0+rev=e08036e";
version = "0.0.0+rev=9fc30c9";
src = fetchFromGitHub {
owner = "derekstride";
repo = "tree-sitter-sql";
rev = "e08036ee4928b32fbebe55ac9336f81b7389e107";
hash = "sha256-x3vngL+36kO60eEFN0jvTzh9sCvsYvrzrvfMg08JL4w=";
rev = "9fc30c949f29747d34c254677d039c9df3c521b4";
hash = "sha256-EyZSbcjbPuaQGpi33YK+hpsod73yifk2hL+MCjn8R9M=";
};
meta.homepage = "https://github.com/derekstride/tree-sitter-sql";
};
@ -1828,12 +1839,12 @@
};
swift = buildGrammar {
language = "swift";
version = "0.0.0+rev=56ecc99";
version = "0.0.0+rev=29541ac";
src = fetchFromGitHub {
owner = "alex-pinkus";
repo = "tree-sitter-swift";
rev = "56ecc996e5765054fc25cdae5fbddfd75a64287b";
hash = "sha256-GH0HpxAprOlOLv8zqsP1O0/RbIn93FfdgAHp56Pyw9g=";
rev = "29541ac9bbe2090de75d0b1e70360b85bbda1fef";
hash = "sha256-jT7SdhxX5AlZP33oH7NISV+HvJwQwsXMXDWzHorgnIc=";
};
generate = true;
meta.homepage = "https://github.com/alex-pinkus/tree-sitter-swift";
@ -1863,12 +1874,12 @@
};
tablegen = buildGrammar {
language = "tablegen";
version = "0.0.0+rev=e5e046e";
version = "0.0.0+rev=300f6a4";
src = fetchFromGitHub {
owner = "amaanq";
repo = "tree-sitter-tablegen";
rev = "e5e046e1b221e25111175469f02f3cf336010857";
hash = "sha256-qh5AWLinsSwfbui7b3Vk7DRW3GaS4Avaa0iLeMmMFtM=";
rev = "300f6a490e71f895e644ed2deec6920860a2e107";
hash = "sha256-V4fEmiGPBAnZO+NAyA7FdlyjLSA0ByUfrCTbsdDOxc8=";
};
meta.homepage = "https://github.com/amaanq/tree-sitter-tablegen";
};
@ -1953,12 +1964,12 @@
};
tsx = buildGrammar {
language = "tsx";
version = "0.0.0+rev=3429d8c";
version = "0.0.0+rev=e5fa28f";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-typescript";
rev = "3429d8c77d7a83e80032667f0642e6cb19d0c772";
hash = "sha256-qMzxxCx7u8fp+LhlSg6rvK0vMa0SXnJqSc4hgLcpZ7U=";
rev = "e5fa28f919e0b1ed1961af9adf9a1e7a71271104";
hash = "sha256-1kyW5tohk3byP/sWM7Edv8N3tWin65k7h+nkKBMQGAg=";
};
location = "tsx";
meta.homepage = "https://github.com/tree-sitter/tree-sitter-typescript";
@ -1987,12 +1998,12 @@
};
typescript = buildGrammar {
language = "typescript";
version = "0.0.0+rev=3429d8c";
version = "0.0.0+rev=e5fa28f";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-typescript";
rev = "3429d8c77d7a83e80032667f0642e6cb19d0c772";
hash = "sha256-qMzxxCx7u8fp+LhlSg6rvK0vMa0SXnJqSc4hgLcpZ7U=";
rev = "e5fa28f919e0b1ed1961af9adf9a1e7a71271104";
hash = "sha256-1kyW5tohk3byP/sWM7Edv8N3tWin65k7h+nkKBMQGAg=";
};
location = "typescript";
meta.homepage = "https://github.com/tree-sitter/tree-sitter-typescript";
@ -2021,12 +2032,12 @@
};
uxntal = buildGrammar {
language = "uxntal";
version = "0.0.0+rev=14e4760";
version = "0.0.0+rev=4c5ecd6";
src = fetchFromGitHub {
owner = "amaanq";
repo = "tree-sitter-uxntal";
rev = "14e47600afef0affffcbfbe1543381b1ac8fbc5c";
hash = "sha256-SgBWJ8b/9kMkSDafx+6eSl+FS4Hkd1Ei2ALhTLL7yRk=";
rev = "4c5ecd6326ebd61f6f9a22a370cbd100e0d601da";
hash = "sha256-vgeTsRJ3mlR02jXuucmXpszVOmusZwuV0xj/7sSs+WQ=";
};
meta.homepage = "https://github.com/amaanq/tree-sitter-uxntal";
};
@ -2132,12 +2143,12 @@
};
wing = buildGrammar {
language = "wing";
version = "0.0.0+rev=755aef4";
version = "0.0.0+rev=1f8736f";
src = fetchFromGitHub {
owner = "winglang";
repo = "wing";
rev = "755aef4e57da4a00da47e85b6aff976b007d500c";
hash = "sha256-EbTNiwZwzPWxf8VNUWX82x/Jz4RFCE1LDuzXwYiYQLs=";
rev = "1f8736fc86204a045644e0086bee68f7171e1967";
hash = "sha256-cguDviBdQPOLOwoM/jhGNasQyjN1IfLw5Eg9DVjnU1s=";
};
location = "libs/tree-sitter-wing";
generate = true;

View file

@ -919,7 +919,7 @@ self: super: {
pname = "sg-nvim-rust";
inherit (old) version src;
cargoHash = "sha256-IRp4avOvM2tz2oC1Cwr4W/d4i0pzawcZLP+c1+jnm+I=";
cargoHash = "sha256-ErXgFNx3bTp955p45xpW0vAfLMPbH8KQ+SQH6/TE3m4=";
nativeBuildInputs = [ pkg-config ];

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "goldendict";
repo = pname;
rev = "v${version}";
rev = version;
hash = "sha256-80o8y+mbzpyMQYUGHYs/zgQT23nLVCs7Jcr8FbbXn8M=";
};

View file

@ -19,9 +19,9 @@
}
},
"beta": {
"version": "115.0.5790.40",
"sha256": "1ab034zrgyz0gwi0caz6y1nyr0p5yhbly50chnhvsr3k6gmidl58",
"sha256bin64": "02vzlz5z87n9lwdhxnzdzr5w85l3b828j0y1z6fzq7br90yr0pcw",
"version": "115.0.5790.90",
"sha256": "156k5cijkxj44r4cn14k7r2xa11xp0nwi7nsgxfmg3dfsay05s42",
"sha256bin64": "1b573bd19ywwy0k8570501az1cw3xnp6iy53zk1a1gawsn8f4pv5",
"deps": {
"gn": {
"version": "2023-05-19",
@ -32,9 +32,9 @@
}
},
"dev": {
"version": "116.0.5845.14",
"sha256": "1b8ak0yg7ymz0siw81g47fdl12bj7f7gdw2nd5wlgj3h0g0b0675",
"sha256bin64": "1hnis5m5l6ygihmwsy6qk12lz6gjcndfdnssb3l9pd7v3qwfpkp2",
"version": "116.0.5845.32",
"sha256": "0migfx1snbsa9a42cv37x6bkpa9j7y3n6h6hs0w79ss1hxmmj2mi",
"sha256bin64": "1zdr2340lbkvwyw303954ba8cay44p9a5d6b9l693kcrgkf4z8bz",
"deps": {
"gn": {
"version": "2023-06-09",

View file

@ -1,9 +1,9 @@
{
"version" = "1.11.35";
"version" = "1.11.36";
"hashes" = {
"desktopSrcHash" = "8BP7PC0ZqE3d0K1AxmG05Xh3Ze1dAOcBVW9ADW4YAjY=";
"desktopYarnHash" = "1k8ih7z9hxm38kbvnfimd0djwqlrs62s8i0hc6d6ii10l3binkzp";
"webSrcHash" = "IM1M8iygeya8hw0uVjV4EK/jGG4UyQUTviYAvAjI7k4=";
"webYarnHash" = "0lr5cgs8nhdjrv43pcyhq4ysrz8bncx0j969j82l0chq3nzdml5b";
"desktopSrcHash" = "MMTuyyUXur5Fy24aXPWtZbQLAaXR2R7coEi8ZOJo1YI=";
"desktopYarnHash" = "03wmdqnxzjrvdypwrb5z564liiqamwn6qmw2fww1mja8dkdkx5ng";
"webSrcHash" = "u+Y/iLRlTd5RkczF6qIaer9HKFnm8LUGP8ZnB/WfiGI=";
"webYarnHash" = "0s9ly1hr9jvb2asgjf6g5n5n5w6qh51wkwyl7ps891c0hv9m28zm";
};
}

View file

@ -1,14 +1,17 @@
{ lib
, stdenv
, openvpn
, fetchpatch
, fetchurl
, iproute2
, autoconf
, automake
, libnl
, autoreconfHook
, pkg-config
}:
openvpn.overrideAttrs (oldAttrs:
let
inherit (lib) optional;
fetchMullvadPatch = { commit, sha256 }: fetchpatch {
url = "https://github.com/mullvad/openvpn/commit/${commit}.patch";
inherit sha256;
@ -16,68 +19,90 @@ openvpn.overrideAttrs (oldAttrs:
in
rec {
pname = "openvpn-mullvad";
version = "2.5.3";
version = "2.6.0";
src = fetchurl {
url = "https://swupdate.openvpn.net/community/releases/openvpn-${version}.tar.gz";
sha256 = "sha256-dfAETfRJQwVVynuZWit3qyTylG/cNmgwG47cI5hqX34=";
sha256 = "sha256-6+yTMmPJhQ72984SXi8iIUvmCxy7jM/xiJJkP+CDro8=";
};
buildInputs = oldAttrs.buildInputs or [ ] ++ [
iproute2
];
configureFlags = oldAttrs.configureFlags or [ ] ++ [
"--enable-iproute2"
"IPROUTE=${iproute2}/sbin/ip"
];
nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [
autoconf
automake
autoreconfHook
pkg-config
];
buildInputs = oldAttrs.buildInputs or [ ]
++ optional stdenv.isLinux [ libnl.dev ];
configureFlags = [
# Assignement instead of appending to make sure to use exactly the flags required by mullvad
# Flags are based on https://github.com/mullvad/mullvadvpn-app-binaries/blob/main/Makefile#L17
"--enable-static"
"--disable-shared"
"--disable-debug"
"--disable-plugin-down-root"
"--disable-management"
"--disable-port-share"
"--disable-systemd"
"--disable-dependency-tracking"
"--disable-pkcs11"
"--disable-plugin-auth-pam"
"--enable-plugins"
"--disable-lzo"
"--disable-lz4"
"--enable-comp-stub"
]
++ optional stdenv.isLinux [
# Flags are based on https://github.com/mullvad/mullvadvpn-app-binaries/blob/main/Makefile#L35
"--enable-dco" # requires libnl
"--disable-iproute2"
];
patches = oldAttrs.patches or [ ] ++ [
# look at compare to find the relevant commits
# https://github.com/OpenVPN/openvpn/compare/release/2.5...mullvad:mullvad-patches
# https://github.com/OpenVPN/openvpn/compare/release/2.6...mullvad:mullvad-patches
# used openvpn version is the latest tag ending with -mullvad
# https://github.com/mullvad/openvpn/tags
(fetchMullvadPatch {
# "Reduce PUSH_REQUEST_INTERVAL to one second"
commit = "41e44158fc71bb6cc8cc6edb6ada3307765a12e8";
sha256 = "sha256-UoH0V6gTPdEuybFkWxdaB4zomt7rZeEUyXs9hVPbLb4=";
})
(fetchMullvadPatch {
# "Allow auth plugins to set a failure reason"
commit = "f51781c601e8c72ae107deaf25bf66f7c193e9cd";
sha256 = "sha256-+kwG0YElL16T0e+avHlI8gNQdAxneRS6fylv7QXvC1s=";
commit = "4084b49de84e64c56584a378e85faf37973b6d6d";
sha256 = "sha256-MmYeFSw6c/QJh0LqLgkx+UxrbtTVv6zEFcnYEqznR1c=";
})
(fetchMullvadPatch {
# "Send an event to any plugins when authentication fails"
commit = "c2f810f966f2ffd68564d940b5b8946ea6007d5a";
sha256 = "sha256-PsKIxYwpLD66YaIpntXJM8OGcObyWBSAJsQ60ojvj30=";
commit = "f24de7922d70c6e1ae06acf18bce1f62d9fa6b07";
sha256 = "sha256-RvlQbR6/s4NorYeA6FL7tE6geg6MIoZJtHeYxkVbdwA=";
})
(fetchMullvadPatch {
# "Shutdown when STDIN is closed"
commit = "879d6a3c0288b5443bbe1b94261655c329fc2e0e";
sha256 = "sha256-pRFY4r+b91/xAKXx6u5GLzouQySXuO5gH0kMGm77a3c=";
})
(fetchMullvadPatch {
# "Update TAP hardware ID"
commit = "7f71b37a3b25bec0b33a0e29780c222aef869e9d";
sha256 = "sha256-RF/GvD/ZvhLdt34wDdUT/yxa+IVWx0eY6WRdNWXxXeQ=";
commit = "81ae84271c044359b67991b15ebfb0cf9a32b3ad";
sha256 = "sha256-ilKMyU97ha2m0p1FD64aNQncnKo4Tyi/nATuD5yPmVw=";
})
(fetchMullvadPatch {
# "Undo dependency on Python docutils"
commit = "abd3c6214529d9f4143cc92dd874d8743abea17c";
sha256 = "sha256-SC2RlpWHUDMAEKap1t60dC4hmalk3vok6xY+/xhC2U0=";
commit = "a5064b4b6c598b68d8cabc3f4006e5addef1ec1e";
sha256 = "sha256-+B6jxL0M+W5LzeukXkir26hn1OaYnycVNBwMYFq6gsE=";
})
(fetchMullvadPatch {
# "Prevent signal when stdin is closed from being cleared (#10)"
commit = "b45b090c81e7b4f2dc938642af7a1e12f699f5c5";
sha256 = "sha256-KPTFmbuJhMI+AvaRuu30CPPLQAXiE/VApxlUCqbZFls=";
commit = "abe529e6d7f71228a036007c6c02624ec98ad6c1";
sha256 = "sha256-qJQeEtZO/+8kenXTKv4Bx6NltUYe8AwzXQtJcyhrjfc=";
})
(fetchMullvadPatch {
# "Disable libcap-ng"
commit = "598014de7c063fa4e8ba1fffa01434229faafd04";
sha256 = "sha256-+cFX5gmMuG6XFkTs6IV7utiKRF9E47F5Pgo93c+zBXo=";
})
(fetchMullvadPatch {
# "Remove libnsl dep"
commit = "845727e01ab3ec9bd58fcedb31b3cf2ebe2d5226";
sha256 = "sha256-Via62wKVfMWHTmO7xIXXO7b5k0KYHs1D0JVg3qnXkeM=";
})
];
postPatch = oldAttrs.postPatch or "" + ''
rm ./configure
'';
meta = oldAttrs.meta or { } // {
description = "OpenVPN with Mullvad-specific patches applied";

View file

@ -21,11 +21,11 @@
stdenv.mkDerivation rec {
pname = "e16";
version = "1.0.27";
version = "1.0.28";
src = fetchurl {
url = "mirror://sourceforge/enlightenment/e16-${version}.tar.xz";
hash = "sha256-Lr5OC14N6KTZNU3Ei4O9taYGL+1NZd5JmejYBmmELUE=";
hash = "sha256-k3W2IoBc75DNQ2QSjChsC/yVRO/aZT3E31Tl/njgH30=";
};
nativeBuildInputs = [

View file

@ -33,13 +33,13 @@
stdenv.mkDerivation rec {
pname = "cheese";
version = "44.0.1";
version = "44.1";
outputs = [ "out" "man" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/cheese/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "2SJAEnLN1BXCknA+UsazZEZqCyDuHbMgJRZEwoNgb9Q=";
sha256 = "XyGFxMmeVN3yuLr2DIKBmVDlSVLhMuhjmHXz7cv49o4=";
};
nativeBuildInputs = [

View file

@ -2416,6 +2416,37 @@ buildLuarocksPackage {
};
}) {};
magick = callPackage({ fetchgit, buildLuarocksPackage, lua }:
buildLuarocksPackage {
pname = "magick";
version = "1.6.0-1";
knownRockspec = (fetchurl {
url = "mirror://luarocks/magick-1.6.0-1.rockspec";
sha256 = "1pg150xsxnqvlhxpiy17s9hm4dkc84v46mlwi9rhriynqz8qks9w";
}).outPath;
src = fetchgit ( removeAttrs (builtins.fromJSON ''{
"url": "https://github.com/leafo/magick.git",
"rev": "6971fa700c4d392130492a3925344b51c7cc54aa",
"date": "2022-03-10T20:02:11-08:00",
"path": "/nix/store/fpl99q09zg3qnk4kagxk1djabl1dm47l-magick",
"sha256": "01b9qsz27f929rz5z7vapqhazxak74sichdwkjwb219nlhrwfncm",
"fetchLFS": false,
"fetchSubmodules": true,
"deepClone": false,
"leaveDotGit": false
}
'') ["date" "path"]) ;
disabled = (lua.luaversion != "5.1");
propagatedBuildInputs = [ lua ];
meta = {
homepage = "git://github.com/leafo/magick.git";
description = "Lua bindings to ImageMagick & GraphicsMagick for LuaJIT using FFI";
license.fullName = "MIT";
};
}) {};
markdown = callPackage({ buildLuarocksPackage, luaAtLeast, fetchgit, luaOlder, lua }:
buildLuarocksPackage {
pname = "markdown";

View file

@ -0,0 +1,53 @@
diff --git a/magick/wand/lib.lua b/magick/wand/lib.lua
index 21940a0..0d103dc 100644
--- a/magick/wand/lib.lua
+++ b/magick/wand/lib.lua
@@ -134,15 +134,6 @@ get_filters = function()
local prefixes = {
"/usr/include/ImageMagick",
"/usr/local/include/ImageMagick",
- unpack((function()
- local _accum_0 = { }
- local _len_0 = 1
- for p in get_flags():gmatch("-I([^%s]+)") do
- _accum_0[_len_0] = p
- _len_0 = _len_0 + 1
- end
- return _accum_0
- end)())
}
for _index_0 = 1, #prefixes do
local p = prefixes[_index_0]
@@ -204,12 +195,7 @@ try_to_load = function(...)
break
end
end
- if pcall(function()
- out = ffi.load(name)
- end) then
- return out
- end
- _continue_0 = true
+ return ffi.load(name)
until true
if not _continue_0 then
break
@@ -217,17 +203,7 @@ try_to_load = function(...)
end
return error("Failed to load ImageMagick (" .. tostring(...) .. ")")
end
-lib = try_to_load("MagickWand", function()
- local lname = get_flags():match("-l(MagickWand[^%s]*)")
- local suffix
- if ffi.os == "OSX" then
- suffix = ".dylib"
- elseif ffi.os == "Windows" then
- suffix = ".dll"
- else
- suffix = ".so"
- end
- return lname and "lib" .. lname .. suffix
+lib = try_to_load("@nix_wand@", function()
end)
return {
lib = lib,

View file

@ -15,6 +15,7 @@
, gnulib
, gnum4
, gobject-introspection
, imagemagick
, installShellFiles
, lib
, libevent
@ -477,6 +478,25 @@ with prev;
];
});
magick = prev.magick.overrideAttrs (oa: {
buildInputs = oa.buildInputs ++ [
imagemagick
];
# Fix MagickWand not being found in the pkg-config search path
patches = [
./magick.patch
];
postPatch = ''
substituteInPlace magick/wand/lib.lua \
--replace @nix_wand@ ${imagemagick}/lib/libMagickWand-7.Q16HDRI.so
'';
# Requires ffi
meta.broken = !isLuaJIT;
});
mpack = prev.mpack.overrideAttrs (drv: {
buildInputs = (drv.buildInputs or []) ++ [ libmpack ];
env = {

View file

@ -9,7 +9,7 @@
buildPythonPackage rec {
pname = "cpyparsing";
version = "2.4.7.2.1.1";
version = "2.4.7.2.1.2";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -18,7 +18,7 @@ buildPythonPackage rec {
owner = "evhub";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-ZJKWJhqhnTbTAf/48Whq2mSNIp/Ar17syFWvpD3w4fE=";
hash = "sha256-Y3EyX9Gjssez0DkD6dIaOpazNLy7rDYzjKO1u+lLGFI=";
};
nativeBuildInputs = [

View file

@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "pyxbe";
version = "1.0.2";
version = "1.0.3";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -16,7 +16,7 @@ buildPythonPackage rec {
owner = "mborgerson";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-sm8/Lcsk3aL8/MB0cVrKNb8MoQPxGCGpHkEPWv+mPdo=";
hash = "sha256-iLzGGgizUbaEG1xrNq4WDaWrGtcaLwAYgn4NGYiSDBo=";
};
nativeCheckInputs = [

View file

@ -3,13 +3,12 @@
, fetchPypi
, pythonOlder
, setuptools-scm
, six
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "repeated-test";
version = "2.3.1";
version = "2.3.3";
format = "pyproject";
disabled = pythonOlder "3.5";
@ -17,17 +16,13 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "repeated_test";
inherit version;
hash = "sha256-TbVyQA7EjCSwo6qfDksbE8IU1ElkSCABEUBWy5j1KJc=";
hash = "sha256-3YPU8SL9rud5s0pnwwH5TJk1MXsDhdkDnZp/Oj6sgXs=";
};
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
six
];
nativeCheckInputs = [
pytestCheckHook
];
@ -39,6 +34,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Unittest-compatible framework for repeating a test function over many fixtures";
homepage = "https://github.com/epsy/repeated_test";
changelog = "https://github.com/epsy/repeated_test/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ tjni ];
};

View file

@ -0,0 +1,33 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gitUpdater
}:
stdenv.mkDerivation rec {
pname = "fatcat";
version = "1.1.1";
src = fetchFromGitHub {
owner = "Gregwar";
repo = "fatcat";
rev = "v${version}";
hash = "sha256-/iGNVP7Bz/UZAR+dFxAKMKM9jm07h0x0F3VGpdxlHdk=";
};
nativeBuildInputs = [
cmake
];
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
meta = with lib; {
description = "FAT filesystems explore, extract, repair, and forensic tool";
homepage = "https://github.com/Gregwar/fatcat";
license = licenses.mit;
maintainers = with maintainers; [ cynerd ];
};
}

View file

@ -0,0 +1,42 @@
{ lib
, fetchFromGitHub
, crystal
, gobject-introspection
}:
crystal.buildCrystalPackage rec {
pname = "gi-crystal";
version = "0.17.0";
src = fetchFromGitHub {
owner = "hugopl";
repo = "gi-crystal";
rev = "v${version}";
hash = "sha256-DIH8L8P8lkWzzVUj1Tbf9oTUvu9X7OT66APyUHiDkYk=";
};
# Make sure gi-crystal picks up the name of the so or dylib and not the leading nix store path
# when the package name happens to start with “lib”.
patches = [ ./src.patch ./store-friendly-library-name.patch ];
nativeBuildInputs = [ gobject-introspection ];
buildTargets = [ "generator" ];
doCheck = false;
doInstallCheck = false;
installPhase = ''
runHook preInstall
mkdir $out
cp -r * $out
runHook postInstall
'';
meta = with lib; {
description = "GI Crystal is a binding generator used to generate Crystal bindings for GObject based libraries using GObject Introspection.";
homepage = "https://github.com/hugopl/gi-crystal";
mainProgram = "gi-crystal";
maintainers = with maintainers; [ sund3RRR ];
};
}

View file

@ -0,0 +1,57 @@
--- a/src/generator/main.cr 2023-07-14 18:30:47.687581729 +0300
+++ b/src/generator/main.cr 2023-07-17 07:55:24.177630085 +0300
@@ -1,6 +1,8 @@
require "colorize"
require "log"
require "option_parser"
+require "file"
+require "file_utils"
require "./binding_config"
require "./error"
@@ -43,7 +45,7 @@
end
end
- output_dir = Path.new(project_dir, "lib/gi-crystal/src/auto").normalize if output_dir.nil?
+ output_dir = Path.new(Dir.current, "lib/gi-crystal/src/auto").normalize if output_dir.nil?
extra_bindings = argv.map { |path| Path.new(path).expand.to_s }
{output_dir: output_dir,
@@ -74,11 +76,23 @@
end
end
-private def find_bindings : Array(String)
- find_pattern = Path.new(project_dir, "**/binding.yml").normalize
+private def find_bindings_yml(path) : Array(String)
+ find_pattern = File.join(path, "**/binding.yml")
Dir[find_pattern]
end
+private def find_bindings : Array(String)
+ current_directory = Dir.current
+
+ bindings = find_bindings_yml(current_directory)
+ Dir.glob(File.join(current_directory, "**/*")).each do |path|
+ if File.symlink?(path)
+ bindings += find_bindings_yml(path)
+ end
+ end
+ bindings
+end
+
private def format_files(dir)
# We need to chdir into output dir since the formatter ignores everything under `lib` dir.
Dir.cd(dir) { `crystal tool format` }
@@ -102,7 +116,9 @@
Log.info { "Generating bindings at #{options[:output_dir]}" }
Generator::DocRepo.disable! unless options[:doc_gen]
-
+
+ FileUtils.cp_r(project_dir, File.join(Dir.current, "lib/gi-crystal"))
+
binding_yamls = find_bindings.concat(options[:extra_bindings])
binding_yamls.each do |file|
Log.info { "Using binding config at #{file}" }

View file

@ -0,0 +1,10 @@
--- a/src/generator/lib_gen.cr 1969-12-31 17:00:01.000000000 -0700
+++ b/src/generator/lib_gen.cr 2023-07-14 11:48:41.509397114 -0600
@@ -10,7 +10,7 @@
private def libraries : Array(String)
namespace.shared_libraries.map do |library|
- library[/lib([^\/]+)\.(?:so|.+?\.dylib).*/, 1]
+ library[/(?:\/[^\/]*)+\/lib([^\/]+)\.(?:so|.+?\.dylib).*/, 1]
end
end

View file

@ -5,16 +5,16 @@
rustPlatform.buildRustPackage rec {
pname = "jql";
version = "7.0.1";
version = "7.0.2";
src = fetchFromGitHub {
owner = "yamafaktory";
repo = pname;
rev = "jql-v${version}";
hash = "sha256-JGD+E5QWrtRX047Nrufl+wQJnJXqKTZkXcU4/uXA6l0=";
hash = "sha256-lYm+zgZkt/iVJgehJM44VqWbcR4kqt8rUSEsnz07tbU=";
};
cargoHash = "sha256-t3QACjuHMpJULEpEcUPCAF27LIrjtn4i7Ud0DfDa0ek=";
cargoHash = "sha256-Gav89ub4ccv/lCCqNYn9NvK4Q8udlu6YaZPhouHOVss=";
meta = with lib; {
description = "A JSON Query Language CLI tool built with Rust";

View file

@ -0,0 +1,34 @@
{ lib
, fetchFromGitHub
, makeWrapper
, rustPlatform
, rust-analyzer
}:
rustPlatform.buildRustPackage {
pname = "ra-multiplex";
version = "0.2.2";
src = fetchFromGitHub {
owner = "pr2502";
repo = "ra-multiplex";
rev = "dcb5f83890cb91016b0a1590cc1b732606bb6ec1";
hash = "sha256-Hf4Gj9eXEP4gXiqNV4Jq0oiGLX3DtDF9At1feEZ+bUE=";
};
cargoHash = "sha256-MeUtkPjOsL1kQ2W0Q1/OqhKDVXs4cECkATHISpyfp9U=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/ra-multiplex \
--suffix PATH ${lib.makeBinPath [ rust-analyzer ]}
'';
meta = with lib; {
description = "A multiplexer for rust-analyzer";
homepage = "https://github.com/pr2502/ra-multiplex";
license = with licenses; [ mit ];
maintainers = with maintainers; [ norfair ];
};
}

View file

@ -25,12 +25,12 @@ rec {
stable = if stdenv.hostPlatform.system == "i686-linux" then legacy_390 else latest;
production = generic {
version = "535.54.03";
sha256_64bit = "sha256-RUdk9X6hueGRZqNw94vhDnHwYmQ4+xl/cm3DyvBbQII=";
sha256_aarch64 = "sha256-SUxW/Z8sJJ7bc/yhozTh8Wd2gKLsniJwKmXh1tJwUm8=";
openSha256 = "sha256-dp74UiiZfsQbZbAKHgFkLdRNyYbRlVMF3tIXcxok7FU";
settingsSha256 = "sha256-5yIdOAaYQCQ2CmCayD/a5opoQppjK56s9cDqLmm17ww=";
persistencedSha256 = "sha256-R5WCh09BSPjfifui0ODkCsdIXTowceNjLDq5XHwda08=";
version = "535.86.05";
sha256_64bit = "sha256-QH3wyjZjLr2Fj8YtpbixJP/DvM7VAzgXusnCcaI69ts=";
sha256_aarch64 = "sha256-ON++eWPDWHnm/NuJmDSYkR4sKKvCdX+kwxS7oA2M5zU=";
openSha256 = "sha256-qCYEQP54cT7G+VrLmuMT+RWIwuGdBhlbYTrCDcztfNs=";
settingsSha256 = "sha256-0NAxQosC+zPz5STpELuRKDMap4KudoPGWKL4QlFWjLQ=";
persistencedSha256 = "sha256-Ak4Wf59w9by08QJ0x15Zs5fHOhiIatiJfjBQfnY65Mg=";
};
latest = selectHighestVersion production (generic {
@ -79,23 +79,18 @@ rec {
# Last one supporting Kepler architecture
legacy_470 = generic {
version = "470.182.03";
sha256_64bit = "sha256-PbwUCPxIuGXT3azvxF9KP8E7kLg6Yo7lRrAIKrLD/Hk=";
sha256_aarch64 = "sha256-FEoWikgQjZKkHvAHgtkxnDhB41GdYplZTttEUBit4QQ=";
settingsSha256 = "sha256-TRKQ4brLnCbBZt1smGSIHTfwW+wEFPWWPEwDxjVXN7s=";
persistencedSha256 = "sha256-fSJMx49z9trdNxx0iPI45oG57smvvhaqVNxsRnfXKCI=";
version = "470.199.02";
sha256_64bit = "sha256-/fggDt8RzjLDW0JiGjr4aV4RGnfEKL8MTTQ4tCjXaP0=";
sha256_aarch64 = "sha256-UmF7LszdrO2d+bOaoQYrTVKXUwDqzMy1UDBW5SPuZy4=";
settingsSha256 = "sha256-FkKPE4QV5IiVizGYUNUYoEXRpEhojt/cbH/I8iCn3hw=";
persistencedSha256 = "sha256-JP71wt3uCNOgheLNlQbW3DqVFQNTC5vj4y4COWKQzAs=";
patchFlags = [ "-p1" "-d" "kernel" ];
patches = [
# source: https://gist.github.com/joanbm/d10e9cbbbb8e245b6e7e27b2db338faf
# source: https://gist.github.com/joanbm/dfe8dc59af1c83e2530a1376b77be8ba
(fetchpatch {
url = "https://gist.github.com/joanbm/d10e9cbbbb8e245b6e7e27b2db338faf/raw/f5d5238bdbaa16cd4008658a0f82b9dd84f1b38f/nvidia-470xx-fix-linux-6.3.patch";
hash = "sha256-mR+vXDHgVhWC0JeLgGlbNVCH8XTs7XnhEJS6BV75tI8=";
})
# source: https://gist.github.com/joanbm/77f0650d45747b9a4dc8e330ade2bf5c
(fetchpatch {
url = "https://gist.github.com/joanbm/77f0650d45747b9a4dc8e330ade2bf5c/raw/688b612624945926676de28059fe749203b4b549/nvidia-470xx-fix-linux-6.4.patch";
hash = "sha256-OyRmezyzqAi7mSJHDjsWQVocSsgJPTW5DvHDFVNX7Dk=";
url = "https://gist.github.com/joanbm/dfe8dc59af1c83e2530a1376b77be8ba/raw/37ff2b5ccf99f295ff958c9a44ca4ed4f42503b4/nvidia-470xx-fix-linux-6.5.patch";
hash = "sha256-s5r7nwuMva0BLy2qJBVKqNtnUN9am5+PptnVwNdzdbk=";
})
];
};

View file

@ -2,17 +2,17 @@
, stdenvNoCC
, fetchurl
, makeWrapper
, jdk11_headless
, jdk17_headless
, nixosTests
}:
stdenvNoCC.mkDerivation rec {
pname = "komga";
version = "0.165.0";
version = "1.1.0";
src = fetchurl {
url = "https://github.com/gotson/${pname}/releases/download/v${version}/${pname}-${version}.jar";
sha256 = "sha256-J8dpw7GzLJnLiiFSFVCoqZFQ6mI2z0zBZHdbmxMgmf8=";
sha256 = "sha256-uGzJgy+jfV11bZXvCMZAUdjuZasKCcv5rQBBUEidWQU=";
};
nativeBuildInputs = [
@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation rec {
];
buildCommand = ''
makeWrapper ${jdk11_headless}/bin/java $out/bin/komga --add-flags "-jar $src"
makeWrapper ${jdk17_headless}/bin/java $out/bin/komga --add-flags "-jar $src"
'';
passthru.tests = {
@ -31,7 +31,7 @@ stdenvNoCC.mkDerivation rec {
description = "Free and open source comics/mangas server";
homepage = "https://komga.org/";
license = licenses.mit;
platforms = jdk11_headless.meta.platforms;
platforms = jdk17_headless.meta.platforms;
maintainers = with maintainers; [ govanify ];
};

View file

@ -1,12 +0,0 @@
diff --git a/Source/Core/Util/EncounterSlot.cpp b/Source/Core/Util/EncounterSlot.cpp
index adddbdab..71c98e83 100644
--- a/Source/Core/Util/EncounterSlot.cpp
+++ b/Source/Core/Util/EncounterSlot.cpp
@@ -20,6 +20,7 @@
#include "EncounterSlot.hpp"
#include <Core/Enum/Encounter.hpp>
#include <array>
+#include <cstddef>
namespace
{

View file

@ -1,45 +1,74 @@
{ lib
, stdenv
, copyDesktopItems
, makeDesktopItem
, fetchFromGitHub
, cmake
, qtbase
, qttools
, qtwayland
, imagemagick
, wrapQtAppsHook
, gitUpdater
}:
stdenv.mkDerivation rec {
pname = "pokefinder";
version = "4.0.1";
version = "4.1.1";
src = fetchFromGitHub {
owner = "Admiral-Fish";
repo = "PokeFinder";
rev = "v${version}";
sha256 = "j7xgjNF8NWLFVPNItWcFM5WL8yPxgHxVX00x7lt45WI=";
sha256 = "fYBeWc9eYLbj4+ku1jwaO5ISL8a7WJnBHJ4qz4W8RHA=";
fetchSubmodules = true;
# the repo has identical cmake and CMake folders, causing issues on macOS
postFetch = if stdenv.isDarwin then ''
mv $out/cmake $out/cmake.tmp
mv $out/cmake.tmp $out/CMake
'' else ''
rm -rf $out/cmake
'';
};
patches = [ ./cstddef.patch ];
patches = [ ./set-desktop-file-name.patch ];
postPatch = ''
patchShebangs Source/Core/Resources/
'';
installPhase = lib.optionalString (!stdenv.isDarwin) ''
install -D Source/Forms/PokeFinder $out/bin/PokeFinder
'' + lib.optionalString stdenv.isDarwin ''
installPhase = ''
runHook preInstall
'' + lib.optionalString (stdenv.isDarwin) ''
mkdir -p $out/Applications
cp -R Source/Forms/PokeFinder.app $out/Applications
cp -R Source/PokeFinder.app $out/Applications
'' + lib.optionalString (!stdenv.isDarwin) ''
install -D Source/PokeFinder $out/bin/PokeFinder
mkdir -p $out/share/pixmaps
convert "$src/Source/Form/Images/pokefinder.ico[-1]" $out/share/pixmaps/pokefinder.png
'' + ''
runHook postInstall
'';
nativeBuildInputs = [ cmake wrapQtAppsHook ];
nativeBuildInputs = [ cmake wrapQtAppsHook ] ++ lib.optionals (!stdenv.isDarwin) [ copyDesktopItems imagemagick ];
desktopItems = [
(makeDesktopItem {
name = "pokefinder";
exec = "PokeFinder";
icon = "pokefinder";
comment = "Cross platform Pokémon RNG tool";
desktopName = "PokéFinder";
categories = [ "Utility" ];
})
];
buildInputs = [ qtbase qttools ]
++ lib.optionals stdenv.isLinux [ qtwayland ];
passthru.updateScript = gitUpdater { };
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
meta = with lib; {
homepage = "https://github.com/Admiral-Fish/PokeFinder";

View file

@ -0,0 +1,12 @@
diff --git a/Source/main.cpp b/Source/main.cpp
index 3e58a381..2e7e4a86 100644
--- a/Source/main.cpp
+++ b/Source/main.cpp
@@ -69,6 +69,7 @@ int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("PokeFinder");
+ a.setDesktopFileName("pokefinder");
a.setOrganizationName("PokeFinder Team");
Q_INIT_RESOURCE(resources);

View file

@ -0,0 +1,33 @@
{ lib
, python3
, fetchFromGitHub
}:
python3.pkgs.buildPythonApplication rec {
pname = "cp210x-program";
version = "0.4.1";
src = fetchFromGitHub {
owner = "VCTLabs";
repo = "cp210x-program";
rev = "refs/tags/${version}";
sha256 = "sha256-IjKshP12WfFly9cPm6svD4qZW6cT8C7lOVrGenSqbfY=";
};
propagatedBuildInputs = with python3.pkgs; [
hexdump
pyusb
];
postInstall = ''
ln -s $out/bin/cp210x-program{.py,}
'';
meta = with lib; {
description = "EEPROM tool for Silabs CP210x USB-Serial adapter";
homepage = "https://github.com/VCTLabs/cp210x-program";
license = licenses.lgpl21Only; # plus/only status unclear
maintainers = with maintainers; [ ckie ];
mainProgram = "cp210x-program";
};
}

View file

@ -517,6 +517,8 @@ with pkgs;
copilot-cli = callPackage ../tools/admin/copilot-cli { };
cp210x-program = callPackage ../tools/misc/cp210x-program { };
cp437 = callPackage ../tools/misc/cp437 { };
cpm-cmake = callPackage ../development/tools/cpm-cmake { };
@ -8167,6 +8169,8 @@ with pkgs;
ghz = callPackage ../tools/networking/ghz { };
gi-crystal = callPackage ../development/tools/gi-crystal { };
gibberish-detector = with python3Packages; toPythonApplication gibberish-detector;
gibo = callPackage ../tools/misc/gibo { };
@ -16980,6 +16984,8 @@ with pkgs;
ravedude = callPackage ../development/tools/rust/ravedude { };
ra-multiplex = callPackage ../development/tools/rust/ra-multiplex {};
rhack = callPackage ../development/tools/rust/rhack { };
roogle = callPackage ../development/tools/rust/roogle { };
rustfmt = rustPackages.rustfmt;
@ -18881,6 +18887,8 @@ with pkgs;
fastgron = callPackage ../development/tools/fastgron { };
fatcat = callPackage ../development/tools/fatcat { };
findbugs = callPackage ../development/tools/analysis/findbugs { };
findnewest = callPackage ../development/tools/misc/findnewest { };
@ -30192,8 +30200,11 @@ with pkgs;
bitwig-studio4 = callPackage ../applications/audio/bitwig-studio/bitwig-studio4.nix {
libjpeg = libjpeg.override { enableJpeg8 = true; };
};
bitwig-studio5 = callPackage ../applications/audio/bitwig-studio/bitwig-studio5.nix {
libjpeg = libjpeg.override { enableJpeg8 = true; };
};
bitwig-studio = bitwig-studio4;
bitwig-studio = bitwig-studio5;
bgpdump = callPackage ../tools/networking/bgpdump { };