Merge branch 'master' into staging-next

This commit is contained in:
Artturin 2024-10-20 19:28:48 +03:00
commit a0a7eb6616
77 changed files with 2468 additions and 1401 deletions

View File

@ -406,6 +406,9 @@
* from `/var/log/private/gns3` to `/var/log/gns3`
and to change the ownership of these directories and their contents to `gns3` (including `/etc/gns3`).
- The `sshd` module now doesn't include `%h/.ssh/authorized_keys` as `AuthorizedKeysFile` unless
`services.openssh.authorizedKeysInHomedir` is set to `true` (the default is `false` for `stateVersion` 24.11 onwards).
- Legacy package `stalwart-mail_0_6` was dropped, please note the
[manual upgrade process](https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md)
before changing the package to `pkgs.stalwart-mail` in

View File

@ -108,6 +108,10 @@ let
};
usersWithKeys = lib.attrValues (lib.flip lib.filterAttrs config.users.users (n: u:
lib.length u.openssh.authorizedKeys.keys != 0 || lib.length u.openssh.authorizedKeys.keyFiles != 0
));
authKeysFiles = let
mkAuthKeyFile = u: lib.nameValuePair "ssh/authorized_keys.d/${u.name}" {
mode = "0444";
@ -116,9 +120,6 @@ let
${lib.concatMapStrings (f: lib.readFile f + "\n") u.openssh.authorizedKeys.keyFiles}
'';
};
usersWithKeys = lib.attrValues (lib.flip lib.filterAttrs config.users.users (n: u:
lib.length u.openssh.authorizedKeys.keys != 0 || lib.length u.openssh.authorizedKeys.keyFiles != 0
));
in lib.listToAttrs (map mkAuthKeyFile usersWithKeys);
authPrincipalsFiles = let
@ -302,7 +303,8 @@ in
authorizedKeysInHomedir = lib.mkOption {
type = lib.types.bool;
default = true;
default = lib.versionOlder config.system.stateVersion "24.11";
defaultText = lib.literalMD "`false` unless [](#opt-system.stateVersion) is 24.05 or older";
description = ''
Enables the use of the `~/.ssh/authorized_keys` file.
@ -544,6 +546,17 @@ in
config = lib.mkIf cfg.enable {
warnings = lib.optional (with cfg; lib.all lib.id [
# ~/.ssh/authorized_keys is ignored and no custom file locations were set
(authorizedKeysFiles == [ "/etc/ssh/authorized_keys.d/%u" ])
# no command provides authorized keys
(authorizedKeysCommand == "none")
# no users have keys in declarative configuration
(usersWithKeys == [])
# no authentication methods other than public keys are configured
((settings.PasswordAuthentication == false && !package.withKerberos) || settings.AuthenticationMethods == [ "publickey" ])
]) "services.openssh: no keys were set in `users.users.*.openssh.authorizedKeys` and `~/.ssh/authorized_keys` will be ignored";
users.users.sshd =
{
isSystemUser = true;

View File

@ -1,5 +1,10 @@
# Module for VirtualBox guests.
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.virtualisation.virtualbox.guest;
kernel = config.boot.kernelPackages;
@ -28,7 +33,20 @@ let
in
{
imports = [
(lib.mkRenamedOptionModule [ "virtualisation" "virtualbox" "guest" "draganddrop" ] [ "virtualisation" "virtualbox" "guest" "dragAndDrop" ])
(lib.mkRenamedOptionModule
[
"virtualisation"
"virtualbox"
"guest"
"draganddrop"
]
[
"virtualisation"
"virtualbox"
"guest"
"dragAndDrop"
]
)
];
options.virtualisation.virtualbox.guest = {
@ -59,36 +77,38 @@ in
###### implementation
config = lib.mkIf cfg.enable (lib.mkMerge [
{
assertions = [{
assertion = pkgs.stdenv.hostPlatform.isx86;
message = "Virtualbox not currently supported on ${pkgs.stdenv.hostPlatform.system}";
}];
config = lib.mkIf cfg.enable (
lib.mkMerge [
{
assertions = [
{
assertion = pkgs.stdenv.hostPlatform.isx86;
message = "Virtualbox not currently supported on ${pkgs.stdenv.hostPlatform.system}";
}
];
environment.systemPackages = [ kernel.virtualboxGuestAdditions ];
environment.systemPackages = [ kernel.virtualboxGuestAdditions ];
boot.extraModulePackages = [ kernel.virtualboxGuestAdditions ];
boot.extraModulePackages = [ kernel.virtualboxGuestAdditions ];
boot.supportedFilesystems = [ "vboxsf" ];
boot.initrd.supportedFilesystems = [ "vboxsf" ];
boot.supportedFilesystems = [ "vboxsf" ];
boot.initrd.supportedFilesystems = [ "vboxsf" ];
users.groups.vboxsf.gid = config.ids.gids.vboxsf;
users.groups.vboxsf.gid = config.ids.gids.vboxsf;
systemd.services.virtualbox = {
description = "VirtualBox Guest Services";
systemd.services.virtualbox = {
description = "VirtualBox Guest Services";
wantedBy = [ "multi-user.target" ];
requires = [ "dev-vboxguest.device" ];
after = [ "dev-vboxguest.device" ];
wantedBy = [ "multi-user.target" ];
requires = [ "dev-vboxguest.device" ];
after = [ "dev-vboxguest.device" ];
unitConfig.ConditionVirtualization = "oracle";
unitConfig.ConditionVirtualization = "oracle";
serviceConfig.ExecStart = "@${kernel.virtualboxGuestAdditions}/bin/VBoxService VBoxService --foreground";
};
serviceConfig.ExecStart = "@${kernel.virtualboxGuestAdditions}/bin/VBoxService VBoxService --foreground";
};
services.udev.extraRules =
''
services.udev.extraRules = ''
# /dev/vboxuser is necessary for VBoxClient to work. Maybe we
# should restrict this to logged-in users.
KERNEL=="vboxuser", OWNER="root", GROUP="root", MODE="0666"
@ -97,22 +117,17 @@ in
SUBSYSTEM=="misc", KERNEL=="vboxguest", TAG+="systemd"
'';
systemd.user.services.virtualboxClientVmsvga = mkVirtualBoxUserService "--vmsvga-session";
}
(
lib.mkIf cfg.clipboard {
systemd.user.services.virtualboxClientVmsvga = mkVirtualBoxUserService "--vmsvga-session";
}
(lib.mkIf cfg.clipboard {
systemd.user.services.virtualboxClientClipboard = mkVirtualBoxUserService "--clipboard";
}
)
(
lib.mkIf cfg.seamless {
})
(lib.mkIf cfg.seamless {
systemd.user.services.virtualboxClientSeamless = mkVirtualBoxUserService "--seamless";
}
)
(
lib.mkIf cfg.dragAndDrop {
})
(lib.mkIf cfg.dragAndDrop {
systemd.user.services.virtualboxClientDragAndDrop = mkVirtualBoxUserService "--draganddrop";
}
)
]);
})
]
);
}

View File

@ -1,9 +1,19 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.virtualisation.virtualbox.host;
virtualbox = cfg.package.override {
inherit (cfg) enableHardening headless enableWebService enableKvm;
inherit (cfg)
enableHardening
headless
enableWebService
enableKvm
;
extensionPack = if cfg.enableExtensionPack then pkgs.virtualboxExtpack else null;
};
@ -93,93 +103,119 @@ in
};
};
config = lib.mkIf cfg.enable (lib.mkMerge [{
warnings = lib.mkIf (pkgs.config.virtualbox.enableExtensionPack or false)
["'nixpkgs.virtualbox.enableExtensionPack' has no effect, please use 'virtualisation.virtualbox.host.enableExtensionPack'"];
environment.systemPackages = [ virtualbox ];
security.wrappers = let
mkSuid = program: {
source = "${virtualbox}/libexec/virtualbox/${program}";
owner = "root";
group = "vboxusers";
setuid = true;
};
executables = [
"VBoxHeadless"
"VBoxNetAdpCtl"
"VBoxNetDHCP"
"VBoxNetNAT"
"VBoxVolInfo"
] ++ (lib.optionals (!cfg.headless) [
"VBoxSDL"
"VirtualBoxVM"
]);
in lib.mkIf cfg.enableHardening
(builtins.listToAttrs (map (x: { name = x; value = mkSuid x; }) executables));
users.groups.vboxusers.gid = config.ids.gids.vboxusers;
services.udev.extraRules =
''
SUBSYSTEM=="usb_device", ACTION=="add", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
'';
} (lib.mkIf cfg.enableKvm {
assertions = [
config = lib.mkIf cfg.enable (
lib.mkMerge [
{
assertion = !cfg.addNetworkInterface;
message = "VirtualBox KVM only supports standard NAT networking for VMs. Please turn off virtualisation.virtualbox.host.addNetworkInterface.";
warnings = lib.mkIf (pkgs.config.virtualbox.enableExtensionPack or false) [
"'nixpkgs.virtualbox.enableExtensionPack' has no effect, please use 'virtualisation.virtualbox.host.enableExtensionPack'"
];
environment.systemPackages = [ virtualbox ];
security.wrappers =
let
mkSuid = program: {
source = "${virtualbox}/libexec/virtualbox/${program}";
owner = "root";
group = "vboxusers";
setuid = true;
};
executables =
[
"VBoxHeadless"
"VBoxNetAdpCtl"
"VBoxNetDHCP"
"VBoxNetNAT"
"VBoxVolInfo"
]
++ (lib.optionals (!cfg.headless) [
"VBoxSDL"
"VirtualBoxVM"
]);
in
lib.mkIf cfg.enableHardening (
builtins.listToAttrs (
map (x: {
name = x;
value = mkSuid x;
}) executables
)
);
users.groups.vboxusers.gid = config.ids.gids.vboxusers;
services.udev.extraRules = ''
SUBSYSTEM=="usb_device", ACTION=="add", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
'';
}
];
}) (lib.mkIf (!cfg.enableKvm) {
boot.kernelModules = [ "vboxdrv" "vboxnetadp" "vboxnetflt" ];
boot.extraModulePackages = [ kernelModules ];
(lib.mkIf cfg.enableKvm {
assertions = [
{
assertion = !cfg.addNetworkInterface;
message = "VirtualBox KVM only supports standard NAT networking for VMs. Please turn off virtualisation.virtualbox.host.addNetworkInterface.";
}
];
})
(lib.mkIf (!cfg.enableKvm) {
boot.kernelModules = [
"vboxdrv"
"vboxnetadp"
"vboxnetflt"
];
boot.extraModulePackages = [ kernelModules ];
services.udev.extraRules =
''
KERNEL=="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660", TAG+="systemd"
KERNEL=="vboxdrvu", OWNER="root", GROUP="root", MODE="0666", TAG+="systemd"
KERNEL=="vboxnetctl", OWNER="root", GROUP="vboxusers", MODE="0660", TAG+="systemd"
'';
services.udev.extraRules = ''
KERNEL=="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660", TAG+="systemd"
KERNEL=="vboxdrvu", OWNER="root", GROUP="root", MODE="0666", TAG+="systemd"
KERNEL=="vboxnetctl", OWNER="root", GROUP="vboxusers", MODE="0660", TAG+="systemd"
'';
# Since we lack the right setuid/setcap binaries, set up a host-only network by default.
}) (lib.mkIf cfg.addNetworkInterface {
systemd.services.vboxnet0 =
{ description = "VirtualBox vboxnet0 Interface";
requires = [ "dev-vboxnetctl.device" ];
after = [ "dev-vboxnetctl.device" ];
wantedBy = [ "network.target" "sys-subsystem-net-devices-vboxnet0.device" ];
path = [ virtualbox ];
serviceConfig.RemainAfterExit = true;
serviceConfig.Type = "oneshot";
serviceConfig.PrivateTmp = true;
environment.VBOX_USER_HOME = "/tmp";
script =
''
# Since we lack the right setuid/setcap binaries, set up a host-only network by default.
})
(lib.mkIf cfg.addNetworkInterface {
systemd.services.vboxnet0 = {
description = "VirtualBox vboxnet0 Interface";
requires = [ "dev-vboxnetctl.device" ];
after = [ "dev-vboxnetctl.device" ];
wantedBy = [
"network.target"
"sys-subsystem-net-devices-vboxnet0.device"
];
path = [ virtualbox ];
serviceConfig.RemainAfterExit = true;
serviceConfig.Type = "oneshot";
serviceConfig.PrivateTmp = true;
environment.VBOX_USER_HOME = "/tmp";
script = ''
if ! [ -e /sys/class/net/vboxnet0 ]; then
VBoxManage hostonlyif create
cat /tmp/VBoxSVC.log >&2
fi
'';
postStop =
''
postStop = ''
VBoxManage hostonlyif remove vboxnet0
'';
};
};
networking.interfaces.vboxnet0.ipv4.addresses = [{ address = "192.168.56.1"; prefixLength = 24; }];
# Make sure NetworkManager won't assume this interface being up
# means we have internet access.
networking.networkmanager.unmanaged = ["vboxnet0"];
}) (lib.mkIf config.networking.useNetworkd {
systemd.network.networks."40-vboxnet0".extraConfig = ''
[Link]
RequiredForOnline=no
'';
})
networking.interfaces.vboxnet0.ipv4.addresses = [
{
address = "192.168.56.1";
prefixLength = 24;
}
];
# Make sure NetworkManager won't assume this interface being up
# means we have internet access.
networking.networkmanager.unmanaged = [ "vboxnet0" ];
})
(lib.mkIf config.networking.useNetworkd {
systemd.network.networks."40-vboxnet0".extraConfig = ''
[Link]
RequiredForOnline=no
'';
})
]);
]
);
}

View File

@ -14,7 +14,10 @@ in {
{ ... }:
{
services.openssh.enable = true;
services.openssh = {
enable = true;
authorizedKeysInHomedir = true;
};
security.pam.services.sshd.limits =
[ { domain = "*"; item = "memlock"; type = "-"; value = 1024; } ];
users.users.root.openssh.authorizedKeys.keys = [
@ -39,7 +42,11 @@ in {
{ ... }:
{
services.openssh = { enable = true; startWhenNeeded = true; };
services.openssh = {
enable = true;
startWhenNeeded = true;
authorizedKeysInHomedir = true;
};
security.pam.services.sshd.limits =
[ { domain = "*"; item = "memlock"; type = "-"; value = 1024; } ];
users.users.root.openssh.authorizedKeys.keys = [

View File

@ -17,14 +17,14 @@
}:
stdenv.mkDerivation rec {
version = "2.4.0";
version = "2.4.1";
pname = "polyphone";
src = fetchFromGitHub {
owner = "davy7125";
repo = "polyphone";
rev = version;
hash = "sha256-cPHLmqsS4ReqOCcsgOf77V/ShIkk7chGoJ6bU4W5ejs=";
hash = "sha256-43EswCgNJv11Ov+4vmj2vS/yJ2atyzkRmk/SoCKYD/0=";
};
nativeBuildInputs = [

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "argocd";
version = "2.12.4";
version = "2.12.6";
src = fetchFromGitHub {
owner = "argoproj";
repo = "argo-cd";
rev = "v${version}";
hash = "sha256-CxxaNm6O0wGvh1V0RmU4eA654u2ooL41EmlNX49KEE0=";
hash = "sha256-Lu0RUCSOrNNQ17CZGv/+ic3jPz4+3433JjwnjVzYzF4=";
};
proxyVendor = true; # darwin/linux hash mismatch

View File

@ -2,15 +2,15 @@
buildGoModule rec {
pname = "istioctl";
version = "1.23.1";
version = "1.23.2";
src = fetchFromGitHub {
owner = "istio";
repo = "istio";
rev = version;
hash = "sha256-ksTtjPzEY//JMLKzTMqkeqZqD92euvqV0iXziYQvFGg=";
hash = "sha256-Vyd32T19dw0j7PfuAcs6cuDlAhtMnRcUZXvYtEM7D4w=";
};
vendorHash = "sha256-4zNPI5tefOgLwbzxRM9NS/szlUjGo2BiruqP92qmwBU=";
vendorHash = "sha256-Sh/SsVIque5xdyOGCNU188pi0JCDXv90LlV7NCmgpGQ=";
nativeBuildInputs = [ installShellFiles ];

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "kubedb-cli";
version = "0.48.0";
version = "0.48.1";
src = fetchFromGitHub {
owner = "kubedb";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-xqupDfcjCSP7uomBCuFlhCAOetZrvSiKehOgCqZKLLg=";
sha256 = "sha256-jk+IUqM0/7qVKBMFntQFr52B3TJYEGrmT/DKcgfrw3Q=";
};
vendorHash = null;

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "terranix";
version = "2.7.0";
version = "2.8.0";
src = fetchFromGitHub {
owner = "mrVanDalo";
repo = "terranix";
rev = version;
sha256 = "sha256-xiUfVD6rtsVWFotVtUW3Q1nQh4obKzgvpN1wqZuGXvM=";
sha256 = "sha256-1Pu2j5xsBTuoyga08ZVf+rKp3FOMmJh/0fXen/idOrA=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "diamond";
version = "2.1.9";
version = "2.1.10";
src = fetchFromGitHub {
owner = "bbuchfink";
repo = "diamond";
rev = "v${version}";
sha256 = "sha256-cTg9TEpz3FSgX2tpfU4y55cCgFY5+mQY86FziHAwd+s=";
sha256 = "sha256-rNwoHb2jbQwL1bnP5KsI/SsHNN9EeXzsGnMpFhXrc1o=";
};

View File

@ -1,26 +1,27 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, makeWrapper
, gnugrep
, gnused
, curl
, mpv
, aria2
, ffmpeg
, fzf
, openssl
{
lib,
stdenvNoCC,
fetchFromGitHub,
makeWrapper,
gnugrep,
gnused,
curl,
mpv,
aria2,
ffmpeg,
fzf,
openssl,
}:
stdenvNoCC.mkDerivation {
pname = "dra-cla";
version = "unstable-2024-02-07";
version = "0-unstable-2024-06-07";
src = fetchFromGitHub {
owner = "CoolnsX";
repo = "dra-cla";
rev = "cf8a90c0c68338404e8a1434af0a6e65fc5d0a08";
hash = "sha256-3cz1VeDM0NHdYMiCDVnIq6Y/7rFSijhNrnxC36Yixxc=";
rev = "24d7eaa5d433bc2cbbba4f23552cd812506fefee";
hash = "sha256-BmBQSkLSq+BaxkzXEy3hlI3qNq2NCIoGKDKt7gyDz+s=";
};
nativeBuildInputs = [ makeWrapper ];
@ -31,7 +32,18 @@ stdenvNoCC.mkDerivation {
install -Dm755 dra-cla $out/bin/dra-cla
wrapProgram $out/bin/dra-cla \
--prefix PATH : ${lib.makeBinPath [ gnugrep gnused curl mpv aria2 ffmpeg fzf openssl ]}
--prefix PATH : ${
lib.makeBinPath [
gnugrep
gnused
curl
mpv
aria2
ffmpeg
fzf
openssl
]
}
runHook postInstall
'';

View File

@ -1,25 +1,74 @@
{ config, stdenv, fetchurl, fetchpatch, callPackage, lib, acpica-tools, dev86, pam, libxslt, libxml2, wrapQtAppsHook
, libX11, xorgproto, libXext, libXcursor, libXmu, libIDL, SDL2, libcap, libGL, libGLU
, libpng, glib, lvm2, libXrandr, libXinerama, libopus, libtpms, qtbase, qtx11extras
, qttools, qtsvg, qtwayland, pkg-config, which, docbook_xsl, docbook_xml_dtd_43
, alsa-lib, curl, libvpx, nettools, dbus, substituteAll, gsoap, zlib, xz
, yasm, glslang
, nixosTests
# If open-watcom-bin is not passed, VirtualBox will fall back to use
# the shipped alternative sources (assembly).
, open-watcom-bin
, makeself, perl
, vulkan-loader
, javaBindings ? true, jdk # Almost doesn't affect closure size
, pythonBindings ? false, python3
, extensionPack ? null, fakeroot
, pulseSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux, libpulseaudio
, enableHardening ? false
, headless ? false
, enable32bitGuests ? true
, enableWebService ? false
, enableKvm ? false
, extraConfigureFlags ? ""
{
config,
stdenv,
fetchurl,
fetchpatch,
callPackage,
lib,
acpica-tools,
dev86,
pam,
libxslt,
libxml2,
wrapQtAppsHook,
libX11,
xorgproto,
libXext,
libXcursor,
libXmu,
libIDL,
SDL2,
libcap,
libGL,
libGLU,
libpng,
glib,
lvm2,
libXrandr,
libXinerama,
libopus,
libtpms,
qtbase,
qtx11extras,
qttools,
qtsvg,
qtwayland,
pkg-config,
which,
docbook_xsl,
docbook_xml_dtd_43,
alsa-lib,
curl,
libvpx,
nettools,
dbus,
substituteAll,
gsoap,
zlib,
xz,
yasm,
glslang,
nixosTests,
# If open-watcom-bin is not passed, VirtualBox will fall back to use
# the shipped alternative sources (assembly).
open-watcom-bin,
makeself,
perl,
vulkan-loader,
javaBindings ? true,
jdk, # Almost doesn't affect closure size
pythonBindings ? false,
python3,
extensionPack ? null,
fakeroot,
pulseSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux,
libpulseaudio,
enableHardening ? false,
headless ? false,
enable32bitGuests ? true,
enableWebService ? false,
enableKvm ? false,
extraConfigureFlags ? "",
}:
# The web services use Java infrastructure.
@ -41,12 +90,26 @@ let
virtualboxGuestAdditionsIso = callPackage guest-additions-iso/default.nix { };
inherit (lib) optional optionals optionalString getDev getLib;
in stdenv.mkDerivation (finalAttrs: {
inherit (lib)
optional
optionals
optionalString
getDev
getLib
;
in
stdenv.mkDerivation (finalAttrs: {
pname = "virtualbox";
version = finalAttrs.virtualboxVersion;
inherit buildType virtualboxVersion virtualboxSha256 kvmPatchVersion kvmPatchHash virtualboxGuestAdditionsIso;
inherit
buildType
virtualboxVersion
virtualboxSha256
kvmPatchVersion
kvmPatchHash
virtualboxGuestAdditionsIso
;
src = fetchurl {
url = "https://download.virtualbox.org/virtualbox/${finalAttrs.virtualboxVersion}/VirtualBox-${finalAttrs.virtualboxVersion}.tar.bz2";
@ -55,39 +118,84 @@ in stdenv.mkDerivation (finalAttrs: {
outputs = [ "out" ] ++ optional withModsrc "modsrc";
nativeBuildInputs = [ pkg-config which docbook_xsl docbook_xml_dtd_43 yasm glslang ]
++ optional (!headless) wrapQtAppsHook;
nativeBuildInputs = [
pkg-config
which
docbook_xsl
docbook_xml_dtd_43
yasm
glslang
] ++ optional (!headless) wrapQtAppsHook;
# Wrap manually because we wrap just a small number of executables.
dontWrapQtApps = true;
buildInputs = [
acpica-tools dev86 libxslt libxml2 xorgproto libX11 libXext libXcursor libIDL
libcap glib lvm2 alsa-lib curl libvpx pam makeself perl
libXmu libXrandr libpng libopus libtpms python3 xz ]
buildInputs =
[
acpica-tools
dev86
libxslt
libxml2
xorgproto
libX11
libXext
libXcursor
libIDL
libcap
glib
lvm2
alsa-lib
curl
libvpx
pam
makeself
perl
libXmu
libXrandr
libpng
libopus
libtpms
python3
xz
]
++ optional javaBindings jdk
++ optional pythonBindings python3 # Python is needed even when not building bindings
++ optional pulseSupport libpulseaudio
++ optionals headless [ libGL ]
++ optionals (!headless) [ qtbase qtx11extras libXinerama SDL2 libGLU ]
++ optionals enableWebService [ gsoap zlib ];
++ optionals (!headless) [
qtbase
qtx11extras
libXinerama
SDL2
libGLU
]
++ optionals enableWebService [
gsoap
zlib
];
hardeningDisable = [ "format" "fortify" "pic" "stackprotector" ];
hardeningDisable = [
"format"
"fortify"
"pic"
"stackprotector"
];
prePatch = ''
set -x
sed -e 's@MKISOFS --version@MKISOFS -version@' \
-e 's@PYTHONDIR=.*@PYTHONDIR=${optionalString pythonBindings python3}@' \
-e 's@CXX_FLAGS="\(.*\)"@CXX_FLAGS="-std=c++11 \1"@' \
${optionalString (!headless) ''
-e 's@TOOLQT5BIN=.*@TOOLQT5BIN="${getDev qtbase}/bin"@' \
''} -i configure
${
optionalString (!headless) ''
-e 's@TOOLQT5BIN=.*@TOOLQT5BIN="${getDev qtbase}/bin"@' \
''
} -i configure
ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2
ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2
grep 'libpulse\.so\.0' src include -rI --files-with-match | xargs sed -i -e '
${optionalString pulseSupport
''s@"libpulse\.so\.0"@"${libpulseaudio.out}/lib/libpulse.so.0"@g''}'
${optionalString pulseSupport ''s@"libpulse\.so\.0"@"${libpulseaudio.out}/lib/libpulse.so.0"@g''}'
grep 'libdbus-1\.so\.3' src include -rI --files-with-match | xargs sed -i -e '
s@"libdbus-1\.so\.3"@"${dbus.lib}/lib/libdbus-1.so.3"@g'
@ -100,39 +208,41 @@ in stdenv.mkDerivation (finalAttrs: {
'';
patches =
optional enableHardening ./hardened.patch
# Since VirtualBox 7.0.8, VBoxSDL requires SDL2, but the build framework uses SDL1
++ optionals (!headless) [ ./fix-sdl.patch
# No update patch disables check for update function
# https://bugs.launchpad.net/ubuntu/+source/virtualbox-ose/+bug/272212
(fetchpatch {
url = "https://salsa.debian.org/pkg-virtualbox-team/virtualbox/-/raw/debian/7.0.14-dfsg-1/debian/patches/16-no-update.patch";
hash = "sha256-UJHpuB6QB/BbxJorlqZXUF12lgq8gbLMRHRMsbyqRpY=";
})]
++ [ ./extra_symbols.patch ]
# When hardening is enabled, we cannot use wrapQtApp to ensure that VirtualBoxVM sees
# the correct environment variables needed for Qt to work, specifically QT_PLUGIN_PATH.
# This is because VirtualBoxVM would detect that it is wrapped that and refuse to run,
# and also because it would unset QT_PLUGIN_PATH for security reasons. We work around
# these issues by patching the code to set QT_PLUGIN_PATH to the necessary paths,
# after the code that unsets it. Note that qtsvg is included so that SVG icons from
# the user's icon theme can be loaded.
++ optional (!headless && enableHardening) (substituteAll {
optional enableHardening ./hardened.patch
# Since VirtualBox 7.0.8, VBoxSDL requires SDL2, but the build framework uses SDL1
++ optionals (!headless) [
./fix-sdl.patch
# No update patch disables check for update function
# https://bugs.launchpad.net/ubuntu/+source/virtualbox-ose/+bug/272212
(fetchpatch {
url = "https://salsa.debian.org/pkg-virtualbox-team/virtualbox/-/raw/debian/7.0.14-dfsg-1/debian/patches/16-no-update.patch";
hash = "sha256-UJHpuB6QB/BbxJorlqZXUF12lgq8gbLMRHRMsbyqRpY=";
})
]
++ [ ./extra_symbols.patch ]
# When hardening is enabled, we cannot use wrapQtApp to ensure that VirtualBoxVM sees
# the correct environment variables needed for Qt to work, specifically QT_PLUGIN_PATH.
# This is because VirtualBoxVM would detect that it is wrapped that and refuse to run,
# and also because it would unset QT_PLUGIN_PATH for security reasons. We work around
# these issues by patching the code to set QT_PLUGIN_PATH to the necessary paths,
# after the code that unsets it. Note that qtsvg is included so that SVG icons from
# the user's icon theme can be loaded.
++ optional (!headless && enableHardening) (substituteAll {
src = ./qt-env-vars.patch;
qtPluginPath = "${qtbase.bin}/${qtbase.qtPluginPrefix}:${qtsvg.bin}/${qtbase.qtPluginPrefix}:${qtwayland.bin}/${qtbase.qtPluginPrefix}";
})
# While the KVM patch should not break any other behavior if --with-kvm is not specified,
# we don't take any chances and only apply it if people actually want to use KVM support.
++ optional enableKvm (fetchpatch {
})
# While the KVM patch should not break any other behavior if --with-kvm is not specified,
# we don't take any chances and only apply it if people actually want to use KVM support.
++ optional enableKvm (fetchpatch {
name = "virtualbox-${finalAttrs.virtualboxVersion}-kvm-dev-${finalAttrs.kvmPatchVersion}.patch";
url = "https://github.com/cyberus-technology/virtualbox-kvm/releases/download/dev-${finalAttrs.kvmPatchVersion}/kvm-backend-${finalAttrs.virtualboxVersion}-dev-${finalAttrs.kvmPatchVersion}.patch";
hash = finalAttrs.kvmPatchHash;
})
++ [
./qt-dependency-paths.patch
# https://github.com/NixOS/nixpkgs/issues/123851
./fix-audio-driver-loading.patch
];
++ [
./qt-dependency-paths.patch
# https://github.com/NixOS/nixpkgs/issues/123851
./fix-audio-driver-loading.patch
];
postPatch = ''
sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \
@ -161,18 +271,18 @@ in stdenv.mkDerivation (finalAttrs: {
VBOX_WITH_UPDATE_AGENT :=
${optionalString javaBindings ''
VBOX_JAVA_HOME := ${jdk}
VBOX_JAVA_HOME := ${jdk}
''}
${optionalString (!headless) ''
VBOX_WITH_VBOXSDL := 1
PATH_QT5_X11_EXTRAS_LIB := ${getLib qtx11extras}/lib
PATH_QT5_X11_EXTRAS_INC := ${getDev qtx11extras}/include
PATH_QT5_TOOLS_LIB := ${getLib qttools}/lib
PATH_QT5_TOOLS_INC := ${getDev qttools}/include
VBOX_WITH_VBOXSDL := 1
PATH_QT5_X11_EXTRAS_LIB := ${getLib qtx11extras}/lib
PATH_QT5_X11_EXTRAS_INC := ${getDev qtx11extras}/include
PATH_QT5_TOOLS_LIB := ${getLib qttools}/lib
PATH_QT5_TOOLS_INC := ${getDev qttools}/include
''}
${optionalString enableWebService ''
# fix gsoap missing zlib include and produce errors with --as-needed
VBOX_GSOAP_CXX_LIBS := gsoapssl++ z
# fix gsoap missing zlib include and produce errors with --as-needed
VBOX_GSOAP_CXX_LIBS := gsoapssl++ z
''}
TOOL_QT5_LRC := ${getDev qttools}/bin/lrelease
LOCAL_CONFIG
@ -213,7 +323,9 @@ in stdenv.mkDerivation (finalAttrs: {
-name src -o -exec cp -avt "$libexec" {} +
mkdir -p $out/bin
for file in ${optionalString (!headless) "VirtualBox VBoxSDL"} ${optionalString enableWebService "vboxwebsrv"} VBoxManage VBoxBalloonCtrl VBoxHeadless; do
for file in ${
optionalString (!headless) "VirtualBox VBoxSDL"
} ${optionalString enableWebService "vboxwebsrv"} VBoxManage VBoxBalloonCtrl VBoxHeadless; do
echo "Linking $file to /bin"
test -x "$libexec/$file"
ln -s "$libexec/$file" $out/bin/$file
@ -255,15 +367,16 @@ in stdenv.mkDerivation (finalAttrs: {
ln -s "${finalAttrs.virtualboxGuestAdditionsIso}" "$out/share/virtualbox/VBoxGuestAdditions.iso"
'';
preFixup = optionalString (!headless) ''
wrapQtApp $out/bin/VirtualBox
''
# If hardening is disabled, wrap the VirtualBoxVM binary instead of patching
# the source code (see postPatch).
+ optionalString (!headless && !enableHardening) ''
wrapQtApp $out/libexec/virtualbox/VirtualBoxVM \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ vulkan-loader ]}"
'';
preFixup =
optionalString (!headless) ''
wrapQtApp $out/bin/VirtualBox
''
# If hardening is disabled, wrap the VirtualBoxVM binary instead of patching
# the source code (see postPatch).
+ optionalString (!headless && !enableHardening) ''
wrapQtApp $out/libexec/virtualbox/VirtualBoxVM \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ vulkan-loader ]}"
'';
passthru = {
inherit extensionPack; # for inclusion in profile to prevent gc
@ -285,7 +398,11 @@ in stdenv.mkDerivation (finalAttrs: {
];
license = lib.licenses.gpl2;
homepage = "https://www.virtualbox.org/";
maintainers = with lib.maintainers; [ sander friedrichaltheide blitz ];
maintainers = with lib.maintainers; [
sander
friedrichaltheide
blitz
];
platforms = [ "x86_64-linux" ];
mainProgram = "VirtualBox";
};

View File

@ -1,4 +1,8 @@
{ fetchurl, lib, virtualbox }:
{
fetchurl,
lib,
virtualbox,
}:
let
inherit (virtualbox) version;
in
@ -9,14 +13,20 @@ fetchurl rec {
# Manually sha256sum the extensionPack file, must be hex!
# Thus do not use `nix-prefetch-url` but instead plain old `sha256sum`.
# Checksums can also be found at https://www.virtualbox.org/download/hashes/${version}/SHA256SUMS
let value = "d750fb17688d70e0cb2d7b06f1ad3a661303793f4d1ac39cfa9a54806b89da25";
in assert (builtins.stringLength value) == 64; value;
let
value = "d750fb17688d70e0cb2d7b06f1ad3a661303793f4d1ac39cfa9a54806b89da25";
in
assert (builtins.stringLength value) == 64;
value;
meta = with lib; {
description = "Oracle Extension pack for VirtualBox";
license = licenses.virtualbox-puel;
homepage = "https://www.virtualbox.org/";
maintainers = with maintainers; [ sander friedrichaltheide ];
maintainers = with maintainers; [
sander
friedrichaltheide
];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -1,4 +1,8 @@
{ fetchurl, lib, virtualbox}:
{
fetchurl,
lib,
virtualbox,
}:
let
inherit (virtualbox) version;
@ -13,7 +17,13 @@ fetchurl {
'';
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.sander lib.maintainers.friedrichaltheide ];
platforms = [ "i686-linux" "x86_64-linux" ];
maintainers = [
lib.maintainers.sander
lib.maintainers.friedrichaltheide
];
platforms = [
"i686-linux"
"x86_64-linux"
];
};
}

View File

@ -1,14 +1,32 @@
{ stdenv, kernel, fetchurl, lib, pam, libxslt
, libXext, libXcursor, libXmu
, glib, libXrandr, dbus, xz
, pkg-config, which, xorg
, yasm, patchelf, makeself
, linuxHeaders, openssl}:
{
stdenv,
kernel,
fetchurl,
lib,
pam,
libxslt,
libXext,
libXcursor,
libXmu,
glib,
libXrandr,
dbus,
xz,
pkg-config,
which,
xorg,
yasm,
patchelf,
makeself,
linuxHeaders,
openssl,
}:
let
buildType = "release";
in stdenv.mkDerivation (finalAttrs: {
in
stdenv.mkDerivation (finalAttrs: {
pname = "VirtualBox-GuestAdditions-builder-${kernel.version}";
version = "7.0.20";
@ -19,8 +37,26 @@ in stdenv.mkDerivation (finalAttrs: {
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration";
nativeBuildInputs = [ patchelf pkg-config which yasm makeself xorg.xorgserver openssl linuxHeaders xz ] ++ kernel.moduleBuildDependencies;
buildInputs = [ dbus libxslt libXext libXcursor pam libXmu libXrandr ];
nativeBuildInputs = [
patchelf
pkg-config
which
yasm
makeself
xorg.xorgserver
openssl
linuxHeaders
xz
] ++ kernel.moduleBuildDependencies;
buildInputs = [
dbus
libxslt
libXext
libXcursor
pam
libXmu
libXrandr
];
KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
KERN_INCL = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/source/include";
@ -58,61 +94,61 @@ in stdenv.mkDerivation (finalAttrs: {
'';
configurePhase = ''
NIX_CFLAGS_COMPILE=$(echo "$NIX_CFLAGS_COMPILE" | sed 's,\-isystem ${lib.getDev stdenv.cc.libc}/include,,g')
NIX_CFLAGS_COMPILE=$(echo "$NIX_CFLAGS_COMPILE" | sed 's,\-isystem ${lib.getDev stdenv.cc.libc}/include,,g')
cat >> LocalConfig.kmk <<LOCAL_CONFIG
VBOX_WITH_TESTCASES :=
VBOX_WITH_TESTSUITE :=
VBOX_WITH_VALIDATIONKIT :=
VBOX_WITH_DOCS :=
VBOX_WITH_WARNINGS_AS_ERRORS :=
cat >> LocalConfig.kmk <<LOCAL_CONFIG
VBOX_WITH_TESTCASES :=
VBOX_WITH_TESTSUITE :=
VBOX_WITH_VALIDATIONKIT :=
VBOX_WITH_DOCS :=
VBOX_WITH_WARNINGS_AS_ERRORS :=
VBOX_WITH_ORIGIN :=
VBOX_PATH_APP_PRIVATE_ARCH_TOP := $out/share/virtualbox
VBOX_PATH_APP_PRIVATE_ARCH := $out/libexec/virtualbox
VBOX_PATH_SHARED_LIBS := $out/libexec/virtualbox
VBOX_WITH_RUNPATH := $out/libexec/virtualbox
VBOX_PATH_APP_PRIVATE := $out/share/virtualbox
VBOX_PATH_APP_DOCS := $out/doc
VBOX_WITH_ORIGIN :=
VBOX_PATH_APP_PRIVATE_ARCH_TOP := $out/share/virtualbox
VBOX_PATH_APP_PRIVATE_ARCH := $out/libexec/virtualbox
VBOX_PATH_SHARED_LIBS := $out/libexec/virtualbox
VBOX_WITH_RUNPATH := $out/libexec/virtualbox
VBOX_PATH_APP_PRIVATE := $out/share/virtualbox
VBOX_PATH_APP_DOCS := $out/doc
VBOX_USE_SYSTEM_XORG_HEADERS := 1
VBOX_USE_SYSTEM_GL_HEADERS := 1
VBOX_NO_LEGACY_XORG_X11 := 1
SDK_VBoxLibPng_INCS :=
SDK_VBoxLibXml2_INCS :=
SDK_VBoxLibLzma_INCS := ${xz.dev}/include
SDK_VBoxLibLzma_LIBS := ${xz.out}/lib
VBOX_USE_SYSTEM_XORG_HEADERS := 1
VBOX_USE_SYSTEM_GL_HEADERS := 1
VBOX_NO_LEGACY_XORG_X11 := 1
SDK_VBoxLibPng_INCS :=
SDK_VBoxLibXml2_INCS :=
SDK_VBoxLibLzma_INCS := ${xz.dev}/include
SDK_VBoxLibLzma_LIBS := ${xz.out}/lib
SDK_VBoxOpenSslStatic_INCS := ${openssl.dev}/include/ssl
SDK_VBoxOpenSslStatic_INCS := ${openssl.dev}/include/ssl
VBOX_ONLY_ADDITIONS := 1
VBOX_WITH_SHARED_CLIPBOARD := 1
VBOX_WITH_GUEST_PROPS := 1
VBOX_WITH_VMSVGA := 1
VBOX_WITH_SHARED_FOLDERS := 1
VBOX_WITH_GUEST_CONTROL := 1
VBOX_WITHOUT_LINUX_GUEST_PACKAGE := 1
VBOX_WITH_PAM :=
VBOX_WITH_UPDATE_AGENT :=
VBOX_WITH_AUDIO_ALSA :=
VBOX_WITH_AUDIO_PULSE :=
VBOX_ONLY_ADDITIONS := 1
VBOX_WITH_SHARED_CLIPBOARD := 1
VBOX_WITH_GUEST_PROPS := 1
VBOX_WITH_VMSVGA := 1
VBOX_WITH_SHARED_FOLDERS := 1
VBOX_WITH_GUEST_CONTROL := 1
VBOX_WITHOUT_LINUX_GUEST_PACKAGE := 1
VBOX_WITH_PAM :=
VBOX_WITH_UPDATE_AGENT :=
VBOX_WITH_AUDIO_ALSA :=
VBOX_WITH_AUDIO_PULSE :=
VBOX_BUILD_PUBLISHER := _NixOS
LOCAL_CONFIG
VBOX_BUILD_PUBLISHER := _NixOS
LOCAL_CONFIG
./configure \
--only-additions \
--with-linux=${kernel.dev} \
--disable-kmods
./configure \
--only-additions \
--with-linux=${kernel.dev} \
--disable-kmods
sed -e 's@PKG_CONFIG_PATH=.*@PKG_CONFIG_PATH=${glib.dev}/lib/pkgconfig @' \
-i AutoConfig.kmk
sed -e 's@arch/x86/@@' \
-i Config.kmk
sed -e 's@PKG_CONFIG_PATH=.*@PKG_CONFIG_PATH=${glib.dev}/lib/pkgconfig @' \
-i AutoConfig.kmk
sed -e 's@arch/x86/@@' \
-i Config.kmk
export USER=nix
set +x
'';
export USER=nix
set +x
'';
enableParallelBuilding = true;
@ -130,7 +166,11 @@ in stdenv.mkDerivation (finalAttrs: {
runHook preInstall
mkdir -p $out
cp -rv ./out/linux.${if stdenv.hostPlatform.is32bit then "x86" else "amd64"}/${buildType}/bin/additions/VBoxGuestAdditions-${if stdenv.hostPlatform.is32bit then "x86" else "amd64"}.tar.bz2 $out/
cp -rv ./out/linux.${
if stdenv.hostPlatform.is32bit then "x86" else "amd64"
}/${buildType}/bin/additions/VBoxGuestAdditions-${
if stdenv.hostPlatform.is32bit then "x86" else "amd64"
}.tar.bz2 $out/
runHook postInstall
'';

View File

@ -1,5 +1,13 @@
{ stdenv, kernel, callPackage, lib, dbus
, xorg, zlib, patchelf, makeWrapper
{
stdenv,
kernel,
callPackage,
lib,
dbus,
xorg,
zlib,
patchelf,
makeWrapper,
}:
let
virtualBoxNixGuestAdditionsBuilder = callPackage ./builder.nix { };
@ -12,96 +20,129 @@ let
# dlopen are found. We grep binaries for specific library names and patch
# RUNPATH in matching binaries to contain the needed library paths.
dlopenLibs = [
{ name = "libdbus-1.so"; pkg = dbus; }
{ name = "libXfixes.so"; pkg = xorg.libXfixes; }
{ name = "libXrandr.so"; pkg = xorg.libXrandr; }
{
name = "libdbus-1.so";
pkg = dbus;
}
{
name = "libXfixes.so";
pkg = xorg.libXfixes;
}
{
name = "libXrandr.so";
pkg = xorg.libXrandr;
}
];
in stdenv.mkDerivation {
pname = "VirtualBox-GuestAdditions";
version = "${virtualBoxNixGuestAdditionsBuilder.version}-${kernel.version}";
in
stdenv.mkDerivation {
pname = "VirtualBox-GuestAdditions";
version = "${virtualBoxNixGuestAdditionsBuilder.version}-${kernel.version}";
src = "${virtualBoxNixGuestAdditionsBuilder}/VBoxGuestAdditions-${if stdenv.hostPlatform.is32bit then "x86" else "amd64"}.tar.bz2";
sourceRoot = ".";
src = "${virtualBoxNixGuestAdditionsBuilder}/VBoxGuestAdditions-${
if stdenv.hostPlatform.is32bit then "x86" else "amd64"
}.tar.bz2";
sourceRoot = ".";
KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
KERN_INCL = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/source/include";
KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
KERN_INCL = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/source/include";
hardeningDisable = [ "pic" ];
hardeningDisable = [ "pic" ];
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration";
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration";
nativeBuildInputs = [ patchelf makeWrapper virtualBoxNixGuestAdditionsBuilder ] ++ kernel.moduleBuildDependencies;
nativeBuildInputs = [
patchelf
makeWrapper
virtualBoxNixGuestAdditionsBuilder
] ++ kernel.moduleBuildDependencies;
buildPhase = ''
runHook preBuild
buildPhase = ''
runHook preBuild
# Build kernel modules.
cd src/vboxguest-${virtualBoxNixGuestAdditionsBuilder.version}_NixOS
# Run just make first. If we only did make install, we get symbol warnings during build.
make
cd ../..
# Build kernel modules.
cd src/vboxguest-${virtualBoxNixGuestAdditionsBuilder.version}_NixOS
# Run just make first. If we only did make install, we get symbol warnings during build.
make
cd ../..
# Change the interpreter for various binaries
for i in sbin/VBoxService bin/{VBoxClient,VBoxControl,VBoxDRMClient} other/mount.vboxsf; do
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} $i
patchelf --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc zlib
xorg.libX11 xorg.libXt xorg.libXext xorg.libXmu xorg.libXfixes xorg.libXcursor ]} $i
done
# Change the interpreter for various binaries
for i in sbin/VBoxService bin/{VBoxClient,VBoxControl,VBoxDRMClient} other/mount.vboxsf; do
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} $i
patchelf --set-rpath ${
lib.makeLibraryPath [
stdenv.cc.cc
stdenv.cc.libc
zlib
xorg.libX11
xorg.libXt
xorg.libXext
xorg.libXmu
xorg.libXfixes
xorg.libXcursor
]
} $i
done
runHook postBuild
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
# Install kernel modules.
cd src/vboxguest-${virtualBoxNixGuestAdditionsBuilder.version}_NixOS
make install INSTALL_MOD_PATH=$out KBUILD_EXTRA_SYMBOLS=$PWD/vboxsf/Module.symvers
cd ../..
# Install binaries
install -D -m 755 other/mount.vboxsf $out/bin/mount.vboxsf
install -D -m 755 sbin/VBoxService $out/bin/VBoxService
install -m 755 bin/VBoxClient $out/bin
install -m 755 bin/VBoxControl $out/bin
install -m 755 bin/VBoxDRMClient $out/bin
# Don't install VBoxOGL for now
# It seems to be broken upstream too, and fixing it is far down the priority list:
# https://www.virtualbox.org/pipermail/vbox-dev/2017-June/014561.html
# Additionally, 3d support seems to rely on VBoxOGL.so being symlinked from
# libGL.so (which we can't), and Oracle doesn't plan on supporting libglvnd
# either. (#18457)
runHook postInstall
'';
# Stripping breaks these binaries for some reason.
dontStrip = true;
# Patch RUNPATH according to dlopenLibs (see the comment there).
postFixup = lib.concatMapStrings (library: ''
for i in $(grep -F ${lib.escapeShellArg library.name} -l -r $out/{lib,bin}); do
origRpath=$(patchelf --print-rpath "$i")
patchelf --set-rpath "$origRpath:${lib.makeLibraryPath [ library.pkg ]}" "$i"
done
'') dlopenLibs;
meta = {
description = "Guest additions for VirtualBox";
longDescription = ''
Various add-ons which makes NixOS work better as guest OS inside VirtualBox.
This add-on provides support for dynamic resizing of the virtual display, shared
host/guest clipboard support.
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
# Install kernel modules.
cd src/vboxguest-${virtualBoxNixGuestAdditionsBuilder.version}_NixOS
make install INSTALL_MOD_PATH=$out KBUILD_EXTRA_SYMBOLS=$PWD/vboxsf/Module.symvers
cd ../..
# Install binaries
install -D -m 755 other/mount.vboxsf $out/bin/mount.vboxsf
install -D -m 755 sbin/VBoxService $out/bin/VBoxService
install -m 755 bin/VBoxClient $out/bin
install -m 755 bin/VBoxControl $out/bin
install -m 755 bin/VBoxDRMClient $out/bin
# Don't install VBoxOGL for now
# It seems to be broken upstream too, and fixing it is far down the priority list:
# https://www.virtualbox.org/pipermail/vbox-dev/2017-June/014561.html
# Additionally, 3d support seems to rely on VBoxOGL.so being symlinked from
# libGL.so (which we can't), and Oracle doesn't plan on supporting libglvnd
# either. (#18457)
runHook postInstall
'';
# Stripping breaks these binaries for some reason.
dontStrip = true;
# Patch RUNPATH according to dlopenLibs (see the comment there).
postFixup = lib.concatMapStrings (library: ''
for i in $(grep -F ${lib.escapeShellArg library.name} -l -r $out/{lib,bin}); do
origRpath=$(patchelf --print-rpath "$i")
patchelf --set-rpath "$origRpath:${lib.makeLibraryPath [ library.pkg ]}" "$i"
done
'') dlopenLibs;
meta = {
description = "Guest additions for VirtualBox";
longDescription = ''
Various add-ons which makes NixOS work better as guest OS inside VirtualBox.
This add-on provides support for dynamic resizing of the virtual display, shared
host/guest clipboard support.
'';
sourceProvenance = with lib.sourceTypes; [ fromSource ];
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.sander lib.maintainers.friedrichaltheide ];
platforms = [ "i686-linux" "x86_64-linux" ];
broken = stdenv.hostPlatform.is32bit && (kernel.kernelAtLeast "5.10");
};
}
sourceProvenance = with lib.sourceTypes; [ fromSource ];
license = lib.licenses.gpl2;
maintainers = [
lib.maintainers.sander
lib.maintainers.friedrichaltheide
];
platforms = [
"i686-linux"
"x86_64-linux"
];
broken = stdenv.hostPlatform.is32bit && (kernel.kernelAtLeast "5.10");
};
}

View File

@ -0,0 +1,25 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f1ecfe0..9056f9d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,8 +83,9 @@ ExternalProject_Add(BearSource
-DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
-DROOT_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
${CMAKE_CACHE_ARGS_EXTRA}
- TEST_BEFORE_INSTALL
+ TEST_EXCLUDE_FROM_MAIN
1
+ STEP_TARGETS test
TEST_COMMAND
ctest # or `ctest -T memcheck`
)
@@ -100,7 +101,8 @@ if (ENABLE_FUNC_TESTS)
-DCMAKE_INSTALL_LIBDIR:PATH=${CMAKE_INSTALL_LIBDIR}
-DCMAKE_INSTALL_BINDIR:PATH=${CMAKE_INSTALL_BINDIR}
-DSTAGED_INSTALL_PREFIX:PATH=${STAGED_INSTALL_PREFIX}
- TEST_BEFORE_INSTALL
+ TEST_EXCLUDE_FROM_MAIN
+ STEP_TARGETS test
1
INSTALL_COMMAND
""

View File

@ -6,7 +6,7 @@
ninja,
pkg-config,
grpc,
protobuf_25,
protobuf,
openssl,
nlohmann_json,
gtest,
@ -20,33 +20,28 @@
coreutils,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "bear";
version = "3.1.3";
version = "3.1.5";
src = fetchFromGitHub {
owner = "rizsotto";
repo = pname;
rev = version;
hash = "sha256-1nZPzgLWcmaRkOUXdm16IW2Nw/p1w8GBGEfZX/v+En0=";
repo = "bear";
rev = finalAttrs.version;
hash = "sha256-pwdjytP+kmTwozRl1Gd0jUqRs3wfvcYPqiQvVwa6s9c=";
};
nativeBuildInputs = [
cmake
ninja
pkg-config
# Used for functional tests, which run during buildPhase.
lit
python3
];
buildInputs = [
grpc
protobuf_25
protobuf
openssl
nlohmann_json
gtest
spdlog
c-ares
zlib
@ -54,20 +49,52 @@ stdenv.mkDerivation rec {
re2
];
patches = [
# This patch is necessary to run tests in a separate phase. By default
# test targets are run with ALL, which is not what we want. This patch creates
# separate 'test' step targets for each cmake ExternalProject:
# - BearTest-test (functional lit tests)
# - BearSource-test (unit tests via gtest)
./0001-exclude-tests-from-all.patch
];
nativeCheckInputs = [
lit
python3
];
checkInputs = [
gtest
];
cmakeFlags = [
# Build system and generated files concatenate install prefix and
# CMAKE_INSTALL_{BIN,LIB}DIR, which breaks if these are absolute paths.
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
(lib.cmakeBool "ENABLE_UNIT_TESTS" false)
(lib.cmakeBool "ENABLE_FUNC_TESTS" false)
(lib.cmakeBool "ENABLE_UNIT_TESTS" finalAttrs.doCheck)
(lib.cmakeBool "ENABLE_FUNC_TESTS" finalAttrs.doCheck)
];
patches = [
# Fix toolchain environment variable handling and the Darwin SIP check.
./fix-functional-tests.patch
checkTarget = lib.concatStringsSep " " [
"BearTest-test"
"BearSource-test"
];
doCheck = true;
env = {
# Disable failing tests. The cause is not immediately clear.
LIT_FILTER_OUT = lib.concatStringsSep "|" [
"cases/compilation/output/config/filter_compilers.sh"
"cases/intercept/preload/posix/execvpe/success_to_resolve.c"
"cases/intercept/preload/posix/popen/success.c"
"cases/intercept/preload/posix/posix_spawnp/success_to_resolve.c"
"cases/intercept/preload/posix/system/success.c"
"cases/intercept/preload/shell_commands_intercepted_without_shebang.sh"
];
};
postPatch = ''
patchShebangs test/bin
@ -92,4 +119,4 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = with maintainers; [ DieracDelta ];
};
}
})

View File

@ -12,14 +12,14 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blueprint-compiler";
version = "0.12.0";
version = "0.14.0";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "jwestman";
repo = "blueprint-compiler";
rev = "v${finalAttrs.version}";
hash = "sha256-pvYSFCiYynH3E6QOTu4RfG+6eucq++yiRu75qucSlZU=";
hash = "sha256-pkbTxCN7LagIbOtpiUCkh40aHw6uRtalQVFa47waXjU=";
};
nativeBuildInputs = [

View File

@ -0,0 +1,35 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbip-asn-lite";
version = "2024-10";
src = fetchurl {
url = "https://download.db-ip.com/free/dbip-asn-lite-${finalAttrs.version}.mmdb.gz";
hash = "sha256-zfBRxZ6xwIrOC6MrmtbfKrIK7jxMD/1EMOgQDON6nPw=";
};
dontUnpack = true;
installPhase = ''
runHook preBuild
gzip -c -d "$src" > dbip-asn-lite.mmdb
install -Dm444 dbip-asn-lite.mmdb "$out/share/dbip/dbip-asn-lite.mmdb"
runHook postBuild
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-asn-lite.mmdb";
meta = {
description = "Free IP to ASN Lite database by DB-IP";
homepage = "https://db-ip.com/db/download/ip-to-asn-lite";
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ Guanran928 ];
platforms = lib.platforms.all;
};
})

View File

@ -0,0 +1,35 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbip-city-lite";
version = "2024-10";
src = fetchurl {
url = "https://download.db-ip.com/free/dbip-city-lite-${finalAttrs.version}.mmdb.gz";
hash = "sha256-sPjtO0WRdMxGiTySFO3vA1mL3RHxDnhLFzQ1fq2LNUw=";
};
dontUnpack = true;
installPhase = ''
runHook preBuild
gzip -c -d "$src" > dbip-city-lite.mmdb
install -Dm444 dbip-city-lite.mmdb "$out/share/dbip/dbip-city-lite.mmdb"
runHook postBuild
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-city-lite.mmdb";
meta = {
description = "Free IP to City Lite database by DB-IP";
homepage = "https://db-ip.com/db/download/ip-to-city-lite";
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ Guanran928 ];
platforms = lib.platforms.all;
};
})

View File

@ -1,8 +1,8 @@
{ lib
, stdenvNoCC
, fetchurl
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbip-country-lite";
version = "2024-10";
@ -25,11 +25,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-country-lite.mmdb";
meta = with lib; {
meta = {
description = "Free IP to Country Lite database by DB-IP";
homepage = "https://db-ip.com/db/download/ip-to-country-lite";
license = licenses.cc-by-40;
maintainers = with maintainers; [ nickcao ];
platforms = platforms.all;
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ nickcao ];
platforms = lib.platforms.all;
};
})

View File

@ -0,0 +1,33 @@
{
stdenv,
lib,
fetchFromGitea,
}:
stdenv.mkDerivation {
pname = "dut";
version = "0-unstable-2024-07-31";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "201984";
repo = "dut";
rev = "041c6f26162c2286776fac246ddbda312da1563d";
hash = "sha256-YrBV5rG9rASI/5pwG3kcHoOvXBHhLJHvFFrvNhmGq2Y=";
};
installFlags = [
"DESTDIR=${placeholder "out"}"
"PREFIX="
];
meta = {
platforms = lib.platforms.all;
broken = stdenv.isDarwin;
description = "A disk usage calculator for Linux";
homepage = "https://codeberg.org/201984/dut";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ errnoh ];
mainProgram = "dut";
};
}

View File

@ -3,6 +3,7 @@
, stdenv
, fetchFromGitHub
, fetchurl
, fetchpatch
, cmake
, qt6
, fmt
@ -16,11 +17,11 @@
stdenv.mkDerivation (finalAttrs: {
pname = "gpt4all";
version = "3.3.0";
version = "3.4.2";
src = fetchFromGitHub {
fetchSubmodules = true;
hash = "sha256-aez/APsei30Tp1em/RDCuq+v8hOavHq4O9qZahrsF/g=";
hash = "sha256-QzU22y6tt3UhazVSPcFuKejH4AV+mw7JExH61NtAKoM=";
owner = "nomic-ai";
repo = "gpt4all";
rev = "v${finalAttrs.version}";
@ -33,6 +34,12 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
./embedding-local.patch
(fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/004-fix-build-with-qt-6.8.0.diff?h=gpt4all-chat&id=d14b12cb63fae95e578aa839a570189a23833051";
sha256 = "3Zur9KFn45f4dgAzOF7p1q42IdLqXwioN4zMiBbWbVU=";
# remove the `gpt4all-chat` part of the paths as sourceRoot is gpt4all-chat
stripLen = 1;
})
];
sourceRoot = "${finalAttrs.src.name}/gpt4all-chat";
@ -70,6 +77,8 @@ stdenv.mkDerivation (finalAttrs: {
"-DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=OFF"
"-DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON"
"-DKOMPUTE_OPT_USE_BUILT_IN_FMT=OFF"
"-DGGML_VULKAN=ON"
"-DGGML_KOMPUTE=ON"
] ++ lib.optionals (!cudaSupport) [
"-DLLMODEL_CUDA=OFF"
];

View File

@ -0,0 +1,73 @@
{
stdenv,
lib,
fetchFromGitHub,
nix-update-script,
adwaita-icon-theme,
gtk4,
libadwaita,
desktop-file-utils,
wrapGAppsHook4,
meson,
ninja,
pkg-config,
cmake,
python3Packages,
appstream,
fetchPypi,
gobject-introspection,
glib,
}:
python3Packages.buildPythonApplication rec {
pname = "hashes";
version = "1.1.0";
pyproject = false;
src = fetchFromGitHub {
owner = "zefr0x";
repo = "hashes";
rev = "refs/tags/v${version}";
hash = "sha256-BmfSCHs+JcpsAG8AhaYf+SDFI+LdJKMKgBIodd66qmw=";
};
nativeBuildInputs = [
meson
ninja
desktop-file-utils
cmake
pkg-config
appstream
gobject-introspection
wrapGAppsHook4
];
buildInputs = [
gtk4
libadwaita
glib
adwaita-icon-theme
];
dependencies = with python3Packages; [
name-that-hash
pygobject3
];
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/zefr0x/hashes/tree/main";
changelog = "https://github.com/zefr0x/hashes/releases/tag/v${version}";
description = "Simple hash algorithm identification GUI";
maintainers = with lib.maintainers; [ bot-wxt1221 ];
license = lib.licenses.gpl3Plus;
mainProgram = "hashes";
platforms = lib.platforms.unix;
};
}

View File

@ -9,17 +9,17 @@
}:
rustPlatform.buildRustPackage rec {
pname = "kclvm_cli";
version = "0.10.0";
version = "0.10.3";
src = fetchFromGitHub {
owner = "kcl-lang";
repo = "kcl";
rev = "v${version}";
hash = "sha256-OMPo2cT0ngwHuGghVSfGoDgf+FThj2GsZ3Myb1wSxQM=";
hash = "sha256-qIaDc10NxQKBH7WRzzkQ6bQfkSqsDrFxSwSX+Hf7qS8=";
};
sourceRoot = "${src.name}/cli";
cargoHash = "sha256-2694O2q6UbNySgn76aBTjdqt2Hh1GrdRaro064fGBrI=";
cargoHash = "sha256-mB4qOUj9qZmbstvBIyaWHEzX3DQ7tLhQKDEvea4Bnyk=";
cargoPatches = [ ./cargo_lock.patch ];
buildInputs = [ kclvm rustc ] ++ (

View File

@ -1,47 +1,44 @@
{ chromaprint
, cmake
, docbook_xml_dtd_45
, docbook_xsl
, fetchurl
, ffmpeg
, flac
, id3lib
, kdePackages
, lib
, libogg
, libvorbis
, libxslt
, mp4v2
, pkg-config
, python3
, qtbase
, qtdeclarative
, qtmultimedia
, qttools
, readline
, stdenv
, taglib
, wrapQtAppsHook
, zlib
, withCLI ? true
, withKDE ? true
, withQt ? false
{
lib,
chromaprint,
cmake,
docbook_xml_dtd_45,
docbook_xsl,
fetchurl,
ffmpeg,
flac,
id3lib,
kdePackages,
libogg,
libvorbis,
libxslt,
mp4v2,
pkg-config,
python3,
qt6,
readline,
stdenv,
taglib,
zlib,
# Boolean flags
withCLI ? true,
withKDE ? true,
withQt ? false,
}:
let
inherit (lib) optionals;
inherit (qt6)
qtbase
qtdeclarative
qtmultimedia
qttools
wrapQtAppsHook
;
apps = lib.concatStringsSep ";" (
optionals withCLI [ "CLI" ]
++ optionals withKDE [ "KDE" ]
++ optionals withQt [ "Qt" ]
lib.optionals withCLI [ "CLI" ] ++ lib.optionals withKDE [ "KDE" ] ++ lib.optionals withQt [ "Qt" ]
);
mainProgram =
if withQt then "kid3-qt"
else if withKDE then "kid3"
else "kid3-cli";
in
stdenv.mkDerivation (finalAttrs: {
pname = "kid3";
@ -62,29 +59,34 @@ stdenv.mkDerivation (finalAttrs: {
wrapQtAppsHook
];
buildInputs = [
chromaprint
ffmpeg
flac
id3lib
libogg
libvorbis
libxslt
mp4v2
qtbase
qtdeclarative
qtmultimedia
readline
taglib
zlib
] ++ lib.optionals withKDE (with kdePackages; [
kconfig
kconfigwidgets
kcoreaddons
kio
kxmlgui
phonon
]);
buildInputs =
[
chromaprint
ffmpeg
flac
id3lib
libogg
libvorbis
libxslt
mp4v2
qtbase
qtdeclarative
qtmultimedia
readline
taglib
zlib
]
++ lib.optionals withKDE (
with kdePackages;
[
kconfig
kconfigwidgets
kcoreaddons
kio
kxmlgui
phonon
]
);
cmakeFlags = [ (lib.cmakeFeature "WITH_APPS" apps) ];
@ -95,10 +97,8 @@ stdenv.mkDerivation (finalAttrs: {
};
meta = {
description = "Simple and powerful audio tag editor";
inherit mainProgram;
homepage = "https://kid3.kde.org/";
license = lib.licenses.lgpl2Plus;
description = "Simple and powerful audio tag editor";
longDescription = ''
If you want to easily tag multiple MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC,
MP2, Opus, Speex, TrueAudio, WavPack, WMA, WAV and AIFF files (e.g. full
@ -128,6 +128,14 @@ stdenv.mkDerivation (finalAttrs: {
- Edit synchronized lyrics and event timing codes, import and export
LRC files.
'';
license = lib.licenses.lgpl2Plus;
mainProgram =
if withQt then
"kid3-qt"
else if withKDE then
"kid3"
else
"kid3-cli";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.linux;
};

View File

@ -7,7 +7,7 @@
buildGoModule rec {
pname = "litmusctl";
version = "1.10.0";
version = "1.11.0";
nativeBuildInputs = [
installShellFiles
@ -21,7 +21,7 @@ buildGoModule rec {
owner = "litmuschaos";
repo = "litmusctl";
rev = "${version}";
hash = "sha256-0I07qgl/yyNAG19eAkZAXh7TkK3V1lnQTPXskF6k/L0=";
hash = "sha256-ByDtmKLdPSFGIPCdFlNr2yv3gnyfdjiuIuKcryvKwkY=";
};
vendorHash = "sha256-7FYOQ89aUFPX+5NCPYKg+YGCXstQ6j9DK4V2mCgklu0=";

View File

@ -1,21 +1,22 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, flint
, gmp
, mpfr
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
flint,
gmp,
mpfr,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "msolve";
version = "0.7.2";
version = "0.7.3";
src = fetchFromGitHub {
owner = "algebraic-solving";
repo = "msolve";
rev = "v${finalAttrs.version}";
hash = "sha256-p7fD954aMApyBP58cvGrPwHEqhkxWlaiDHUlQT7kX4c=";
hash = "sha256-F4jEZ3+bA3FADiVZMDNE0T9kd1K1ZBInIaORqQtv+sY=";
};
postPatch = ''
@ -34,13 +35,13 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;
meta = with lib; {
meta = {
description = "Library for polynomial system solving through algebraic methods";
mainProgram = "msolve";
homepage = "https://msolve.lip6.fr";
changelog = "https://github.com/algebraic-solving/msolve/releases/tag/${finalAttrs.src.rev}";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ wegank ];
platforms = platforms.unix;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ wegank ];
platforms = lib.platforms.unix;
};
})

View File

@ -1,20 +1,37 @@
{ lib, buildGoModule, buildNpmPackage, fetchFromGitHub, moreutils, jq, git }:
{
lib,
buildGoModule,
buildNpmPackage,
fetchFromGitHub,
moreutils,
npm-lockfile-fix,
jq,
git,
}:
let
# finalAttrs when 🥺 (buildGoModule does not support them)
# https://github.com/NixOS/nixpkgs/issues/273815
version = "1.6.1";
version = "1.7.5";
src = fetchFromGitHub {
owner = "thomiceli";
repo = "opengist";
rev = "v${version}";
hash = "sha256-rJ8oiH08kSSFNgPHKGo68Oi1i3L1SEJyHuzoxKMOZME=";
hash = "sha256-mZ4j9UWdKa3nygcRO5ceyONetkks3ZGWxvzD34eOXew=";
# follow https://github.com/thomiceli/opengist/pull/350 and remove here
postFetch = ''
${lib.getExe npm-lockfile-fix} $out/package-lock.json
'';
};
frontend = buildNpmPackage {
pname = "opengist-frontend";
inherit version src;
nativeBuildInputs = [ moreutils jq ];
nativeBuildInputs = [
moreutils
jq
];
# npm complains of "invalid package". shrug. we can give it a version.
preBuild = ''
@ -33,15 +50,17 @@ let
cp -R public $out
'';
npmDepsHash = "sha256-Sy321tIQOOrypk+EOGGixEzrPdhA9U8Hak+DOS+d00A=";
npmDepsHash = "sha256-cITkgRvWOml6uH77WkiNgFedEuPNze63Gntet09uS5w=";
};
in
buildGoModule {
pname = "opengist";
inherit version src;
vendorHash = "sha256-IorqXJKzUTUL5zfKRipZaJtRlwVOmTwolJXFG/34Ais=";
tags = [
"fs_embed"
vendorHash = "sha256-6PpS/dsonc/akBn8NwUIVFNe2FjynAhF1TYIYT9K/ws=";
tags = [ "fs_embed" ];
ldflags = [
"-s"
"-X github.com/thomiceli/opengist/internal/config.OpengistVersion=v${version}"
];
# required for tests
@ -62,10 +81,11 @@ buildGoModule {
meta = {
description = "Self-hosted pastebin powered by Git";
mainProgram = "opengist";
homepage = "https://github.com/thomiceli/opengist";
license = lib.licenses.agpl3Only;
maintainers = [ ];
changelog = "https://github.com/thomiceli/opengist/blob/master/CHANGELOG.md";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ phanirithvij ];
mainProgram = "opengist";
};
}

View File

@ -7,16 +7,16 @@
buildGoModule rec {
pname = "patch2pr";
version = "0.28.0";
version = "0.29.0";
src = fetchFromGitHub {
owner = "bluekeyes";
repo = "patch2pr";
rev = "v${version}";
hash = "sha256-Pr2h5iezn//oyvuUoq5B49wEL1cUXOHhHjR3ylMXowQ=";
hash = "sha256-eWOzK08ZlNORaRRtDumxOhsQWNXxk48jxcanwhEOChY=";
};
vendorHash = "sha256-6w49XQNElSHpOamEZNpvvr67vYrZYXy2Sm7dWMh6OiU=";
vendorHash = "sha256-x2w1HYrJo0HqyGGlIaxKqy1XYj/akQm0ijbYuK7qg58=";
ldflags = [
"-X main.version=${version}"

View File

@ -6,7 +6,7 @@
buildNpmPackage rec {
pname = "prettier-plugin-go-template";
version = "0-unstable-2023-07-26";
version = "0.0.15-unstable-2023-07-26";
src = fetchFromGitHub {
owner = "NiklasPor";
@ -17,6 +17,15 @@ buildNpmPackage rec {
npmDepsHash = "sha256-PpJnVZFRxpUHux2jIBDtyBS4qNo6IJY4kwTAq6stEVQ=";
dontNpmPrune = true;
# Fixes error: Cannot find module 'prettier'
postInstall = ''
pushd "$nodeModulesPath"
find -mindepth 1 -maxdepth 1 -type d -print0 | grep --null-data -Exv "\./(ulid|prettier)" | xargs -0 rm -rfv
popd
'';
meta = {
description = "Fixes prettier formatting for go templates";
mainProgram = "prettier-plugin-go-template";

View File

@ -11,16 +11,16 @@
rustPlatform.buildRustPackage rec {
pname = "rustic";
version = "0.9.1";
version = "0.9.3";
src = fetchFromGitHub {
owner = "rustic-rs";
repo = "rustic";
rev = "refs/tags/v${version}";
hash = "sha256-hkkylXJOhPOC4p+MOuYCzfcmCoHmm+/8afsaPFwD1/s=";
hash = "sha256-5Zr3ZxKUT8S8vfHNaCResF+S2UcHrk5pGwJH4riTzIw=";
};
cargoHash = "sha256-Rh96vPLAxz8KCIk9y9TFB2fP0JngnM9LSsClWfgYUG0=";
cargoHash = "sha256-HOpBBXJk8bHjXfRq8UczfMjr3bM91lB62taTlUGUC+M=";
nativeBuildInputs = [ installShellFiles ];
@ -49,6 +49,9 @@ rustPlatform.buildRustPackage rec {
lib.licenses.mit
lib.licenses.asl20
];
maintainers = [ lib.maintainers.nobbz ];
maintainers = [
lib.maintainers.nobbz
lib.maintainers.pmw
];
};
}

View File

@ -7,13 +7,13 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "sarasa-gothic";
version = "1.0.21";
version = "1.0.22";
src = fetchurl {
# Use the 'ttc' files here for a smaller closure size.
# (Using 'ttf' files gives a closure size about 15x larger, as of November 2021.)
url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${finalAttrs.version}/Sarasa-TTC-${finalAttrs.version}.zip";
hash = "sha256-zoTZ0JwkV6zaKHw1PegzE6NiGGVptBZgCgD8O9ZHHGc=";
hash = "sha256-356T39GotzLj4lu5KYulpFn2RmS7fZOgjz6Yy9M2T6Y=";
};
sourceRoot = ".";

View File

@ -5,16 +5,16 @@
}:
rustPlatform.buildRustPackage rec {
pname = "srgn";
version = "0.13.2";
version = "0.13.3";
src = fetchFromGitHub {
owner = "alexpovel";
repo = "srgn";
rev = "srgn-v${version}";
hash = "sha256-yVjxNTftrtKb/KHRZG7E3JcsCEtixhfBiHl/6zdcLMo=";
hash = "sha256-JjO4ZH4CYu2qwYfUrwTASYuxyBjObLb9ydPPbObew0g=";
};
cargoHash = "sha256-Z8y5gN4CzfllUzSMUyCc7TZKeIYVZtATnaIQIga5cAk=";
cargoHash = "sha256-/Y85FbmHfape2K8tdu/amjW8Q5Eg19HOPCE/x8qZ8uY=";
nativeBuildInputs = [ installShellFiles ];

View File

@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
openssl,
autoreconfHook,
pkg-config,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sscep";
version = "0.10.0";
src = fetchFromGitHub {
owner = "certnanny";
repo = "sscep";
rev = "v${finalAttrs.version}";
hash = "sha256-wlxQONOCLPuNdI6AyMJoLP09cs+ak7Jv9idhXTT5RWA=";
};
buildInputs = [ openssl ];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Client-only implementation of the SCEP (Cisco System's Simple Certificate Enrollment Protocol)";
homepage = "https://github.com/certnanny/sscep";
maintainers = [ lib.maintainers.stv0g ];
license = [
lib.licenses.bsd2
lib.licenses.openssl
];
platforms = lib.platforms.all;
};
})

View File

@ -8,16 +8,16 @@
buildGoModule rec {
pname = "stackql";
version = "0.5.742";
version = "0.5.748";
src = fetchFromGitHub {
owner = "stackql";
repo = "stackql";
rev = "v${version}";
hash = "sha256-GMc22n0y4lKv4DlG9069p/TrMJLyw0Zdiykuo41Tgys=";
hash = "sha256-3nt0hGBbS99WCRs3WnaB+0T/DS/uWROigYhXJw0fms8=";
};
vendorHash = "sha256-dssGqcS9l3VipEypKErlCeRs087Tb5Kx4VXvkErZar4=";
vendorHash = "sha256-oIpkhZHqg02qs68/ljuhNkw0BiIkY++du/pJRHXlPs0=";
ldflags = [
"-s"

View File

@ -1,17 +1,23 @@
{ lib
, stdenv
, cmake
, fetchFromGitHub
, pkg-config
, qtbase
, qtscript
, qtsvg
, substituteAll
, unzip
, wrapQtAppsHook
, zip
{
lib,
cmake,
fetchFromGitHub,
pkg-config,
qt5,
stdenv,
substituteAll,
unzip,
zip,
}:
let
inherit (qt5)
qtbase
qtscript
qtsvg
wrapQtAppsHook
;
in
stdenv.mkDerivation (finalAttrs: {
pname = "vym";
version = "2.9.26";
@ -23,13 +29,16 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-5cHhv9GDjJvSqGJ+7fI0xaWCiXw/0WP0Bem/ZRV8Y7M=";
};
outputs = [ "out" "man" ];
outputs = [
"out"
"man"
];
patches = [
(substituteAll {
src = ./000-fix-zip-paths.diff;
zipPath = "${zip}/bin/zip";
unzipPath = "${unzip}/bin/unzip";
src = ./patches/0000-fix-zip-paths.diff;
zipPath = "${lib.getExe zip}";
unzipPath = "${lib.getExe unzip}";
})
];
@ -45,16 +54,20 @@ stdenv.mkDerivation (finalAttrs: {
qtsvg
];
strictDeps = true;
qtWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ unzip zip ]}"
"--prefix PATH : ${
lib.makeBinPath [
unzip
zip
]
}"
];
strictDeps = true;
meta = {
homepage = "http://www.insilmaril.de/vym/";
description = "Mind-mapping software";
mainProgram = "vym";
longDescription = ''
VYM (View Your Mind) is a tool to generate and manipulate maps which show
your thoughts. Such maps can help you to improve your creativity and
@ -67,6 +80,7 @@ stdenv.mkDerivation (finalAttrs: {
work with such maps.
'';
license = with lib.licenses; [ gpl2Plus ];
mainProgram = "vym";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.linux;
};

View File

@ -2,12 +2,12 @@
stdenvNoCC.mkDerivation rec {
pname = "JuliaMono-ttf";
version = "0.057";
version = "0.058";
src = fetchzip {
url = "https://github.com/cormullion/juliamono/releases/download/v${version}/${pname}.tar.gz";
stripRoot = false;
hash = "sha256-SSTv/cyZ+7nK0VvQPqQ+T5JXDXOZgLmv++cjHLlObb8=";
hash = "sha256-QKMTU6ISP983Kg4ZxyPV4IgiuO0ZXMiOtvZPwP7dF7k=";
};
installPhase = ''

View File

@ -4,5 +4,7 @@
idris2Api = callPackage ./idris2-api.nix { };
idris2Lsp = callPackage ./idris2-lsp.nix { };
pack = callPackage ./pack.nix { };
buildIdris = callPackage ./build-idris.nix { };
}

View File

@ -0,0 +1,55 @@
{
lib,
idris2Packages,
fetchFromGitHub,
}:
let
inherit (idris2Packages) idris2Api buildIdris;
toml = buildIdris {
ipkgName = "toml";
version = "2022-05-05";
src = fetchFromGitHub {
owner = "cuddlefishie";
repo = "toml-idr";
rev = "b4f5a4bd874fa32f20d02311a62a1910dc48123f";
hash = "sha256-+bqfCE6m0aJ+S65urT+zQLuZUtUkC1qcuSsefML/fAE=";
};
idrisLibraries = [ ];
};
filepath = buildIdris {
ipkgName = "filepath";
version = "2023-12-04";
src = fetchFromGitHub {
owner = "stefan-hoeck";
repo = "idris2-filepath";
rev = "eac02d51b631633f32330c788bcebeb24221fa09";
hash = "sha256-noylxQvT2h50H0xmAiwe/cI6vz5gkbOhSD7mXuhJGfU=";
};
idrisLibraries = [ ];
};
packPkg = buildIdris {
ipkgName = "pack";
version = "2024-02-07";
src = fetchFromGitHub {
owner = "stefan-hoeck";
repo = "idris2-pack";
rev = "305123401a28a57b02f750c589c35af628b2a5eb";
hash = "sha256-IPAkwe6fEYWT3mpyKKkUPU0qFJX9gGIM1f7OeNWyB9w=";
};
idrisLibraries = [
idris2Api
toml
filepath
];
meta = {
description = "An Idris2 Package Manager with Curated Package Collections";
mainProgram = "pack";
homepage = "https://github.com/stefan-hoeck/idris2-pack";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ mattpolzin ];
inherit (idris2Packages.idris2.meta) platforms;
};
};
in
packPkg.executable

View File

@ -0,0 +1,16 @@
{ callPackage, fetchzip, ... }@args:
callPackage ./generic.nix (
args
// rec {
release = "9.0";
version = "${release}.0";
# Note: when updating, the hash in pkgs/development/libraries/tk/9.0.nix must also be updated!
src = fetchzip {
url = "mirror://sourceforge/tcl/tcl${version}-src.tar.gz";
sha256 = "sha256-QaPSY6kfxyc3x+2ptzEmN2puZ0gSFSeeNjPuxsVKXYE=";
};
}
)

View File

@ -1,5 +1,5 @@
{ lib, stdenv, callPackage, makeSetupHook, runCommand
, tzdata
, tzdata, zip, zlib
# Version specific stuff
, release, version, src
@ -24,17 +24,39 @@ let
--replace "/usr/local/etc/zoneinfo" ""
'';
nativeBuildInputs = lib.optionals (lib.versionAtLeast version "9.0") [
# Only used to detect the presence of zlib. Could be replaced with a stub.
zip
];
buildInputs = lib.optionals (lib.versionAtLeast version "9.0") [
zlib
];
preConfigure = ''
cd unix
'';
configureFlags = [
# Note: pre-9.0 flags are temporarily interspersed to avoid a mass rebuild.
configureFlags = lib.optionals (lib.versionOlder version "9.0") [
"--enable-threads"
] ++ [
# Note: using $out instead of $man to prevent a runtime dependency on $man.
"--mandir=${placeholder "out"}/share/man"
] ++ lib.optionals (lib.versionOlder version "9.0") [
"--enable-man-symlinks"
# Don't install tzdata because NixOS already has a more up-to-date copy.
"--with-tzdata=no"
] ++ lib.optionals (lib.versionAtLeast version "9.0") [
# By default, tcl libraries get zipped and embedded into libtcl*.so,
# which gets `zipfs mount`ed at runtime. This is fragile (for example
# stripping the .so removes the zip trailer), so we install them as
# traditional files.
# This might make tcl slower to start from slower storage on cold cache,
# however according to my benchmarks on fast storage and warm cache
# tcl built with --disable-zipfs actually starts in half the time.
"--disable-zipfs"
] ++ [
"tcl_cv_strtod_unbroken=ok"
] ++ lib.optional stdenv.hostPlatform.is64bit "--enable-64bit";

View File

@ -58,7 +58,7 @@ in
stdenv.mkDerivation rec {
pname = "imgui";
version = "1.90.6";
version = "1.91.4";
outputs = [
# Note: no "dev" because vcpkg installs include/ and imgui-config.cmake
# into different prefixes but expects the merged layout at import time
@ -69,8 +69,8 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "ocornut";
repo = "imgui";
rev = "v${version}";
sha256 = "sha256-FSob6FPfg0tF0n72twA5/moLvEaB251BPkIDJUXhYbg=";
rev = "refs/tags/v${version}";
hash = "sha256-6j4keBOAzbBDsV0+R4zTNlsltxz2dJDGI43UIrHXDNM=";
};
cmakeRules = "${vcpkgSource}/ports/imgui";

View File

@ -0,0 +1,23 @@
{
callPackage,
fetchzip,
tcl,
...
}@args:
callPackage ./generic.nix (
args
// {
src = fetchzip {
url = "mirror://sourceforge/tcl/tk${tcl.version}-src.tar.gz";
sha256 = "sha256-jQ9kZuFx6ikQ+SpY7kSbvXJ5hjw4WB9VgRaNlQLtG0s=";
};
patches = [
# https://core.tcl-lang.org/tk/tktview/765642ffffffffffffff
./tk-8_6_13-find-library.patch
];
}
)

View File

@ -1,4 +1,4 @@
{ stdenv, lib, src, pkg-config, tcl, libXft, patches ? []
{ stdenv, lib, src, pkg-config, tcl, libXft, zip, zlib, patches ? []
, enableAqua ? stdenv.hostPlatform.isDarwin, darwin
, ... }:
@ -39,9 +39,26 @@ tcl.mkTclDerivation {
configureFlags = [
"--enable-threads"
] ++ lib.optional stdenv.hostPlatform.is64bit "--enable-64bit"
++ lib.optional enableAqua "--enable-aqua";
++ lib.optional enableAqua "--enable-aqua"
++ lib.optional (lib.versionAtLeast tcl.version "9.0")
# By default, tk libraries get zipped and embedded into libtcl9tk*.so,
# which gets `zipfs mount`ed at runtime. This is fragile (for example
# stripping the .so removes the zip trailer), so we install them as
# traditional files.
# This might make tcl slower to start from slower storage on cold cache,
# however according to my benchmarks on fast storage and warm cache
# tcl built with --disable-zipfs actually starts in half the time.
"--disable-zipfs";
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [
pkg-config
] ++ lib.optionals (lib.versionAtLeast tcl.version "9.0") [
# Only used to detect the presence of zlib. Could be replaced with a stub.
zip
];
buildInputs = lib.optionals (lib.versionAtLeast tcl.version "9.0") [
zlib
];
propagatedBuildInputs = [
libXft
@ -69,5 +86,7 @@ tcl.mkTclDerivation {
license = licenses.tcltk;
platforms = platforms.all;
maintainers = [ ];
broken = stdenv.hostPlatform.isDarwin
&& lib.elem (lib.versions.majorMinor tcl.version) ["8.5" "9.0"];
};
}

View File

@ -31,6 +31,8 @@ buildPythonPackage rec {
build-system = [ hatchling ];
pythonRelaxDeps = [ "protobuf" ];
dependencies = [
agate
dbt-common

View File

@ -44,6 +44,7 @@ buildPythonPackage rec {
sourceRoot = "${src.name}/core";
pythonRelaxDeps = [
"protobuf"
"agate"
"click"
"dbt-semantic-interfaces"

View File

@ -19,7 +19,7 @@
buildPythonPackage rec {
pname = "dbt-semantic-interfaces";
version = "0.6.2";
version = "0.7.4";
pyproject = true;
disabled = pythonOlder "3.8";
@ -28,7 +28,7 @@ buildPythonPackage rec {
owner = "dbt-labs";
repo = "dbt-semantic-interfaces";
rev = "refs/tags/v${version}";
hash = "sha256-V6yMT9Fkug+T3smBEu0Szg5GPMRxEOZc4gtJybWXbrs=";
hash = "sha256-LHcNitkrDQNz2971iMn13eELUyuJbjUK/u+u83JRIBk=";
};
pythonRelaxDeps = [ "importlib-metadata" ];

View File

@ -13,7 +13,7 @@
let
# 0.18.12 was yanked from PyPI, it refers to this issue:
# https://github.com/deschler/django-modeltranslation/issues/701
version = "0.19.9";
version = "0.19.10";
in
buildPythonPackage {
pname = "django-modeltranslation";
@ -23,7 +23,7 @@ buildPythonPackage {
owner = "deschler";
repo = "django-modeltranslation";
rev = "refs/tags/v${version}";
hash = "sha256-2GTz+niXfEsi++KyL6+HtwdzO1YFhpKQsDK3F8GAl4A=";
hash = "sha256-E3CaQx5SGOnxqjLFY0opcKZF4DMl2HKSUD0gOnA25RA=";
};
disabled = pythonOlder "3.6";

View File

@ -17,16 +17,16 @@
buildPythonPackage rec {
pname = "mkdocstrings";
version = "0.26.1";
version = "0.26.2";
pyproject = true;
disabled = pythonOlder "3.8";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "mkdocstrings";
repo = "mkdocstrings";
rev = "refs/tags/${version}";
hash = "sha256-YV9Cncry+RXXGxRYN4dXp5E2msGA4Kq2QSvcPywWV2c=";
hash = "sha256-xZKE8+bNHL+GSQS00MlShOl/3p7+mRV558Pel50ipOI=";
};
postPatch = ''

View File

@ -14,17 +14,16 @@
buildPythonPackage rec {
pname = "parselmouth";
version = "0.4.4";
version = "0.4.5";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "YannickJadoul";
repo = "Parselmouth";
# Stable branch with cherry picked changes to fit to the newer dependencies versions https://github.com/YannickJadoul/Parselmouth/issues/130
rev = "c2cbecc0ce4a0b5d3052cc6c6fbddf4bf133655d";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-+6id0PVfpiVjee7O4ZoskNK0dz5ZmTYRTtum3B3tIgE=";
hash = "sha256-/Hde/DpSbmHs8WF3PAk4esYuMgOX6SxMaYJrrHYr/ZU=";
};
configurePhase = ''

View File

@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "pyexploitdb";
version = "0.2.39";
version = "0.2.40";
pyproject = true;
disabled = pythonOlder "3.7";
@ -18,7 +18,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "pyExploitDb";
inherit version;
hash = "sha256-Q7fql+IEEdfGlY8Uq3D7Y0+17Hg5oLjMn8Nq1HA2HMQ=";
hash = "sha256-3o4KnWau2Sxkj18ZoY6EsSszm0Z0Z1Gz/KWr1ZH7FTs=";
};
build-system = [ setuptools ];

View File

@ -8,14 +8,14 @@
buildPythonPackage rec {
pname = "pypoint";
version = "3.0.0";
version = "3.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "fredrike";
repo = "pypoint";
rev = "v${version}";
hash = "sha256-Ri+vf/vnjQQ+9eZ1Gzt+v68FAxVGt0IY9S3SpeVem3A=";
rev = "refs/tags/v${version}";
hash = "sha256-9z9VcY42uHIksIvDU1Vz+kvXNmrCu08fGB/waQahmyg=";
};
build-system = [ setuptools ];

View File

@ -19,7 +19,7 @@
buildPythonPackage rec {
pname = "python-roborock";
version = "2.6.0";
version = "2.6.1";
pyproject = true;
disabled = pythonOlder "3.10";
@ -28,7 +28,7 @@ buildPythonPackage rec {
owner = "humbertogontijo";
repo = "python-roborock";
rev = "refs/tags/v${version}";
hash = "sha256-Mszy1p7TOEynCePCEiLhwdWiKXfFnlo3/a3vc9TxGeY=";
hash = "sha256-0gzbPa19UIt8Vs0Vnqs9j0tFJAkRTupU7DxT+7rwouI=";
};
postPatch = ''

View File

@ -8,12 +8,12 @@
buildPythonPackage rec {
pname = "types-beautifulsoup4";
version = "4.12.0.20240907";
version = "4.12.0.20241020";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-jQI7hlMJIgcEF6HUxNkWeKsP8kObOyss/6O2KLSeurE=";
hash = "sha256-FYNw0I0M1Ei9EbEypQ/1J5I3pdS1g3vroHTeFSpRMFk=";
};
build-system = [ setuptools ];

View File

@ -9,7 +9,7 @@
buildPythonPackage rec {
pname = "xdg-base-dirs";
version = "6.0.1";
version = "6.0.2";
format = "pyproject";
disabled = pythonOlder "3.10";
@ -17,8 +17,8 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "srstevenson";
repo = "xdg-base-dirs";
rev = version;
hash = "sha256-nbdF1tjVqlxwiGW0pySS6HyJbmNuQ7mVdQYfhofO4Dk=";
rev = "refs/tags/${version}";
hash = "sha256-iXK9WURTfmpl5vd7RsT0ptwfrb5UQQFqMMCu3+vL+EY=";
};
nativeBuildInputs = [ poetry-core ];

View File

@ -1,32 +0,0 @@
diff --git a/test/lit.cfg b/test/lit.cfg
index 118c979..b69fecc 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -207,13 +207,8 @@ def is_preload_disabled():
if is_windows:
return True
elif sys.platform == 'darwin':
- command = ['csrutil', 'status']
- pattern = re.compile(r'System Integrity Protection status:\s+enabled')
- try:
- output = subprocess.check_output(command, stderr=subprocess.STDOUT)
- return any(pattern.match(line) for line in output.decode('utf-8').splitlines())
- except (OSError, subprocess.CalledProcessError):
- return False
+ # csrutil(8) isn't available in the Nix build sandbox.
+ return True
else:
return False
@@ -221,6 +216,11 @@ def is_preload_disabled():
if not is_preload_disabled():
config.available_features.add('preload')
+# Preserve the variables required for the Nix toolchain wrappers.
+for var, value in os.environ.items():
+ if var.startswith('NIX_'):
+ config.environment[var] = value
+
print(config.substitutions)
print(config.environment)
print(config.available_features)

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "buildkite-cli";
version = "3.1.0";
version = "3.2.0";
src = fetchFromGitHub {
owner = "buildkite";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-fidE4MSZS53Odv5tlNPFJEhcb8JTmILVRNmcVF9Z9Oc=";
sha256 = "sha256-lmsL73jck3vt6oDP699BrMq0RyrXAUuTjKtvHcNtcZc=";
};
vendorHash = "sha256-stxsMJPBUclLlmR88c7OwAhsw9dhyBIhStuxLVu00bo=";
vendorHash = "sha256-PZHMJpyZ2w3GFHQW56m+9POyXR6wMt3TmNaQENg9lWw=";
doCheck = false;

View File

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "cargo-sort";
version = "1.0.9";
version = "1.1.0";
src = fetchFromGitHub {
owner = "devinr528";
repo = pname;
rev = "v${version}";
sha256 = "sha256-fqmyL4ZSz+nKfUIrcrfLRT9paEas5d00Y/kvEqyz2vw=";
sha256 = "sha256-AUtue1xkhrhlF7PtqsCQ9rdhV0/0i85DWrp7YL9SAYk=";
};
cargoHash = "sha256-JON6cE1ZHeI+0vU9AJp0e1TIbiH3AWjHyn0jd9PNqQU=";
cargoHash = "sha256-y6lLwk40hmFQKDU7sYz3+QQzdn5eGoEX7izmloK22dg=";
meta = with lib; {
description = "Tool to check that your Cargo.toml dependencies are sorted alphabetically";

View File

@ -38,5 +38,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Only;
maintainers = with maintainers; [ pSub ];
platforms = platforms.linux;
mainProgram = "xlock";
};
}

View File

@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
pname = "android-udev-rules";
version = "20240829";
version = "20241019";
src = fetchFromGitHub {
owner = "M0Rf30";
repo = "android-udev-rules";
rev = version;
hash = "sha256-QrWEvNcPKSEJghQc0tqb/L71IqeMUmuJLyA0NtzacyY=";
hash = "sha256-ZKJhGobW3F339PBsIezMTbzouomYGxDJyFbJMGIeim4=";
};
installPhase = ''

View File

@ -6,16 +6,16 @@
buildNpmPackage rec {
pname = "hourly-weather";
version = "6.2.0";
version = "6.4.0";
src = fetchFromGitHub {
owner = "decompil3d";
repo = "lovelace-hourly-weather";
rev = version;
hash = "sha256-dDWdVAVrZrZIyGG9gOyLohxRZ3DGfjbvW3gGCLqZr+A=";
hash = "sha256-Aaeo3dL7N2vRTQU6bEj+jfxUAclI+8ROAUuF0PeOdw8=";
};
npmDepsHash = "sha256-UzbMDlVOef6dO+tOeTHBBeuT578brklibbfma+VVYD8=";
npmDepsHash = "sha256-unTZvllmfEBXWgEbObJWMPpEJzgrihKKK1eMREWpbVE=";
env.CYPRESS_INSTALL_BINARY = "0";

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "mongodb_exporter";
version = "0.41.1";
version = "0.41.2";
src = fetchFromGitHub {
owner = "percona";
repo = "mongodb_exporter";
rev = "v${version}";
hash = "sha256-2/oYfeybXnaoccyhriCHEY5lZcojLnk9qoiSlt4TDZY=";
hash = "sha256-d2/N/NqtRglRN/3E7B5FOMpcQXP/taKFYodc6mhW7A4=";
};
vendorHash = "sha256-xKqt4JdHbFxMvFMa/zi8qGm9OZ3YFjGJQrMXfBfj4xA=";
vendorHash = "sha256-hy2w1Ix202gSJyp/EQ6uKJC8y16nw8Y78kDaP9LbU/4=";
ldflags = [
"-s"

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "sql_exporter";
version = "0.5.6";
version = "0.5.7";
src = fetchFromGitHub {
owner = "justwatchcom";
repo = pname;
rev = "v${version}";
sha256 = "sha256-kNIf8HwqNPGJAR8+/IkGn/5ryMEd6rGCixjnKG63xcY=";
sha256 = "sha256-9e3prTe7mHQJfSeIL+bEkW6GykvxA8ryD3GHgxk56Us=";
};
vendorHash = null;

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@
}:
let
version = "1.9.0";
version = "1.10.2";
in
rustPlatform.buildRustPackage {
pname = "meilisearch";
@ -20,14 +20,9 @@ rustPlatform.buildRustPackage {
owner = "meilisearch";
repo = "meiliSearch";
rev = "refs/tags/v${version}";
hash = "sha256-fPXhayS8OKiiiDvVvBry3njZ74/W6oVL0p85Z5qf3KA==";
hash = "sha256-gI0Azbb4gYFf4E/oIoJbln/mkbJIenSPzGUVliGzOzE=";
};
cargoPatches = [
# fix build with Rust 1.80
./time-crate.patch
];
cargoBuildFlags = [ "--package=meilisearch" ];
cargoLock = {
@ -64,7 +59,10 @@ rustPlatform.buildRustPackage {
homepage = "https://docs.meilisearch.com/";
changelog = "https://github.com/meilisearch/meilisearch/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ happysalada ];
maintainers = with lib.maintainers; [
happysalada
bbenno
];
platforms = [
"aarch64-linux"
"aarch64-darwin"

View File

@ -1,28 +0,0 @@
diff --git a/Cargo.lock b/Cargo.lock
index 3c728f348..51df0ea7b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5098,9 +5098,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.34"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
@@ -5121,9 +5121,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.17"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
"num-conv",
"time-core",

View File

@ -11,11 +11,11 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "opensearch";
version = "2.17.0";
version = "2.17.1";
src = fetchurl {
url = "https://artifacts.opensearch.org/releases/bundle/opensearch/${finalAttrs.version}/opensearch-${finalAttrs.version}-linux-x64.tar.gz";
hash = "sha256-I5CI9t5jsayE58O3lGRLQ2zj5lClWldKNsPBS4tNtfs=";
hash = "sha256-9m7Vt+x4SPOBAqVL88gufSmqhvAiCcnOi7bL43XzCiU=";
};
nativeBuildInputs = [

View File

@ -5,13 +5,13 @@
buildGoModule rec {
pname = "vouch-proxy";
version = "0.40.0";
version = "0.41.0";
src = fetchFromGitHub {
owner = "vouch";
repo = "vouch-proxy";
rev = "refs/tags/v${version}";
hash = "sha256-/B7MMRkI5DhDBWa53mgFUME1CR3FSxxQ8UWjlN19EmQ=";
hash = "sha256-HQ1NaAHY1YRbNUThW983V8x3ptzTc/zNP6yIMyDiq1s=";
};
vendorHash = "sha256-1k9YFdackF10iJWJ22XlaENlOfRkZMs+IedDWnd/h8E=";

View File

@ -11,6 +11,9 @@ let
emulator = stdenv.hostPlatform.emulator buildPackages;
isCxx = stdenv.cc.libcxx != null;
libcxxStdenvSuffix = lib.optionalString isCxx "-libcxx";
CC = "PATH= ${lib.getExe' stdenv.cc "${stdenv.cc.targetPrefix}cc"}";
CXX = "PATH= ${lib.getExe' stdenv.cc "${stdenv.cc.targetPrefix}c++"}";
READELF = "PATH= ${lib.getExe' stdenv.cc "${stdenv.cc.targetPrefix}readelf"}";
in stdenv.mkDerivation {
pname = "cc-wrapper-test-${stdenv.cc.cc.pname}${libcxxStdenvSuffix}";
version = stdenv.cc.version;
@ -20,38 +23,38 @@ in stdenv.mkDerivation {
echo "With libc: ${stdenv.cc.libc.name}" >&2
set -o pipefail
NIX_DEBUG=1 $CC -v
NIX_DEBUG=1 $CXX -v
NIX_DEBUG=1 ${CC} -v
NIX_DEBUG=1 ${CXX} -v
echo "checking whether compiler builds valid C binaries... " >&2
$CC -o cc-check ${./cc-main.c}
${CC} -o cc-check ${./cc-main.c}
${emulator} ./cc-check
echo "checking whether compiler builds valid C++ binaries... " >&2
$CXX -o cxx-check ${./cxx-main.cc}
${CXX} -o cxx-check ${./cxx-main.cc}
${emulator} ./cxx-check
# test for https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1431745905
# .../include/cxxabi.h:20:10: fatal error: '__cxxabi_config.h' file not found
# in libcxxStdenv
echo "checking whether cxxabi.h can be included... " >&2
$CXX -o include-cxxabi ${./include-cxxabi.cc}
${CXX} -o include-cxxabi ${./include-cxxabi.cc}
${emulator} ./include-cxxabi
# cxx doesn't have libatomic.so
${lib.optionalString (!isCxx) ''
# https://github.com/NixOS/nixpkgs/issues/91285
echo "checking whether libatomic.so can be linked... " >&2
$CXX -shared -o atomics.so ${./atomics.cc} -latomic ${lib.optionalString (stdenv.cc.isClang && lib.versionOlder stdenv.cc.version "6.0.0" ) "-std=c++17"}
$READELF -d ./atomics.so | grep libatomic.so && echo "ok" >&2 || echo "failed" >&2
${CXX} -shared -o atomics.so ${./atomics.cc} -latomic ${lib.optionalString (stdenv.cc.isClang && lib.versionOlder stdenv.cc.version "6.0.0" ) "-std=c++17"}
${READELF} -d ./atomics.so | grep libatomic.so && echo "ok" >&2 || echo "failed" >&2
''}
# Test that linking libc++ works, and statically.
${lib.optionalString isCxx ''
echo "checking whether can link with libc++... " >&2
NIX_DEBUG=1 $CXX ${./cxx-main.cc} -c -o cxx-main.o
NIX_DEBUG=1 $CC cxx-main.o -lc++ -o cxx-main
NIX_DEBUG=1 $CC cxx-main.o ${lib.getLib stdenv.cc.libcxx}/lib/libc++.a -o cxx-main-static
NIX_DEBUG=1 ${CXX} ${./cxx-main.cc} -c -o cxx-main.o
NIX_DEBUG=1 ${CC} cxx-main.o -lc++ -o cxx-main
NIX_DEBUG=1 ${CC} cxx-main.o ${lib.getLib stdenv.cc.libcxx}/lib/libc++.a -o cxx-main-static
${emulator} ./cxx-main
${emulator} ./cxx-main-static
rm cxx-main{,-static,.o}
@ -60,18 +63,18 @@ in stdenv.mkDerivation {
${lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.cc.isClang) ''
echo "checking whether compiler can build with CoreFoundation.framework... " >&2
mkdir -p foo/lib
$CC -framework CoreFoundation -o core-foundation-check ${./core-foundation-main.c}
${CC} -framework CoreFoundation -o core-foundation-check ${./core-foundation-main.c}
${emulator} ./core-foundation-check
''}
${lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
echo "checking whether compiler builds valid static C binaries... " >&2
$CC ${staticLibc} -static -o cc-static ${./cc-main.c}
${CC} ${staticLibc} -static -o cc-static ${./cc-main.c}
${emulator} ./cc-static
${lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast (lib.getVersion stdenv.cc.name) "8.0.0") ''
echo "checking whether compiler builds valid static pie C binaries... " >&2
$CC ${staticLibc} -static-pie -o cc-static-pie ${./cc-main.c}
${CC} ${staticLibc} -static-pie -o cc-static-pie ${./cc-main.c}
${emulator} ./cc-static-pie
''}
''}
@ -84,47 +87,47 @@ in stdenv.mkDerivation {
# Make sure `--` is not parsed as a "non flag arg"; we should get an
# input file error here and *not* a linker error.
{ ! $CC --; } |& grep -q "no input files"
{ ! ${CC} --; } |& grep -q "no input files"
# And that positional file args _must_ be files (this is just testing
# that we remembered to put the `--` back in the args to the compiler):
{ ! $CC -c -- -o foo ${./foo.c}; } \
{ ! ${CC} -c -- -o foo ${./foo.c}; } \
|& grep -q "no such file or directory: '-o'"
# Now check that we accept single and multiple positional file args:
$CC -c -DVALUE=42 -o positional/foo.o -- ${./foo.c}
$CC -o positional/main -- positional/foo.o ${./ldflags-main.c}
${CC} -c -DVALUE=42 -o positional/foo.o -- ${./foo.c}
${CC} -o positional/main -- positional/foo.o ${./ldflags-main.c}
${emulator} ./positional/main
''}
echo "checking whether compiler uses NIX_CFLAGS_COMPILE... " >&2
mkdir -p foo/include
cp ${./foo.c} foo/include/foo.h
NIX_CFLAGS_COMPILE="-Ifoo/include -DVALUE=42" $CC -o cflags-check ${./cflags-main.c}
NIX_CFLAGS_COMPILE="-Ifoo/include -DVALUE=42" ${CC} -o cflags-check ${./cflags-main.c}
${emulator} ./cflags-check
echo "checking whether compiler uses NIX_LDFLAGS... " >&2
mkdir -p foo/lib
$CC -shared \
${CC} -shared \
${lib.optionalString stdenv.hostPlatform.isDarwin "-Wl,-install_name,@rpath/libfoo.dylib"} \
-DVALUE=42 \
-o foo/lib/libfoo${stdenv.hostPlatform.extensions.sharedLibrary} \
${./foo.c}
NIX_LDFLAGS="-L$NIX_BUILD_TOP/foo/lib -rpath $NIX_BUILD_TOP/foo/lib" $CC -lfoo -o ldflags-check ${./ldflags-main.c}
NIX_LDFLAGS="-L$NIX_BUILD_TOP/foo/lib -rpath $NIX_BUILD_TOP/foo/lib" ${CC} -lfoo -o ldflags-check ${./ldflags-main.c}
${emulator} ./ldflags-check
echo "Check whether -nostdinc and -nostdinc++ is handled correctly" >&2
mkdir -p std-include
cp ${./stdio.h} std-include/stdio.h
NIX_DEBUG=1 $CC -I std-include -nostdinc -o nostdinc-main ${./nostdinc-main.c}
NIX_DEBUG=1 ${CC} -I std-include -nostdinc -o nostdinc-main ${./nostdinc-main.c}
${emulator} ./nostdinc-main
$CXX -I std-include -nostdinc++ -o nostdinc-main++ ${./nostdinc-main.c}
${CXX} -I std-include -nostdinc++ -o nostdinc-main++ ${./nostdinc-main.c}
${emulator} ./nostdinc-main++
${lib.optionalString sanitizersWorking ''
echo "checking whether sanitizers are fully functional... ">&2
$CC -o sanitizers -fsanitize=address,undefined ${./sanitizers.c}
${CC} -o sanitizers -fsanitize=address,undefined ${./sanitizers.c}
ASAN_OPTIONS=use_sigaltstack=0 ${emulator} ./sanitizers
''}

View File

@ -30,6 +30,8 @@ with pkgs;
(filter (lib.hasPrefix "gcc"))
(filter (lib.hasSuffix "Stdenv"))
(filter (n: n != "gccCrossLibcStdenv"))
(filter (n: n != "gcc49Stdenv"))
(filter (n: n != "gcc6Stdenv"))
] ++ lib.optionals (!(
(stdenv.buildPlatform.isLinux && stdenv.buildPlatform.isx86_64) &&
(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64)

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "vals";
version = "0.37.5";
version = "0.37.7";
src = fetchFromGitHub {
rev = "v${version}";
owner = "helmfile";
repo = pname;
sha256 = "sha256-ezF8cV3JPE/GObpTc4wPw/YcQrOKNi2bsRs3svLWpV8=";
sha256 = "sha256-iRXBT3VpEVHna3GkMxVSVRqQ2HTK7gCd6LkthwrBMx4=";
};
vendorHash = "sha256-jwxKFgUhBilX/HxwjtHwLzmyUFrM8snM6Sq1CdY7oOY=";
vendorHash = "sha256-1iyJ56YKu/WVb7dPP7YE07kdbJte2/Sww8cQu+epFNc=";
proxyVendor = true;

View File

@ -7,13 +7,13 @@
buildGoModule rec {
pname = "nsc";
version = "2.9.0";
version = "2.10.0";
src = fetchFromGitHub {
owner = "nats-io";
repo = pname;
rev = "v${version}";
hash = "sha256-pzUjcezzZ3Fo9b7nuPV08ZSxrk7cBufQL6Dbfvmjkg4=";
hash = "sha256-iobC5qhrQg/vy161atU0NqqKnvsr1CGaiXAe6Ln+Tn8=";
};
ldflags = [
@ -23,7 +23,7 @@ buildGoModule rec {
"-X main.builtBy=nixpkgs"
];
vendorHash = "sha256-tZTrjIax3zofrRuSJQO7VA7rlTXN/GT1KTcsLpvB+2Q=";
vendorHash = "sha256-CirTiIQD3Xvt+ly7Ll3THLwImqbyQDDIz092ihosejY=";
nativeBuildInputs = [ installShellFiles ];
@ -46,7 +46,7 @@ buildGoModule rec {
# the test strips table formatting from the command output in a naive way
# that removes all the table characters, including '-'.
# The nix build directory looks something like:
# /private/tmp/nix-build-nsc-2.9.0.drv-0/nsc_test2000598938/keys
# /private/tmp/nix-build-nsc-2.10.0.drv-0/nsc_test2000598938/keys
# Then the `-` are removed from the path unintentionally and the test fails.
# This should be fixed upstream to avoid mangling the path when
# removing the table decorations from the command output.

View File

@ -526,8 +526,6 @@ with pkgs;
databricks-sql-cli = python3Packages.callPackage ../applications/misc/databricks-sql-cli { };
dbip-country-lite = callPackage ../data/misc/dbip-country-lite { };
dcgm = callPackage ../os-specific/linux/dcgm { };
deck = callPackage ../by-name/de/deck/package.nix {
@ -16614,6 +16612,7 @@ with pkgs;
tcl = tcl-8_6;
tcl-8_5 = callPackage ../development/interpreters/tcl/8.5.nix { };
tcl-8_6 = callPackage ../development/interpreters/tcl/8.6.nix { };
tcl-9_0 = callPackage ../development/interpreters/tcl/9.0.nix { };
tclreadline = callPackage ../development/interpreters/tclreadline { };
@ -17018,8 +17017,6 @@ with pkgs;
buildBazelPackage = darwin.apple_sdk_11_0.callPackage ../build-support/build-bazel-package { };
bear = callPackage ../development/tools/build-managers/bear { };
bingrep = callPackage ../development/tools/analysis/bingrep { };
binutils-unwrapped = callPackage ../development/tools/misc/binutils {
@ -23303,6 +23300,7 @@ with pkgs;
tk = tk-8_6;
tk-9_0 = callPackage ../development/libraries/tk/9.0.nix { tcl = tcl-9_0; };
tk-8_6 = callPackage ../development/libraries/tk/8.6.nix { };
tk-8_5 = callPackage ../development/libraries/tk/8.5.nix { tcl = tcl-8_5; };
@ -30387,10 +30385,9 @@ with pkgs;
khard = callPackage ../applications/misc/khard { };
kid3-cli = qt6Packages.callPackage ../applications/audio/kid3 { withCLI = true; withKDE = false; withQt = false; };
kid3-kde = qt6Packages.callPackage ../applications/audio/kid3 { withCLI = true; withKDE = true; withQt = false; };
kid3-qt = qt6Packages.callPackage ../applications/audio/kid3 { withCLI = true; withKDE = false; withQt = true; };
kid3 = kid3-kde;
kid3-cli = kid3.override { withCLI = true; withKDE = false; withQt = false; };
kid3-kde = kid3.override { withCLI = true; withKDE = true; withQt = false; };
kid3-qt = kid3.override { withCLI = true; withKDE = false; withQt = true; };
kile = callPackage ../applications/editors/kile { };
@ -33369,8 +33366,6 @@ with pkgs;
vwm = callPackage ../applications/window-managers/vwm { };
vym = libsForQt5.callPackage ../applications/misc/vym { };
wad = callPackage ../tools/security/wad { };
wafw00f = callPackage ../tools/security/wafw00f { };