diff --git a/.editorconfig b/.editorconfig index 3ff05f9a7fa0..c9711d519408 100644 --- a/.editorconfig +++ b/.editorconfig @@ -95,3 +95,9 @@ trim_trailing_whitespace = unset [pkgs/tools/misc/timidity/timidity.cfg] trim_trailing_whitespace = unset + +[pkgs/tools/virtualization/ovftool/*.ova] +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset +charset = unset diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index dd42de0651ee..161a6065df87 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5912,6 +5912,15 @@ githubId = 41522204; name = "hexchen"; }; + heyimnova = { + email = "git@heyimnova.dev"; + github = "heyimnova"; + githubId = 115728866; + name = "Nova Witterick"; + keys = [{ + fingerprint = "4304 6B43 8D83 078E 3DF7 10D6 DEB0 E15C 6D2A 5A7C"; + }]; + }; hh = { email = "hh@m-labs.hk"; github = "HarryMakes"; @@ -14933,7 +14942,7 @@ }; toastal = { email = "toastal+nix@posteo.net"; - matrix = "@toastal:chat.mozilla.org"; + matrix = "@toastal:mozilla.org"; github = "toastal"; githubId = 561087; name = "toastal"; diff --git a/nixos/modules/config/console.nix b/nixos/modules/config/console.nix index 854d7acf9232..f5db5dc5dfc1 100644 --- a/nixos/modules/config/console.nix +++ b/nixos/modules/config/console.nix @@ -168,7 +168,6 @@ in "${config.boot.initrd.systemd.package.kbd}/bin/setfont" "${config.boot.initrd.systemd.package.kbd}/bin/loadkeys" "${config.boot.initrd.systemd.package.kbd.gzip}/bin/gzip" # Fonts and keyboard layouts are compressed - "${config.boot.initrd.systemd.package.kbd.gzip}/bin/.gzip-wrapped" ] ++ optionals (hasPrefix builtins.storeDir cfg.font) [ "${cfg.font}" ] ++ optionals (hasPrefix builtins.storeDir cfg.keyMap) [ diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index 2d5a0007ff01..75247286368b 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -65,8 +65,6 @@ in { ] ++ optional pkgs.stdenv.hostPlatform.isAarch raspberrypiWirelessFirmware ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ rtl8723bs-firmware - ] ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "5.16") [ - rtw89-firmware ]; hardware.wirelessRegulatoryDatabase = true; }) diff --git a/nixos/modules/services/backup/borgbackup.md b/nixos/modules/services/backup/borgbackup.md index e86ae593bbd6..39141f6ec858 100644 --- a/nixos/modules/services/backup/borgbackup.md +++ b/nixos/modules/services/backup/borgbackup.md @@ -128,7 +128,7 @@ To backup your home directory to borgbase you have to: - Initialize the repository on the server. Eg. sudo borg init --encryption=repokey-blake2 \ - -rsh "ssh -i /run/keys/id_ed25519_borgbase" \ + --rsh "ssh -i /run/keys/id_ed25519_borgbase" \ zzz2aaaaa@zzz2aaaaa.repo.borgbase.com:repo - Add it to your NixOS configuration, e.g. diff --git a/nixos/modules/services/matrix/mautrix-telegram.nix b/nixos/modules/services/matrix/mautrix-telegram.nix index 5a632fd27e80..b64cc71d9873 100644 --- a/nixos/modules/services/matrix/mautrix-telegram.nix +++ b/nixos/modules/services/matrix/mautrix-telegram.nix @@ -137,7 +137,7 @@ in { wantedBy = [ "multi-user.target" ]; wants = [ "network-online.target" ] ++ cfg.serviceDependencies; after = [ "network-online.target" ] ++ cfg.serviceDependencies; - path = [ pkgs.lottieconverter ]; + path = [ pkgs.lottieconverter pkgs.ffmpeg-full ]; # mautrix-telegram tries to generate a dotfile in the home directory of # the running user if using a postgresql database: diff --git a/nixos/modules/services/web-apps/discourse.nix b/nixos/modules/services/web-apps/discourse.nix index 5565a4f45d1e..151fb812ddea 100644 --- a/nixos/modules/services/web-apps/discourse.nix +++ b/nixos/modules/services/web-apps/discourse.nix @@ -615,6 +615,7 @@ in s3_endpoint = null; s3_http_continue_timeout = null; s3_install_cors_rule = null; + s3_asset_cdn_url = null; max_user_api_reqs_per_minute = 20; max_user_api_reqs_per_day = 2880; @@ -647,6 +648,9 @@ in multisite_config_path = "config/multisite.yml"; enable_long_polling = null; long_polling_interval = null; + preload_link_header = false; + redirect_avatar_requests = false; + pg_force_readonly_mode = false; }; services.redis.servers.discourse = @@ -1011,6 +1015,7 @@ in notification_email = cfg.mail.notificationEmailAddress; contact_email = cfg.mail.contactEmailAddress; }; + security.force_https = tlsEnabled; email = { manual_polling_enabled = cfg.mail.incoming.enable; reply_by_email_enabled = cfg.mail.incoming.enable; diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index 70edc13dc0fa..1189be3738f4 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -427,9 +427,6 @@ in { # fido2 support "${cfg.package}/lib/cryptsetup/libcryptsetup-token-systemd-fido2.so" "${pkgs.libfido2}/lib/libfido2.so.1" - - # the unwrapped systemd-cryptsetup executable - "${cfg.package}/lib/systemd/.systemd-cryptsetup-wrapped" ] ++ jobScripts; targets.initrd.aliases = ["default.target"]; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 86dd096afc0b..ecf95c2cba0a 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -368,6 +368,7 @@ in { login = handleTest ./login.nix {}; logrotate = handleTest ./logrotate.nix {}; loki = handleTest ./loki.nix {}; + luks = handleTest ./luks.nix {}; lvm2 = handleTest ./lvm2 {}; lxd = handleTest ./lxd.nix {}; lxd-nftables = handleTest ./lxd-nftables.nix {}; @@ -646,6 +647,7 @@ in { systemd-confinement = handleTest ./systemd-confinement.nix {}; systemd-coredump = handleTest ./systemd-coredump.nix {}; systemd-cryptenroll = handleTest ./systemd-cryptenroll.nix {}; + systemd-credentials-tpm2 = handleTest ./systemd-credentials-tpm2.nix {}; systemd-escaping = handleTest ./systemd-escaping.nix {}; systemd-initrd-btrfs-raid = handleTest ./systemd-initrd-btrfs-raid.nix {}; systemd-initrd-luks-fido2 = handleTest ./systemd-initrd-luks-fido2.nix {}; @@ -656,6 +658,7 @@ in { systemd-initrd-shutdown = handleTest ./systemd-shutdown.nix { systemdStage1 = true; }; systemd-initrd-simple = handleTest ./systemd-initrd-simple.nix {}; systemd-initrd-swraid = handleTest ./systemd-initrd-swraid.nix {}; + systemd-initrd-vconsole = handleTest ./systemd-initrd-vconsole.nix {}; systemd-journal = handleTest ./systemd-journal.nix {}; systemd-machinectl = handleTest ./systemd-machinectl.nix {}; systemd-networkd = handleTest ./systemd-networkd.nix {}; diff --git a/nixos/tests/discourse.nix b/nixos/tests/discourse.nix index 35ca083c6c4e..c79ba41c2eb9 100644 --- a/nixos/tests/discourse.nix +++ b/nixos/tests/discourse.nix @@ -40,7 +40,7 @@ import ./make-test-python.nix ( networking.extraHosts = '' 127.0.0.1 ${discourseDomain} - ${nodes.client.config.networking.primaryIPAddress} ${clientDomain} + ${nodes.client.networking.primaryIPAddress} ${clientDomain} ''; services.postfix = { @@ -90,7 +90,7 @@ import ./make-test-python.nix ( networking.extraHosts = '' 127.0.0.1 ${clientDomain} - ${nodes.discourse.config.networking.primaryIPAddress} ${discourseDomain} + ${nodes.discourse.networking.primaryIPAddress} ${discourseDomain} ''; services.dovecot2 = { @@ -178,8 +178,8 @@ import ./make-test-python.nix ( discourse.wait_until_succeeds("curl -sS -f https://${discourseDomain}") discourse.succeed( "curl -sS -f https://${discourseDomain}/session/csrf -c cookie -b cookie -H 'Accept: application/json' | jq -r '\"X-CSRF-Token: \" + .csrf' > csrf_token", - "curl -sS -f https://${discourseDomain}/session -c cookie -b cookie -H @csrf_token -H 'Accept: application/json' -d 'login=${nodes.discourse.config.services.discourse.admin.username}' -d \"password=${adminPassword}\" | jq -e '.user.username == \"${nodes.discourse.config.services.discourse.admin.username}\"'", - "curl -sS -f https://${discourseDomain}/login -v -H 'Accept: application/json' -c cookie -b cookie 2>&1 | grep ${nodes.discourse.config.services.discourse.admin.username}", + "curl -sS -f https://${discourseDomain}/session -c cookie -b cookie -H @csrf_token -H 'Accept: application/json' -d 'login=${nodes.discourse.services.discourse.admin.username}' -d \"password=${adminPassword}\" | jq -e '.user.username == \"${nodes.discourse.services.discourse.admin.username}\"'", + "curl -sS -f https://${discourseDomain}/login -v -H 'Accept: application/json' -c cookie -b cookie 2>&1 | grep ${nodes.discourse.services.discourse.admin.username}", ) client.wait_for_unit("postfix.service") diff --git a/nixos/tests/luks.nix b/nixos/tests/luks.nix new file mode 100644 index 000000000000..82f5095cb260 --- /dev/null +++ b/nixos/tests/luks.nix @@ -0,0 +1,69 @@ +import ./make-test-python.nix ({ lib, pkgs, ... }: { + name = "luks"; + + nodes.machine = { pkgs, ... }: { + # Use systemd-boot + virtualisation = { + emptyDiskImages = [ 512 512 ]; + useBootLoader = true; + useEFIBoot = true; + }; + boot.loader.systemd-boot.enable = true; + + boot.kernelParams = lib.mkOverride 5 [ "console=tty1" ]; + + environment.systemPackages = with pkgs; [ cryptsetup ]; + + specialisation = rec { + boot-luks.configuration = { + boot.initrd.luks.devices = lib.mkVMOverride { + # We have two disks and only type one password - key reuse is in place + cryptroot.device = "/dev/vdc"; + cryptroot2.device = "/dev/vdd"; + }; + virtualisation.bootDevice = "/dev/mapper/cryptroot"; + }; + boot-luks-custom-keymap.configuration = lib.mkMerge [ + boot-luks.configuration + { + console.keyMap = "neo"; + } + ]; + }; + }; + + enableOCR = true; + + testScript = '' + # Create encrypted volume + machine.wait_for_unit("multi-user.target") + machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdc -") + machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdd -") + + # Boot from the encrypted disk + machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks.conf") + machine.succeed("sync") + machine.crash() + + # Boot and decrypt the disk + machine.start() + machine.wait_for_text("Passphrase for") + machine.send_chars("supersecret\n") + machine.wait_for_unit("multi-user.target") + + assert "/dev/mapper/cryptroot on / type ext4" in machine.succeed("mount") + + # Boot from the encrypted disk with custom keymap + machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks-custom-keymap.conf") + machine.succeed("sync") + machine.crash() + + # Boot and decrypt the disk + machine.start() + machine.wait_for_text("Passphrase for") + machine.send_chars("havfkhfrkfl\n") + machine.wait_for_unit("multi-user.target") + + assert "/dev/mapper/cryptroot on / type ext4" in machine.succeed("mount") + ''; +}) diff --git a/nixos/tests/miriway.nix b/nixos/tests/miriway.nix index c4c50646f015..d0d9f16d40f9 100644 --- a/nixos/tests/miriway.nix +++ b/nixos/tests/miriway.nix @@ -3,7 +3,10 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { meta = { maintainers = with lib.maintainers; [ OPNA2608 ]; - # FIXME On ARM Miriway inside the VM doesn't receive keyboard inputs, why? + # Natively running Mir has problems with capturing the first registered libinput device. + # In our VM runners on ARM and on some hardware configs (my RPi4, distro-independent), this misses the keyboard. + # It can be worked around by dis- and reconnecting the affected hardware, but we can't do this in these tests. + # https://github.com/MirServer/mir/issues/2837 broken = pkgs.stdenv.hostPlatform.isAarch; }; @@ -30,6 +33,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { enable = true; config = '' add-wayland-extensions=all + enable-x11= ctrl-alt=t:foot --maximized ctrl-alt=a:env WINIT_UNIX_BACKEND=x11 WAYLAND_DISPLAY=invalid alacritty --option window.startup_mode=maximized diff --git a/nixos/tests/systemd-credentials-tpm2.nix b/nixos/tests/systemd-credentials-tpm2.nix new file mode 100644 index 000000000000..d2dc1fd7b615 --- /dev/null +++ b/nixos/tests/systemd-credentials-tpm2.nix @@ -0,0 +1,124 @@ +import ./make-test-python.nix ({ lib, pkgs, system, ... }: + +let + tpmSocketPath = "/tmp/swtpm-sock"; + tpmDeviceModels = { + x86_64-linux = "tpm-tis"; + aarch64-linux = "tpm-tis-device"; + }; +in + +{ + name = "systemd-credentials-tpm2"; + + meta = { + maintainers = with pkgs.lib.maintainers; [ tmarkus ]; + }; + + nodes.machine = { pkgs, ... }: { + virtualisation = { + qemu.options = [ + "-chardev socket,id=chrtpm,path=${tpmSocketPath}" + "-tpmdev emulator,id=tpm_dev_0,chardev=chrtpm" + "-device ${tpmDeviceModels.${system}},tpmdev=tpm_dev_0" + ]; + }; + + boot.initrd.availableKernelModules = [ "tpm_tis" ]; + + environment.systemPackages = with pkgs; [ diffutils ]; + }; + + testScript = '' + import subprocess + from tempfile import TemporaryDirectory + + # From systemd-initrd-luks-tpm2.nix + class Tpm: + def __init__(self): + self.state_dir = TemporaryDirectory() + self.start() + + def start(self): + self.proc = subprocess.Popen(["${pkgs.swtpm}/bin/swtpm", + "socket", + "--tpmstate", f"dir={self.state_dir.name}", + "--ctrl", "type=unixio,path=${tpmSocketPath}", + "--tpm2", + ]) + + # Check whether starting swtpm failed + try: + exit_code = self.proc.wait(timeout=0.2) + if exit_code is not None and exit_code != 0: + raise Exception("failed to start swtpm") + except subprocess.TimeoutExpired: + pass + + """Check whether the swtpm process exited due to an error""" + def check(self): + exit_code = self.proc.poll() + if exit_code is not None and exit_code != 0: + raise Exception("swtpm process died") + + CRED_NAME = "testkey" + CRED_RAW_FILE = f"/root/{CRED_NAME}" + CRED_FILE = f"/root/{CRED_NAME}.cred" + + def systemd_run(machine, cmd): + machine.log(f"Executing command (via systemd-run): \"{cmd}\"") + + (status, out) = machine.execute( " ".join([ + "systemd-run", + "--service-type=exec", + "--quiet", + "--wait", + "-E PATH=\"$PATH\"", + "-p StandardOutput=journal", + "-p StandardError=journal", + f"-p LoadCredentialEncrypted={CRED_NAME}:{CRED_FILE}", + f"$SHELL -c '{cmd}'" + ]) ) + + if status != 0: + raise Exception(f"systemd_run failed (status {status})") + + machine.log("systemd-run finished successfully") + + tpm = Tpm() + + @polling_condition + def swtpm_running(): + tpm.check() + + machine.wait_for_unit("multi-user.target") + + with subtest("Check whether TPM device exists"): + machine.succeed("test -e /dev/tpm0") + machine.succeed("test -e /dev/tpmrm0") + + with subtest("Check whether systemd-creds detects TPM2 correctly"): + cmd = "systemd-creds has-tpm2" + machine.log(f"Running \"{cmd}\"") + (status, _) = machine.execute(cmd) + + # Check exit code equals 0 or 1 (1 means firmware support is missing, which is OK here) + if status != 0 and status != 1: + raise Exception("systemd-creds failed to detect TPM2") + + with subtest("Encrypt credential using systemd-creds"): + machine.succeed(f"dd if=/dev/urandom of={CRED_RAW_FILE} bs=1k count=16") + machine.succeed(f"systemd-creds --with-key=host+tpm2 encrypt --name=testkey {CRED_RAW_FILE} {CRED_FILE}") + + with subtest("Write provided credential and check for equality"): + CRED_OUT_FILE = f"/root/{CRED_NAME}.out" + systemd_run(machine, f"systemd-creds cat testkey > {CRED_OUT_FILE}") + machine.succeed(f"cmp --silent -- {CRED_RAW_FILE} {CRED_OUT_FILE}") + + with subtest("Check whether systemd service can see credential in systemd-creds list"): + systemd_run(machine, f"systemd-creds list | grep {CRED_NAME}") + + with subtest("Check whether systemd service can access credential in $CREDENTIALS_DIRECTORY"): + systemd_run(machine, f"cmp --silent -- $CREDENTIALS_DIRECTORY/{CRED_NAME} {CRED_RAW_FILE}") + ''; +}) diff --git a/nixos/tests/systemd-initrd-vconsole.nix b/nixos/tests/systemd-initrd-vconsole.nix new file mode 100644 index 000000000000..b74df410c422 --- /dev/null +++ b/nixos/tests/systemd-initrd-vconsole.nix @@ -0,0 +1,33 @@ +import ./make-test-python.nix ({ lib, pkgs, ... }: { + name = "systemd-initrd-vconsole"; + + nodes.machine = { pkgs, ... }: { + boot.kernelParams = [ "rd.systemd.unit=rescue.target" ]; + + boot.initrd.systemd = { + enable = true; + emergencyAccess = true; + }; + + console = { + earlySetup = true; + keyMap = "colemak"; + }; + }; + + testScript = '' + # Boot into rescue shell in initrd + machine.start() + machine.wait_for_console_text("Press Enter for maintenance") + machine.send_console("\n") + machine.wait_for_console_text("Logging in with home") + + # Check keymap + machine.send_console("(printf '%s to receive text: \\n' Ready && read text && echo \"$text\") file.7z - bsdtar xf file.7z -C extracted - done - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out/lib - cd extracted - - cp -r \ - CollectStrategy.txt \ - cpdf_settings \ - fxplugins \ - lang \ - resource \ - run \ - stamps \ - welcome \ - Wrappers \ - $out/lib/ - - patchelf $out/lib/fxplugins/librms.so \ - --replace-needed libssl.so.10 libssl.so \ - --replace-needed libcrypto.so.10 libcrypto.so - - # FIXME: Doing this with one invocation is broken right now - patchelf $out/lib/fxplugins/librmscrypto.so \ - --replace-needed libssl.so.10 libssl.so - patchelf $out/lib/fxplugins/librmscrypto.so \ - --replace-needed libcrypto.so.10 libcrypto.so - - install -D -m 755 FoxitReader -t $out/bin - - # Install icon and desktop files - install -D -m 644 images/FoxitReader.png -t $out/share/pixmaps/ - install -D -m 644 FoxitReader.desktop -t $out/share/applications/ - echo Exec=FoxitReader %F >> $out/share/applications/FoxitReader.desktop - - runHook postInstall - ''; - - qtWrapperArgs = [ "--set appname FoxitReader" "--set selfpath $out/lib" ]; - - meta = with lib; { - description = "A viewer for PDF documents"; - homepage = "https://www.foxitsoftware.com/"; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - license = licenses.unfree; - platforms = [ "x86_64-linux" ]; - maintainers = with maintainers; [ p-h rhoriguchi ]; - }; -} diff --git a/pkgs/applications/misc/joplin-desktop/default.nix b/pkgs/applications/misc/joplin-desktop/default.nix index 4cec4a97fe06..68e03b8902de 100644 --- a/pkgs/applications/misc/joplin-desktop/default.nix +++ b/pkgs/applications/misc/joplin-desktop/default.nix @@ -2,7 +2,7 @@ let pname = "joplin-desktop"; - version = "2.9.17"; + version = "2.10.4"; name = "${pname}-${version}"; inherit (stdenv.hostPlatform) system; @@ -16,8 +16,8 @@ let src = fetchurl { url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}.${suffix}"; sha256 = { - x86_64-linux = "sha256-kdmxSXKHIyVdvVNEoZkSIQlOkTt97bpAdrV0sxhL1Ug="; - x86_64-darwin = "sha256-o3Q5foEuBi4OTHr6mP0ZXOxkkUw/c/jXaZOtztQf0gM="; + x86_64-linux = "sha256-KEEPPtWxaY6+Nu/CE+AVAnaVZ30zmASWiIYaJt4a+3E="; + x86_64-darwin = "sha256-8Rkj1pV6tJygznbfELnAhzhh7ImnTm9dxCxCjYlWdnU="; }.${system} or throwSystem; }; @@ -35,7 +35,7 @@ let Markdown format. ''; homepage = "https://joplinapp.org"; - license = licenses.mit; + license = licenses.agpl3Plus; maintainers = with maintainers; [ hugoreeves ]; platforms = [ "x86_64-linux" "x86_64-darwin" ]; }; diff --git a/pkgs/applications/misc/menumaker/default.nix b/pkgs/applications/misc/menumaker/default.nix index 0fa9ad5e7f0a..c0958cd23537 100644 --- a/pkgs/applications/misc/menumaker/default.nix +++ b/pkgs/applications/misc/menumaker/default.nix @@ -13,7 +13,7 @@ python3Packages.buildPythonApplication rec { meta = with lib; { description = "Heuristics-driven menu generator for several window managers"; - homepage = "http://menumaker.sourceforge.net"; + homepage = "https://menumaker.sourceforge.net"; license = licenses.bsd2; platforms = platforms.unix; maintainers = [ maintainers.romildo ]; diff --git a/pkgs/applications/misc/wcalc/default.nix b/pkgs/applications/misc/wcalc/default.nix index 7541b759e06c..30ca1836b740 100644 --- a/pkgs/applications/misc/wcalc/default.nix +++ b/pkgs/applications/misc/wcalc/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A command line calculator"; - homepage = "http://w-calc.sourceforge.net"; + homepage = "https://w-calc.sourceforge.net"; license = licenses.gpl2; platforms = platforms.all; }; diff --git a/pkgs/applications/misc/zine/default.nix b/pkgs/applications/misc/zine/default.nix index 3f62f3381c55..2946b226155e 100644 --- a/pkgs/applications/misc/zine/default.nix +++ b/pkgs/applications/misc/zine/default.nix @@ -10,14 +10,14 @@ rustPlatform.buildRustPackage rec { pname = "zine"; - version = "0.10.1"; + version = "0.11.0"; src = fetchCrate { inherit pname version; - sha256 = "sha256-3xFJ7v/IZQ3yfU0D09sFXV+4XKRau+Mj3BNxkeUjbbU="; + sha256 = "sha256-koN30s+giX4wOp4i5QtTLE/t1ZJ9mP0K0YfY0kTuDJY="; }; - cargoHash = "sha256-3Sw/USfGJuf6JGSR3Xkjnmm/UR7NK8rB8St48b4WpIM="; + cargoHash = "sha256-Re/ooEJCRjQSnz1VSzz4uRWx81yOzChBEeH7gedAHJw="; nativeBuildInputs = [ pkg-config diff --git a/pkgs/applications/networking/browsers/vivaldi/default.nix b/pkgs/applications/networking/browsers/vivaldi/default.nix index 644f7e734bf7..0238fc61bcfa 100644 --- a/pkgs/applications/networking/browsers/vivaldi/default.nix +++ b/pkgs/applications/networking/browsers/vivaldi/default.nix @@ -21,11 +21,11 @@ let vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi"; in stdenv.mkDerivation rec { pname = "vivaldi"; - version = "5.6.2867.62"; + version = "5.7.2921.53"; src = fetchurl { url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}-1_amd64.deb"; - sha256 = "sha256-p5okCdvEBurL1UgqLMBhCd4caPbiOA1WZrI9TC5j6og="; + sha256 = "sha256-qkKCoHJCRji3XfXk71n4BfjFyQpXZ+BariHmbYPAuv8="; }; unpackPhase = '' diff --git a/pkgs/applications/networking/diswall/default.nix b/pkgs/applications/networking/diswall/default.nix index 0a8ac4456416..ceeeae75a18f 100644 --- a/pkgs/applications/networking/diswall/default.nix +++ b/pkgs/applications/networking/diswall/default.nix @@ -5,20 +5,20 @@ let in rustPlatform.buildRustPackage rec { pname = "diswall"; - version = "0.3.0"; + version = "0.3.1"; src = fetchFromGitHub { owner = "dis-works"; repo = "diswall-rs"; rev = "v${version}"; - sha256 = "sha256-3FTqT3IL48lYmGoB9u76RQSgZPbaq7IkOyQjyxwpkWA="; + sha256 = "sha256-54iNbMZ+j6ioBTb/okyWZqqe4p6IyapZwc6VdtiAkLs="; }; buildInputs = lib.optionals stdenv.isDarwin [ Security ]; - cargoSha256 = "sha256-sb6s4Oc3W+I9DB0SGyZINxyWHCSpkakiEeQUatEpeEU="; + cargoHash = "sha256-stpJNDC+dQQNZdZTihbQWZ66wgdQ+oz8s3Ogb1wxnxY="; doCheck = false; diff --git a/pkgs/applications/networking/instant-messengers/element/pin.json b/pkgs/applications/networking/instant-messengers/element/pin.json index ccb7ecd1537f..bf1458c264eb 100644 --- a/pkgs/applications/networking/instant-messengers/element/pin.json +++ b/pkgs/applications/networking/instant-messengers/element/pin.json @@ -1,7 +1,7 @@ { - "version": "1.11.22", - "desktopSrcHash": "UJesD6cshsf/NK2ZTzOtAUfH+8JcGP9oCLFhkgfM0E0=", - "desktopYarnHash": "0bq24rjf63rkq3jphv7raqaz2fnibmj41z905k5f3l4ln835ndfv", - "webSrcHash": "B2clSJgKkjvQdIXQgi3bBPaVTDKOjeNBOvkAtcPOkFI=", - "webYarnHash": "182fh1ayh1y98kbg4mn8fxqvljs19b02j4ivvjszm55dcpwfp1df" + "version": "1.11.23", + "desktopSrcHash": "Q3kyAiBvedTy4jiBkYmEJeonRf6HesdpKgmtOT2sYwI=", + "desktopYarnHash": "8lHIkUkFAo7m8XjfnFSAkp4mIKyrXOsnbstRIPXI+vE=", + "webSrcHash": "JOfuzo0DQ0v2rC80/HkucLgc2xsCb3eujaH0fg7j0nI=", + "webYarnHash": "0Cb7TuRFHcQvYbnVAnXOIwt6NXa7ITrMPJnmbUFaPNU=" } diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/tg_owt.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/tg_owt.nix index 9feb5ff10a07..713069ff95a3 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/tg_owt.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/tg_owt.nix @@ -37,6 +37,11 @@ stdenv.mkDerivation { url = "https://github.com/desktop-app/tg_owt/pull/101/commits/86d2bcd7afb8706663d29e30f65863de5a626142.patch"; hash = "sha256-iWS0mB8R0vqPU/0qf6Ax54UCAKYDVCPac2mi/VHbFm0="; }) + # additional fix for GCC 12 + musl + (fetchpatch { + url = "https://git.alpinelinux.org/aports/plain/community/tg_owt/gcc12.patch?id=8120df03fa3b6db5b8ff92c7a52b680290ad6e20"; + hash = "sha256-ikgxUH1e7pz0n0pKUemrPXXa4UkECX+w467M9gU68zs="; + }) ]; cmakeFlags = [ diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix index c6ce7c8f593a..7c0b8dc0747e 100644 --- a/pkgs/applications/networking/sync/unison/default.nix +++ b/pkgs/applications/networking/sync/unison/default.nix @@ -2,42 +2,45 @@ , stdenv , fetchFromGitHub , ocamlPackages -, fontschumachermisc -, xset -, makeWrapper , ncurses -, gnugrep , copyDesktopItems , makeDesktopItem +, wrapGAppsHook +, glib +, gsettings-desktop-schemas +, zlib , enableX11 ? true +, Cocoa }: stdenv.mkDerivation rec { pname = "unison"; - version = "2.52.1"; + version = "2.53.0"; src = fetchFromGitHub { owner = "bcpierce00"; repo = "unison"; rev = "v${version}"; - sha256 = "sha256-taA8eZ/wOe9uMccXVYfe34/XzWgqYKA3tLZnIOahOrQ="; + sha256 = "sha256-4Lyn1UecpVIhoEXIFu35XK4aoAfYGPCZ9L4ZY7224yo="; }; strictDeps = true; - nativeBuildInputs = [ makeWrapper ocamlPackages.ocaml ] + nativeBuildInputs = [ glib wrapGAppsHook ocamlPackages.ocaml ] ++ lib.optional enableX11 copyDesktopItems; - buildInputs = [ ncurses ]; + buildInputs = [ gsettings-desktop-schemas ncurses zlib ] + ++ lib.optional stdenv.isDarwin Cocoa; preBuild = lib.optionalString enableX11 '' - sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${ocamlPackages.lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)|" src/Makefile.OCaml + sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${ocamlPackages.lablgtk3}"/lib/ocaml/*/site-lib/lablgtk3)|" src/Makefile.OCaml + sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${ocamlPackages.cairo2}"/lib/ocaml/*/site-lib/cairo2)|" src/Makefile.OCaml '' + '' echo -e '\ninstall:\n\tcp $(FSMONITOR)$(EXEC_EXT) $(INSTALLDIR)' >> src/fsmonitor/linux/Makefile ''; makeFlags = [ "INSTALLDIR=$(out)/bin/" - "UISTYLE=${if enableX11 then "gtk2" else "text"}" + "UISTYLE=${if enableX11 then "gtk3" else "text"}" ] ++ lib.optional (!ocamlPackages.ocaml.nativeCompilers) "NATIVE=false"; preInstall = '' @@ -45,11 +48,6 @@ stdenv.mkDerivation rec { ''; postInstall = lib.optionalString enableX11 '' - for i in $(cd $out/bin && ls); do - wrapProgram $out/bin/$i \ - --run "[ -n \"\$DISPLAY\" ] && (${xset}/bin/xset q | ${gnugrep}/bin/grep -q \"${fontschumachermisc}\" || ${xset}/bin/xset +fp \"${fontschumachermisc}/lib/X11/fonts/misc\")" - done - install -D $src/icons/U.svg $out/share/icons/hicolor/scalable/apps/unison.svg ''; diff --git a/pkgs/applications/office/todoman/default.nix b/pkgs/applications/office/todoman/default.nix index 50db368073d1..7794116ecd46 100644 --- a/pkgs/applications/office/todoman/default.nix +++ b/pkgs/applications/office/todoman/default.nix @@ -67,6 +67,7 @@ python3.pkgs.buildPythonApplication rec { # Testing of the CLI part and output "test_color_due_dates" "test_color_flag" + "test_datetime_serialization" # Will be fixed in versions after 4.1.0 "test_default_command" "test_main" "test_missing_cache_dir" @@ -74,8 +75,6 @@ python3.pkgs.buildPythonApplication rec { "test_xdg_existant" # Tests are sensitive to performance "test_sorting_fields" - ] ++ lib.optionals stdenv.isDarwin [ - "test_sorting_fields" ]; pythonImportsCheck = [ diff --git a/pkgs/applications/radio/rtl-sdr/default.nix b/pkgs/applications/radio/rtl-sdr/default.nix index d8180750c7a1..722a0565e0de 100644 --- a/pkgs/applications/radio/rtl-sdr/default.nix +++ b/pkgs/applications/radio/rtl-sdr/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { owner = "librtlsdr"; repo = "librtlsdr"; rev = "v${version}"; - sha256 = "1fgxlkgmdchbrf0nn98ivjr6css5hak3608nr4xrf2qzf7xy2kdk"; + hash = "sha256-s03h+3EfC5c7yRYBM6aCRWtmstwRJWuBywuyVt+k/bk="; }; postPatch = '' @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config cmake ]; - buildInputs = [ libusb1 ]; + propagatedBuildInputs = [ libusb1 ]; cmakeFlags = lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" diff --git a/pkgs/applications/radio/unixcw/default.nix b/pkgs/applications/radio/unixcw/default.nix index 3fd066ec7b7b..80121db69c01 100644 --- a/pkgs/applications/radio/unixcw/default.nix +++ b/pkgs/applications/radio/unixcw/default.nix @@ -31,7 +31,7 @@ mkDerivation rec { These change the parameters used when sounding the Morse code. cw reports any errors in embedded commands ''; - homepage = "http://unixcw.sourceforge.net"; + homepage = "https://unixcw.sourceforge.net"; maintainers = [ maintainers.mafo ]; license = licenses.gpl2; platforms=platforms.linux; diff --git a/pkgs/applications/science/astronomy/xplanet/default.nix b/pkgs/applications/science/astronomy/xplanet/default.nix index 8c0cb2be32b9..d284171831b8 100644 --- a/pkgs/applications/science/astronomy/xplanet/default.nix +++ b/pkgs/applications/science/astronomy/xplanet/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Renders an image of the earth or other planets into the X root window"; - homepage = "http://xplanet.sourceforge.net"; + homepage = "https://xplanet.sourceforge.net"; license = licenses.gpl2; maintainers = with maintainers; [ lassulus sander ]; platforms = platforms.all; diff --git a/pkgs/applications/science/biology/bowtie/default.nix b/pkgs/applications/science/biology/bowtie/default.nix index ccb797d8a227..bec263a2d931 100644 --- a/pkgs/applications/science/biology/bowtie/default.nix +++ b/pkgs/applications/science/biology/bowtie/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "An ultrafast memory-efficient short read aligner"; license = licenses.artistic2; - homepage = "http://bowtie-bio.sourceforge.net"; + homepage = "https://bowtie-bio.sourceforge.net"; maintainers = with maintainers; [ prusnak ]; platforms = platforms.all; }; diff --git a/pkgs/applications/science/biology/seaview/default.nix b/pkgs/applications/science/biology/seaview/default.nix index 9cfa7cb933b0..640d2f5ae416 100644 --- a/pkgs/applications/science/biology/seaview/default.nix +++ b/pkgs/applications/science/biology/seaview/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { Gouy M., Guindon S. & Gascuel O. (2010) SeaView version 4 : a multiplatform graphical user interface for sequence alignment and phylogenetic tree building. Molecular Biology and Evolution 27(2):221-224. ''; - homepage = "http://doua.prabi.fr/software/seaview"; + homepage = "https://doua.prabi.fr/software/seaview"; license = licenses.gpl3; maintainers = [ maintainers.iimog ]; platforms = platforms.linux; diff --git a/pkgs/applications/science/electronics/gtkwave/default.nix b/pkgs/applications/science/electronics/gtkwave/default.nix index 57a832fed242..cc03a2e8c819 100644 --- a/pkgs/applications/science/electronics/gtkwave/default.nix +++ b/pkgs/applications/science/electronics/gtkwave/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { meta = { description = "VCD/Waveform viewer for Unix and Win32"; - homepage = "http://gtkwave.sourceforge.net"; + homepage = "https://gtkwave.sourceforge.net"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ thoughtpolice jiegec ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; diff --git a/pkgs/applications/science/electronics/qucs/default.nix b/pkgs/applications/science/electronics/qucs/default.nix index a5f2cf394b44..eeb10b3a5a1d 100644 --- a/pkgs/applications/science/electronics/qucs/default.nix +++ b/pkgs/applications/science/electronics/qucs/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { meta = { description = "Integrated circuit simulator"; - homepage = "http://qucs.sourceforge.net"; + homepage = "https://qucs.sourceforge.net"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [viric]; platforms = with lib.platforms; linux; diff --git a/pkgs/applications/science/electronics/xoscope/default.nix b/pkgs/applications/science/electronics/xoscope/default.nix index 7a9f58a0c6e3..9f9224b5543c 100644 --- a/pkgs/applications/science/electronics/xoscope/default.nix +++ b/pkgs/applications/science/electronics/xoscope/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { meta = { description = "Oscilloscope through the sound card"; - homepage = "http://xoscope.sourceforge.net"; + homepage = "https://xoscope.sourceforge.net"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [viric]; platforms = with lib.platforms; linux; diff --git a/pkgs/applications/science/logic/yices/default.nix b/pkgs/applications/science/logic/yices/default.nix index fb14723241b8..83fbb6d6546b 100644 --- a/pkgs/applications/science/logic/yices/default.nix +++ b/pkgs/applications/science/logic/yices/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A high-performance theorem prover and SMT solver"; - homepage = "http://yices.csl.sri.com"; + homepage = "https://yices.csl.sri.com"; license = licenses.gpl3; platforms = with platforms; linux ++ darwin; maintainers = with maintainers; [ thoughtpolice ]; diff --git a/pkgs/applications/science/math/gretl/default.nix b/pkgs/applications/science/math/gretl/default.nix index a2624c29662e..315433feb1c2 100644 --- a/pkgs/applications/science/math/gretl/default.nix +++ b/pkgs/applications/science/math/gretl/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { gretl is a cross-platform software package for econometric analysis, written in the C programming language. ''; - homepage = "http://gretl.sourceforge.net"; + homepage = "https://gretl.sourceforge.net"; license = licenses.gpl3; maintainers = with maintainers; [ dmrauh ]; platforms = with platforms; all; diff --git a/pkgs/applications/science/math/lp_solve/default.nix b/pkgs/applications/science/math/lp_solve/default.nix index f4c117267d56..6a1bc86abced 100644 --- a/pkgs/applications/science/math/lp_solve/default.nix +++ b/pkgs/applications/science/math/lp_solve/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A Mixed Integer Linear Programming (MILP) solver"; - homepage = "http://lpsolve.sourceforge.net"; + homepage = "https://lpsolve.sourceforge.net"; license = licenses.gpl2Plus; maintainers = with maintainers; [ smironov ]; platforms = platforms.unix; diff --git a/pkgs/applications/science/math/singular/default.nix b/pkgs/applications/science/math/singular/default.nix index 3ca1501e382e..e41d851cf7e8 100644 --- a/pkgs/applications/science/math/singular/default.nix +++ b/pkgs/applications/science/math/singular/default.nix @@ -166,7 +166,7 @@ stdenv.mkDerivation rec { # https://www.singular.uni-kl.de:8002/trac/ticket/837 platforms = subtractLists platforms.i686 platforms.unix; license = licenses.gpl3; # Or GPLv2 at your option - but not GPLv4 - homepage = "http://www.singular.uni-kl.de"; + homepage = "https://www.singular.uni-kl.de"; downloadPage = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/"; mainProgram = "Singular"; }; diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix index 26e6ab12ab04..cdc5bc855731 100644 --- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix +++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix @@ -70,7 +70,7 @@ in stdenv.mkDerivation rec { ''; meta = with lib; { - homepage = "http://www.gromacs.org"; + homepage = "https://www.gromacs.org"; license = licenses.gpl2; description = "Molecular dynamics software package"; longDescription = '' diff --git a/pkgs/applications/terminal-emulators/wezterm/default.nix b/pkgs/applications/terminal-emulators/wezterm/default.nix index cece7cb8a01e..74de8d070750 100644 --- a/pkgs/applications/terminal-emulators/wezterm/default.nix +++ b/pkgs/applications/terminal-emulators/wezterm/default.nix @@ -2,6 +2,7 @@ , rustPlatform , lib , fetchFromGitHub +, fetchpatch , ncurses , perl , pkg-config @@ -40,12 +41,12 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-1gnP2Dn4nkhxelUsXMay2VGvgvMjkdEKhFK5AAST++s="; }; - # Rust 1.65 does better at enum packing (according to - # 40e08fafe2f6e5b0c70d55996a0814d6813442ef), but Nixpkgs doesn't have 1.65 - # yet (still in staging), so skip these tests for now. - checkFlags = [ - "--skip=escape::action_size" - "--skip=surface::line::storage::test::memory_usage" + patches = [ + # fix build with rust 1.67 + (fetchpatch { + url = "https://github.com/wez/wezterm/commit/36519f0d90e1875fb4b3f11f6cbf94c7d716ef78.patch"; + sha256 = "sha256-sOGFmDan1uO1xOBCpvlGrSotjfw01MjRg0KVqa5omig="; + }) ]; postPatch = '' @@ -122,9 +123,7 @@ rustPlatform.buildRustPackage rec { }; terminfo = runCommand "wezterm-terminfo" { - nativeBuildInputs = [ - ncurses - ]; + nativeBuildInputs = [ ncurses ]; } '' mkdir -p $out/share/terminfo $out/nix-support tic -x -o $out/share/terminfo ${src}/termwiz/data/wezterm.terminfo @@ -132,10 +131,9 @@ rustPlatform.buildRustPackage rec { }; meta = with lib; { - description = "A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust"; + description = "GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust"; homepage = "https://wezfurlong.org/wezterm"; license = licenses.mit; maintainers = with maintainers; [ SuperSandro2000 ]; - platforms = platforms.unix; }; } diff --git a/pkgs/applications/version-management/git-machete/default.nix b/pkgs/applications/version-management/git-machete/default.nix index 9667e7bd2fee..885f6d1355e9 100644 --- a/pkgs/applications/version-management/git-machete/default.nix +++ b/pkgs/applications/version-management/git-machete/default.nix @@ -12,13 +12,13 @@ buildPythonApplication rec { pname = "git-machete"; - version = "3.15.0"; + version = "3.15.2"; src = fetchFromGitHub { owner = "virtuslab"; repo = pname; rev = "v${version}"; - hash = "sha256-HSgCvHjSOrMPsdOPtgFUeK6b0ioVnwTtg2oHGg4BrZw="; + hash = "sha256-hIm3JDLXUTwjuVfAHvZBWFBJNOAVWyfl/X4A6B0OoXg="; }; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/applications/version-management/gitea/default.nix b/pkgs/applications/version-management/gitea/default.nix index 1b4734027b7d..2ded0cf170d6 100644 --- a/pkgs/applications/version-management/gitea/default.nix +++ b/pkgs/applications/version-management/gitea/default.nix @@ -15,12 +15,12 @@ buildGoModule rec { pname = "gitea"; - version = "1.18.3"; + version = "1.18.4"; # not fetching directly from the git repo, because that lacks several vendor files for the web UI src = fetchurl { url = "https://dl.gitea.io/gitea/${version}/gitea-src-${version}.tar.gz"; - hash = "sha256-jqjpbDgcmwZoc/ovgburFeeta9mAJOmz7yrvmUKAwRU="; + hash = "sha256-LSSOmqSeiv9qNCAsRWYtjRLfUDLMd8mOVAxTOacvNOA="; }; vendorHash = null; diff --git a/pkgs/applications/version-management/glitter/default.nix b/pkgs/applications/version-management/glitter/default.nix index 5786ebc8a650..c99403889d54 100644 --- a/pkgs/applications/version-management/glitter/default.nix +++ b/pkgs/applications/version-management/glitter/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "glitter"; - version = "1.6.3"; + version = "1.6.5"; src = fetchFromGitHub { owner = "milo123459"; repo = pname; rev = "v${version}"; - sha256 = "sha256-xrQqeRJfBEcjX0tkULg+94R7+mWWn6QeKIfZiDp+Vt8="; + sha256 = "sha256-sMAHVXpgAhZYUpl75JRtKhTqt/sQkSkoEzk7aGV1vcQ="; }; - cargoSha256 = "sha256-GQ7Bns+FPj4jl2dBXnMrmcKIYcZTLZc1WvaHgKGj/gU="; + cargoSha256 = "sha256-CaWpGNP7Jsv/3dks0LVbZXoD/9HqJmOzaD0ejT5xSqA="; nativeCheckInputs = [ git diff --git a/pkgs/applications/video/imagination/default.nix b/pkgs/applications/video/imagination/default.nix index 732d8f547ff6..804265bcb545 100644 --- a/pkgs/applications/video/imagination/default.nix +++ b/pkgs/applications/video/imagination/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Lightweight and simple DVD slide show maker"; - homepage = "http://imagination.sourceforge.net"; + homepage = "https://imagination.sourceforge.net"; license = licenses.gpl3Only; maintainers = with maintainers; [ austinbutler ]; platforms = platforms.linux; diff --git a/pkgs/applications/video/tivodecode/default.nix b/pkgs/applications/video/tivodecode/default.nix index 706dbc187377..c21a0611262d 100644 --- a/pkgs/applications/video/tivodecode/default.nix +++ b/pkgs/applications/video/tivodecode/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Converts a .TiVo file (produced by TiVoToGo) to a normal MPEG file"; - homepage = "http://tivodecode.sourceforge.net"; + homepage = "https://tivodecode.sourceforge.net"; platforms = platforms.unix; license = licenses.bsd3; }; diff --git a/pkgs/applications/virtualization/quickgui/default.nix b/pkgs/applications/virtualization/quickgui/default.nix new file mode 100644 index 000000000000..9c4de021f256 --- /dev/null +++ b/pkgs/applications/virtualization/quickgui/default.nix @@ -0,0 +1,48 @@ +{ stdenv +, lib +, fetchurl +, autoPatchelfHook +, dpkg +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "quickgui"; + version = "1.2.8"; + + src = fetchurl { + url = "https://github.com/quickemu-project/quickgui/releases/download/v${version}/quickgui_${version}-1_lunar1.0_amd64.deb"; + sha256 = "sha256-crnV7OWH5UbkMM/TxTIOlXmvqBgjFmQG7RxameMOjH0="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + dpkg + ]; + + buildInputs = [ + wrapGAppsHook + ]; + + unpackCmd = "dpkg-deb -x $curSrc source"; + + installPhase = '' + runHook preInstall + + mv usr $out + substituteInPlace $out/share/applications/quickgui.desktop \ + --replace "/usr" $out + + runHook postInstall + ''; + + meta = { + description = "A Flutter frontend for quickemu"; + homepage = "https://github.com/quickemu-project/quickgui"; + changelog = "https://github.com/quickemu-project/quickgui/releases/tag/v${version}"; + maintainers = [ lib.maintainers.heyimnova ]; + platforms = lib.platforms.linux; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + mainProgram = "quickgui"; + }; +} diff --git a/pkgs/applications/window-managers/miriway/default.nix b/pkgs/applications/window-managers/miriway/default.nix index a7048e83dae0..fd3e82e43aa5 100644 --- a/pkgs/applications/window-managers/miriway/default.nix +++ b/pkgs/applications/window-managers/miriway/default.nix @@ -11,24 +11,15 @@ stdenv.mkDerivation rec { pname = "miriway"; - version = "unstable-2022-12-18"; + version = "unstable-2023-02-18"; src = fetchFromGitHub { owner = "Miriway"; repo = "Miriway"; - rev = "d294c303cb99b7becb0d6686be9a09f0a1f57596"; - hash = "sha256-H+IZgI1IQxNl5yAygbDKXkyXajGHV/mp9gEqZcp0TeE="; + rev = "1363ae0452c5093f84418bc65354e93796caec65"; + hash = "sha256-hQ2z3GlTJG9qewJLkPpoRMSn0D7xCLyl+1O+G4NnedA="; }; - postPatch = '' - substituteInPlace CMakeLists.txt \ - --replace "\''${CMAKE_INSTALL_PREFIX}/bin" "\''${CMAKE_INSTALL_BINDIR}" \ - --replace "/usr/share" "\''${CMAKE_INSTALL_DATADIR}" \ - --replace "/etc" "\''${CMAKE_INSTALL_SYSCONFDIR}" - - sed -i -e '/project(/a include(GNUInstallDirs)' CMakeLists.txt - ''; - strictDeps = true; nativeBuildInputs = [ diff --git a/pkgs/build-support/kernel/make-initrd-ng/README.md b/pkgs/build-support/kernel/make-initrd-ng/README.md index 741eba67e43f..d92b7eab7fe1 100644 --- a/pkgs/build-support/kernel/make-initrd-ng/README.md +++ b/pkgs/build-support/kernel/make-initrd-ng/README.md @@ -38,6 +38,9 @@ object is copied depends on its type. - If it is *also* an ELF file, then all of its direct shared library dependencies are also listed as objects to be copied. + - If an unwrapped file exists as `.[filename]-wrapped`, then it is + also listed as an object to be copied. + 2. A directory's direct children are listed as objects to be copied, and a directory at the same absolute path in the initrd is created. diff --git a/pkgs/build-support/kernel/make-initrd-ng/src/main.rs b/pkgs/build-support/kernel/make-initrd-ng/src/main.rs index 89a7c08fda7e..c23713b723c3 100644 --- a/pkgs/build-support/kernel/make-initrd-ng/src/main.rs +++ b/pkgs/build-support/kernel/make-initrd-ng/src/main.rs @@ -1,8 +1,9 @@ use std::collections::{HashSet, VecDeque}; use std::env; -use std::ffi::OsStr; +use std::ffi::{OsStr, OsString}; use std::fs; use std::hash::Hash; +use std::iter::FromIterator; use std::io::{BufRead, BufReader, Error}; use std::os::unix; use std::path::{Component, Path, PathBuf}; @@ -163,6 +164,19 @@ fn handle_path( let typ = fs::symlink_metadata(&source)?.file_type(); if typ.is_file() && !target.exists() { copy_file(&source, &target, queue)?; + + if let Some(filename) = source.file_name() { + source.set_file_name(OsString::from_iter([ + OsStr::new("."), + filename, + OsStr::new("-wrapped"), + ])); + + let wrapped_path = source.as_path(); + if wrapped_path.exists() { + queue.push_back(Box::from(wrapped_path)); + } + } } else if typ.is_symlink() { let link_target = fs::read_link(&source)?; diff --git a/pkgs/build-support/node/fetch-npm-deps/default.nix b/pkgs/build-support/node/fetch-npm-deps/default.nix index 7d6277df987f..d87071d8559f 100644 --- a/pkgs/build-support/node/fetch-npm-deps/default.nix +++ b/pkgs/build-support/node/fetch-npm-deps/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenvNoCC, rustPlatform, makeWrapper, Security, gnutar, gzip, testers, fetchurl, prefetch-npm-deps, fetchNpmDeps }: +{ lib, stdenvNoCC, rustPlatform, makeWrapper, Security, gnutar, gzip, nix, testers, fetchurl, prefetch-npm-deps, fetchNpmDeps }: { prefetch-npm-deps = rustPlatform.buildRustPackage { @@ -20,7 +20,7 @@ buildInputs = lib.optional stdenvNoCC.isDarwin Security; postInstall = '' - wrapProgram "$out/bin/prefetch-npm-deps" --prefix PATH : ${lib.makeBinPath [ gnutar gzip ]} + wrapProgram "$out/bin/prefetch-npm-deps" --prefix PATH : ${lib.makeBinPath [ gnutar gzip nix ]} ''; passthru.tests = diff --git a/pkgs/build-support/vm/deb/deb-closure.pl b/pkgs/build-support/vm/deb/deb-closure.pl index fe23025df1d8..2d331e18dfeb 100644 --- a/pkgs/build-support/vm/deb/deb-closure.pl +++ b/pkgs/build-support/vm/deb/deb-closure.pl @@ -156,7 +156,7 @@ foreach my $pkgName (@order) { $cleanedName =~ s/~//g; print " (fetchurl {\n"; - print " url = $urlPrefix/$cdata->{Filename};\n"; + print " url = \"$urlPrefix/$cdata->{Filename}\";\n"; print " sha256 = \"$cdata->{SHA256}\";\n"; print " name = \"$cleanedName\";\n" if $cleanedName ne $origName; print " })\n"; diff --git a/pkgs/data/fonts/proggyfonts/default.nix b/pkgs/data/fonts/proggyfonts/default.nix index e8881fce3674..195b6ed1d39a 100644 --- a/pkgs/data/fonts/proggyfonts/default.nix +++ b/pkgs/data/fonts/proggyfonts/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - homepage = "http://www.upperbounds.net"; + homepage = "https://www.upperbounds.net"; description = "A set of fixed-width screen fonts that are designed for code listings"; license = licenses.mit; platforms = platforms.all; diff --git a/pkgs/data/misc/clash-geoip/default.nix b/pkgs/data/misc/clash-geoip/default.nix index c138ac710d57..7c28c82e8646 100644 --- a/pkgs/data/misc/clash-geoip/default.nix +++ b/pkgs/data/misc/clash-geoip/default.nix @@ -2,11 +2,11 @@ stdenvNoCC.mkDerivation rec { pname = "clash-geoip"; - version = "20230112"; + version = "20230212"; src = fetchurl { url = "https://github.com/Dreamacro/maxmind-geoip/releases/download/${version}/Country.mmdb"; - sha256 = "sha256-mMu+U3gtoZmi6LrTMTqsNZKZ+w4J6LZ16Aorneyy7P8="; + sha256 = "sha256-Tnma6tpET4Vrm5G8KmLpsVnpD2JIKts56kZQsBIbRZ8="; }; dontUnpack = true; diff --git a/pkgs/desktops/cinnamon/warpinator/default.nix b/pkgs/desktops/cinnamon/warpinator/default.nix index 7bdfb469c346..a488baab0071 100644 --- a/pkgs/desktops/cinnamon/warpinator/default.nix +++ b/pkgs/desktops/cinnamon/warpinator/default.nix @@ -15,7 +15,7 @@ python3.pkgs.buildPythonApplication rec { pname = "warpinator"; - version = "1.4.4"; + version = "1.4.5"; format = "other"; @@ -23,7 +23,7 @@ python3.pkgs.buildPythonApplication rec { owner = "linuxmint"; repo = pname; rev = version; - hash = "sha256-oHJOwdCvHnPalTHb5E3mNDYBaR9ZvlV1F6ux7nejBlc="; + hash = "sha256-5mMV4WinpFR9ihgoQsgIXre0VpBdg9S8GjSkx+7ocLg="; }; nativeBuildInputs = [ diff --git a/pkgs/desktops/deepin/artwork/deepin-wallpapers/default.nix b/pkgs/desktops/deepin/artwork/deepin-wallpapers/default.nix new file mode 100644 index 000000000000..74a8786abe34 --- /dev/null +++ b/pkgs/desktops/deepin/artwork/deepin-wallpapers/default.nix @@ -0,0 +1,45 @@ +{ stdenv +, lib +, fetchFromGitHub +, dde-api +}: + +stdenv.mkDerivation rec { + pname = "deepin-wallpapers"; + version = "1.7.10"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "sha256-D7DXyPh74VlYn5vKUzDh/P/xoskxs8N/BEg5ZemXRwk="; + }; + + nativeBuildInputs = [ dde-api ]; + + postPatch = '' + patchShebangs blur_image.sh + + substituteInPlace blur_image.sh \ + --replace /usr/lib/deepin-api/image-blur ${dde-api}/lib/deepin-api/image-blur + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/wallpapers/deepin + cp deepin/* $out/share/wallpapers/deepin + mkdir -p $out/share/wallpapers/image-blur + cp image-blur/* $out/share/wallpapers/image-blur + mkdir -p $out/share/backgrounds + ln -s $out/share/wallpapers/deepin/desktop.jpg $out/share/backgrounds/default_background.jpg + runHook postInstall + ''; + + meta = with lib; { + description = "deepin-wallpapers provides wallpapers of dde"; + homepage = "https://github.com/linuxdeepin/deepin-wallpapers"; + license = with licenses; [ gpl3Plus cc-by-sa-30 ]; + platforms = platforms.linux; + maintainers = teams.deepin.members; + }; +} diff --git a/pkgs/desktops/deepin/core/dde-polkit-agent/default.nix b/pkgs/desktops/deepin/core/dde-polkit-agent/default.nix new file mode 100644 index 000000000000..a1acab05cf1a --- /dev/null +++ b/pkgs/desktops/deepin/core/dde-polkit-agent/default.nix @@ -0,0 +1,61 @@ +{ stdenv +, lib +, fetchFromGitHub +, dtkwidget +, qt5integration +, qt5platform-plugins +, dde-qt-dbus-factory +, pkg-config +, cmake +, qttools +, wrapQtAppsHook +, polkit-qt +, qtbase +}: +stdenv.mkDerivation rec { + pname = "dde-polkit-agent"; + version = "5.5.22"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "sha256-4wAqMymLPxKXbfAx2PtkEGfwenphPxBZn+qCdcyqNc0="; + }; + + postPatch = '' + substituteInPlace AuthDialog.cpp \ + --replace "/usr/share/dde-session-shell/dde-session-shell.conf" "/etc/dde-session-shell/dde-session-shell.conf" + ''; + + nativeBuildInputs = [ + cmake + pkg-config + qttools + wrapQtAppsHook + ]; + + buildInputs = [ + dtkwidget + qt5platform-plugins + dde-qt-dbus-factory + polkit-qt + ]; + + # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH + qtWrapperArgs = [ + "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}" + ]; + + postFixup = '' + wrapQtApp $out/lib/polkit-1-dde/dde-polkit-agent + ''; + + meta = with lib; { + description = "PolicyKit agent for Deepin Desktop Environment"; + homepage = "https://github.com/linuxdeepin/dde-polkit-agent"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = teams.deepin.members; + }; +} diff --git a/pkgs/desktops/deepin/core/dpa-ext-gnomekeyring/default.nix b/pkgs/desktops/deepin/core/dpa-ext-gnomekeyring/default.nix new file mode 100644 index 000000000000..f9b4e7592fb8 --- /dev/null +++ b/pkgs/desktops/deepin/core/dpa-ext-gnomekeyring/default.nix @@ -0,0 +1,51 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, pkg-config +, qttools +, wrapQtAppsHook +, dtkwidget +, dde-polkit-agent +, libsecret +, libgnome-keyring +}: + +stdenv.mkDerivation rec { + pname = "dpa-ext-gnomekeyring"; + version = "5.0.11"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "sha256-mXaGwbtEwaqfOT0izK64zX4s3VFmsRpUGOVm6oSEhn8="; + }; + + postPatch = '' + substituteInPlace gnomekeyringextention.cpp \ + --replace "/usr/share/dpa-ext-gnomekeyring" "$out/share/dpa-ext-gnomekeyring" + ''; + + nativeBuildInputs = [ + cmake + pkg-config + qttools + wrapQtAppsHook + ]; + + buildInputs = [ + dtkwidget + dde-polkit-agent + libgnome-keyring + libsecret + ]; + + meta = with lib; { + description = "GNOME keyring extension for dde-polkit-agent"; + homepage = "https://github.com/linuxdeepin/dpa-ext-gnomekeyring"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = teams.deepin.members; + }; +} diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 5afb5e03059c..653372d47ffa 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -29,6 +29,10 @@ let image-editor = callPackage ./library/image-editor { }; udisks2-qt5 = callPackage ./library/udisks2-qt5 { }; + #### CORE + dde-polkit-agent = callPackage ./core/dde-polkit-agent { }; + dpa-ext-gnomekeyring = callPackage ./core/dpa-ext-gnomekeyring { }; + #### Dtk Application deepin-album = callPackage ./apps/deepin-album { }; deepin-calculator = callPackage ./apps/deepin-calculator { }; @@ -54,6 +58,7 @@ let #### ARTWORK dde-account-faces = callPackage ./artwork/dde-account-faces { }; deepin-icon-theme = callPackage ./artwork/deepin-icon-theme { }; + deepin-wallpapers = callPackage ./artwork/deepin-wallpapers { }; deepin-gtk-theme = callPackage ./artwork/deepin-gtk-theme { }; deepin-sound-theme = callPackage ./artwork/deepin-sound-theme { }; diff --git a/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix b/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix index 29a60e5513af..759fd1d9bfe3 100644 --- a/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix +++ b/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix @@ -1,14 +1,14 @@ -{ lib, stdenv, fetchFromGitHub, substituteAll, glib, gnome, gettext }: +{ lib, stdenv, fetchFromGitHub, substituteAll, glib, gnome, gettext, jq }: stdenv.mkDerivation rec { pname = "gnome-shell-extension-EasyScreenCast"; - version = "1.4.0"; + version = "1.7.0"; src = fetchFromGitHub { owner = "EasyScreenCast"; repo = "EasyScreenCast"; rev = version; - sha256 = "sha256-+lh/hqYC9+DUvLE016KuAY4Ybw8KrqEEG7WG4pUbg2k="; + hash = "sha256-+cH/gczCdxoSrLp5nD82Spo8bSGyRnUUut3Xkmr9f3o="; }; patches = [ @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ - glib gettext + glib gettext jq ]; makeFlags = [ "INSTALLBASE=$(out)/share/gnome-shell/extensions" ]; diff --git a/pkgs/desktops/gnome/extensions/EasyScreenCast/fix-gi-path.patch b/pkgs/desktops/gnome/extensions/EasyScreenCast/fix-gi-path.patch index 2d32021b6c66..4ea048ba79bf 100644 --- a/pkgs/desktops/gnome/extensions/EasyScreenCast/fix-gi-path.patch +++ b/pkgs/desktops/gnome/extensions/EasyScreenCast/fix-gi-path.patch @@ -1,16 +1,40 @@ -diff --git i/utilaudio.js w/utilaudio.js -index 983b29c..7a94de8 100644 ---- i/utilaudio.js -+++ w/utilaudio.js -@@ -11,10 +11,7 @@ - */ +diff --git a/prefs.js b/prefs.js +index 97b85a3..2fc6539 100644 +--- a/prefs.js ++++ b/prefs.js +@@ -14,8 +14,8 @@ + 'use strict'; const GIRepository = imports.gi.GIRepository; --GIRepository.Repository.prepend_search_path("/usr/lib/gnome-shell"); --GIRepository.Repository.prepend_library_path("/usr/lib/gnome-shell"); --GIRepository.Repository.prepend_search_path("/usr/lib64/gnome-shell"); --GIRepository.Repository.prepend_library_path("/usr/lib64/gnome-shell"); +-GIRepository.Repository.prepend_search_path('/usr/lib64/gnome-shell'); +-GIRepository.Repository.prepend_library_path('/usr/lib64/gnome-shell'); ++GIRepository.Repository.prepend_search_path('@gnomeShell@/lib/gnome-shell'); ++GIRepository.Repository.prepend_library_path('@gnomeShell@/lib/gnome-shell'); + + const GObject = imports.gi.GObject; + const Gio = imports.gi.Gio; +@@ -746,7 +746,7 @@ const EasyScreenCastSettingsWidget = GObject.registerClass({ + Lib.TalkativeLog('-^-NOT SET xdg-user video'); + + ctx.CtrlExe.Execute( +- '/usr/bin/sh -c "echo $HOME"', ++ '/bin/sh -c "echo $HOME"', + true, + (success, out) => { + Lib.TalkativeLog(`-^-CALLBACK sync S: ${success} out: ${out}`); +diff --git a/utilaudio.js b/utilaudio.js +index 957eda2..84af241 100644 +--- a/utilaudio.js ++++ b/utilaudio.js +@@ -15,10 +15,7 @@ + + const GObject = imports.gi.GObject; + const GIRepository = imports.gi.GIRepository; +-GIRepository.Repository.prepend_search_path('/usr/lib/gnome-shell'); +-GIRepository.Repository.prepend_library_path('/usr/lib/gnome-shell'); +-GIRepository.Repository.prepend_search_path('/usr/lib64/gnome-shell'); +-GIRepository.Repository.prepend_library_path('/usr/lib64/gnome-shell'); +GIRepository.Repository.prepend_search_path("@gnomeShell@/lib/gnome-shell"); const Gvc = imports.gi.Gvc; - const Lang = imports.lang; + const ExtensionUtils = imports.misc.extensionUtils; diff --git a/pkgs/development/compilers/ligo/default.nix b/pkgs/development/compilers/ligo/default.nix index 72f4a9591184..93ef913b4a7d 100644 --- a/pkgs/development/compilers/ligo/default.nix +++ b/pkgs/development/compilers/ligo/default.nix @@ -10,12 +10,12 @@ ocamlPackages.buildDunePackage rec { pname = "ligo"; - version = "0.59.0"; + version = "0.60.0"; src = fetchFromGitLab { owner = "ligolang"; repo = "ligo"; rev = version; - sha256 = "sha256-JwFFreUV70W5soXY0UF8/4QlN2oWejdxqwh4KT5VDoQ="; + sha256 = "sha256-gyMSpy+F3pF2Kv1ygUs20mrspJ6GtJ6ySyZD7zfZj2w="; fetchSubmodules = true; }; @@ -94,6 +94,7 @@ ocamlPackages.buildDunePackage rec { data-encoding pure-splitmix zarith_stubs_js + simple-diff ]; nativeCheckInputs = [ diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix index 1fa52721ddb9..c2cc7bb40b5f 100644 --- a/pkgs/development/compilers/ocaml/generic.nix +++ b/pkgs/development/compilers/ocaml/generic.nix @@ -17,7 +17,7 @@ in assert useX11 -> safeX11 stdenv; assert aflSupport -> lib.versionAtLeast version "4.05"; assert flambdaSupport -> lib.versionAtLeast version "4.03"; -assert spaceTimeSupport -> lib.versionAtLeast version "4.04"; +assert spaceTimeSupport -> lib.versionAtLeast version "4.04" && lib.versionOlder version "4.12"; assert unsafeStringSupport -> lib.versionAtLeast version "4.06" && lib.versionOlder version "5.0"; let diff --git a/pkgs/development/compilers/rust/clippy.nix b/pkgs/development/compilers/rust/clippy.nix index 23b8e7effe12..499db45021ea 100644 --- a/pkgs/development/compilers/rust/clippy.nix +++ b/pkgs/development/compilers/rust/clippy.nix @@ -10,7 +10,7 @@ rustPlatform.buildRustPackage { # changes hash of vendor directory otherwise dontUpdateAutotoolsGnuConfigScripts = true; - buildInputs = [ rustc rustc.llvm ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ rustc.llvm ] ++ lib.optionals stdenv.isDarwin [ Security ]; # fixes: error: the option `Z` is only accepted on the nightly compiler RUSTC_BOOTSTRAP = 1; @@ -20,14 +20,21 @@ rustPlatform.buildRustPackage { # (/private/tmp/nix-build-clippy-1.36.0.drv-0/rustc-1.36.0-src/src/librustc_llvm) doCheck = false; + # Clippy uses the rustc_driver and std private libraries, and Rust's build process forces them to have + # an install name of `@rpath/...` [0] [1] instead of the standard on macOS, which is an absolute path + # to itself. + # + # [0]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/src/bootstrap/builder.rs#L1543 + # [1]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/compiler/rustc_codegen_ssa/src/back/linker.rs#L323-L331 preFixup = lib.optionalString stdenv.isDarwin '' - install_name_tool -add_rpath "${rustc}/lib" $out/bin/clippy-driver + install_name_tool -add_rpath "${rustc}/lib" "$out/bin/clippy-driver" + install_name_tool -add_rpath "${rustc}/lib" "$out/bin/cargo-clippy" ''; meta = with lib; { homepage = "https://rust-lang.github.io/rust-clippy/"; description = "A bunch of lints to catch common mistakes and improve your Rust code"; - maintainers = with maintainers; [ basvandijk ]; + maintainers = with maintainers; [ basvandijk ] ++ teams.rust.members; license = with licenses; [ mit asl20 ]; platforms = platforms.unix; }; diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 60f07a64299a..130cb8326115 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -11,6 +11,8 @@ , sha256 , patches ? [] , fd +, ripgrep +, wezterm , firefox , thunderbird }: @@ -204,7 +206,9 @@ in stdenv.mkDerivation rec { passthru = { llvm = llvmShared; inherit llvmPackages; - tests = { inherit fd; } // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit firefox thunderbird; }; + tests = { + inherit fd ripgrep wezterm; + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit firefox thunderbird; }; }; meta = with lib; { diff --git a/pkgs/development/interpreters/love/0.10.nix b/pkgs/development/interpreters/love/0.10.nix index 5e97e4f003e2..881bc59ccff2 100644 --- a/pkgs/development/interpreters/love/0.10.nix +++ b/pkgs/development/interpreters/love/0.10.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "love"; - version = "11.4"; + version = "0.10.2"; src = fetchFromGitHub { owner = "love2d"; repo = "love"; rev = version; - sha256 = "sha256-C/Ifd0KjmaM5Y2fxBiDNz1GQoT4GeH/vyUCiira57U4="; + sha256 = "19yfmlcx6w8yi4ndm5lni8lrsvnn77bxw5py0dc293nzzlaqa9ym"; }; nativeBuildInputs = [ pkg-config autoconf automake ]; diff --git a/pkgs/development/interpreters/metamath/default.nix b/pkgs/development/interpreters/metamath/default.nix index e83a724d25d2..c9a490ddc4e3 100644 --- a/pkgs/development/interpreters/metamath/default.nix +++ b/pkgs/development/interpreters/metamath/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { in the Metamath Proof Explorer, and it generated its web pages. The *.mm ASCII databases (set.mm and others) are also included in this derivation. ''; - homepage = "http://us.metamath.org"; + homepage = "https://us.metamath.org"; downloadPage = "https://us.metamath.org/#downloads"; license = licenses.gpl2Plus; maintainers = [ maintainers.taneb ]; diff --git a/pkgs/development/libraries/armadillo/default.nix b/pkgs/development/libraries/armadillo/default.nix index 2b07d3a87a64..d3bee03c5e19 100644 --- a/pkgs/development/libraries/armadillo/default.nix +++ b/pkgs/development/libraries/armadillo/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "C++ linear algebra library"; - homepage = "http://arma.sourceforge.net"; + homepage = "https://arma.sourceforge.net"; license = licenses.asl20; platforms = platforms.unix; maintainers = with maintainers; [ juliendehos knedlsepp ]; diff --git a/pkgs/development/libraries/clucene-core/2.x.nix b/pkgs/development/libraries/clucene-core/2.x.nix index d928b814e826..538c4ceb4f55 100644 --- a/pkgs/development/libraries/clucene-core/2.x.nix +++ b/pkgs/development/libraries/clucene-core/2.x.nix @@ -37,6 +37,10 @@ stdenv.mkDerivation rec { ./Install-contribs-lib.patch # From arch ./fix-missing-include-time.patch + + # required for darwin and linux-musl + ./pthread-include.patch + ] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ]; # fails with "Unable to find executable: @@ -57,7 +61,7 @@ stdenv.mkDerivation rec { CLucene is a port of the very popular Java Lucene text search engine API. ''; - homepage = "http://clucene.sourceforge.net"; + homepage = "https://clucene.sourceforge.net"; platforms = platforms.unix; license = with licenses; [ asl20 lgpl2 ]; }; diff --git a/pkgs/development/libraries/clucene-core/default.nix b/pkgs/development/libraries/clucene-core/default.nix index 58c24069a3a4..7687694d0f68 100644 --- a/pkgs/development/libraries/clucene-core/default.nix +++ b/pkgs/development/libraries/clucene-core/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { CLucene is a port of the very popular Java Lucene text search engine API. ''; - homepage = "http://clucene.sourceforge.net"; + homepage = "https://clucene.sourceforge.net"; platforms = platforms.unix; license = with licenses; [ asl20 lgpl2 ]; }; diff --git a/pkgs/development/libraries/clucene-core/fix-darwin.patch b/pkgs/development/libraries/clucene-core/fix-darwin.patch index c06413f3c2e1..cb47a4f3763f 100644 --- a/pkgs/development/libraries/clucene-core/fix-darwin.patch +++ b/pkgs/development/libraries/clucene-core/fix-darwin.patch @@ -1,16 +1,3 @@ ---- a/src/shared/CLucene/LuceneThreads.h -+++ b/src/shared/CLucene/LuceneThreads.h -@@ -7,6 +7,9 @@ - #ifndef _LuceneThreads_h - #define _LuceneThreads_h - -+#if defined(_CL_HAVE_PTHREAD) -+ #include -+#endif - - CL_NS_DEF(util) - class CLuceneThreadIdCompare; - --- a/src/shared/CLucene/config/repl_tchar.h +++ b/src/shared/CLucene/config/repl_tchar.h @@ -28,26 +28,26 @@ diff --git a/pkgs/development/libraries/clucene-core/pthread-include.patch b/pkgs/development/libraries/clucene-core/pthread-include.patch new file mode 100644 index 000000000000..73a168c132f4 --- /dev/null +++ b/pkgs/development/libraries/clucene-core/pthread-include.patch @@ -0,0 +1,14 @@ +--- a/src/shared/CLucene/LuceneThreads.h ++++ b/src/shared/CLucene/LuceneThreads.h +@@ -7,6 +7,9 @@ + #ifndef _LuceneThreads_h + #define _LuceneThreads_h + ++#if defined(_CL_HAVE_PTHREAD) ++ #include ++#endif + + CL_NS_DEF(util) + class CLuceneThreadIdCompare; + + diff --git a/pkgs/development/libraries/dbus-cplusplus/default.nix b/pkgs/development/libraries/dbus-cplusplus/default.nix index 1e38ddf44e19..263ddc636528 100644 --- a/pkgs/development/libraries/dbus-cplusplus/default.nix +++ b/pkgs/development/libraries/dbus-cplusplus/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--disable-ecore" "--disable-tests" ]; meta = with lib; { - homepage = "http://dbus-cplusplus.sourceforge.net"; + homepage = "https://dbus-cplusplus.sourceforge.net"; description = "C++ API for D-BUS"; license = licenses.gpl2Plus; platforms = platforms.linux; diff --git a/pkgs/development/libraries/gtkspell/default.nix b/pkgs/development/libraries/gtkspell/default.nix index 9c5c2b614fa2..eb8b1363c32b 100644 --- a/pkgs/development/libraries/gtkspell/default.nix +++ b/pkgs/development/libraries/gtkspell/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Word-processor-style highlighting and replacement of misspelled words"; - homepage = "http://gtkspell.sourceforge.net"; + homepage = "https://gtkspell.sourceforge.net"; platforms = platforms.unix; license = licenses.gpl2; }; diff --git a/pkgs/development/libraries/hamlib/4.nix b/pkgs/development/libraries/hamlib/4.nix index b199bb27397b..ffaa53ccffe2 100644 --- a/pkgs/development/libraries/hamlib/4.nix +++ b/pkgs/development/libraries/hamlib/4.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { command line interface or in a text-oriented interactive interface. ''; license = with licenses; [ gpl2Plus lgpl2Plus ]; - homepage = "http://hamlib.sourceforge.net"; + homepage = "https://hamlib.sourceforge.net"; maintainers = with maintainers; [ relrod ]; platforms = with platforms; unix; }; diff --git a/pkgs/development/libraries/hamlib/default.nix b/pkgs/development/libraries/hamlib/default.nix index 31b620ae5d2e..9250a66c219e 100644 --- a/pkgs/development/libraries/hamlib/default.nix +++ b/pkgs/development/libraries/hamlib/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { command line interface or in a text-oriented interactive interface. ''; license = with licenses; [ gpl2Plus lgpl2Plus ]; - homepage = "http://hamlib.sourceforge.net"; + homepage = "https://hamlib.sourceforge.net"; maintainers = with maintainers; [ relrod ]; platforms = with platforms; unix; }; diff --git a/pkgs/development/libraries/hunspell/default.nix b/pkgs/development/libraries/hunspell/default.nix index 324b4337c874..2f48bd668de4 100644 --- a/pkgs/development/libraries/hunspell/default.nix +++ b/pkgs/development/libraries/hunspell/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; meta = with lib; { - homepage = "http://hunspell.sourceforge.net"; + homepage = "https://hunspell.sourceforge.net"; description = "Spell checker"; longDescription = '' Hunspell is the spell checker of LibreOffice, OpenOffice.org, Mozilla diff --git a/pkgs/development/libraries/id3lib/default.nix b/pkgs/development/libraries/id3lib/default.nix index 8f5512e94db5..e95f5e3cab2d 100644 --- a/pkgs/development/libraries/id3lib/default.nix +++ b/pkgs/development/libraries/id3lib/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags"; - homepage = "http://id3lib.sourceforge.net"; + homepage = "https://id3lib.sourceforge.net"; platforms = platforms.unix; license = licenses.lgpl2; }; diff --git a/pkgs/development/libraries/java/httpunit/default.nix b/pkgs/development/libraries/java/httpunit/default.nix index a93a646e21ac..07afdabd89b2 100644 --- a/pkgs/development/libraries/java/httpunit/default.nix +++ b/pkgs/development/libraries/java/httpunit/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - homepage = "http://httpunit.sourceforge.net"; + homepage = "https://httpunit.sourceforge.net"; platforms = platforms.unix; license = licenses.mit; }; diff --git a/pkgs/development/libraries/lesstif/default.nix b/pkgs/development/libraries/lesstif/default.nix index a5c37dd0f04f..e0bd674e4daa 100644 --- a/pkgs/development/libraries/lesstif/default.nix +++ b/pkgs/development/libraries/lesstif/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "An open source clone of the Motif widget set"; - homepage = "http://lesstif.sourceforge.net"; + homepage = "https://lesstif.sourceforge.net"; platforms = platforms.unix; license = with licenses; [ gpl2 lgpl2 ]; }; diff --git a/pkgs/development/libraries/libcdaudio/default.nix b/pkgs/development/libraries/libcdaudio/default.nix index dccad33dda93..134f9d7f8f33 100644 --- a/pkgs/development/libraries/libcdaudio/default.nix +++ b/pkgs/development/libraries/libcdaudio/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { meta = { description = "A portable library for controlling audio CDs"; - homepage = "http://libcdaudio.sourceforge.net"; + homepage = "https://libcdaudio.sourceforge.net"; platforms = lib.platforms.linux; license = lib.licenses.lgpl2; }; diff --git a/pkgs/development/libraries/libiodbc/default.nix b/pkgs/development/libraries/libiodbc/default.nix index eb34bc56f443..6b9510a46ba5 100644 --- a/pkgs/development/libraries/libiodbc/default.nix +++ b/pkgs/development/libraries/libiodbc/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "iODBC driver manager"; - homepage = "http://www.iodbc.org"; + homepage = "https://www.iodbc.org"; platforms = platforms.unix; license = licenses.bsd3; }; diff --git a/pkgs/development/libraries/liblastfmSF/default.nix b/pkgs/development/libraries/liblastfmSF/default.nix index 74d32a6cc748..f25ee3afae4a 100644 --- a/pkgs/development/libraries/liblastfmSF/default.nix +++ b/pkgs/development/libraries/liblastfmSF/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; meta = { - homepage = "http://liblastfm.sourceforge.net"; + homepage = "https://liblastfm.sourceforge.net"; description = "Unofficial C lastfm library"; license = lib.licenses.gpl3; }; diff --git a/pkgs/development/libraries/liblouis/default.nix b/pkgs/development/libraries/liblouis/default.nix index da724aaac9b4..b9b61214462c 100644 --- a/pkgs/development/libraries/liblouis/default.nix +++ b/pkgs/development/libraries/liblouis/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Open-source braille translator and back-translator"; - homepage = "http://liblouis.org/"; + homepage = "https://liblouis.org/"; license = with licenses; [ lgpl21Plus # library gpl3Plus # tools diff --git a/pkgs/development/libraries/libmcrypt/default.nix b/pkgs/development/libraries/libmcrypt/default.nix index cdd6a7b2ec50..d1f048ee2c53 100644 --- a/pkgs/development/libraries/libmcrypt/default.nix +++ b/pkgs/development/libraries/libmcrypt/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { meta = { description = "Replacement for the old crypt() package and crypt(1) command, with extensions"; - homepage = "http://mcrypt.sourceforge.net"; + homepage = "https://mcrypt.sourceforge.net"; license = "GPL"; platforms = lib.platforms.all; }; diff --git a/pkgs/development/libraries/libmhash/default.nix b/pkgs/development/libraries/libmhash/default.nix index f569ce7fac75..0cccefb99980 100644 --- a/pkgs/development/libraries/libmhash/default.nix +++ b/pkgs/development/libraries/libmhash/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { following rfc2104 (HMAC). It also includes some key generation algorithms which are based on hash algorithms. ''; - homepage = "http://mhash.sourceforge.net"; + homepage = "https://mhash.sourceforge.net"; license = "LGPL"; platforms = lib.platforms.unix; }; diff --git a/pkgs/development/libraries/librtlsdr/default.nix b/pkgs/development/libraries/librtlsdr/default.nix deleted file mode 100644 index c09575924a0a..000000000000 --- a/pkgs/development/libraries/librtlsdr/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, pkg-config -, libusb1 -}: - -stdenv.mkDerivation rec { - pname = "librtlsdr"; - version = "0.8.0"; - - src = fetchFromGitHub { - owner = "librtlsdr"; - repo = "librtlsdr"; - rev = "v${version}"; - sha256 = "sha256-s03h+3EfC5c7yRYBM6aCRWtmstwRJWuBywuyVt+k/bk="; - }; - - postPatch = '' - substituteInPlace CMakeLists.txt \ - --replace '/etc/udev/rules.d' "$out/etc/udev/rules.d" - - substituteInPlace rtl-sdr.rules \ - --replace 'MODE:="0666"' 'ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"' - ''; - - nativeBuildInputs = [ pkg-config cmake ]; - - propagatedBuildInputs = [ libusb1 ]; - - meta = with lib; { - description = "Turns your Realtek RTL2832 based DVB dongle into a SDR receiver"; - homepage = "https://github.com/librtlsdr/librtlsdr"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ bjornfor ]; - platforms = platforms.linux ++ platforms.darwin; - }; -} diff --git a/pkgs/development/libraries/liburing/0001-Add-custom-error-function-for-tests.patch b/pkgs/development/libraries/liburing/0001-Add-custom-error-function-for-tests.patch new file mode 100644 index 000000000000..191f6ae8cd5a --- /dev/null +++ b/pkgs/development/libraries/liburing/0001-Add-custom-error-function-for-tests.patch @@ -0,0 +1,66 @@ +From d4714fd7aac9c5f499c406703bc437dc6cf72ef3 Mon Sep 17 00:00:00 2001 +From: Steffen +Date: Mon, 13 Feb 2023 17:32:16 +0100 +Subject: [PATCH 1/3] Add custom error function for tests. + +On musl systems, liburing cannot build examples and tests due to +it's usage of error.h. t_error calls fprintf(stderr, ...) and +exits. + +Closes: #786 + +Signed-off-by: Steffen Winter +--- + test/helpers.c | 18 ++++++++++++++++++ + test/helpers.h | 2 ++ + 2 files changed, 20 insertions(+) + +diff --git a/test/helpers.c b/test/helpers.c +index 8fb32b8..caa887e 100644 +--- a/test/helpers.c ++++ b/test/helpers.c +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -266,3 +267,20 @@ bool t_probe_defer_taskrun(void) + io_uring_queue_exit(&ring); + return true; + } ++ ++/* ++ * Implementation of error(3), prints an error message and exits. ++ */ ++void t_error(int status, int errnum, const char *format, ...) ++{ ++ va_list args; ++ va_start(args, format); ++ ++ vfprintf(stderr, format, args); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ ++ fprintf(stderr, "\n"); ++ va_end(args); ++ exit(status); ++} +diff --git a/test/helpers.h b/test/helpers.h +index 4375a9e..33b82cf 100644 +--- a/test/helpers.h ++++ b/test/helpers.h +@@ -87,6 +87,8 @@ bool t_probe_defer_taskrun(void); + + #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + ++void t_error(int status, int errnum, const char *format, ...); ++ + #ifdef __cplusplus + } + #endif +-- +2.39.1 + diff --git a/pkgs/development/libraries/liburing/0002-test-Use-t_error-instead-of-glibc-s-error.patch b/pkgs/development/libraries/liburing/0002-test-Use-t_error-instead-of-glibc-s-error.patch new file mode 100644 index 000000000000..676b006482c4 --- /dev/null +++ b/pkgs/development/libraries/liburing/0002-test-Use-t_error-instead-of-glibc-s-error.patch @@ -0,0 +1,109 @@ +From e84f40ca872f0bce72b5686c95a11739d9c89494 Mon Sep 17 00:00:00 2001 +From: Steffen +Date: Mon, 13 Feb 2023 17:56:03 +0100 +Subject: [PATCH 2/3] test: Use t_error instead of glibc's error. + +On musl systems, liburing cannot build examples and tests due to +it's usage of error.h. Replacing calls to error() with t_error(). + +Closes: #786 + +Signed-off-by: Steffen Winter +--- + test/defer-taskrun.c | 1 - + test/send-zerocopy.c | 1 - + test/single-issuer.c | 15 +++++++-------- + 3 files changed, 7 insertions(+), 10 deletions(-) + +diff --git a/test/defer-taskrun.c b/test/defer-taskrun.c +index 9283f28..87cd256 100644 +--- a/test/defer-taskrun.c ++++ b/test/defer-taskrun.c +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/test/send-zerocopy.c b/test/send-zerocopy.c +index 4db102b..be33094 100644 +--- a/test/send-zerocopy.c ++++ b/test/send-zerocopy.c +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/test/single-issuer.c b/test/single-issuer.c +index 1d13f47..d71cd74 100644 +--- a/test/single-issuer.c ++++ b/test/single-issuer.c +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include + #include + +@@ -56,13 +55,13 @@ static int try_submit(struct io_uring *ring) + return ret; + + if (ret != 1) +- error(1, ret, "submit %i", ret); ++ t_error(1, ret, "submit %i", ret); + ret = io_uring_wait_cqe(ring, &cqe); + if (ret) +- error(1, ret, "wait fail %i", ret); ++ t_error(1, ret, "wait fail %i", ret); + + if (cqe->res || cqe->user_data != 42) +- error(1, ret, "invalid cqe"); ++ t_error(1, ret, "invalid cqe"); + + io_uring_cqe_seen(ring, cqe); + return 0; +@@ -106,7 +105,7 @@ int main(int argc, char *argv[]) + ret = io_uring_queue_init(8, &ring, IORING_SETUP_SINGLE_ISSUER | + IORING_SETUP_R_DISABLED); + if (ret) +- error(1, ret, "ring init (2) %i", ret); ++ t_error(1, ret, "ring init (2) %i", ret); + + if (!fork_t()) { + io_uring_enable_rings(&ring); +@@ -122,7 +121,7 @@ int main(int argc, char *argv[]) + ret = io_uring_queue_init(8, &ring, IORING_SETUP_SINGLE_ISSUER | + IORING_SETUP_R_DISABLED); + if (ret) +- error(1, ret, "ring init (3) %i", ret); ++ t_error(1, ret, "ring init (3) %i", ret); + + io_uring_enable_rings(&ring); + if (!fork_t()) { +@@ -137,7 +136,7 @@ int main(int argc, char *argv[]) + /* test that anyone can submit to a SQPOLL|SINGLE_ISSUER ring */ + ret = io_uring_queue_init(8, &ring, IORING_SETUP_SINGLE_ISSUER|IORING_SETUP_SQPOLL); + if (ret) +- error(1, ret, "ring init (4) %i", ret); ++ t_error(1, ret, "ring init (4) %i", ret); + + ret = try_submit(&ring); + if (ret) { +@@ -157,7 +156,7 @@ int main(int argc, char *argv[]) + /* test that IORING_ENTER_REGISTERED_RING doesn't break anything */ + ret = io_uring_queue_init(8, &ring, IORING_SETUP_SINGLE_ISSUER); + if (ret) +- error(1, ret, "ring init (5) %i", ret); ++ t_error(1, ret, "ring init (5) %i", ret); + + if (!fork_t()) { + ret = try_submit(&ring); +-- +2.39.1 + diff --git a/pkgs/development/libraries/liburing/0003-examples-Use-t_error-instead-of-glibc-s-error.patch b/pkgs/development/libraries/liburing/0003-examples-Use-t_error-instead-of-glibc-s-error.patch new file mode 100644 index 000000000000..ce92f16dcb18 --- /dev/null +++ b/pkgs/development/libraries/liburing/0003-examples-Use-t_error-instead-of-glibc-s-error.patch @@ -0,0 +1,226 @@ +From 23704bbd1416ed1a051b32d5d44e46dd654b8ffe Mon Sep 17 00:00:00 2001 +From: Steffen +Date: Mon, 13 Feb 2023 18:23:44 +0100 +Subject: [PATCH 3/3] examples: Use t_error instead of glibc's error. + +On musl systems, liburing cannot build examples and tests due to +it's usage of error.h. t_error copied from test/helpers.c. +Replacing calls to error() with t_error(). + +Closes: #786 + +Signed-off-by: Steffen Winter +--- + examples/send-zerocopy.c | 61 +++++++++++++++++++++++++--------------- + 1 file changed, 39 insertions(+), 22 deletions(-) + +diff --git a/examples/send-zerocopy.c b/examples/send-zerocopy.c +index 7f5f2b1..6092af9 100644 +--- a/examples/send-zerocopy.c ++++ b/examples/send-zerocopy.c +@@ -5,11 +5,11 @@ + #include + #include + #include +-#include + #include + #include + #include + #include ++#include + #include + + #include +@@ -57,6 +57,23 @@ static struct sockaddr_storage cfg_dst_addr; + + static char payload[IP_MAXPACKET] __attribute__((aligned(4096))); + ++/* ++ * Implementation of error(3), prints an error message and exits. ++ */ ++static void t_error(int status, int errnum, const char *format, ...) ++{ ++ va_list args; ++ va_start(args, format); ++ ++ vfprintf(stderr, format, args); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ ++ fprintf(stderr, "\n"); ++ va_end(args); ++ exit(status); ++} ++ + static unsigned long gettimeofday_ms(void) + { + struct timeval tv; +@@ -68,7 +85,7 @@ static unsigned long gettimeofday_ms(void) + static void do_setsockopt(int fd, int level, int optname, int val) + { + if (setsockopt(fd, level, optname, &val, sizeof(val))) +- error(1, errno, "setsockopt %d.%d: %d", level, optname, val); ++ t_error(1, errno, "setsockopt %d.%d: %d", level, optname, val); + } + + static void setup_sockaddr(int domain, const char *str_addr, +@@ -84,7 +101,7 @@ static void setup_sockaddr(int domain, const char *str_addr, + addr4->sin_port = htons(cfg_port); + if (str_addr && + inet_pton(AF_INET, str_addr, &(addr4->sin_addr)) != 1) +- error(1, 0, "ipv4 parse error: %s", str_addr); ++ t_error(1, 0, "ipv4 parse error: %s", str_addr); + break; + case PF_INET6: + memset(addr6, 0, sizeof(*addr6)); +@@ -92,10 +109,10 @@ static void setup_sockaddr(int domain, const char *str_addr, + addr6->sin6_port = htons(cfg_port); + if (str_addr && + inet_pton(AF_INET6, str_addr, &(addr6->sin6_addr)) != 1) +- error(1, 0, "ipv6 parse error: %s", str_addr); ++ t_error(1, 0, "ipv6 parse error: %s", str_addr); + break; + default: +- error(1, 0, "illegal domain"); ++ t_error(1, 0, "illegal domain"); + } + } + +@@ -105,12 +122,12 @@ static int do_setup_tx(int domain, int type, int protocol) + + fd = socket(domain, type, protocol); + if (fd == -1) +- error(1, errno, "socket t"); ++ t_error(1, errno, "socket t"); + + do_setsockopt(fd, SOL_SOCKET, SO_SNDBUF, 1 << 21); + + if (connect(fd, (void *) &cfg_dst_addr, cfg_alen)) +- error(1, errno, "connect"); ++ t_error(1, errno, "connect"); + return fd; + } + +@@ -125,7 +142,7 @@ static inline struct io_uring_cqe *wait_cqe_fast(struct io_uring *ring) + + ret = io_uring_wait_cqe(ring, &cqe); + if (ret) +- error(1, ret, "wait cqe"); ++ t_error(1, ret, "wait cqe"); + return cqe; + } + +@@ -143,17 +160,17 @@ static void do_tx(int domain, int type, int protocol) + + ret = io_uring_queue_init(512, &ring, IORING_SETUP_COOP_TASKRUN); + if (ret) +- error(1, ret, "io_uring: queue init"); ++ t_error(1, ret, "io_uring: queue init"); + + if (cfg_fixed_files) { + ret = io_uring_register_files(&ring, &fd, 1); + if (ret < 0) +- error(1, ret, "io_uring: files registration"); ++ t_error(1, ret, "io_uring: files registration"); + } + if (cfg_reg_ringfd) { + ret = io_uring_register_ring_fd(&ring); + if (ret < 0) +- error(1, ret, "io_uring: io_uring_register_ring_fd"); ++ t_error(1, ret, "io_uring: io_uring_register_ring_fd"); + } + + iov.iov_base = payload; +@@ -161,7 +178,7 @@ static void do_tx(int domain, int type, int protocol) + + ret = io_uring_register_buffers(&ring, &iov, 1); + if (ret) +- error(1, ret, "io_uring: buffer registration"); ++ t_error(1, ret, "io_uring: buffer registration"); + + tstop = gettimeofday_ms() + cfg_runtime_ms; + do { +@@ -193,14 +210,14 @@ static void do_tx(int domain, int type, int protocol) + + ret = io_uring_submit(&ring); + if (ret != cfg_nr_reqs) +- error(1, ret, "submit"); ++ t_error(1, ret, "submit"); + + for (i = 0; i < cfg_nr_reqs; i++) { + cqe = wait_cqe_fast(&ring); + + if (cqe->flags & IORING_CQE_F_NOTIF) { + if (cqe->flags & IORING_CQE_F_MORE) +- error(1, -EINVAL, "F_MORE notif"); ++ t_error(1, -EINVAL, "F_MORE notif"); + compl_cqes--; + i--; + io_uring_cqe_seen(&ring, cqe); +@@ -217,7 +234,7 @@ static void do_tx(int domain, int type, int protocol) + fprintf(stderr, "Connection failure"); + goto out_fail; + } else if (cqe->res != -EAGAIN) { +- error(1, cqe->res, "send failed"); ++ t_error(1, cqe->res, "send failed"); + } + io_uring_cqe_seen(&ring, cqe); + } +@@ -226,7 +243,7 @@ static void do_tx(int domain, int type, int protocol) + out_fail: + shutdown(fd, SHUT_RDWR); + if (close(fd)) +- error(1, errno, "close"); ++ t_error(1, errno, "close"); + + fprintf(stderr, "tx=%lu (MB=%lu), tx/s=%lu (MB/s=%lu)\n", + packets, bytes >> 20, +@@ -254,7 +271,7 @@ static void do_test(int domain, int type, int protocol) + + static void usage(const char *filepath) + { +- error(1, 0, "Usage: %s [-n] [-z] [-s] " ++ t_error(1, 0, "Usage: %s [-n] [-z] [-s] " + "(-4|-6) [-t