Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2024-04-06 00:12:19 +00:00 committed by GitHub
commit 1b23f872be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
418 changed files with 15432 additions and 7438 deletions

View File

@ -1,9 +1,9 @@
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/master/logo/nixos-hires.png">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/master/logo/nixos-hires.png" width="500px" alt="NixOS logo">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="500px" alt="NixOS logo">
</picture>
</a>
</p>

View File

@ -203,6 +203,12 @@
fingerprint = "D292 365E 3C46 A5AA 75EE B30B 78DB 7EDE 3540 794B";
}];
};
_48cf = {
name = "czapek";
email = "czapek1337@gmail.com";
github = "48cf";
githubId = 32851089;
};
_6543 = {
email = "6543@obermui.de";
github = "6543";
@ -1425,6 +1431,12 @@
githubId = 4194320;
name = "Anton Schirg";
};
aorith = {
email = "aomanu+nixpkgs@gmail.com";
github = "aorith";
githubId = 5411704;
name = "Manuel Sanchez Pinar";
};
apeschar = {
email = "albert@peschar.net";
github = "apeschar";
@ -6436,6 +6448,12 @@
githubId = 5198058;
name = "Udo Sauer";
};
ferrine = {
email = "justferres@yandex.ru";
github = "ferrine";
githubId = 11705326;
name = "Max Kochurov";
};
ffinkdevs = {
email = "fink@h0st.space";
github = "ffinkdevs";
@ -7249,6 +7267,12 @@
githubId = 5549373;
name = "Jochen Kiemes";
};
giodamelio = {
name = "Giovanni d'Amelio";
email = "gio@damelio.net";
github = "giodamelio";
githubId = 441646;
};
giogadi = {
email = "lgtorres42@gmail.com";
github = "giogadi";
@ -10867,6 +10891,12 @@
}];
name = "Yaroslav Bolyukin";
};
lachrymal = {
email = "lachrymalfutura@gmail.com";
name = "lachrymaL";
github = "lachrymaLF";
githubId = 13716477;
};
lafrenierejm = {
email = "joseph@lafreniere.xyz";
github = "lafrenierejm";
@ -14324,6 +14354,12 @@
githubId = 6930756;
name = "Nicolas Mattia";
};
noaccos = {
name = "Francesco Noacco";
email = "francesco.noacco2000@gmail.com";
github = "noaccOS";
githubId = 24324352;
};
nobbz = {
name = "Norbert Melzer";
email = "timmelzer+nixpkgs@gmail.com";

View File

@ -257,7 +257,6 @@ with lib.maintainers; {
docs = {
members = [
asymmetric
ryantm
];
scope = "Maintain nixpkgs/NixOS documentation and tools for building it.";

View File

@ -230,7 +230,7 @@ When upgrading from a previous release, please be aware of the following incompa
- The `documentation` module gained an option named `documentation.nixos.includeAllModules` which makes the generated configuration.nix 5 manual page include all options from all NixOS modules included in a given `configuration.nix` configuration file. Currently, it is set to `false` by default as enabling it frequently prevents evaluation. But the plan is to eventually have it set to `true` by default. Please set it to `true` now in your `configuration.nix` and fix all the bugs it uncovers.
- The `vlc` package gained support for Chromecast streaming, enabled by default. TCP port 8010 must be open for it to work, so something like `networking.firewall.allowedTCPPorts = [ 8010 ];` may be required in your configuration. Also consider enabling [ Accelerated Video Playback](https://nixos.wiki/wiki/Accelerated_Video_Playback) for better transcoding performance.
- The `vlc` package gained support for Chromecast streaming, enabled by default. TCP port 8010 must be open for it to work, so something like `networking.firewall.allowedTCPPorts = [ 8010 ];` may be required in your configuration. Also consider enabling [ Accelerated Video Playback](https://wiki.nixos.org/wiki/Accelerated_Video_Playback) for better transcoding performance.
- The following changes apply if the `stateVersion` is changed to 19.09 or higher. For `stateVersion = "19.03"` or lower the old behavior is preserved.

View File

@ -291,6 +291,13 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `services.resolved.fallbackDns` can now be used to disable the upstream fallback servers entirely by setting it to an empty list. To get the previous behaviour of the upstream defaults set it to null, the new default, instead.
- `services.hledger-web.capabilities` options has been replaced by a new option `services.hledger-web.allow`.
- `allow = "view"` means `capabilities = { view = true; }`;
- `allow = "add"` means `capabilities = { view = true; add = true; }`;
- `allow = "edit"` means `capabilities = { view = true; add = true; edit = true }`;
- `allow = "sandstorm"` reads permissions from the `X-Sandstorm-Permissions` request header.
- `xxd` has been moved from `vim` default output to its own output to reduce closure size. The canonical way to reference it across all platforms is `unixtools.xxd`.
- The `stalwart-mail` package has been updated to v0.5.3, which includes [breaking changes](https://github.com/stalwartlabs/mail-server/blob/v0.5.3/UPGRADING.md).

View File

@ -165,8 +165,6 @@ class StartCommand:
)
if not allow_reboot:
qemu_opts += " -no-reboot"
# TODO: qemu script already catpures this env variable, legacy?
qemu_opts += " " + os.environ.get("QEMU_OPTS", "")
return (
f"{self._cmd}"

View File

@ -34,6 +34,13 @@ in
Sets the [`meta.broken`](https://nixos.org/manual/nixpkgs/stable/#var-meta-broken) attribute on the [{option}`test`](#test-opt-test) derivation.
'';
};
platforms = lib.mkOption {
type = types.listOf types.raw;
default = lib.platforms.linux;
description = ''
Sets the [`meta.platforms`](https://nixos.org/manual/nixpkgs/stable/#var-meta-platforms) attribute on the [{option}`test`](#test-opt-test) derivation.
'';
};
};
};
default = {};

View File

@ -1389,6 +1389,7 @@
./services/web-apps/rss-bridge.nix
./services/web-apps/selfoss.nix
./services/web-apps/shiori.nix
./services/web-apps/silverbullet.nix
./services/web-apps/slskd.nix
./services/web-apps/snipe-it.nix
./services/web-apps/sogo.nix

View File

@ -302,7 +302,7 @@ in {
};
config = lib.mkMerge [
(lib.mkIf (enabledInstances != []) {
(lib.mkIf (enabledInstances != {}) {
assertions = lib.mkMerge (lib.attrValues (lib.mapAttrs (name: cfg: [
{
assertion = cfg.settings.homeserver.domain != "" && cfg.settings.homeserver.address != "";

View File

@ -204,7 +204,7 @@ in
description = "Apply the settings specified in cloud-config";
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" "syslog.target" "cloud-config.target" ];
after = [ "network-online.target" "cloud-config.target" ];
path = path;
serviceConfig = {
@ -220,7 +220,7 @@ in
description = "Execute cloud user/final scripts";
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" "syslog.target" "cloud-config.service" "rc-local.service" ];
after = [ "network-online.target" "cloud-config.service" "rc-local.service" ];
requires = [ "cloud-config.target" ];
path = path;
serviceConfig = {

View File

@ -26,28 +26,17 @@ in {
'';
};
capabilities = {
view = mkOption {
type = types.bool;
default = true;
description = lib.mdDoc ''
Enable the view capability.
'';
};
add = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Enable the add capability.
'';
};
manage = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Enable the manage capability.
'';
};
allow = mkOption {
type = types.enum [ "view" "add" "edit" "sandstorm" ];
default = "view";
description = lib.mdDoc ''
User's access level for changing data.
* view: view only permission.
* add: view and add permissions.
* edit: view, add, and edit permissions.
* sandstorm: permissions from the `X-Sandstorm-Permissions` request header.
'';
};
stateDir = mkOption {
@ -89,6 +78,11 @@ in {
};
imports = [
(mkRemovedOptionModule [ "services" "hledger-web" "capabilities" ]
"This option has been replaced by new option `services.hledger-web.allow`.")
];
config = mkIf cfg.enable {
users.users.hledger = {
@ -102,16 +96,11 @@ in {
users.groups.hledger = {};
systemd.services.hledger-web = let
capabilityString = with cfg.capabilities; concatStringsSep "," (
(optional view "view")
++ (optional add "add")
++ (optional manage "manage")
);
serverArgs = with cfg; escapeShellArgs ([
"--serve"
"--host=${host}"
"--port=${toString port}"
"--capabilities=${capabilityString}"
"--allow=${allow}"
(optionalString (cfg.baseUrl != null) "--base-url=${cfg.baseUrl}")
(optionalString (cfg.serveApi) "--serve-api")
] ++ (map (f: "--file=${stateDir}/${f}") cfg.journalFiles)

View File

@ -0,0 +1,123 @@
{ config
, pkgs
, lib
, ...
}:
let
cfg = config.services.silverbullet;
defaultUser = "silverbullet";
defaultGroup = defaultUser;
defaultSpaceDir = "/var/lib/silverbullet";
in
{
options = {
services.silverbullet = {
enable = lib.mkEnableOption (lib.mdDoc "Silverbullet, an open-source, self-hosted, offline-capable Personal Knowledge Management (PKM) web application.");
package = lib.mkPackageOptionMD pkgs "silverbullet" { };
openFirewall = lib.mkOption {
type = lib.types.bool;
default = false;
description = lib.mdDoc "Open port in the firewall.";
};
listenPort = lib.mkOption {
type = lib.types.int;
default = 3000;
description = lib.mdDoc "Port to listen on.";
};
listenAddress = lib.mkOption {
type = lib.types.str;
default = "127.0.0.1";
description = lib.mdDoc "Address or hostname to listen on. Defaults to 127.0.0.1.";
};
spaceDir = lib.mkOption {
type = lib.types.path;
default = defaultSpaceDir;
example = "/home/yourUser/silverbullet";
description = lib.mdDoc ''
Folder to store Silverbullet's space/workspace.
By default it is located at `${defaultSpaceDir}`.
'';
};
user = lib.mkOption {
type = lib.types.str;
default = defaultUser;
example = "yourUser";
description = lib.mdDoc ''
The user to run Silverbullet as.
By default, a user named `${defaultUser}` will be created whose space
directory is [spaceDir](#opt-services.silverbullet.spaceDir).
'';
};
group = lib.mkOption {
type = lib.types.str;
default = defaultGroup;
example = "yourGroup";
description = lib.mdDoc ''
The group to run Silverbullet under.
By default, a group named `${defaultGroup}` will be created.
'';
};
envFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
example = "/etc/silverbullet.env";
description = lib.mdDoc ''
File containing extra environment variables. For example:
```
SB_USER=user:password
SB_AUTH_TOKEN=abcdefg12345
```
'';
};
extraArgs = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "--db /path/to/silverbullet.db" ];
description = lib.mdDoc "Extra arguments passed to silverbullet.";
};
};
};
config = lib.mkIf cfg.enable {
systemd.services.silverbullet = {
description = "Silverbullet service";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
preStart = lib.mkIf (!lib.hasPrefix "/var/lib/" cfg.spaceDir) "mkdir -p '${cfg.spaceDir}'";
serviceConfig = {
Type = "simple";
User = "${cfg.user}";
Group = "${cfg.group}";
EnvironmentFile = lib.mkIf (cfg.envFile != null) "${cfg.envFile}";
StateDirectory = lib.mkIf (lib.hasPrefix "/var/lib/" cfg.spaceDir) (lib.last (lib.splitString "/" cfg.spaceDir));
ExecStart = "${lib.getExe cfg.package} --port ${toString cfg.listenPort} --hostname '${cfg.listenAddress}' '${cfg.spaceDir}' " + lib.concatStringsSep " " cfg.extraArgs;
Restart = "on-failure";
};
};
networking.firewall = lib.mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.listenPort ];
};
users.users.${defaultUser} = lib.mkIf (cfg.user == defaultUser) {
isSystemUser = true;
group = cfg.group;
description = "Silverbullet daemon user";
};
users.groups.${defaultGroup} = lib.mkIf (cfg.group == defaultGroup) { };
};
meta.maintainers = with lib.maintainers; [ aorith ];
}

View File

@ -190,22 +190,6 @@ in
"org.gnome.SettingsDaemon.XSettings.service"
];
# https://github.com/elementary/gala/issues/1826#issuecomment-1890461298
systemd.user.services."io.elementary.gala.daemon@" = {
unitConfig = {
Description = "Gala Daemon";
BindsTo = "io.elementary.gala@.service";
After = "io.elementary.gala@.service";
};
serviceConfig = {
Type = "dbus";
BusName = "org.pantheon.gala.daemon";
ExecStart = "${pkgs.pantheon.gala}/bin/gala-daemon";
Slice = "session.slice";
};
};
# Global environment
environment.systemPackages = (with pkgs.pantheon; [
elementary-session-settings

View File

@ -170,7 +170,7 @@ in
# thing, but for VM tests it should provide a bit more
# determinism (e.g. if the VM runs at lower speed, then
# timeouts in the VM should also be delayed).
"clock=acpi_pm"
"clocksource=acpi_pm"
];
# `xwininfo' is used by the test driver to query open windows.

View File

@ -186,7 +186,7 @@ let
NIX_EFI_VARS=$(readlink -f "''${NIX_EFI_VARS:-${config.system.name}-efi-vars.fd}")
# VM needs writable EFI vars
if ! test -e "$NIX_EFI_VARS"; then
${if cfg.useBootLoader then
${if cfg.efi.keepVariables then
# We still need the EFI var from the make-disk-image derivation
# because our "switch-to-configuration" process might
# write into it and we want to keep this data.
@ -905,6 +905,13 @@ in
Defaults to OVMF.
'';
};
keepVariables = mkOption {
type = types.bool;
default = cfg.useBootLoader;
defaultText = literalExpression "cfg.useBootLoader";
description = "Whether to keep EFI variable values from the generated system image";
};
};
virtualisation.tpm = {

View File

@ -811,6 +811,7 @@ in {
shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
shiori = handleTest ./shiori.nix {};
signal-desktop = handleTest ./signal-desktop.nix {};
silverbullet = handleTest ./silverbullet.nix {};
simple = handleTest ./simple.nix {};
sing-box = handleTest ./sing-box.nix {};
slimserver = handleTest ./slimserver.nix {};

View File

@ -19,7 +19,7 @@ rec {
host = "127.0.0.1";
port = 5000;
enable = true;
capabilities.manage = true;
allow = "edit";
};
networking.firewall.allowedTCPPorts = [ config.services.hledger-web.port ];
systemd.services.hledger-web.preStart = ''

View File

@ -51,7 +51,7 @@ let
boot.loader.systemd-boot.enable = true;
''}
boot.initrd.secrets."/etc/secret" = ./secret;
boot.initrd.secrets."/etc/secret" = "/etc/nixos/secret";
${optionalString clevisTest ''
boot.kernelParams = [ "console=tty0" "ip=192.168.1.1:::255.255.255.0::eth1:none" ];
@ -80,39 +80,24 @@ let
# a test script fragment `createPartitions', which must create
# partitions and filesystems.
testScriptFun = { bootLoader, createPartitions, grubDevice, grubUseEfi, grubIdentifier
, postInstallCommands, preBootCommands, postBootCommands, extraConfig
, postInstallCommands, postBootCommands, extraConfig
, testSpecialisationConfig, testFlakeSwitch, clevisTest, clevisFallbackTest
, disableFileSystems
}:
let
qemu-common = import ../lib/qemu-common.nix { inherit (pkgs) lib pkgs; };
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
qemu = qemu-common.qemuBinary pkgs.qemu_test;
in if !isEfi && !pkgs.stdenv.hostPlatform.isx86 then ''
machine.succeed("true")
'' else ''
startTarget = ''
${optionalString clevisTest "tpm.start()"}
target.start()
${postBootCommands}
target.wait_for_unit("multi-user.target")
'';
in ''
${optionalString clevisTest ''
import os
import subprocess
tpm_folder = os.environ['NIX_BUILD_TOP']
startcommand = "${qemu} -m 2048"
${optionalString clevisTest ''
startcommand += f" -chardev socket,id=chrtpm,path={tpm_folder}/swtpm-sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0"
startcommand += " -device virtio-net-pci,netdev=vlan1,mac=52:54:00:12:11:02 -netdev vde,id=vlan1,sock=\"$QEMU_VDE_SOCKET_1\""
''}
${optionalString isEfi ''
startcommand +=" -drive if=pflash,format=raw,unit=0,readonly=on,file=${pkgs.OVMF.firmware} -drive if=pflash,format=raw,unit=1,readonly=on,file=${pkgs.OVMF.variables}"
''}
image_dir = machine.state_dir
disk_image = os.path.join(image_dir, "machine.qcow2")
startcommand += f" -drive file={disk_image},if=virtio,werror=report"
def create_machine_named(name):
return create_machine(startcommand, name=name)
class Tpm:
def __init__(self):
self.start()
@ -143,30 +128,31 @@ let
os.mkdir(f"{tpm_folder}/swtpm")
tpm = Tpm()
tpm.check()
''}
start_all()
installer.start()
${optionalString clevisTest ''
tang.start()
tang.wait_for_unit("sockets.target")
tang.systemctl("start network-online.target")
tang.wait_for_unit("network-online.target")
machine.systemctl("start network-online.target")
machine.wait_for_unit("network-online.target")
installer.systemctl("start network-online.target")
installer.wait_for_unit("network-online.target")
''}
machine.wait_for_unit("multi-user.target")
installer.wait_for_unit("multi-user.target")
with subtest("Assert readiness of login prompt"):
machine.succeed("echo hello")
installer.succeed("echo hello")
with subtest("Wait for hard disks to appear in /dev"):
machine.succeed("udevadm settle")
installer.succeed("udevadm settle")
${createPartitions}
with subtest("Create the NixOS configuration"):
machine.succeed("nixos-generate-config ${optionalString disableFileSystems "--no-filesystems"} --root /mnt")
machine.succeed("cat /mnt/etc/nixos/hardware-configuration.nix >&2")
machine.copy_from_host(
installer.succeed("nixos-generate-config ${optionalString disableFileSystems "--no-filesystems"} --root /mnt")
installer.succeed("cat /mnt/etc/nixos/hardware-configuration.nix >&2")
installer.copy_from_host(
"${ makeConfig {
inherit bootLoader grubDevice grubIdentifier
grubUseEfi extraConfig clevisTest;
@ -174,13 +160,13 @@ let
}",
"/mnt/etc/nixos/configuration.nix",
)
machine.copy_from_host("${pkgs.writeText "secret" "secret"}", "/mnt/etc/nixos/secret")
installer.copy_from_host("${pkgs.writeText "secret" "secret"}", "/mnt/etc/nixos/secret")
${optionalString clevisTest ''
with subtest("Create the Clevis secret with Tang"):
machine.systemctl("start network-online.target")
machine.wait_for_unit("network-online.target")
machine.succeed('echo -n password | clevis encrypt sss \'{"t": 2, "pins": {"tpm2": {}, "tang": {"url": "http://192.168.1.2"}}}\' -y > /mnt/etc/nixos/clevis-secret.jwe')''}
installer.systemctl("start network-online.target")
installer.wait_for_unit("network-online.target")
installer.succeed('echo -n password | clevis encrypt sss \'{"t": 2, "pins": {"tpm2": {}, "tang": {"url": "http://192.168.1.2"}}}\' -y > /mnt/etc/nixos/clevis-secret.jwe')''}
${optionalString clevisFallbackTest ''
with subtest("Shutdown Tang to check fallback to interactive prompt"):
@ -188,13 +174,13 @@ let
''}
with subtest("Perform the installation"):
machine.succeed("nixos-install < /dev/null >&2")
installer.succeed("nixos-install < /dev/null >&2")
with subtest("Do it again to make sure it's idempotent"):
machine.succeed("nixos-install < /dev/null >&2")
installer.succeed("nixos-install < /dev/null >&2")
with subtest("Check that we can build things in nixos-enter"):
machine.succeed(
installer.succeed(
"""
nixos-enter -- nix-build --option substitute false -E 'derivation {
name = "t";
@ -209,48 +195,48 @@ let
${postInstallCommands}
with subtest("Shutdown system after installation"):
machine.succeed("umount -R /mnt")
machine.succeed("sync")
machine.shutdown()
installer.succeed("umount -R /mnt")
installer.succeed("sync")
installer.shutdown()
# We're actually the same machine, just booting differently this time.
target.state_dir = installer.state_dir
# Now see if we can boot the installation.
machine = create_machine_named("boot-after-install")
# For example to enter LUKS passphrase.
${preBootCommands}
${startTarget}
with subtest("Assert that /boot get mounted"):
machine.wait_for_unit("local-fs.target")
target.wait_for_unit("local-fs.target")
${if bootLoader == "grub"
then ''machine.succeed("test -e /boot/grub")''
else ''machine.succeed("test -e /boot/loader/loader.conf")''
then ''target.succeed("test -e /boot/grub")''
else ''target.succeed("test -e /boot/loader/loader.conf")''
}
with subtest("Check whether /root has correct permissions"):
assert "700" in machine.succeed("stat -c '%a' /root")
assert "700" in target.succeed("stat -c '%a' /root")
with subtest("Assert swap device got activated"):
# uncomment once https://bugs.freedesktop.org/show_bug.cgi?id=86930 is resolved
machine.wait_for_unit("swap.target")
machine.succeed("cat /proc/swaps | grep -q /dev")
target.wait_for_unit("swap.target")
target.succeed("cat /proc/swaps | grep -q /dev")
with subtest("Check that the store is in good shape"):
machine.succeed("nix-store --verify --check-contents >&2")
target.succeed("nix-store --verify --check-contents >&2")
with subtest("Check whether the channel works"):
machine.succeed("nix-env -iA nixos.procps >&2")
assert ".nix-profile" in machine.succeed("type -tP ps | tee /dev/stderr")
target.succeed("nix-env -iA nixos.procps >&2")
assert ".nix-profile" in target.succeed("type -tP ps | tee /dev/stderr")
with subtest(
"Check that the daemon works, and that non-root users can run builds "
"(this will build a new profile generation through the daemon)"
):
machine.succeed("su alice -l -c 'nix-env -iA nixos.procps' >&2")
target.succeed("su alice -l -c 'nix-env -iA nixos.procps' >&2")
with subtest("Configure system with writable Nix store on next boot"):
# we're not using copy_from_host here because the installer image
# doesn't know about the host-guest sharing mechanism.
machine.copy_from_host_via_shell(
target.copy_from_host_via_shell(
"${ makeConfig {
inherit bootLoader grubDevice grubIdentifier
grubUseEfi extraConfig clevisTest;
@ -261,25 +247,23 @@ let
)
with subtest("Check whether nixos-rebuild works"):
machine.succeed("nixos-rebuild switch >&2")
target.succeed("nixos-rebuild switch >&2")
# FIXME: Nix 2.4 broke nixos-option, someone has to fix it.
# with subtest("Test nixos-option"):
# kernel_modules = machine.succeed("nixos-option boot.initrd.kernelModules")
# kernel_modules = target.succeed("nixos-option boot.initrd.kernelModules")
# assert "virtio_console" in kernel_modules
# assert "List of modules" in kernel_modules
# assert "qemu-guest.nix" in kernel_modules
machine.shutdown()
target.shutdown()
# Check whether a writable store build works
machine = create_machine_named("rebuild-switch")
${preBootCommands}
machine.wait_for_unit("multi-user.target")
${startTarget}
# we're not using copy_from_host here because the installer image
# doesn't know about the host-guest sharing mechanism.
machine.copy_from_host_via_shell(
target.copy_from_host_via_shell(
"${ makeConfig {
inherit bootLoader grubDevice grubIdentifier
grubUseEfi extraConfig clevisTest;
@ -288,73 +272,62 @@ let
}",
"/etc/nixos/configuration.nix",
)
machine.succeed("nixos-rebuild boot >&2")
machine.shutdown()
target.succeed("nixos-rebuild boot >&2")
target.shutdown()
# And just to be sure, check that the machine still boots after
# "nixos-rebuild switch".
machine = create_machine_named("boot-after-rebuild-switch")
${preBootCommands}
machine.wait_for_unit("network.target")
# And just to be sure, check that the target still boots after "nixos-rebuild switch".
${startTarget}
target.wait_for_unit("network.target")
# Sanity check, is it the configuration.nix we generated?
hostname = machine.succeed("hostname").strip()
hostname = target.succeed("hostname").strip()
assert hostname == "thatworked"
${postBootCommands}
machine.shutdown()
target.shutdown()
# Tests for validating clone configuration entries in grub menu
''
+ optionalString testSpecialisationConfig ''
# Reboot Machine
machine = create_machine_named("clone-default-config")
${preBootCommands}
machine.wait_for_unit("multi-user.target")
# Reboot target
${startTarget}
with subtest("Booted configuration name should be 'Home'"):
# This is not the name that shows in the grub menu.
# The default configuration is always shown as "Default"
machine.succeed("cat /run/booted-system/configuration-name >&2")
assert "Home" in machine.succeed("cat /run/booted-system/configuration-name")
target.succeed("cat /run/booted-system/configuration-name >&2")
assert "Home" in target.succeed("cat /run/booted-system/configuration-name")
with subtest("We should **not** find a file named /etc/gitconfig"):
machine.fail("test -e /etc/gitconfig")
target.fail("test -e /etc/gitconfig")
with subtest("Set grub to boot the second configuration"):
machine.succeed("grub-reboot 1")
target.succeed("grub-reboot 1")
${postBootCommands}
machine.shutdown()
target.shutdown()
# Reboot Machine
machine = create_machine_named("clone-alternate-config")
${preBootCommands}
# Reboot target
${startTarget}
machine.wait_for_unit("multi-user.target")
with subtest("Booted configuration name should be Work"):
machine.succeed("cat /run/booted-system/configuration-name >&2")
assert "Work" in machine.succeed("cat /run/booted-system/configuration-name")
target.succeed("cat /run/booted-system/configuration-name >&2")
assert "Work" in target.succeed("cat /run/booted-system/configuration-name")
with subtest("We should find a file named /etc/gitconfig"):
machine.succeed("test -e /etc/gitconfig")
target.succeed("test -e /etc/gitconfig")
${postBootCommands}
machine.shutdown()
target.shutdown()
''
+ optionalString testFlakeSwitch ''
${preBootCommands}
machine.start()
${startTarget}
with subtest("Configure system with flake"):
# TODO: evaluate as user?
machine.succeed("""
target.succeed("""
mkdir /root/my-config
mv /etc/nixos/hardware-configuration.nix /root/my-config/
mv /etc/nixos/secret /root/my-config/
rm /etc/nixos/configuration.nix
""")
machine.copy_from_host_via_shell(
target.copy_from_host_via_shell(
"${makeConfig {
inherit bootLoader grubDevice grubIdentifier grubUseEfi extraConfig clevisTest;
forceGrubReinstallCount = 1;
@ -362,11 +335,11 @@ let
}}",
"/root/my-config/configuration.nix",
)
machine.copy_from_host_via_shell(
target.copy_from_host_via_shell(
"${./installer/flake.nix}",
"/root/my-config/flake.nix",
)
machine.succeed("""
target.succeed("""
# for some reason the image does not have `pkgs.path`, so
# we use readlink to find a Nixpkgs source.
pkgs=$(readlink -f /nix/var/nix/profiles/per-user/root/channels)/nixos
@ -378,36 +351,32 @@ let
""")
with subtest("Switch to flake based config"):
machine.succeed("nixos-rebuild switch --flake /root/my-config#xyz")
target.succeed("nixos-rebuild switch --flake /root/my-config#xyz")
${postBootCommands}
machine.shutdown()
target.shutdown()
${preBootCommands}
machine.start()
machine.wait_for_unit("multi-user.target")
${startTarget}
with subtest("nix-channel command is not available anymore"):
machine.succeed("! which nix-channel")
target.succeed("! which nix-channel")
# Note that the channel profile is still present on disk, but configured
# not to be used.
with subtest("builtins.nixPath is now empty"):
machine.succeed("""
target.succeed("""
[[ "[ ]" == "$(nix-instantiate builtins.nixPath --eval --expr)" ]]
""")
with subtest("<nixpkgs> does not resolve"):
machine.succeed("""
target.succeed("""
! nix-instantiate '<nixpkgs>' --eval --expr
""")
with subtest("Evaluate flake config in fresh env without nix-channel"):
machine.succeed("nixos-rebuild switch --flake /root/my-config#xyz")
target.succeed("nixos-rebuild switch --flake /root/my-config#xyz")
with subtest("Evaluate flake config in fresh env without channel profiles"):
machine.succeed("""
target.succeed("""
(
exec 1>&2
rm -v /root/.nix-channels
@ -415,16 +384,15 @@ let
rm -vrf /nix/var/nix/profiles/per-user/root/channels*
)
""")
machine.succeed("nixos-rebuild switch --flake /root/my-config#xyz")
target.succeed("nixos-rebuild switch --flake /root/my-config#xyz")
${postBootCommands}
machine.shutdown()
target.shutdown()
'';
makeInstallerTest = name:
{ createPartitions
, postInstallCommands ? "", preBootCommands ? "", postBootCommands ? ""
, postInstallCommands ? "", postBootCommands ? ""
, extraConfig ? ""
, extraInstallerConfig ? {}
, bootLoader ? "grub" # either "grub" or "systemd-boot"
@ -436,18 +404,39 @@ let
, clevisFallbackTest ? false
, disableFileSystems ? false
}:
makeTest {
let
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
in makeTest {
inherit enableOCR;
name = "installer-" + name;
meta = {
# put global maintainers here, individuals go into makeInstallerTest fkt call
maintainers = (meta.maintainers or []);
# non-EFI tests can only run on x86
platforms = if isEfi then platforms.linux else [ "x86_64-linux" "i686-linux" ];
};
nodes = {
nodes = let
commonConfig = {
# builds stuff in the VM, needs more juice
virtualisation.diskSize = 8 * 1024;
virtualisation.cores = 8;
virtualisation.memorySize = 2048;
# The configuration of the machine used to run "nixos-install".
machine = { pkgs, ... }: {
# both installer and target need to use the same drive
virtualisation.diskImage = "./target.qcow2";
# and the same TPM options
virtualisation.qemu.options = mkIf (clevisTest) [
"-chardev socket,id=chrtpm,path=$NIX_BUILD_TOP/swtpm-sock"
"-tpmdev emulator,id=tpm0,chardev=chrtpm"
"-device tpm-tis,tpmdev=tpm0"
];
};
in {
# The configuration of the system used to run "nixos-install".
installer = {
imports = [
commonConfig
../modules/profiles/installation-device.nix
../modules/profiles/base.nix
extraInstallerConfig
@ -458,11 +447,6 @@ let
# root filesystem.
virtualisation.fileSystems."/".autoFormat = systemdStage1;
# builds stuff in the VM, needs more juice
virtualisation.diskSize = 8 * 1024;
virtualisation.cores = 8;
virtualisation.memorySize = 2048;
boot.initrd.systemd.enable = systemdStage1;
# Use a small /dev/vdb as the root disk for the
@ -470,17 +454,6 @@ let
# the same during and after installation.
virtualisation.emptyDiskImages = [ 512 ];
virtualisation.rootDevice = "/dev/vdb";
virtualisation.bootLoaderDevice = "/dev/vda";
virtualisation.qemu.diskInterface = "virtio";
virtualisation.qemu.options = mkIf (clevisTest) [
"-chardev socket,id=chrtpm,path=$NIX_BUILD_TOP/swtpm-sock"
"-tpmdev emulator,id=tpm0,chardev=chrtpm"
"-device tpm-tis,tpmdev=tpm0"
];
# We don't want to have any networking in the guest apart from the clevis tests.
virtualisation.vlans = mkIf (!clevisTest) [];
boot.loader.systemd-boot.enable = mkIf (bootLoader == "systemd-boot") true;
hardware.enableAllFirmware = mkForce false;
@ -520,7 +493,13 @@ let
in [
(pkgs.grub2.override { inherit zfsSupport; })
(pkgs.grub2_efi.override { inherit zfsSupport; })
]) ++ optionals clevisTest [ pkgs.klibc ];
])
++ optionals (bootLoader == "systemd-boot") [
pkgs.zstd.bin
pkgs.mypy
pkgs.bootspec
]
++ optionals clevisTest [ pkgs.klibc ];
nix.settings = {
substituters = mkForce [];
@ -529,6 +508,18 @@ let
};
};
target = {
imports = [ commonConfig ];
virtualisation.useBootLoader = true;
virtualisation.useEFIBoot = isEfi;
virtualisation.useDefaultFilesystems = false;
virtualisation.efi.keepVariables = false;
virtualisation.fileSystems."/" = {
device = "/dev/disk/by-label/this-is-not-real-and-will-never-be-used";
fsType = "ext4";
};
};
} // optionalAttrs clevisTest {
tang = {
services.tang = {
@ -541,7 +532,7 @@ let
};
testScript = testScriptFun {
inherit bootLoader createPartitions postInstallCommands preBootCommands postBootCommands
inherit bootLoader createPartitions postInstallCommands postBootCommands
grubDevice grubIdentifier grubUseEfi extraConfig
testSpecialisationConfig testFlakeSwitch clevisTest clevisFallbackTest
disableFileSystems;
@ -550,7 +541,7 @@ let
makeLuksRootTest = name: luksFormatOpts: makeInstallerTest name {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB" # /boot
+ " mkpart primary linux-swap 100M 1024M"
@ -572,10 +563,9 @@ let
boot.kernelParams = lib.mkAfter [ "console=tty0" ];
'';
enableOCR = true;
preBootCommands = ''
machine.start()
machine.wait_for_text("[Pp]assphrase for")
machine.send_chars("supersecret\n")
postBootCommands = ''
target.wait_for_text("[Pp]assphrase for")
target.send_chars("supersecret\n")
'';
};
@ -583,7 +573,7 @@ let
# one big filesystem partition.
simple-test-config = {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary linux-swap 1M 1024M"
+ " mkpart primary ext2 1024M -1s",
@ -602,7 +592,7 @@ let
simple-uefi-grub-config = {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel gpt"
+ " mkpart ESP fat32 1M 100MiB" # /boot
+ " set 1 boot on"
@ -656,7 +646,7 @@ let
environment.systemPackages = with pkgs; [ keyutils clevis ];
};
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB"
+ " mkpart primary linux-swap 100M 1024M"
@ -680,13 +670,9 @@ let
# not know the UUID in advance.
fileSystems."/" = lib.mkForce { device = "/dev/vda3"; fsType = "bcachefs"; };
'';
preBootCommands = ''
tpm = Tpm()
tpm.check()
'' + optionalString fallback ''
machine.start()
machine.wait_for_text("enter passphrase for")
machine.send_chars("password\n")
postBootCommands = optionalString fallback ''
target.wait_for_text("enter passphrase for")
target.send_chars("password\n")
'';
};
@ -698,7 +684,7 @@ let
environment.systemPackages = with pkgs; [ clevis ];
};
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB"
+ " mkpart primary linux-swap 100M 1024M"
@ -719,17 +705,13 @@ let
extraConfig = ''
boot.initrd.clevis.devices."crypt-root".secretFile = "/etc/nixos/clevis-secret.jwe";
'';
preBootCommands = ''
tpm = Tpm()
tpm.check()
'' + optionalString fallback ''
machine.start()
postBootCommands = optionalString fallback ''
${if systemdStage1 then ''
machine.wait_for_text("Please enter")
target.wait_for_text("Please enter")
'' else ''
machine.wait_for_text("Passphrase for")
target.wait_for_text("Passphrase for")
''}
machine.send_chars("password\n")
target.send_chars("password\n")
'';
};
@ -742,7 +724,7 @@ let
environment.systemPackages = with pkgs; [ clevis ];
};
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB"
+ " mkpart primary linux-swap 100M 1024M"
@ -770,17 +752,13 @@ let
boot.zfs.devNodes = "/dev/disk/by-uuid/";
networking.hostId = "00000000";
'';
preBootCommands = ''
tpm = Tpm()
tpm.check()
'' + optionalString fallback ''
machine.start()
postBootCommands = optionalString fallback ''
${if systemdStage1 then ''
machine.wait_for_text("Enter key for rpool/root")
target.wait_for_text("Enter key for rpool/root")
'' else ''
machine.wait_for_text("Key load error")
target.wait_for_text("Key load error")
''}
machine.send_chars("password\n")
target.send_chars("password\n")
'';
};
@ -801,7 +779,7 @@ in {
# Simple GPT/UEFI configuration using systemd-boot with 3 partitions: ESP, swap & root filesystem
simpleUefiSystemdBoot = makeInstallerTest "simpleUefiSystemdBoot" {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel gpt"
+ " mkpart ESP fat32 1M 100MiB" # /boot
+ " set 1 boot on"
@ -828,7 +806,7 @@ in {
# Same as the previous, but now with a separate /boot partition.
separateBoot = makeInstallerTest "separateBoot" {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB" # /boot
+ " mkpart primary linux-swap 100MB 1024M"
@ -848,7 +826,7 @@ in {
# Same as the previous, but with fat32 /boot.
separateBootFat = makeInstallerTest "separateBootFat" {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB" # /boot
+ " mkpart primary linux-swap 100MB 1024M"
@ -880,7 +858,7 @@ in {
'';
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 256MB" # /boot
+ " mkpart primary linux-swap 256MB 1280M"
@ -932,8 +910,8 @@ in {
# umount & export bpool before shutdown
# this is a fix for "cannot import 'bpool': pool was previously in use from another system."
postInstallCommands = ''
machine.succeed("umount /mnt/boot")
machine.succeed("zpool export bpool")
installer.succeed("umount /mnt/boot")
installer.succeed("zpool export bpool")
'';
};
@ -954,7 +932,7 @@ in {
'';
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary 1M 100MB" # /boot
+ " mkpart primary linux-swap 100M 1024M"
@ -980,7 +958,7 @@ in {
# that contains the logical swap and root partitions.
lvm = makeInstallerTest "lvm" {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary 1M 2048M" # PV1
+ " set 1 lvm on"
@ -1013,7 +991,7 @@ in {
# keyfile is configured
encryptedFSWithKeyfile = makeInstallerTest "encryptedFSWithKeyfile" {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB" # /boot
+ " mkpart primary linux-swap 100M 1024M"
@ -1052,7 +1030,7 @@ in {
# LVM-on-LUKS and a keyfile in initrd.secrets to enter the passphrase once
fullDiskEncryption = makeInstallerTest "fullDiskEncryption" {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel gpt"
+ " mkpart ESP fat32 1M 100MiB" # /boot/efi
+ " set 1 boot on"
@ -1083,23 +1061,22 @@ in {
boot.loader.grub.enableCryptodisk = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.initrd.secrets."/luks.key" = ./luks.key;
boot.initrd.secrets."/luks.key" = "/etc/nixos/luks.key";
boot.initrd.luks.devices.crypt =
{ device = "/dev/vda2";
keyFile = "/luks.key";
};
'';
enableOCR = true;
preBootCommands = ''
machine.start()
machine.wait_for_text("Enter passphrase for")
machine.send_chars("supersecret\n")
postBootCommands = ''
target.wait_for_text("Enter passphrase for")
target.send_chars("supersecret\n")
'';
};
swraid = makeInstallerTest "swraid" {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda --"
+ " mklabel msdos"
+ " mkpart primary ext2 1M 100MB" # /boot
@ -1128,15 +1105,14 @@ in {
"udevadm settle",
)
'';
preBootCommands = ''
machine.start()
machine.fail("dmesg | grep 'immediate safe mode'")
postBootCommands = ''
target.fail("dmesg | grep 'immediate safe mode'")
'';
};
bcache = makeInstallerTest "bcache" {
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda --"
+ " mklabel msdos"
+ " mkpart primary ext2 1M 100MB" # /boot
@ -1165,7 +1141,7 @@ in {
};
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB" # /boot
+ " mkpart primary linux-swap 100M 1024M" # swap
@ -1197,18 +1173,17 @@ in {
'';
enableOCR = true;
preBootCommands = ''
machine.start()
postBootCommands = ''
# Enter it wrong once
machine.wait_for_text("enter passphrase for ")
machine.send_chars("wrong\n")
target.wait_for_text("enter passphrase for ")
target.send_chars("wrong\n")
# Then enter it right.
machine.wait_for_text("enter passphrase for ")
machine.send_chars("password\n")
target.wait_for_text("enter passphrase for ")
target.send_chars("password\n")
'';
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB" # /boot
+ " mkpart primary linux-swap 100M 1024M" # swap
@ -1235,7 +1210,7 @@ in {
};
createPartitions = ''
machine.succeed(
installer.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel msdos"
+ " mkpart primary ext2 1M 100MB" # /boot
+ " mkpart primary linux-swap 100M 1024M" # swap
@ -1256,7 +1231,7 @@ in {
# Test using labels to identify volumes in grub
simpleLabels = makeInstallerTest "simpleLabels" {
createPartitions = ''
machine.succeed(
installer.succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -n 2:0:+1G -N 3 -t 1:ef02 -t 2:8200 -t 3:8300 -c 3:root /dev/vda",
"mkswap /dev/vda2 -L swap",
@ -1273,7 +1248,7 @@ in {
simpleProvided = makeInstallerTest "simpleProvided" {
createPartitions = ''
uuid = "$(blkid -s UUID -o value /dev/vda2)"
machine.succeed(
installer.succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -n 2:0:+100M -n 3:0:+1G -N 4 -t 1:ef02 -t 2:8300 "
+ "-t 3:8200 -t 4:8300 -c 2:boot -c 4:root /dev/vda",
@ -1282,9 +1257,9 @@ in {
"mkfs.ext4 -L boot /dev/vda2",
"mkfs.ext4 -L root /dev/vda4",
)
machine.execute(f"ln -s ../../vda2 /dev/disk/by-uuid/{uuid}")
machine.execute("ln -s ../../vda4 /dev/disk/by-label/root")
machine.succeed(
installer.execute(f"ln -s ../../vda2 /dev/disk/by-uuid/{uuid}")
installer.execute("ln -s ../../vda4 /dev/disk/by-label/root")
installer.succeed(
"mount /dev/disk/by-label/root /mnt",
"mkdir /mnt/boot",
f"mount /dev/disk/by-uuid/{uuid} /mnt/boot",
@ -1296,7 +1271,7 @@ in {
# Simple btrfs grub testing
btrfsSimple = makeInstallerTest "btrfsSimple" {
createPartitions = ''
machine.succeed(
installer.succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -n 2:0:+1G -N 3 -t 1:ef02 -t 2:8200 -t 3:8300 -c 3:root /dev/vda",
"mkswap /dev/vda2 -L swap",
@ -1310,7 +1285,7 @@ in {
# Test to see if we can detect /boot and /nix on subvolumes
btrfsSubvols = makeInstallerTest "btrfsSubvols" {
createPartitions = ''
machine.succeed(
installer.succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -n 2:0:+1G -N 3 -t 1:ef02 -t 2:8200 -t 3:8300 -c 3:root /dev/vda",
"mkswap /dev/vda2 -L swap",
@ -1332,7 +1307,7 @@ in {
# Test to see if we can detect default and aux subvolumes correctly
btrfsSubvolDefault = makeInstallerTest "btrfsSubvolDefault" {
createPartitions = ''
machine.succeed(
installer.succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -n 2:0:+1G -N 3 -t 1:ef02 -t 2:8200 -t 3:8300 -c 3:root /dev/vda",
"mkswap /dev/vda2 -L swap",
@ -1358,7 +1333,7 @@ in {
# Test to see if we can deal with subvols that need to be escaped in fstab
btrfsSubvolEscape = makeInstallerTest "btrfsSubvolEscape" {
createPartitions = ''
machine.succeed(
installer.succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -n 2:0:+1G -N 3 -t 1:ef02 -t 2:8200 -t 3:8300 -c 3:root /dev/vda",
"mkswap /dev/vda2 -L swap",
@ -1385,7 +1360,7 @@ in {
} // optionalAttrs systemdStage1 {
stratisRoot = makeInstallerTest "stratisRoot" {
createPartitions = ''
machine.succeed(
installer.succeed(
"sgdisk --zap-all /dev/vda",
"sgdisk --new=1:0:+100M --typecode=0:ef00 /dev/vda", # /boot
"sgdisk --new=2:0:+1G --typecode=0:8200 /dev/vda", # swap
@ -1428,7 +1403,7 @@ in {
in makeInstallerTest "gptAutoRoot" {
disableFileSystems = true;
createPartitions = ''
machine.succeed(
installer.succeed(
"sgdisk --zap-all /dev/vda",
"sgdisk --new=1:0:+100M --typecode=0:ef00 /dev/vda", # /boot
"sgdisk --new=2:0:+1G --typecode=0:8200 /dev/vda", # swap

View File

@ -50,7 +50,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
machine.wait_until_succeeds(f"pgrep -f {i}")
for i in ["gala", "io.elementary.wingpanel", "plank"]:
machine.wait_for_window(i)
for i in ["io.elementary.gala.daemon@x11.service", "bamfdaemon.service", "io.elementary.files.xdg-desktop-portal.service"]:
for i in ["bamfdaemon.service", "io.elementary.files.xdg-desktop-portal.service"]:
machine.wait_for_unit(i, "${user.name}")
with subtest("Check if various environment variables are set"):

View File

@ -0,0 +1,47 @@
import ./make-test-python.nix ({ lib, ... }: {
name = "silverbullet";
meta.maintainers = with lib.maintainers; [ aorith ];
nodes.simple = { ... }: {
services.silverbullet.enable = true;
};
nodes.configured = { pkgs, ... }: {
users.users.test.isNormalUser = true;
users.groups.test = { };
services.silverbullet = {
enable = true;
package = pkgs.silverbullet;
listenPort = 3001;
listenAddress = "localhost";
spaceDir = "/home/test/silverbullet";
user = "test";
group = "test";
envFile = pkgs.writeText "silverbullet.env" ''
SB_USER=user:password
SB_AUTH_TOKEN=test
'';
extraArgs = [ "--reindex" "--db /home/test/silverbullet/custom.db" ];
};
};
testScript = { nodes, ... }: ''
PORT = ${builtins.toString nodes.simple.services.silverbullet.listenPort}
ADDRESS = "${nodes.simple.services.silverbullet.listenAddress}"
SPACEDIR = "${nodes.simple.services.silverbullet.spaceDir}"
simple.wait_for_unit("silverbullet.service")
simple.wait_for_open_port(PORT)
simple.succeed(f"curl --max-time 5 -s -v -o /dev/null --fail http://{ADDRESS}:{PORT}/")
simple.succeed(f"test -d '{SPACEDIR}'")
PORT = ${builtins.toString nodes.configured.services.silverbullet.listenPort}
ADDRESS = "${nodes.configured.services.silverbullet.listenAddress}"
SPACEDIR = "${nodes.configured.services.silverbullet.spaceDir}"
configured.wait_for_unit("silverbullet.service")
configured.wait_for_open_port(PORT)
assert int(configured.succeed(f"curl --max-time 5 -s -o /dev/null -w '%{{http_code}}' -XPUT -d 'test' --fail http://{ADDRESS}:{PORT}/test.md -H'Authorization: Bearer test'")) == 200
assert int(configured.fail(f"curl --max-time 5 -s -o /dev/null -w '%{{http_code}}' -XPUT -d 'test' --fail http://{ADDRESS}:{PORT}/test.md -H'Authorization: Bearer wrong'")) == 401
configured.succeed(f"test -d '{SPACEDIR}'")
'';
})

View File

@ -1,13 +1,13 @@
{ stdenv, lib, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
pname = "faustPhysicalModeling";
version = "2.70.3";
version = "2.72.14";
src = fetchFromGitHub {
owner = "grame-cncm";
repo = "faust";
rev = version;
sha256 = "sha256-QkksliLu2TnJ1GoM91e+Qf3SlRv3T06WNU++S3qq3e0=";
sha256 = "sha256-UBMVU2oAfoAaSQXxZxV+LFq8dyb5dvy/0cCG4XywZVc=";
};
buildInputs = [ faust2jaqt faust2lv2 ];

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "geonkick";
version = "3.3.1";
version = "3.4.0";
src = fetchFromGitLab {
owner = "Geonkick-Synthesizer";
repo = pname;
rev = "v${version}";
sha256 = "sha256-fsDoqQqZsoeQa66dxb8JC2ywUFmBf6b2J+/ixWZTzfU=";
sha256 = "sha256-zoEC85QYcQMF92KvLBikYw1nDoSHaedpTDDqvoAtte0=";
};
nativeBuildInputs = [ cmake pkg-config ];

View File

@ -21,14 +21,14 @@
stdenv.mkDerivation rec {
pname = "grandorgue";
version = "3.14.0";
version = "3.14.0-1";
src = fetchFromGitHub {
owner = "GrandOrgue";
repo = pname;
rev = version;
fetchSubmodules = true;
hash = "sha256-kPz11V2yNmBe80egNLYxh/m2B1nDca3C5sGbEnrkqnw=";
hash = "sha256-bzGfc0kWlQSjvZsFlRERPjdLtemcZmsa6DsQGgBPoFo=";
};
postPatch = ''

View File

@ -10,6 +10,7 @@
, hicolor-icon-theme
, isocodes
, itstool
, libadwaita
, libxml2
, meson
, ninja
@ -20,13 +21,13 @@
stdenv.mkDerivation rec {
pname = "parlatype";
version = "4.0";
version = "4.1";
src = fetchFromGitHub {
owner = "gkarsay";
repo = pname;
rev = "v${version}";
sha256 = "1iyjxss6sgc9gx6ij30zz97bl31qix8pxklzn4kknh1b0j7hhbwq";
sha256 = "0546rl5sm7xmgl54cqps3a7bhfs7xdvz98jgdcf4sgiz1k2vh9xq";
};
nativeBuildInputs = [
@ -53,6 +54,7 @@ stdenv.mkDerivation rec {
gtk4
hicolor-icon-theme
isocodes
libadwaita
];
postPatch = ''
@ -72,7 +74,8 @@ stdenv.mkDerivation rec {
useful for journalists, students, scientists and whoever needs to
transcribe audio files.
'';
homepage = "https://www.parlatype.org/";
# maintainer lost control of parlatype.org
homepage = "https://github.com/gkarsay/parlatype";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ alexshpilkin melchips ];
platforms = platforms.linux;

View File

@ -1,24 +1,12 @@
{ lib
, fetchFromGitHub
, fetchurl
, python3
, qtbase
, qtwayland
, wrapQtAppsHook
}:
# As of 2.1, puddletag has started pinning versions of all dependencies that it
# was built against which is an issue as the chances of us having the exact same
# versions in nixpkgs are slim to none.
#
# There is a difference between explicit and implicit version requirements and
# we should be able to safely ignore the latter. Therefore use requirements.in
# which contains just the explicit version dependencies instead of
# requirements.txt.
#
# Additionally, we do need to override some of the explicit requirements through
# `overrideVersions`. While we technically run the risk of breaking something by
# ignoring the pinned versions, it's just something we will have to accept
# unless we want to vendor those versions.
python3.pkgs.buildPythonApplication rec {
pname = "puddletag";
version = "2.3.0";
@ -31,6 +19,14 @@ python3.pkgs.buildPythonApplication rec {
hash = "sha256-oScT8YcQoDf2qZ+J7xKm22Sbfym3tkVUrWT5D2LU5e8=";
};
patches = [
(fetchurl {
url = "https://github.com/puddletag/puddletag/commit/54074824adb05da42c03d7adfbba94d8e24982f0.patch";
hash = "sha256-DkgaFWgp2m2bRuhdXhHW+nxV/2GaCgeRNdwLMYAkcYQ=";
name = "fix_for_pyparsing_3_1_2.patch";
})
];
pythonRelaxDeps = true;
pythonRemoveDeps = [
@ -43,6 +39,11 @@ python3.pkgs.buildPythonApplication rec {
--replace share/pixmaps share/icons
'';
buildInputs = [
qtbase
qtwayland
];
nativeBuildInputs = [
python3.pkgs.pythonRelaxDepsHook
wrapQtAppsHook
@ -63,11 +64,13 @@ python3.pkgs.buildPythonApplication rec {
# the file should be executable but it isn't so our wrapper doesn't run
preFixup = ''
chmod 555 $out/bin/puddletag
wrapQtApp $out/bin/puddletag
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
doCheck = false; # there are no tests
dontWrapQtApps = true; # to avoid double-wrapping
dontStrip = true; # we are not generating any binaries
meta = with lib; {

View File

@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
releasePath
else
let
platform = platforms.${stdenv.system};
platform = platforms.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
urlVersion = lib.replaceStrings [ "." ] [ "_" ] version;
in fetchurl {
url =

File diff suppressed because it is too large Load Diff

View File

@ -9,19 +9,19 @@
rustPlatform.buildRustPackage rec {
pname = "waylyrics";
version = "0.2.13";
version = "0.2.15";
src = fetchFromGitHub {
owner = "poly000";
repo = "waylyrics";
rev = "v${version}";
hash = "sha256-522NdpGj0oh2SbWa4GFCFpqNFRhqQxfZ1ZRuS9jUj7Y=";
hash = "sha256-dGtotQfS5Ve3rl6iSsqOzs0/dOePfoRZ9Wlg9zHCXSY=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"ncmapi-0.1.13" = "sha256-qu89qf4IPM14V+oE4QQr/SsXSTx3vQbyfzD+Pihcd3E=";
"ncmapi-0.1.13" = "sha256-gwFMmMzQywlsQC2GljgLwXoP2Cca0r24iEDmV0k/xG0=";
"qqmusic-rs-0.1.0" = "sha256-woLsO0n+m3EBUI+PRLio7iLp0UPQSliWK0djCSZEaZc=";
};
};

View File

@ -25,13 +25,13 @@
mkDerivation rec {
pname = "bitcoin" + lib.optionalString (!withGui) "d" + "-abc";
version = "0.28.12";
version = "0.29.0";
src = fetchFromGitHub {
owner = "bitcoin-ABC";
repo = "bitcoin-abc";
rev = "v${version}";
hash = "sha256-D8ZKxvB8kfNkVTaI6uESEzw+ABtmNk0nJLK5N/pJ6W8=";
hash = "sha256-9BJfzGXX9b7JRWFU9Flda8CWDqkgE2/IZcPopCyfBck=";
};
nativeBuildInputs = [ pkg-config cmake ];

View File

@ -1,19 +1,50 @@
{ buildVersion, aarch64sha256, x64sha256, dev ? false }:
{
buildVersion,
dev ? false,
aarch64sha256,
x64sha256,
}:
{ fetchurl, stdenv, lib, xorg, glib, libglvnd, glibcLocales, gtk3, cairo, pango, makeWrapper, wrapGAppsHook
, writeShellScript, common-updater-scripts, curl
, openssl_1_1, bzip2, bash, unzip, zip
, sqlite
{
fetchurl,
stdenv,
lib,
xorg,
glib,
libglvnd,
glibcLocales,
gtk3,
cairo,
pango,
makeWrapper,
wrapGAppsHook,
writeShellScript,
common-updater-scripts,
curl,
openssl_1_1,
bzip2,
sqlite,
}:
let
pnameBase = "sublimetext4";
packageAttribute = "sublime4${lib.optionalString dev "-dev"}";
binaries = [ "sublime_text" "plugin_host-3.3" "plugin_host-3.8" crashHandlerBinary ];
binaries = [
"sublime_text"
"plugin_host-3.3"
"plugin_host-3.8"
crashHandlerBinary
];
primaryBinary = "sublime_text";
primaryBinaryAliases = [ "subl" "sublime" "sublime4" ];
crashHandlerBinary = if lib.versionAtLeast buildVersion "4153" then "crash_handler" else "crash_reporter";
downloadUrl = arch: "https://download.sublimetext.com/sublime_text_build_${buildVersion}_${arch}.tar.xz";
primaryBinaryAliases = [
"subl"
"sublime"
"sublime4"
];
crashHandlerBinary =
if lib.versionAtLeast buildVersion "4153" then "crash_handler" else "crash_reporter";
downloadUrl =
arch: "https://download.sublimetext.com/sublime_text_build_${buildVersion}_${arch}.tar.xz";
versionUrl = "https://download.sublimetext.com/latest/${if dev then "dev" else "stable"}";
versionFile = builtins.toString ./packages.nix;
@ -30,7 +61,8 @@ let
] ++ lib.optionals (lib.versionAtLeast buildVersion "4145") [
sqlite
];
in let
in
let
binaryPackage = stdenv.mkDerivation rec {
pname = "${pnameBase}-bin";
version = buildVersion;
@ -39,31 +71,22 @@ in let
dontStrip = true;
dontPatchELF = true;
buildInputs = [ glib gtk3 ]; # for GSETTINGS_SCHEMAS_PATH
nativeBuildInputs = [ zip unzip makeWrapper wrapGAppsHook ];
# make exec.py in Default.sublime-package use own bash with an LD_PRELOAD instead of "/bin/bash"
patchPhase = ''
runHook prePatch
buildInputs = [
glib
# for GSETTINGS_SCHEMAS_PATH
gtk3
];
# TODO: Should not be necessary even in 3
mkdir Default.sublime-package-fix
( cd Default.sublime-package-fix
unzip -q ../Packages/Default.sublime-package
substituteInPlace "exec.py" --replace \
"[\"/bin/bash\"" \
"[\"$out/sublime_bash\""
zip -q ../Packages/Default.sublime-package **/*
)
rm -r Default.sublime-package-fix
runHook postPatch
'';
nativeBuildInputs = [
makeWrapper
wrapGAppsHook
];
buildPhase = ''
runHook preBuild
for binary in ${ builtins.concatStringsSep " " binaries }; do
for binary in ${builtins.concatStringsSep " " binaries}; do
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${lib.makeLibraryPath neededLibraries}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \
@ -86,10 +109,6 @@ in let
mkdir -p $out
cp -r * $out/
# We can't just call /usr/bin/env bash because a relocation error occurs
# when trying to run a build from within Sublime Text
ln -s ${bash}/bin/bash $out/sublime_bash
runHook postInstall
'';
@ -116,7 +135,8 @@ in let
};
};
};
in stdenv.mkDerivation (rec {
in
stdenv.mkDerivation (rec {
pname = pnameBase;
version = buildVersion;
@ -124,27 +144,44 @@ in stdenv.mkDerivation (rec {
${primaryBinary} = binaryPackage;
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
mkdir -p "$out/bin"
makeWrapper "''$${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}"
'' + builtins.concatStringsSep "" (map (binaryAlias: "ln -s $out/bin/${primaryBinary} $out/bin/${binaryAlias}\n") primaryBinaryAliases) + ''
mkdir -p "$out/share/applications"
substitute "''$${primaryBinary}/${primaryBinary}.desktop" "$out/share/applications/${primaryBinary}.desktop" --replace "/opt/${primaryBinary}/${primaryBinary}" "${primaryBinary}"
for directory in ''$${primaryBinary}/Icon/*; do
size=$(basename $directory)
mkdir -p "$out/share/icons/hicolor/$size/apps"
ln -s ''$${primaryBinary}/Icon/$size/* $out/share/icons/hicolor/$size/apps
done
'';
installPhase =
''
mkdir -p "$out/bin"
makeWrapper "''$${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}"
''
+ builtins.concatStringsSep "" (
map (binaryAlias: "ln -s $out/bin/${primaryBinary} $out/bin/${binaryAlias}\n") primaryBinaryAliases
)
+ ''
mkdir -p "$out/share/applications"
substitute \
"''$${primaryBinary}/${primaryBinary}.desktop" \
"$out/share/applications/${primaryBinary}.desktop" \
--replace-fail "/opt/${primaryBinary}/${primaryBinary}" "${primaryBinary}"
for directory in ''$${primaryBinary}/Icon/*; do
size=$(basename $directory)
mkdir -p "$out/share/icons/hicolor/$size/apps"
ln -s ''$${primaryBinary}/Icon/$size/* $out/share/icons/hicolor/$size/apps
done
'';
passthru = {
updateScript =
let
script = writeShellScript "${packageAttribute}-update-script" ''
set -o errexit
PATH=${lib.makeBinPath [ common-updater-scripts curl ]}
PATH=${
lib.makeBinPath [
common-updater-scripts
curl
]
}
versionFile=$1
latestVersion=$(curl -s "${versionUrl}")
@ -161,15 +198,27 @@ in stdenv.mkDerivation (rec {
update-source-version "${packageAttribute}.${primaryBinary}" "$latestVersion" --file="$versionFile" --version-key=buildVersion --source-key="sources.$platform"
done
'';
in [ script versionFile ];
in
[
script
versionFile
];
};
meta = with lib; {
description = "Sophisticated text editor for code, markup and prose";
homepage = "https://www.sublimetext.com/";
maintainers = with maintainers; [ jtojnar wmertens demin-dmitriy zimbatm ];
maintainers = with maintainers; [
jtojnar
wmertens
demin-dmitriy
zimbatm
];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "aarch64-linux" "x86_64-linux" ];
platforms = [
"aarch64-linux"
"x86_64-linux"
];
};
})

View File

@ -3,17 +3,17 @@
let
common = opts: callPackage (import ./common.nix opts);
in
{
sublime4 = common {
buildVersion = "4169";
x64sha256 = "jk9wKC0QgfhiHDYUcnDhsmgJsBPOUmCkyvQeI54IJJ4=";
aarch64sha256 = "/W/xGbE+8gGu1zNh6lERZrfG9Dh9QUGkYiqTzp216JI=";
} {};
{
sublime4 = common {
buildVersion = "4169";
x64sha256 = "jk9wKC0QgfhiHDYUcnDhsmgJsBPOUmCkyvQeI54IJJ4=";
aarch64sha256 = "/W/xGbE+8gGu1zNh6lERZrfG9Dh9QUGkYiqTzp216JI=";
} { };
sublime4-dev = common {
buildVersion = "4168";
dev = true;
x64sha256 = "KfW1Mh78CUBTmthHQd1s15a7GrmssSnWZ1RgaarJeag=";
aarch64sha256 = "qJ9oix1kwWN+TUb5/WSKyHcHzB+Q87XolMOhmqx1OFc=";
} {};
}
sublime4-dev = common {
buildVersion = "4173";
dev = true;
x64sha256 = "JEf974X+m0XaZ5x2g4o5XYkdo2A0cIZNjFLCrIgFzEA=";
aarch64sha256 = "+aVV7o59ZFwSOyV0DDNUpaq3q21bXslE+Oz/i33X+4Y=";
} { };
}

View File

@ -14054,6 +14054,18 @@ final: prev:
meta.homepage = "https://github.com/mzlogin/vim-markdown-toc/";
};
vim-matchtag = buildVimPlugin {
pname = "vim-matchtag";
version = "2022-06-24";
src = fetchFromGitHub {
owner = "leafOfTree";
repo = "vim-matchtag";
rev = "54357c00979e07d86aa12b383ddd1d6a7fbda2c2";
sha256 = "01ar9qma2glb6wyhpafnwpf1f63v9i417hx1dzck1gi4fcz1pfqa";
};
meta.homepage = "https://github.com/leafOfTree/vim-matchtag/";
};
vim-matchup = buildVimPlugin {
pname = "vim-matchup";
version = "2024-02-24";

View File

@ -997,6 +997,13 @@
dependencies = with self; [ nvim-dap ];
};
nvim-dap-ui = super.nvim-dap-ui.overrideAttrs {
dependencies = with self; [ nvim-dap nvim-nio ];
doInstallCheck = true;
nvimRequireCheck = "dapui";
};
nvim-lsputils = super.nvim-lsputils.overrideAttrs {
dependencies = with self; [ popfix ];
};

View File

@ -1184,6 +1184,7 @@ https://github.com/Yilin-Yang/vim-markbar/,,
https://github.com/preservim/vim-markdown/,,
https://github.com/euclio/vim-markdown-composer/,,
https://github.com/mzlogin/vim-markdown-toc/,,
https://github.com/leafOfTree/vim-matchtag/,HEAD,
https://github.com/andymass/vim-matchup/,,
https://github.com/aquach/vim-mediawiki-editor/,HEAD,
https://github.com/samoshkin/vim-mergetool/,,

View File

@ -9,7 +9,7 @@ in
name = "vscode-wakatime";
publisher = "WakaTime";
version = "18.0.5";
sha256 = "sha256-vWqGxMbxKqd4UgKK0sOKadMTDf6Y3TQxfWsc93MHjFs=";
hash = "sha256-vWqGxMbxKqd4UgKK0sOKadMTDf6Y3TQxfWsc93MHjFs=";
};
meta = {

View File

@ -13,7 +13,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
name = "rescript-vscode";
publisher = "chenglou92";
inherit version;
sha256 = "sha256-Dt7mqZQ/vEUFyUD5SsY6RGzg9kq19/Amksrwtfv0TuE=";
hash = "sha256-Dt7mqZQ/vEUFyUD5SsY6RGzg9kq19/Amksrwtfv0TuE=";
};
postPatch = ''
rm -r ${analysisDir}

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation {
owner = "rescript-lang";
repo = "rescript-vscode";
rev = version;
sha256 = "sha256-+Ht8qWwxtFWHFMiV/aoZIs2S3SxkOWgdwSKN+akp/LU=";
hash = "sha256-+Ht8qWwxtFWHFMiV/aoZIs2S3SxkOWgdwSKN+akp/LU=";
};
nativeBuildInputs = [ ocaml dune_3 ocamlPackages.cppo ];

View File

@ -10,7 +10,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
name = "context-mapper-vscode-extension";
publisher = "contextmapper";
version = "6.11.0";
sha256 = "sha256-TvApcBBI+Egu7t4tJuEYTs6mhvABOY2eXVb57O4gWfs=";
hash = "sha256-TvApcBBI+Egu7t4tJuEYTs6mhvABOY2eXVb57O4gWfs=";
};
nativeBuildInputs = [

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
name = "vsc-material-theme";
publisher = "Equinusocio";
version = "34.3.1";
sha256 = "sha256-3yxFTMtjJR1b4EzBDfm55HF9chrya5OUF5wN+KHEduE=";
hash = "sha256-3yxFTMtjJR1b4EzBDfm55HF9chrya5OUF5wN+KHEduE=";
};
# extensions wants to write at the /nix/store path, so we patch it to use the globalStorageUri instead.

View File

@ -4,7 +4,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
name = "terraform";
publisher = "hashicorp";
version = "2.19.0";
sha256 = "sha256-k/fcEJuELz0xkwivSrP6Nxtz861BLq1wR2ZDMXVrvkY=";
hash = "sha256-k/fcEJuELz0xkwivSrP6Nxtz861BLq1wR2ZDMXVrvkY=";
};
patches = [ ./fix-terraform-ls.patch ];

View File

@ -5,7 +5,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
name = "plantuml";
publisher = "jebbs";
version = "2.17.4";
sha256 = "sha256-fnz6ubB73i7rJcv+paYyNV1r4cReuyFPjgPM0HO40ug=";
hash = "sha256-fnz6ubB73i7rJcv+paYyNV1r4cReuyFPjgPM0HO40ug=";
};
nativeBuildInputs = [ jq moreutils ];
postInstall = ''

View File

@ -1,10 +1,10 @@
{ publisher, name, version, arch ? "", sha256 ? "" }:
{ publisher, name, version, arch ? "", sha256 ? "", hash ? "" }:
let
archurl = (if arch == "" then "" else "?targetPlatform=${arch}");
in
{
url = "https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage${archurl}";
sha256 = sha256;
inherit sha256 hash;
# The `*.vsix` file is in the end a simple zip file. Change the extension
# so that existing `unzip` hooks takes care of the unpacking.
name = "${publisher}-${name}.zip";

View File

@ -12,7 +12,7 @@ let
extInfo = {
x86_64-linux = {
arch = "linux-x64";
sha256 = "sha256-7m85Zl9oV40le3nkNPzoKu/AAf8XhQpI8sBMsQXmBg8=";
hash = "sha256-7m85Zl9oV40le3nkNPzoKu/AAf8XhQpI8sBMsQXmBg8=";
binaries = [
"components/vs-green-server/platforms/linux-x64/node_modules/@microsoft/servicehub-controller-net60.linux-x64/Microsoft.ServiceHub.Controller"
"components/vs-green-server/platforms/linux-x64/node_modules/@microsoft/visualstudio-code-servicehost.linux-x64/Microsoft.VisualStudio.Code.ServiceHost"
@ -22,7 +22,7 @@ let
};
aarch64-linux = {
arch = "linux-arm64";
sha256 = "sha256-39D55EdwE4baDYbHc9GD/1XoxGbQkUkS1H2uysJHlxw=";
hash = "sha256-39D55EdwE4baDYbHc9GD/1XoxGbQkUkS1H2uysJHlxw=";
binaries = [
"components/vs-green-server/platforms/linux-arm64/node_modules/@microsoft/servicehub-controller-net60.linux-arm64/Microsoft.ServiceHub.Controller"
"components/vs-green-server/platforms/linux-arm64/node_modules/@microsoft/visualstudio-code-servicehost.linux-arm64/Microsoft.VisualStudio.Code.ServiceHost"
@ -32,7 +32,7 @@ let
};
x86_64-darwin = {
arch = "darwin-x64";
sha256 = "sha256-gfhJX07R+DIw9FbzaEE0JZwEmDeifiq4vHyMHZZ1udM=";
hash = "sha256-gfhJX07R+DIw9FbzaEE0JZwEmDeifiq4vHyMHZZ1udM=";
binaries = [
"components/vs-green-server/platforms/darwin-x64/node_modules/@microsoft/servicehub-controller-net60.darwin-x64/Microsoft.ServiceHub.Controller"
"components/vs-green-server/platforms/darwin-x64/node_modules/@microsoft/visualstudio-code-servicehost.darwin-x64/Microsoft.VisualStudio.Code.ServiceHost"
@ -42,7 +42,7 @@ let
};
aarch64-darwin = {
arch = "darwin-arm64";
sha256 = "sha256-vogstgCWvI9csNF9JfJ41XPR1POy842g2yhWqIDoHLw=";
hash = "sha256-vogstgCWvI9csNF9JfJ41XPR1POy842g2yhWqIDoHLw=";
binaries = [
"components/vs-green-server/platforms/darwin-arm64/node_modules/@microsoft/servicehub-controller-net60.darwin-arm64/Microsoft.ServiceHub.Controller"
"components/vs-green-server/platforms/darwin-arm64/node_modules/@microsoft/visualstudio-code-servicehost.darwin-arm64/Microsoft.VisualStudio.Code.ServiceHost"
@ -57,7 +57,7 @@ buildVscodeMarketplaceExtension {
name = "csdevkit";
publisher = "ms-dotnettools";
version = "1.4.28";
inherit (extInfo) sha256 arch;
inherit (extInfo) hash arch;
};
sourceRoot = "extension"; # This has more than one folder.

View File

@ -29,22 +29,22 @@ let
{
x86_64-linux = {
arch = "linux-x64";
sha256 = "sha256-si4HKGVIHu44QNlNI2WEnMff9+QZOMWiBfWQaaFGyQE=";
hash = "sha256-si4HKGVIHu44QNlNI2WEnMff9+QZOMWiBfWQaaFGyQE=";
binaries = linuxBins;
};
aarch64-linux = {
arch = "linux-arm64";
sha256 = "sha256-1IXkSRgCHOLD4VeCdqyy54MXCBUX5RDDb3pf7GQH5jA=";
hash = "sha256-1IXkSRgCHOLD4VeCdqyy54MXCBUX5RDDb3pf7GQH5jA=";
binaries = linuxBins;
};
x86_64-darwin = {
arch = "darwin-x64";
sha256 = "sha256-AAbYjZ+YYyGEXSLkiFfluLf7P4OzPhmHzK44N5XT9UI=";
hash = "sha256-AAbYjZ+YYyGEXSLkiFfluLf7P4OzPhmHzK44N5XT9UI=";
binaries = darwinBins;
};
aarch64-darwin = {
arch = "darwin-arm64";
sha256 = "sha256-1m47kX0Jo+UvthNfgdoPdBBOcDyCA8DfP+zRk3SicR0=";
hash = "sha256-1m47kX0Jo+UvthNfgdoPdBBOcDyCA8DfP+zRk3SicR0=";
binaries = darwinBins ++ [
".debugger/arm64/vsdbg-ui"
".debugger/arm64/vsdbg"
@ -57,7 +57,7 @@ buildVscodeMarketplaceExtension {
name = "csharp";
publisher = "ms-dotnettools";
version = "2.22.3";
inherit (extInfo) sha256 arch;
inherit (extInfo) hash arch;
};
nativeBuildInputs = [

View File

@ -21,7 +21,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
name = "python";
publisher = "ms-python";
version = "2023.1.10091012";
sha256 = "sha256-JosFv6ngJmw1XRILwTZMVxlGIdWFLFQjj4olfnVwAIM=";
hash = "sha256-JosFv6ngJmw1XRILwTZMVxlGIdWFLFQjj4olfnVwAIM=";
};
buildInputs = [ icu ];
@ -72,7 +72,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
tmp=$(mktemp)
curl -sLo $tmp $(echo ${(import ../mktplcExtRefToFetchArgs.nix mktplcRef).url} | sed "s|${mktplcRef.version}|$version|")
hash=$(nix hash file --type sha256 --base32 --sri $tmp)
sed -i -e "s|${mktplcRef.sha256}|$hash|" -e "s|${mktplcRef.version}|$version|" pkgs/applications/editors/vscode/extensions/python/default.nix
sed -i -e "s|${mktplcRef.hash}|$hash|" -e "s|${mktplcRef.version}|$version|" pkgs/applications/editors/vscode/extensions/python/default.nix
fi
'';

View File

@ -5,7 +5,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
name = "jupyter";
publisher = "ms-toolsai";
version = "2024.2.0";
sha256 = "sha256-QavZ8NNeu0FHLvorhHybzfmdQqKnyXD6MYA8AzabPQw=";
hash = "sha256-QavZ8NNeu0FHLvorhHybzfmdQqKnyXD6MYA8AzabPQw=";
};
nativeBuildInputs = [

View File

@ -84,7 +84,7 @@ buildVscodeMarketplaceExtension {
name = "remote-ssh";
publisher = "ms-vscode-remote";
version = "0.78.0";
sha256 = "sha256-vd+9d86Z8429QpQVCZm8gtiJDcMpD++aiFVwvCrPg5w=";
hash = "sha256-vd+9d86Z8429QpQVCZm8gtiJDcMpD++aiFVwvCrPg5w=";
};
postPatch = ''

View File

@ -32,11 +32,11 @@ let
gdbDefaultsTo = if gdbUseFixed then "${gdb}/bin/gdb" else "gdb";
supported = {
x86_64-linux = {
sha256 = "sha256-4mKCBqUCOndKEfsJqTIsfwEt+0CZI8QAhBj3Y4+wKlg=";
hash = "sha256-4mKCBqUCOndKEfsJqTIsfwEt+0CZI8QAhBj3Y4+wKlg=";
arch = "linux-x64";
};
aarch64-linux = {
sha256 = "sha256-Kjl8mEpayA1xMHEAMJ5k3Ctk3l48KlUBU5w3dL4pGWM=";
hash = "sha256-Kjl8mEpayA1xMHEAMJ5k3Ctk3l48KlUBU5w3dL4pGWM=";
arch = "linux-arm64";
};
};

View File

@ -1,54 +1,23 @@
# Based on previous attempts:
# - <https://github.com/msteen/nixos-vsliveshare/blob/master/pkgs/vsliveshare/default.nix>
# - <https://github.com/NixOS/nixpkgs/issues/41189>
{ lib, gccStdenv, vscode-utils
, autoPatchelfHook, bash, makeWrapper
, curl, gcc, libsecret, libunwind, libX11, lttng-ust, util-linux
, desktop-file-utils, xsel
}:
{ lib, vscode-utils, xsel }:
let
# https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually
libs = [
# Credential Storage
libsecret
# NodeJS
libX11
# https://github.com/flathub/com.visualstudio.code.oss/issues/11#issuecomment-392709170
libunwind
lttng-ust
curl
# General
gcc.cc.lib
util-linux # libuuid
];
in ((vscode-utils.override { stdenv = gccStdenv; }).buildVscodeMarketplaceExtension {
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vsliveshare";
publisher = "ms-vsliveshare";
version = "1.0.5900";
sha256 = "sha256-syVW/aS2ppJjg4OZaenzGM3lczt+sLy7prwsYFTDl9s=";
version = "1.0.5918";
hash = "sha256-Tk0mKydUF8M7l7NC9wEA7t2rzJWy/mq4/HvIHI2/ldQ=";
};
}).overrideAttrs({ buildInputs ? [], ... }: {
buildInputs = buildInputs ++ libs;
# Using a patch file won't work, because the file changes too often, causing the patch to fail on most updates.
# Rather than patching the calls to functions, we modify the functions to return what we want,
# which is less likely to break in the future.
postPatch = ''
substituteInPlace extension.js \
--replace "'xsel'" "'${xsel}/bin/xsel'"
--replace-fail '"xsel"' '"${xsel}/bin/xsel"'
'';
meta = {
description = "Live Share lets you achieve greater confidence at speed by streamlining collaborative editing, debugging, and more in real-time during development";
description = "Real-time collaborative development for VS Code";
homepage = "https://aka.ms/vsls-docs";
changelog = "https://marketplace.visualstudio.com/items/MS-vsliveshare.vsliveshare/changelog";
license = lib.licenses.unfree;
maintainers = [ lib.maintainers.jraygauthier lib.maintainers.V ];
platforms = [ "x86_64-linux" ];
maintainers = builtins.attrValues { inherit (lib.maintainers) jraygauthier V; };
};
})
}

View File

@ -26,7 +26,7 @@ let
owner = "rust-lang";
repo = "rust-analyzer";
rev = releaseTag;
sha256 = "sha256-Oj/RPMridKpYt3eRqUIPg9YNrj6npG8THIGuWjsamnE=";
hash = "sha256-Oj/RPMridKpYt3eRqUIPg9YNrj6npG8THIGuWjsamnE=";
};
build-deps = nodePackages."rust-analyzer-build-deps-../../applications/editors/vscode/extensions/rust-lang.rust-analyzer/build-deps";

View File

@ -8,7 +8,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
name = "lua";
publisher = "sumneko";
version = "3.7.3";
sha256 = "sha256-JsZrCeT843QvQkebyOVlO9MI2xbEQI8xX0DrPacfGrM=";
hash = "sha256-JsZrCeT843QvQkebyOVlO9MI2xbEQI8xX0DrPacfGrM=";
};
# Running chmod in runtime will lock up extension

View File

@ -6,7 +6,7 @@ let
repo = "llvm-project";
# codelldb/14.x branch
rev = "4c267c83cbb55fedf2e0b89644dc1db320fdfde7";
sha256 = "sha256-jM//ej6AxnRYj+8BAn4QrxHPT6HiDzK5RqHPSg3dCcw=";
hash = "sha256-jM//ej6AxnRYj+8BAn4QrxHPT6HiDzK5RqHPSg3dCcw=";
};
in (llvmPackages.lldb.overrideAttrs (oldAttrs: rec {
passthru = (oldAttrs.passthru or {}) // {

View File

@ -74,6 +74,7 @@ let
"publisher"
"version"
"sha256"
"hash"
"arch"
];

View File

@ -30,21 +30,21 @@ let
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
sha256 = {
x86_64-linux = "11brsgksn3bl3px0hwa83vr22gb2k19pn8hcn7xwn6zzcgf7rsf2";
x86_64-darwin = "1ai7jmiq37zpicc5p387nvbx5122fp7c3qh2k596jq7l7k0iyfzd";
aarch64-linux = "0psjz56h8asgdh0m6insfysw1f6d00hifvb0rfsi8qv0wca72wb4";
aarch64-darwin = "0jskk6dvjg290mvw8hcs4hrhy7m3ridsj5w9lxs6kn74fdvg1byb";
armv7l-linux = "0rz26xw312s0larjvkrf8np9c0yccppadiqmj69j47vavg78274c";
x86_64-linux = "0kr83pbjbyrpkhhpr432nr0kcjnvra5vwq2zhpdv1p2g1981dbxf";
x86_64-darwin = "0vlbd4y649r5v61322vm6fvdf3mrn2shw1vjh1q8wcbf2j84rgcl";
aarch64-linux = "0bp3a928sqlr103884ljyahl3s4jchyvpcvk08a648wmb1f8ibxi";
aarch64-darwin = "1dyg4f7hpvx1bpspghfpyqaj83xy47462zjql49zrdar17cq738r";
armv7l-linux = "16ri5icgvzf3zfg170dciqyz46dcwlsx6vy4r2y4w1j2hbb7afzn";
}.${system} or throwSystem;
in
callPackage ./generic.nix rec {
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.87.2";
version = "1.88.0";
pname = "vscode" + lib.optionalString isInsiders "-insiders";
# This is used for VS Code - Remote SSH test
rev = "863d2581ecda6849923a2118d93a088b0745d9d6";
rev = "5c3e652f63e798a5ac2f31ffd0d863669328dc4c";
executableName = "code" + lib.optionalString isInsiders "-insiders";
longName = "Visual Studio Code" + lib.optionalString isInsiders " - Insiders";
@ -68,7 +68,7 @@ in
src = fetchurl {
name = "vscode-server-${rev}.tar.gz";
url = "https://update.code.visualstudio.com/commit:${rev}/server-linux-x64/stable";
sha256 = "1hdny44f93qzpm9vgx14wk1myrnsv5qcj25rqcy2jb5kspnq6813";
sha256 = "0vy3r9xx1gv92pkyff5wddywfwgr2i12d3qrydw53kdjhdykamsk";
};
};

View File

@ -287,10 +287,10 @@
"src": {
"owner": "libretro",
"repo": "fbneo",
"rev": "fa70abd34f49d8c461165b65a4ad436a4245eb51",
"hash": "sha256-BaV+BY7jTw/6M4XmAAVSRQ9viftyaPZmG17TFgSFqOg="
"rev": "537b5b8dcc358370f2349109004233fbeab46cfe",
"hash": "sha256-zBOF1RV2dx5zraREZm/W//8DwrRMDc/j8sx+CwTyKz0="
},
"version": "unstable-2024-03-27"
"version": "unstable-2024-04-02"
},
"fceumm": {
"fetcher": "fetchFromGitHub",
@ -307,11 +307,11 @@
"src": {
"owner": "flyinghead",
"repo": "flycast",
"rev": "c9fafa0ed176d1ffabae5c1a7a363d0ee276a972",
"hash": "sha256-ruqgen9X3CEY+PRZFVGNPhEDUUvH486paWphQfGCHew=",
"rev": "a0c81d2f2a393bd34caf6f15c1231ba4e2175405",
"hash": "sha256-hajTfovkSH7l6AayQyiHI7E4I/82pBhQnDSxo0BcYu0=",
"fetchSubmodules": true
},
"version": "unstable-2024-03-26"
"version": "unstable-2024-04-03"
},
"fmsx": {
"fetcher": "fetchFromGitHub",
@ -408,10 +408,10 @@
"src": {
"owner": "libretro",
"repo": "mame",
"rev": "6d6d21fd9e41dab2b0e0ca0587baf3fcad18fd67",
"hash": "sha256-8pPDIxnEeeTQl160E+sg/wmchOR53pQmbhvEAXRFif0="
"rev": "ac9d0347f5d331eb49017cd599a5e63a668b4f22",
"hash": "sha256-P5Hunw1o0C29/YsOu7tmR/oY2sbL2qTmY6RoJ56bTzI="
},
"version": "unstable-2024-02-29"
"version": "unstable-2024-04-01"
},
"mame2000": {
"fetcher": "fetchFromGitHub",
@ -438,10 +438,10 @@
"src": {
"owner": "libretro",
"repo": "mame2003-plus-libretro",
"rev": "ee777f235b99d652890dedbc94337094968869d4",
"hash": "sha256-nfoZRymtbAsXWvb8MKFHUwQr0xRk9kLRtgPC2G2iAVE="
"rev": "f03f865af9d496965ab15b9a213691319daad9d2",
"hash": "sha256-yHVkEJYSXHeUGNFJ/zbAwNi+I4gka8Id7z+LnDkCCSM="
},
"version": "unstable-2024-03-22"
"version": "unstable-2024-04-03"
},
"mame2010": {
"fetcher": "fetchFromGitHub",
@ -559,10 +559,10 @@
"src": {
"owner": "libretro",
"repo": "nestopia",
"rev": "2cef539e0df9ae5c8e6adf830a37f5d122bf5f05",
"hash": "sha256-OKqD99kqpIoqRUOByQ4qwAczYlIGeAn0xfTZVC5jptc="
"rev": "efe3a052c75ad47d6e98eeffd1f3d2d4893279c2",
"hash": "sha256-sSXU+rUBJcE2gQRTqnZV8NSuBz/zWNxlZHQqoAUoigU="
},
"version": "unstable-2024-02-18"
"version": "unstable-2024-03-29"
},
"np2kai": {
"fetcher": "fetchFromGitHub",
@ -630,10 +630,10 @@
"src": {
"owner": "libretro",
"repo": "pcsx_rearmed",
"rev": "e2fb1389dc12376acb84e4993ed3b08760257252",
"hash": "sha256-h/Bjgyfp+8gx3VoxteJyXxI/z4ghyw/xdmwAGXidEkc="
"rev": "2fb8465594a7ffb7ccbac39fdedf7c70085d7f63",
"hash": "sha256-RQU2EDcBRa6aH40JrEJ3eppjflk5++AWlOH+iGJyjFY="
},
"version": "unstable-2024-03-25"
"version": "unstable-2024-03-29"
},
"picodrive": {
"fetcher": "fetchFromGitHub",
@ -651,22 +651,22 @@
"src": {
"owner": "jpd002",
"repo": "Play-",
"rev": "08db12cefaad02eaa5265283e3ad0b51eeb8a633",
"hash": "sha256-1wO/iBnyGnBx+vIlnqaihAVrth3shCvogEX9TC59GaY=",
"rev": "8445595b734301f22c6fdd57536867fea3786b58",
"hash": "sha256-3e9+PkSGZbjZ2LVY0cWRIK+TbdJ4hn8FxBjWqhsQB4o=",
"fetchSubmodules": true
},
"version": "unstable-2024-03-26"
"version": "unstable-2024-04-02"
},
"ppsspp": {
"fetcher": "fetchFromGitHub",
"src": {
"owner": "hrydgard",
"repo": "ppsspp",
"rev": "768174e19ca80bccadc067bd2c7adc0d35fb4602",
"hash": "sha256-V66SGvOAcw5lMOBID+qnsjuvKQkt1afl8wdiscKN3Us=",
"rev": "5bead8d999717ed13f7808d3e6b88a237806899e",
"hash": "sha256-bGNlzpC3xPX5xyFyMfXbeR4q3Q9bGN/oRwFTLcgzfJM=",
"fetchSubmodules": true
},
"version": "unstable-2024-03-27"
"version": "unstable-2024-04-04"
},
"prboom": {
"fetcher": "fetchFromGitHub",
@ -793,10 +793,10 @@
"src": {
"owner": "stella-emu",
"repo": "stella",
"rev": "8e8549c1c441e62c2bac0ae5a6489ba3e15412c6",
"hash": "sha256-gcIBtLpfmjPHxnixMOF/onNyIclC8sDrmgTi3zHW0Mc="
"rev": "09be43c5060b7f23eeb413aa3d7a7021e9a6566c",
"hash": "sha256-jxvX9YAgUVe/92AbwXwgOqJmfoH7t8QxnrrGoXzjFZs="
},
"version": "unstable-2024-03-08"
"version": "unstable-2024-04-04"
},
"stella2014": {
"fetcher": "fetchFromGitHub",

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,7 @@
, wayland
, xorg
, vulkan-loader
, udev
, jre_minimal
, cairo
, gtk3
@ -20,13 +21,13 @@
rustPlatform.buildRustPackage rec {
pname = "ruffle";
version = "nightly-2024-02-09";
version = "nightly-2024-03-25";
src = fetchFromGitHub {
owner = "ruffle-rs";
repo = pname;
rev = version;
hash = "sha256-C4wfR5io0FBFmNfYHlE/v81jQAb0SEoaCzI6tenRYGg=";
hash = "sha256-3G5xSGdMl4ISQmb2BVGdKz1cXU5Mnl+VkVYpJ6P12og=";
};
nativeBuildInputs = [
@ -52,6 +53,7 @@ rustPlatform.buildRustPackage rec {
xorg.libxcb
xorg.libXrender
vulkan-loader
udev
];
dontWrapGApps = true;
@ -59,7 +61,8 @@ rustPlatform.buildRustPackage rec {
preFixup = ''
patchelf $out/bin/ruffle_desktop \
--add-needed libxkbcommon-x11.so \
--add-rpath ${libxkbcommon}/lib
--add-needed libwayland-client.so \
--add-rpath ${libxkbcommon}/lib:${wayland}/lib
'';
postFixup = ''
@ -83,10 +86,10 @@ rustPlatform.buildRustPackage rec {
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"flash-lso-0.6.0" = "sha256-SHWIOVp3MGIATKDKAGNWG3B3jX3a0jDE2c8bt7NptrE=";
"h263-rs-0.1.0" = "sha256-Akf1SBjo8qikhiHI8NPvO3vJvVfm0dQBf2X9V7OdgQc=";
"jpegxr-0.3.0" = "sha256-jirUbse2MiUDCmwBO7ykWNKHgDgL/6ZM5o2HeDUhm0c=";
"nellymoser-rs-0.1.2" = "sha256-GykDQc1XwySOqfxW/OcSxkKCFJyVmwSLy/CEBcwcZJs=";
"flash-lso-0.6.0" = "sha256-sVe53VRtBEEI6eERWRv6aG6BBT31sSLvJ6CSCcif2Lo=";
"h263-rs-0.1.0" = "sha256-EBYZ00axaILGc2CtJoPQpewlf6+jlmml+cXZFyoxhHQ=";
"jpegxr-0.3.1" = "sha256-YbQMi86DXqdi7o0s5ajAv7/vFaxNpShz19cNa9MpOsA=";
"nellymoser-rs-0.1.2" = "sha256-66yt+CKaw/QFIPeNkZA2mb9ke64rKcAw/6k/pjNYY04=";
"nihav_codec_support-0.1.0" = "sha256-HAJS4I6yyzQzCf+vmaFp1MWXpcUgFAHPxLhfMVXmN1c=";
};
};

View File

@ -13,7 +13,7 @@ let
hash = "sha256-Ihk3InHB3/tEYRqH2ozhokz2GN8Gfig5DJkO/8P1LJs=";
};
};
src = srcs.${stdenv.hostPlatform.system};
src = srcs.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
meta = with lib; {
description = "User-friendly Desktop Internet GIS";

View File

@ -8,16 +8,16 @@
rustPlatform.buildRustPackage rec {
pname = "artem";
version = "2.0.6";
version = "3.0.0";
src = fetchFromGitHub {
owner = "finefindus";
repo = "artem";
rev = "v${version}";
hash = "sha256-iio0MJG0qVndhQvF2zgZ6Jw0za6bBQYFmtk1Mbxpq1E=";
hash = "sha256-C3Co+hXstVN/WADIpzqr7f3muAgQL0Zbnz6VI1XNo4U=";
};
cargoHash = "sha256-47HNoAA1qr39qQqfq+qZoCFyjKHu5pnRKC2QzA60K3k=";
cargoHash = "sha256-QyFUxnq4BSULgpZxCu5+7TWfu6Gey0JFkOYSK+rL7l0=";
nativeBuildInputs = [
installShellFiles

View File

@ -6,7 +6,7 @@
stdenv.mkDerivation rec {
pname = "lightburn";
version = "1.5.05";
version = "1.5.06";
nativeBuildInputs = [
p7zip
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://github.com/LightBurnSoftware/deployment/releases/download/${version}/LightBurn-Linux64-v${version}.7z";
sha256 = "sha256-rvskm0Br+3HqPo2DW/ZUIl8n3+UJKPlmkEtQofw05x4=";
sha256 = "sha256-VJMfvZHqdgUQXLyBBZLEV3nyP0qzibuXLnZyBhBBg9E=";
};
buildInputs = [

View File

@ -26,11 +26,11 @@
stdenv.mkDerivation rec {
pname = "photoqt";
version = "4.3";
version = "4.4";
src = fetchurl {
url = "https://photoqt.org/pkgs/photoqt-${version}.tar.gz";
hash = "sha256-B0ZubvWIEZFnD2v74bpPv+/wr7vaHS9QP4//9/afjzQ=";
hash = "sha256-dCaNF5UoH6SkKBrZGtwg2qZcDtlptdBxEGZL2oKyjhI=";
};
nativeBuildInputs = [

View File

@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
url = "https://download.brother.com/welcome/dlf006645/${pname}-${version}.amd64.deb";
sha256 = "sha256-Gpr5456MCNpyam3g2qPo7S3aEZFMaUGR8bu7YmRY8xk=";
};
}."${stdenv.hostPlatform.system}";
}."${stdenv.hostPlatform.system}" or (throw "unsupported system ${stdenv.hostPlatform.system}");
unpackPhase = ''
ar x $src

View File

@ -51,7 +51,7 @@ let
};
src = fetchurl {
inherit (sources.${channel}.${stdenv.system}) url hash;
inherit (sources.${channel}.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}")) url hash;
};
meta = with lib; {

View File

@ -38,7 +38,7 @@
, pcre
, qhull
, systemd
, tbb_2021_8
, tbb_2021_11
, webkitgtk
, wxGTK31
, xorg
@ -53,7 +53,7 @@ let
];
});
openvdb_tbb_2021_8 = openvdb.overrideAttrs (old: rec {
buildInputs = [ openexr boost179 tbb_2021_8 jemalloc c-blosc ilmbase ];
buildInputs = [ openexr boost179 tbb_2021_11 jemalloc c-blosc ilmbase ];
});
in
stdenv.mkDerivation rec {
@ -102,7 +102,7 @@ stdenv.mkDerivation rec {
opencascade-occt
openvdb_tbb_2021_8
pcre
tbb_2021_8
tbb_2021_11
webkitgtk
wxGTK31'
xorg.libX11

View File

@ -9,11 +9,11 @@
stdenvNoCC.mkDerivation rec {
pname = "camunda-modeler";
version = "5.20.0";
version = "5.21.0";
src = fetchurl {
url = "https://github.com/camunda/camunda-modeler/releases/download/v${version}/camunda-modeler-${version}-linux-x64.tar.gz";
hash = "sha256-W8//7sU/ewA99ea3lDPi+IbdAdswt9rukdjoQWj2H9Q=";
hash = "sha256-brZRYvRrOHj/HUb+w5tPkxHnJzVyFBKshk2ZO7YMzsU=";
};
sourceRoot = "camunda-modeler-${version}-linux-x64";

View File

@ -1,13 +1,16 @@
{ lib
, fetchFromGitHub
, git
, python3
{
lib,
fetchFromGitHub,
git,
python3,
}:
python3.pkgs.buildPythonApplication rec {
let
python = python3.override { packageOverrides = self: super: { pydantic = super.pydantic_1; }; };
in
python.pkgs.buildPythonApplication rec {
pname = "dbx";
version = "0.8.18";
format = "setuptools";
pyproject = true;
src = fetchFromGitHub {
owner = "databrickslabs";
@ -17,67 +20,64 @@ python3.pkgs.buildPythonApplication rec {
};
pythonRelaxDeps = [
"cryptography"
"databricks-cli"
"rich"
"typer"
];
pythonRemoveDeps = [
"mlflow-skinny"
];
pythonRemoveDeps = [ "mlflow-skinny" ];
nativeBuildInputs = with python3.pkgs; [
pythonRelaxDepsHook
];
build-system = with python.pkgs; [ setuptools ];
propagatedBuildInputs = with python3.pkgs; [
aiohttp
click
cookiecutter
cryptography
databricks-cli
jinja2
mlflow
pathspec
pydantic
pyyaml
requests
retry
rich
tenacity
typer
watchdog
] ++ typer.optional-dependencies.all;
nativeBuildInputs = with python.pkgs; [ pythonRelaxDepsHook ];
propagatedBuildInputs =
with python.pkgs;
[
aiohttp
click
cookiecutter
cryptography
databricks-cli
jinja2
mlflow
pathspec
pydantic
pyyaml
requests
retry
rich
tenacity
typer
watchdog
]
++ typer.optional-dependencies.all;
passthru.optional-dependencies = with python3.pkgs; {
aws = [
boto3
];
aws = [ boto3 ];
azure = [
azure-storage-blob
azure-identity
];
gcp = [
google-cloud-storage
];
gcp = [ google-cloud-storage ];
};
nativeCheckInputs = [
git
] ++ (with python3.pkgs; [
pytest-asyncio
pytest-mock
pytest-timeout
pytestCheckHook
]);
nativeCheckInputs =
[ git ]
++ (with python3.pkgs; [
pytest-asyncio
pytest-mock
pytest-timeout
pytestCheckHook
]);
preCheck = ''
export HOME=$(mktemp -d)
export PATH="$PATH:$out/bin"
'';
pytestFlagsArray = [
"tests/unit"
];
pytestFlagsArray = [ "tests/unit" ];
disabledTests = [
# Fails because of dbfs CLI wrong call
@ -87,10 +87,27 @@ python3.pkgs.buildPythonApplication rec {
"test_python_basic_sanity_check"
];
pythonImportsCheck = [
"dbx"
disabledTestPaths = [
"tests/unit/api/"
"tests/unit/api/test_build.py"
"tests/unit/api/test_destroyer.py"
"tests/unit/api/test_jinja.py"
"tests/unit/commands/test_configure.py"
"tests/unit/commands/test_deploy_jinja_variables_file.py"
"tests/unit/commands/test_deploy.py"
"tests/unit/commands/test_destroy.py"
"tests/unit/commands/test_execute.py"
"tests/unit/commands/test_help.py"
"tests/unit/commands/test_launch.py"
"tests/unit/models/test_deployment.py"
"tests/unit/models/test_destroyer.py"
"tests/unit/models/test_task.py"
"tests/unit/sync/test_commands.py"
"tests/unit/utils/test_common.py"
];
pythonImportsCheck = [ "dbx" ];
meta = with lib; {
description = "CLI tool for advanced Databricks jobs management";
homepage = "https://github.com/databrickslabs/dbx";

View File

@ -1,4 +1,7 @@
{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, zlib, patches ? null }:
{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, zlib, patches ? null
# update script dependencies
, gitUpdater
}:
stdenv.mkDerivation rec {
pname = "dmenu";
@ -24,11 +27,15 @@ stdenv.mkDerivation rec {
makeFlags = [ "CC:=$(CC)" ];
passthru.updateScript = gitUpdater {
url = "git://git.suckless.org/dmenu";
};
meta = with lib; {
description = "A generic, highly customizable, and efficient menu for the X Window System";
homepage = "https://tools.suckless.org/dmenu";
license = licenses.mit;
maintainers = with maintainers; [ pSub globin ];
maintainers = with maintainers; [ pSub globin qusic ];
platforms = platforms.all;
mainProgram = "dmenu";
};

View File

@ -19,6 +19,7 @@ in appimageTools.wrapType2 {
description = "A cross platform app for quick and easy still image camera matching";
license = licenses.gpl3;
homepage = "https://fspy.io/";
knownVulnerabilities = [ "Vendors Electron 2.0 (end-of-life)" ];
maintainers = with maintainers; [ polygon ];
platforms = platforms.linux;
mainProgram = "fspy";

View File

@ -27,6 +27,7 @@
, LocalAuthentication
, withKeePassBrowser ? true
, withKeePassBrowserPasskeys ? true
, withKeePassFDOSecrets ? true
, withKeePassKeeShare ? true
, withKeePassNetworking ? true
@ -70,6 +71,7 @@ stdenv.mkDerivation rec {
++ (lib.optional (withKeePassFDOSecrets && stdenv.isLinux) "-DWITH_XC_FDOSECRETS=ON")
++ (lib.optional (withKeePassYubiKey && stdenv.isLinux) "-DWITH_XC_YUBIKEY=ON")
++ (lib.optional withKeePassBrowser "-DWITH_XC_BROWSER=ON")
++ (lib.optional withKeePassBrowserPasskeys "-DWITH_XC_BROWSER_PASSKEYS=ON")
++ (lib.optional withKeePassKeeShare "-DWITH_XC_KEESHARE=ON")
++ (lib.optional withKeePassNetworking "-DWITH_XC_NETWORKING=ON")
++ (lib.optional withKeePassSSHAgent "-DWITH_XC_SSHAGENT=ON");

View File

@ -27,7 +27,7 @@
, openvdb
, pcre
, qhull
, tbb_2021_8
, tbb_2021_11
, wxGTK32
, xorg
, libbgcode
@ -61,7 +61,7 @@ let
hash = "sha256-WNdAYu66ggpSYJ8Kt57yEA4mSTv+Rvzj9Rm1q765HpY=";
};
});
openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021_8; };
openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021_11; };
wxGTK-override' = if wxGTK-override == null then wxGTK-prusa else wxGTK-override;
in
stdenv.mkDerivation (finalAttrs: {
@ -104,7 +104,7 @@ stdenv.mkDerivation (finalAttrs: {
openvdb_tbb_2021_8
pcre
qhull
tbb_2021_8
tbb_2021_11
wxGTK-override'
xorg.libX11
libbgcode

View File

@ -1,30 +1,22 @@
{ lib, mkDerivation, fetchFromGitHub, fetchpatch, qmake, pkg-config, udev
, qtmultimedia, qtscript, alsa-lib, ola, libftdi1, libusb-compat-0_1
, qtmultimedia, qtscript, qtserialport, alsa-lib, ola, libftdi1, libusb-compat-0_1
, libsndfile, libmad
}:
mkDerivation rec {
pname = "qlcplus";
version = "4.12.3";
version = "4.13.0";
src = fetchFromGitHub {
owner = "mcallegari";
repo = "qlcplus";
rev = "QLC+_${version}";
sha256 = "PB1Y8N1TrJMcS7A2e1nKjsUlAxOYjdJqBhbyuDCAbGs=";
sha256 = "11av9hg6l0pb1lmlw35v1v2q9mmqz65yfaq01454y5qlmsbxpgkp";
};
patches = [
(fetchpatch {
name = "qt5.15-deprecation-fixes.patch";
url = "https://github.com/mcallegari/qlcplus/commit/e4ce4b0226715876e8e9e3b23785d43689b2bb64.patch";
sha256 = "1zhrg6ava1nyc97xcx75r02zzkxmar0973w4jwkm5ch3iqa8bqnh";
})
];
nativeBuildInputs = [ qmake pkg-config ];
buildInputs = [
udev qtmultimedia qtscript alsa-lib ola libftdi1 libusb-compat-0_1 libsndfile libmad
udev qtmultimedia qtscript qtserialport alsa-lib ola libftdi1 libusb-compat-0_1 libsndfile libmad
];
qmakeFlags = [ "INSTALLROOT=$(out)" ];

View File

@ -6,11 +6,11 @@ stdenv.mkDerivation (finalAttrs: let
in
{
pname = "remnote";
version = "1.14.13";
version = "1.15.4";
src = fetchurl {
url = "https://download.remnote.io/remnote-desktop/RemNote-${version}.AppImage";
hash = "sha256-WpNgdQGNz1Vv3MQe6tgnkzf+rvxMeoDQns5SqKNP7F8=";
hash = "sha256-6WBdTOj/seinx1wJGb/4if3PzCPmtzHyNAFmQwmsrvE=";
};
appexec = appimageTools.wrapType2 {

View File

@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Simple emoji selector for Wayland using wofi and wl-clipboard";
homepage = "https://github.com/dln/wofi-emoji";
homepage = "https://github.com/Zeioth/wofi-emoji";
license = licenses.mit;
maintainers = [ maintainers.ymarkus ];
platforms = platforms.all;

View File

@ -33,6 +33,7 @@
, libuuid
, systemd
, wayland
, libGL
# command line arguments which are always set e.g "--disable-gpu"
, commandLineArgs ? ""
@ -93,7 +94,7 @@ stdenv.mkDerivation rec {
glib nss nspr
];
libGLESv2 = lib.makeLibraryPath [
xorg.libX11 xorg.libXext xorg.libxcb wayland
xorg.libX11 xorg.libXext xorg.libxcb wayland libGL
];
liboneauth = lib.makeLibraryPath [
libuuid xorg.libX11

View File

@ -24,7 +24,7 @@ let
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
in stdenv.mkDerivation rec {
pname = "vivaldi";
version = "6.6.3271.53";
version = "6.6.3271.55";
suffix = {
aarch64-linux = "arm64";
@ -34,8 +34,8 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}-1_${suffix}.deb";
hash = {
aarch64-linux = "sha256-iB8BPA7A2S9fsg5n6QDt6iKFnS1lQ6Xp2yO9VBGndq8=";
x86_64-linux = "sha256-2HS8SxaKu0NF++J8PhGJWEbA9FU1a+g/t9+HIKjvt58=";
aarch64-linux = "sha256-IqCmDqcZDLT1abx67gAsGHR8DVVIAGZ/sifZi8bxUNc=";
x86_64-linux = "sha256-n0CHm1Dtd2QhGNhI/9WzQ6CeCyMAHkBpOMC2w3ylk2g=";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};

View File

@ -2,16 +2,16 @@
builtins.mapAttrs (pname: { doCheck ? true, mainProgram ? pname, subPackages }: buildGoModule rec {
inherit pname;
version = "3.27.2";
version = "3.27.3";
src = fetchFromGitHub {
owner = "projectcalico";
repo = "calico";
rev = "v${version}";
hash = "sha256-iVRK/5vjPnfJMULaufaOu8u09utSt3u85R4cIBl+yUI=";
hash = "sha256-WZcQfZ5ocuimI5gtr5I5LjKxukK07au6iP9N2+vwN1M=";
};
vendorHash = "sha256-h4qTtMG4Xi6YqLMMsXZRWVVdQ3U3VrFG6bV7YDwT5Zk=";
vendorHash = "sha256-ptMec5gL6WTCG/2aHesU8fJwMzMnfuvEn9S68M5y4Eo=";
inherit doCheck subPackages;

View File

@ -35,7 +35,7 @@ let
src = fetchurl {
url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}"
+ optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz";
inherit (platformAttrs.${stdenv.system}) hash;
inherit (platformAttrs.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}")) hash;
};
doCheck = true;

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "popeye";
version = "0.21.2";
version = "0.21.3";
src = fetchFromGitHub {
rev = "v${version}";
owner = "derailed";
repo = "popeye";
sha256 = "sha256-NhQER6XeicpQY0rYisGvkUCHYsURJqt6xVKc9F0CmtE=";
sha256 = "sha256-2+AV2gt67zLa7bRIfsxQIeB82iJba8Y4P0fq9273r7Q=";
};
ldflags = [

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "rke";
version = "1.5.6";
version = "1.5.7";
src = fetchFromGitHub {
owner = "rancher";
repo = pname;
rev = "v${version}";
hash = "sha256-yw7GacSvPKXStmYtG4oQQlIca5Svk4pHDliMDVhyPRI=";
hash = "sha256-4fan6+ka0CH8wa/+7ouTuOuTfWPQE5EqsjAfj3zdrA0=";
};
vendorHash = "sha256-0H9K3/BwdSExADFHaYtn2RrHZ6AyEjzlBKYXL/Ow9JA=";
vendorHash = "sha256-/HsZAMPGCaM5Em6doC8qffoSEveX/yDNwAGog3I0+c4=";
subPackages = [ "." ];

View File

@ -66,7 +66,7 @@ python3.pkgs.buildPythonApplication {
checkInputs = with python3.pkgs; [
pytest-aiohttp
pytest-rerunfailures
pytestCheckHook
(pytestCheckHook.override { pytest = pytest_7; })
];
pytestFlagsArray = [

View File

@ -8,18 +8,19 @@
, qtwebengine
, qtwayland
, pipewire
, kdePackages
, nix-update-script
}:
stdenv.mkDerivation rec {
pname = "discord-screenaudio";
version = "1.9.2";
version = "1.10.1";
src = fetchFromGitHub {
owner = "maltejur";
repo = "discord-screenaudio";
rev = "v${version}";
hash = "sha256-it7JSmiDz3k1j+qEZrrNhyAuoixiQuiEbXac7lbJmko=";
hash = "sha256-+F+XRBQn4AVDVARdM2XtBDE7c6tMPZTR3cntDL8aenw=";
fetchSubmodules = true;
};
@ -34,6 +35,9 @@ stdenv.mkDerivation rec {
qtwebengine
qtwayland
pipewire
kdePackages.knotifications
kdePackages.kxmlgui
kdePackages.kglobalaccel
];
preConfigure = ''

View File

@ -2,22 +2,22 @@
let
versions =
if stdenv.isLinux then {
stable = "0.0.46";
stable = "0.0.47";
ptb = "0.0.76";
canary = "0.0.323";
canary = "0.0.326";
development = "0.0.16";
} else {
stable = "0.0.296";
ptb = "0.0.102";
canary = "0.0.435";
development = "0.0.31";
stable = "0.0.298";
ptb = "0.0.105";
canary = "0.0.451";
development = "0.0.39";
};
version = versions.${branch};
srcs = rec {
x86_64-linux = {
stable = fetchurl {
url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
hash = "sha256-uGHDZg4vu7rUJce6SSVbuLRBPEHXgN4oocAQY+Dqdaw=";
hash = "sha256-4cELs7K7DAfzbA0/BwAkKraTD7z58jzOf1J3Our3CwM=";
};
ptb = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
@ -25,7 +25,7 @@ let
};
canary = fetchurl {
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
hash = "sha256-jhfg66zd5oADT84RDdoBXp8n9xGd1jNaX8hDRnJKFK0=";
hash = "sha256-MxiFhd7tLvL1tBRc451qjCFZlmGM8IolckExp0sR3y8=";
};
development = fetchurl {
url = "https://dl-development.discordapp.net/apps/linux/${version}/discord-development-${version}.tar.gz";
@ -35,24 +35,24 @@ let
x86_64-darwin = {
stable = fetchurl {
url = "https://dl.discordapp.net/apps/osx/${version}/Discord.dmg";
hash = "sha256-0bSyL/J2P1pVzv9pFTNSR3V2NkQcDTd74t8KT+WVd64=";
hash = "sha256-GlTebQ16sRgHdpB9+Jw7dn+KVZ6qIrAmWBSypTcoFmE=";
};
ptb = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/osx/${version}/DiscordPTB.dmg";
hash = "sha256-33x6M++EsRJXTbsC4BCa21Yz7cbAhsosPO1WqYq/lCY=";
hash = "sha256-X5bYO1D5eWTYh22v4R274OhjTsVv70XCyrMqeRlt0Bo=";
};
canary = fetchurl {
url = "https://dl-canary.discordapp.net/apps/osx/${version}/DiscordCanary.dmg";
hash = "sha256-Jreet8EstaTAYAmQrzRaJE/b+xwgRVXIW8elEY7amvw=";
hash = "sha256-psVm0eXDHVBGNb/R0kHbvz/4ilyIg4xlOj/CwkwlvgM=";
};
development = fetchurl {
url = "https://dl-development.discordapp.net/apps/osx/${version}/DiscordDevelopment.dmg";
hash = "sha256-He/9KH1oMyj9ofYSwHhdqm7jKDsvrGpPPjLED9fSq30=";
hash = "sha256-nZV9LK3eGpXK/2wQKJBn3K2Ud6uBk8aammkeE00rWx0=";
};
};
aarch64-darwin = x86_64-darwin;
};
src = srcs.${stdenv.hostPlatform.system}.${branch};
src = srcs.${stdenv.hostPlatform.system}.${branch} or (throw "${stdenv.hostPlatform.system} not supported on ${branch}");
meta = with lib; {
description = "All-in-one cross-platform voice and text chat for gamers";

View File

@ -11,13 +11,13 @@
buildGoModule rec {
pname = "trayscale";
version = "0.11.0";
version = "0.11.1";
src = fetchFromGitHub {
owner = "DeedleFake";
repo = "trayscale";
rev = "v${version}";
hash = "sha256-qSrt94hEJosdvs2N6rbcJLpjqvMPkY20dIKV3jtjFlg=";
hash = "sha256-SepVgSxM4+csX7S0LPl6HmGDcgS991sgWJrOAA2YjIc=";
};
vendorHash = "sha256-eIakjEYfVp2wfXu0oqBmd5hJZTp0xgYKNNbtpRBnT2w=";
@ -46,10 +46,11 @@ buildGoModule rec {
'';
meta = with lib; {
changelog = "https://github.com/DeedleFake/trayscale/releases/tag/${version}";
description = "An unofficial GUI wrapper around the Tailscale CLI client";
homepage = "https://github.com/DeedleFake/trayscale";
license = licenses.mit;
maintainers = with maintainers; [ k900 ];
maintainers = with maintainers; [ patka ];
mainProgram = "trayscale";
};
}

View File

@ -1,36 +1,44 @@
{ lib, fetchFromGitHub, buildPythonApplication, aiohttp, python-dateutil, humanize, click, pytestCheckHook, tox }:
{
lib,
fetchFromGitHub,
python3,
}:
buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "twtxt";
version = "1.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "buckket";
repo = pname;
repo = "twtxt";
rev = "refs/tags/v${version}";
sha256 = "sha256-CbFh1o2Ijinfb8X+h1GP3Tp+8D0D3/Czt/Uatd1B4cw=";
};
# Relax some dependencies
postPatch = ''
substituteInPlace setup.py \
--replace 'aiohttp>=2.2.5,<3' 'aiohttp' \
--replace 'click>=6.7,<7' 'click' \
--replace 'humanize>=0.5.1,<1' 'humanize'
'';
build-system = with python3.pkgs; [ setuptools ];
propagatedBuildInputs = [ aiohttp python-dateutil humanize click ];
dependencies = with python3.pkgs; [
aiohttp
click
humanize
python-dateutil
setuptools
];
nativeCheckInputs = [ pytestCheckHook tox ];
nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ];
pythonImportsCheck = [ "twtxt" ];
disabledTests = [
# Disable test using relative date and time
"test_tweet_relative_datetime"
# Disable test using relative date and time
"test_tweet_relative_datetime"
];
meta = with lib; {
description = "Decentralised, minimalist microblogging service for hackers";
homepage = "https://github.com/buckket/twtxt";
changelog = "https://github.com/buckket/twtxt/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ siraben ];
mainProgram = "twtxt";

View File

@ -28,12 +28,12 @@
stdenv.mkDerivation rec {
pname = "gnucash";
version = "5.5";
version = "5.6";
# raw source code doesn't work out of box; fetchFromGitHub not usable
src = fetchurl {
url = "https://github.com/Gnucash/gnucash/releases/download/${version}/gnucash-${version}.tar.bz2";
hash = "sha256-tNr2e7iStwYyP2Lp+pckIDnX3QouHhB3HgwlgX3Q7Ts=";
hash = "sha256-tLQsYmNQ8+effKHyFzVFzGPd7hrd8kYLGh8iIhvyG9E=";
};
nativeBuildInputs = [
@ -99,7 +99,7 @@ stdenv.mkDerivation rec {
owner = "Gnucash";
repo = "gnucash-docs";
rev = version;
hash = "sha256-ilDh4PH+tdrJReIpgvEd0Gvs8Xvt5Q43XM5r7Bn+5IM=";
hash = "sha256-rQZoau466Bi/YpPj1XpSsm67FgTYhiMfZfogTtn+m1k=";
};
nativeBuildInputs = [ cmake ];

View File

@ -204,7 +204,7 @@ stdenv.mkDerivation rec {
Just the build products, the libraries are passed via an env var in the wrapper, default.nix
'';
homepage = "https://www.kicad.org/";
license = lib.licenses.agpl3Plus;
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all;
};
}

View File

@ -49,7 +49,7 @@ let
# If we don't have a platform available, put a dummy version here, so at
# least evaluation succeeds.
sources =
(lib.importJSON ./sources.json).${stdenv.system} or { picoscope.version = "unknown"; };
(lib.importJSON ./sources.json).${stdenv.system} or (throw "unsupported system ${stdenv.system}");
scopePkg = name:
{ url, version, sha256 }:

View File

@ -1,70 +1,72 @@
{ stdenv
, fetchFromGitHub
, fetchpatch
, lib
, python3
, cmake
, lingeling
, meson
, ninja
, git
, btor2tools
, symfpu
, gtest
, gmp
, cadical
, minisat
, picosat
, cryptominisat
, zlib
, pkg-config
# "*** internal error in 'lglib.c': watcher stack overflow" on aarch64-linux
, withLingeling ? !stdenv.hostPlatform.isAarch64
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "bitwuzla";
version = "unstable-2022-10-03";
version = "0.4.0";
src = fetchFromGitHub {
owner = "bitwuzla";
repo = "bitwuzla";
rev = "3bc0f9f1aca04afabe1aff53dd0937924618b2ad";
hash = "sha256-UXZERl7Nedwex/oUrcf6/GkDSgOQ537WDYm117RfvWo=";
rev = finalAttrs.version;
hash = "sha256-ZEdV4ml1LwrYwscgOcL2gLx/ijPYqRktXMQH/Njh8OI=";
};
nativeBuildInputs = [ cmake pkg-config ];
patches = [
# fix parser on aarch64
# remove on next release
(fetchpatch {
url = "https://github.com/bitwuzla/bitwuzla/commit/4d914aa5ec34076c37749f0cf6dce976ea510386.patch";
hash = "sha256-gp+HEamOySjPXCC39tt5DIMdQqEew26a+M15sNdCmTM=";
})
];
strictDeps = true;
nativeBuildInputs = [ meson pkg-config git ninja ];
buildInputs = [
cadical
cryptominisat
picosat
minisat
btor2tools
symfpu
gmp
zlib
] ++ lib.optional withLingeling lingeling;
];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DPicoSAT_INCLUDE_DIR=${lib.getDev picosat}/include/picosat"
"-DBtor2Tools_INCLUDE_DIR=${lib.getDev btor2tools}/include/btor2parser"
"-DBtor2Tools_LIBRARIES=${lib.getLib btor2tools}/lib/libbtor2parser${stdenv.hostPlatform.extensions.sharedLibrary}"
] ++ lib.optional doCheck "-DTESTING=YES";
mesonFlags = [
# note: the default value for default_library fails to link dynamic dependencies
# but setting it to shared works even in pkgsStatic
"-Ddefault_library=shared"
nativeCheckInputs = [ python3 gtest ];
# two tests fail on darwin and 3 on aarch64-linux
doCheck = stdenv.hostPlatform.isLinux && (!stdenv.hostPlatform.isAarch64);
preCheck = let
var = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in
''
export ${var}=$(readlink -f lib)
patchShebangs ..
'';
(lib.strings.mesonEnable "testing" finalAttrs.doCheck)
];
meta = with lib; {
nativeCheckInputs = [ python3 ];
checkInputs = [ gtest ];
# two tests fail on darwin
doCheck = stdenv.hostPlatform.isLinux;
meta = {
description = "A SMT solver for fixed-size bit-vectors, floating-point arithmetic, arrays, and uninterpreted functions";
mainProgram = "bitwuzla";
homepage = "https://bitwuzla.github.io";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ symphorien ];
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ symphorien ];
};
}
})

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub, copyPkgconfigItems, makePkgconfigItem }:
stdenv.mkDerivation rec {
pname = "cadical";
@ -14,6 +14,35 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "lib" ];
doCheck = true;
nativeBuildInputs = [ copyPkgconfigItems ];
pkgconfigItems = [
(makePkgconfigItem {
name = "cadical";
inherit version;
cflags = [ "-I\${includedir}" ];
libs = [ "-L\${libdir}" "-lcadical" ];
variables = {
includedir = "@includedir@";
libdir = "@libdir@";
};
inherit (meta) description;
})
];
env = {
# copyPkgconfigItems will substitute these in the pkg-config file
includedir = "${placeholder "dev"}/include";
libdir = "${placeholder "lib"}/lib";
};
enableParallelBuilding = true;
# fix static build
postPatch = ''
substituteInPlace makefile.in --replace-fail "ar rc" '$(AR) rc'
'';
# the configure script is not generated by autotools and does not accept the
# arguments that the default configurePhase passes like --prefix and --libdir
configurePhase = ''

View File

@ -17,8 +17,14 @@ stdenv.mkDerivation rec {
hash = "sha256-8oH9moMjQEWnQXKmKcqmXuXcYkEyvr4hwC1bC4l26mo=";
};
buildInputs = [ python3 boost ];
nativeBuildInputs = [ cmake ];
strictDeps = true;
buildInputs = [ boost ];
nativeBuildInputs = [ python3 cmake ];
# musl does not have sys/unistd.h
postPatch = ''
substituteInPlace src/picosat/picosat.c --replace-fail '<sys/unistd.h>' '<unistd.h>'
'';
meta = with lib; {
description = "An advanced SAT Solver";

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub, copyPkgconfigItems, makePkgconfigItem }:
stdenv.mkDerivation rec {
pname = "symfpu";
@ -11,9 +11,32 @@ stdenv.mkDerivation rec {
sha256 = "1jf5lkn67q136ppfacw3lsry369v7mdr1rhidzjpbz18jfy9zl9q";
};
nativeBuildInputs = [ copyPkgconfigItems ];
pkgconfigItems = [
(makePkgconfigItem {
name = "symfpu";
inherit version;
cflags = [ "-I\${includedir}" ];
variables = {
includedir = "@includedir@";
};
inherit (meta) description;
})
];
env = {
# copyPkgconfigItems will substitute this in the pkg-config file
includedir = "${placeholder "out"}/include";
};
installPhase = ''
mkdir -p $out/symfpu
cp -r * $out/symfpu/
runHook preInstall
mkdir -p $out/include/symfpu
cp -r * $out/include/symfpu/
runHook postInstall
'';
meta = with lib; {

View File

@ -28,13 +28,13 @@
stdenv.mkDerivation rec {
pname = "monitor";
version = "0.17.0";
version = "0.17.1";
src = fetchFromGitHub {
owner = "stsdc";
repo = "monitor";
rev = version;
sha256 = "sha256-GUNMA4CRO4cKBjNr7i8yRflstbT8g2ciDHppjUUbAOc=";
sha256 = "sha256-Eo0nwATKrx6SmTsaXe3oFIkp0BUTmjcjIc3Vjt+Cr20=";
fetchSubmodules = true;
};

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "ghq";
version = "1.5.0";
version = "1.6.0";
src = fetchFromGitHub {
owner = "x-motemen";
repo = "ghq";
rev = "v${version}";
sha256 = "sha256-l+Ycts7PSKR72GsHJ1zWqpyd0BMMib/GTUv+B0x6d8M=";
sha256 = "sha256-gSMSn7YuhV/m5po+nu9Z/bxSRKg7/fXbF1stm7JQqZI=";
};
vendorHash = "sha256-6ZDvU3RQ/1M4DZMFOaQsEuodldB8k+2thXNhvZlVQEg=";
vendorHash = "sha256-M9B19rSEMnmT4wfOVnSAK06UPR/xrs0252lX3B9ebF8=";
doCheck = false;

View File

@ -15,7 +15,7 @@ let
sha256 = "sha256-EuWGbn6qggi8/9Rci8iaXfuVKE+QXb1BHEYDvotR/q4=";
};
};
src = srcs.${stdenv.hostPlatform.system};
src = srcs.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
contents = appimageTools.extract { inherit name src; };

View File

@ -1,18 +1,49 @@
{ buildVersion, aarch64sha256, x64sha256, dev ? false }:
{
buildVersion,
dev ? false,
aarch64sha256,
x64sha256,
}:
{ fetchurl, lib, stdenv, xorg, glib, libGL, glibcLocales, gtk3, cairo, pango, libredirect, makeWrapper, wrapGAppsHook
, pkexecPath ? "/run/wrappers/bin/pkexec"
, writeShellScript, common-updater-scripts, curl, gnugrep, coreutils
{
fetchurl,
lib,
stdenv,
xorg,
glib,
libGL,
glibcLocales,
gtk3,
cairo,
pango,
libredirect,
makeWrapper,
wrapGAppsHook,
pkexecPath ? "/run/wrappers/bin/pkexec",
writeShellScript,
common-updater-scripts,
curl,
gnugrep,
coreutils,
}:
let
pnameBase = "sublime-merge";
packageAttribute = "sublime-merge${lib.optionalString dev "-dev"}";
binaries = [ "sublime_merge" crashHandlerBinary "git-credential-sublime" "ssh-askpass-sublime" ];
binaries = [
"sublime_merge"
crashHandlerBinary
"git-credential-sublime"
"ssh-askpass-sublime"
];
primaryBinary = "sublime_merge";
primaryBinaryAliases = [ "smerge" ];
crashHandlerBinary = if lib.versionAtLeast buildVersion "2086" then "crash_handler" else "crash_reporter";
downloadUrl = arch: "https://download.sublimetext.com/sublime_merge_build_${buildVersion}_${arch}.tar.xz";
primaryBinaryAliases = [
"smerge"
];
crashHandlerBinary =
if lib.versionAtLeast buildVersion "2086" then "crash_handler" else "crash_reporter";
downloadUrl =
arch: "https://download.sublimetext.com/sublime_merge_build_${buildVersion}_${arch}.tar.xz";
versionUrl = "https://www.sublimemerge.com/${if dev then "dev" else "download"}";
versionFile = builtins.toString ./default.nix;
@ -25,8 +56,12 @@ let
curl
];
redirects = [ "/usr/bin/pkexec=${pkexecPath}" "/bin/true=${coreutils}/bin/true" ];
in let
redirects = [
"/usr/bin/pkexec=${pkexecPath}"
"/bin/true=${coreutils}/bin/true"
];
in
let
binaryPackage = stdenv.mkDerivation rec {
pname = "${pnameBase}-bin";
version = buildVersion;
@ -35,13 +70,20 @@ in let
dontStrip = true;
dontPatchELF = true;
buildInputs = [ glib gtk3 ]; # for GSETTINGS_SCHEMAS_PATH
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
buildInputs = [
glib
# for GSETTINGS_SCHEMAS_PATH
gtk3
];
nativeBuildInputs = [
makeWrapper
wrapGAppsHook
];
buildPhase = ''
runHook preBuild
for binary in ${ builtins.concatStringsSep " " binaries }; do
for binary in ${builtins.concatStringsSep " " binaries}; do
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${lib.makeLibraryPath neededLibraries}:${libGL}/lib:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \
@ -96,7 +138,8 @@ in let
};
};
};
in stdenv.mkDerivation (rec {
in
stdenv.mkDerivation (rec {
pname = pnameBase;
version = buildVersion;
@ -104,27 +147,45 @@ in stdenv.mkDerivation (rec {
${primaryBinary} = binaryPackage;
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
mkdir -p "$out/bin"
makeWrapper "''$${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}"
'' + builtins.concatStringsSep "" (map (binaryAlias: "ln -s $out/bin/${primaryBinary} $out/bin/${binaryAlias}\n") primaryBinaryAliases) + ''
mkdir -p "$out/share/applications"
substitute "''$${primaryBinary}/${primaryBinary}.desktop" "$out/share/applications/${primaryBinary}.desktop" --replace "/opt/${primaryBinary}/${primaryBinary}" "${primaryBinary}"
for directory in ''$${primaryBinary}/Icon/*; do
size=$(basename $directory)
mkdir -p "$out/share/icons/hicolor/$size/apps"
ln -s ''$${primaryBinary}/Icon/$size/* $out/share/icons/hicolor/$size/apps
done
'';
installPhase =
''
mkdir -p "$out/bin"
makeWrapper "''$${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}"
''
+ builtins.concatStringsSep "" (
map (binaryAlias: "ln -s $out/bin/${primaryBinary} $out/bin/${binaryAlias}\n") primaryBinaryAliases
)
+ ''
mkdir -p "$out/share/applications"
substitute \
"''$${primaryBinary}/${primaryBinary}.desktop" \
"$out/share/applications/${primaryBinary}.desktop" \
--replace-fail "/opt/${primaryBinary}/${primaryBinary}" "${primaryBinary}"
for directory in ''$${primaryBinary}/Icon/*; do
size=$(basename $directory)
mkdir -p "$out/share/icons/hicolor/$size/apps"
ln -s ''$${primaryBinary}/Icon/$size/* $out/share/icons/hicolor/$size/apps
done
'';
passthru = {
updateScript =
let
script = writeShellScript "${packageAttribute}-update-script" ''
set -o errexit
PATH=${lib.makeBinPath [ common-updater-scripts curl gnugrep ]}
PATH=${
lib.makeBinPath [
common-updater-scripts
curl
gnugrep
]
}
versionFile=$1
latestVersion=$(curl -s ${versionUrl} | grep -Po '(?<=<p class="latest"><i>Version:</i> Build )([0-9]+)')
@ -141,7 +202,11 @@ in stdenv.mkDerivation (rec {
update-source-version "${packageAttribute}.${primaryBinary}" "$latestVersion" --file="$versionFile" --version-key=buildVersion --source-key="sources.$platform"
done
'';
in [ script versionFile ];
in
[
script
versionFile
];
};
meta = with lib; {
@ -150,6 +215,9 @@ in stdenv.mkDerivation (rec {
maintainers = with maintainers; [ zookatron ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "aarch64-linux" "x86_64-linux" ];
platforms = [
"aarch64-linux"
"x86_64-linux"
];
};
})

View File

@ -2,17 +2,18 @@
let
common = opts: callPackage (import ./common.nix opts);
in {
in
{
sublime-merge = common {
buildVersion = "2091";
aarch64sha256 = "dkPKuuzQQtL3eZlaAPeL7e2p5PCxroFRSp6Rw5wHODc=";
x64sha256 = "T5g6gHgl9xGytEOsh3VuB08IrbDvMu24o/1edCGmfd4=";
} {};
} { };
sublime-merge-dev = common {
buildVersion = "2092";
dev = true;
aarch64sha256 = "3QMDynXMVB4QVtM8EPbZ8I4m+5sEjzs8XN+jEoMaktM=";
x64sha256 = "S9E+wRvO41Eq+PLA/J+sjBIAn6yz715Wg9bKRW2Eobg=";
dev = true;
} {};
} { };
}

View File

@ -7,10 +7,10 @@
stdenv.mkDerivation rec {
pname = "bilibili";
version = "1.13.0-2";
version = "1.13.2-1";
src = fetchurl {
url = "https://github.com/msojocs/bilibili-linux/releases/download/v${version}/io.github.msojocs.bilibili_${version}_amd64.deb";
hash = "sha256-svTD8YZBFj0K9/3ggojiH+8cMRkCxHr/hHTC24NL2tE=";
hash = "sha256-yqgQNsTD4iT54LJYEbV6dk7OD7KoZvX61XERYQ4MsSA=";
};
unpackPhase = ''

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "freetube";
version = "0.19.2";
version = "0.20.0";
src = fetchurl {
url = "https://github.com/FreeTubeApp/FreeTube/releases/download/v${version}-beta/freetube_${version}_amd64.AppImage";
sha256 = "sha256-GhlU02CmglHUzVTqoajXFS1E6WXxXjxRTdiDEDqsH8s=";
sha256 = "sha256-7k5hyiK3m+117AxmsoecGsgXSxs8xhyTf8+rl4oBbB8=";
};
passthru.tests = nixosTests.freetube;

View File

@ -1,8 +1,8 @@
{ lib
, fetchFromGitLab
, mkDerivation
, mkKdeDerivation
, breeze-icons
, breeze-qt5
, breeze
, cmake
, extra-cmake-modules
, ffmpeg-headless
@ -12,7 +12,7 @@
, ki18n
, kiconthemes
, kio
, kirigami2
, kirigami
, kxmlgui
, kdoctools
, mpv
@ -20,19 +20,18 @@
, wrapQtAppsHook
, qqc2-desktop-style
, qtbase
, qtquickcontrols2
, yt-dlp
}:
mkDerivation rec {
mkKdeDerivation rec {
pname = "haruna";
version = "0.12.3";
version = "1.0.2";
src = fetchFromGitLab {
owner = "multimedia";
repo = "haruna";
rev = "v${version}";
hash = "sha256-iYf8oTMQ65+6E1dlOj0GU6EezPul6p1GG2CcrcjDUik=";
hash = "sha256-L/mTFPJPHl8A6FqkWUwICh+Yl4uIE5KnTkZVnC4kCZ8=";
domain = "invent.kde.org";
};
@ -43,7 +42,7 @@ mkDerivation rec {
buildInputs = [
breeze-icons
breeze-qt5
breeze
qqc2-desktop-style
yt-dlp
@ -54,12 +53,11 @@ mkDerivation rec {
ki18n
kiconthemes
kio
kirigami2
kirigami
kxmlgui
kdoctools
mpv
qtbase
qtquickcontrols2
];
nativeBuildInputs = [

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