diff --git a/ci/OWNERS b/ci/OWNERS index 35edeaf6cf77..d43870578572 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -134,14 +134,16 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @NixOS/nix-team @raitobeza /nixos/modules/installer/sd-card/ # Amazon -/nixos/modules/virtualisation/amazon-init.nix @arianvp -/nixos/modules/virtualisation/ec2-data.nix @arianvp -/nixos/modules/virtualisation/amazon-options.nix @arianvp -/nixos/modules/virtualisation/amazon-image.nix @arianvp -/nixos/maintainers/scripts/ec2/ @arianvp -/nixos/modules/services/misc/amazon-ssm-agent.nix @arianvp -/nixos/tests/amazon-ssm-agent.nix @arianvp -/nixos/modules/system/boot/grow-partition.nix @arianvp +/nixos/modules/virtualisation/amazon-init.nix @arianvp +/nixos/modules/virtualisation/ec2-data.nix @arianvp +/nixos/modules/virtualisation/amazon-options.nix @arianvp +/nixos/modules/virtualisation/amazon-image.nix @arianvp +/nixos/maintainers/scripts/ec2/ @arianvp +/nixos/modules/services/misc/amazon-ssm-agent.nix @arianvp +/nixos/tests/amazon-ssm-agent.nix @arianvp +/nixos/modules/system/boot/grow-partition.nix @arianvp +/nixos/modules/services/monitoring/amazon-cloudwatch-agent.nix @philipmw +/nixos/tests/amazon-cloudwatch-agent.nix @philipmw # nixos-rebuild-ng /pkgs/by-name/ni/nixos-rebuild-ng @thiagokokada diff --git a/nixos/modules/services/monitoring/amazon-cloudwatch-agent.nix b/nixos/modules/services/monitoring/amazon-cloudwatch-agent.nix index fef2cfdd6fb5..c6f64b3754a6 100644 --- a/nixos/modules/services/monitoring/amazon-cloudwatch-agent.nix +++ b/nixos/modules/services/monitoring/amazon-cloudwatch-agent.nix @@ -10,8 +10,16 @@ let tomlFormat = pkgs.formats.toml { }; jsonFormat = pkgs.formats.json { }; - commonConfigurationFile = tomlFormat.generate "common-config.toml" cfg.commonConfiguration; - configurationFile = jsonFormat.generate "amazon-cloudwatch-agent.json" cfg.configuration; + commonConfigurationFile = + if (cfg.commonConfigurationFile == null) then + (tomlFormat.generate "common-config.toml" cfg.commonConfiguration) + else + cfg.commonConfigurationFile; + configurationFile = + if (cfg.configurationFile == null) then + (jsonFormat.generate "amazon-cloudwatch-agent.json" cfg.configuration) + else + cfg.configurationFile; # See https://docs.aws.amazon.com/prescriptive-guidance/latest/implementing-logging-monitoring-cloudwatch/create-store-cloudwatch-configurations.html#store-cloudwatch-configuration-s3. # # We don't use the multiple JSON configuration files feature, @@ -24,13 +32,30 @@ in options.services.amazon-cloudwatch-agent = { enable = lib.mkEnableOption "Amazon CloudWatch Agent"; package = lib.mkPackageOption pkgs "amazon-cloudwatch-agent" { }; - commonConfiguration = lib.mkOption { - type = tomlFormat.type; - default = { }; + commonConfigurationFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = null; description = '' Amazon CloudWatch Agent common configuration. See for supported values. + + {option}`commonConfigurationFile` takes precedence over {option}`commonConfiguration`. + + Note: Restricted evaluation blocks access to paths outside the Nix store. + This means detecting content changes for mutable paths (i.e. not input or content-addressed) can't be done. + As a result, `nixos-rebuild` won't reload/restart the systemd unit when mutable path contents change. + `systemctl restart amazon-cloudwatch-agent.service` must be used instead. + ''; + example = "/etc/amazon-cloudwatch-agent/amazon-cloudwatch-agent.json"; + }; + commonConfiguration = lib.mkOption { + type = tomlFormat.type; + default = { }; + description = '' + See {option}`commonConfigurationFile`. + + {option}`commonConfigurationFile` takes precedence over {option}`commonConfiguration`. ''; example = { credentials = { @@ -44,13 +69,34 @@ in }; }; }; + configurationFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = null; + description = '' + Amazon CloudWatch Agent configuration file. See + + for supported values. + + The following options aren't supported: + * `agent.run_as_user` + * Use {option}`user` instead. + + {option}`configurationFile` takes precedence over {option}`configuration`. + + Note: Restricted evaluation blocks access to paths outside the Nix store. + This means detecting content changes for mutable paths (i.e. not input or content-addressed) can't be done. + As a result, `nixos-rebuild` won't reload/restart the systemd unit when mutable path contents change. + `systemctl restart amazon-cloudwatch-agent.service` must be used instead. + ''; + example = "/etc/amazon-cloudwatch-agent/amazon-cloudwatch-agent.json"; + }; configuration = lib.mkOption { type = jsonFormat.type; default = { }; description = '' - Amazon CloudWatch Agent configuration. See - - for supported values. + See {option}`configurationFile`. + + {option}`configurationFile` takes precedence over {option}`configuration`. ''; # Subset of "CloudWatch agent configuration file: Complete examples" and "CloudWatch agent configuration file: Traces section" in the description link. # @@ -110,6 +156,15 @@ in }; }; }; + # Replaces "agent.run_as_user" from the configuration file. + user = lib.mkOption { + type = lib.types.str; + default = "root"; + description = '' + The user that runs the Amazon CloudWatch Agent. + ''; + example = "amazon-cloudwatch-agent"; + }; mode = lib.mkOption { type = lib.types.str; default = "auto"; @@ -122,7 +177,7 @@ in }; config = lib.mkIf cfg.enable { - # See https://github.com/aws/amazon-cloudwatch-agent/blob/v1.300048.1/packaging/dependencies/amazon-cloudwatch-agent.service. + # See https://github.com/aws/amazon-cloudwatch-agent/blob/v1.300049.1/packaging/dependencies/amazon-cloudwatch-agent.service. systemd.services.amazon-cloudwatch-agent = { description = "Amazon CloudWatch Agent"; after = [ "network.target" ]; @@ -140,40 +195,28 @@ in # 3. Runs "amazon-cloudwatch-agent" with the paths to these generated files. # # Re-implementing with systemd options. - User = lib.attrByPath [ - "agent" - "run_as_user" - ] "root" cfg.configuration; + User = cfg.user; RuntimeDirectory = "amazon-cloudwatch-agent"; LogsDirectory = "amazon-cloudwatch-agent"; - ExecStartPre = '' - ${cfg.package}/bin/config-translator \ - -config ${commonConfigurationFile} \ - -input ${configurationFile} \ - -input-dir ${configurationDirectory} \ - -mode ${cfg.mode} \ - -output ''${RUNTIME_DIRECTORY}/amazon-cloudwatch-agent.toml - ''; - ExecStart = '' - ${cfg.package}/bin/amazon-cloudwatch-agent \ - -config ''${RUNTIME_DIRECTORY}/amazon-cloudwatch-agent.toml \ - -envconfig ''${RUNTIME_DIRECTORY}/env-config.json \ - -otelconfig ''${RUNTIME_DIRECTORY}/amazon-cloudwatch-agent.yaml \ - -pidfile ''${RUNTIME_DIRECTORY}/amazon-cloudwatch-agent.pid - ''; + ExecStartPre = builtins.concatStringsSep " " [ + "${cfg.package}/bin/config-translator" + "-config ${commonConfigurationFile}" + "-input ${configurationFile}" + "-input-dir ${configurationDirectory}" + "-mode ${cfg.mode}" + "-output \${RUNTIME_DIRECTORY}/amazon-cloudwatch-agent.toml" + ]; + ExecStart = builtins.concatStringsSep " " [ + "${cfg.package}/bin/amazon-cloudwatch-agent" + "-config \${RUNTIME_DIRECTORY}/amazon-cloudwatch-agent.toml" + "-envconfig \${RUNTIME_DIRECTORY}/env-config.json" + "-otelconfig \${RUNTIME_DIRECTORY}/amazon-cloudwatch-agent.yaml" + "-pidfile \${RUNTIME_DIRECTORY}/amazon-cloudwatch-agent.pid" + ]; KillMode = "process"; Restart = "on-failure"; RestartSec = 60; }; - restartTriggers = [ - cfg.package - commonConfigurationFile - configurationFile - configurationDirectory - cfg.mode - ]; }; }; - - meta.maintainers = pkgs.amazon-cloudwatch-agent.meta.maintainers; } diff --git a/nixos/tests/amazon-cloudwatch-agent.nix b/nixos/tests/amazon-cloudwatch-agent.nix index 2810ac0a72ea..199f74c9b2a6 100644 --- a/nixos/tests/amazon-cloudwatch-agent.nix +++ b/nixos/tests/amazon-cloudwatch-agent.nix @@ -27,7 +27,6 @@ import ./make-test-python.nix ( in { name = "amazon-cloudwatch-agent"; - meta.maintainers = pkgs.amazon-cloudwatch-agent.meta.maintainers; nodes.machine = { config, pkgs, ... }: diff --git a/pkgs/by-name/am/amazon-cloudwatch-agent/package.nix b/pkgs/by-name/am/amazon-cloudwatch-agent/package.nix index 5301c69bf5e6..6378935663b8 100644 --- a/pkgs/by-name/am/amazon-cloudwatch-agent/package.nix +++ b/pkgs/by-name/am/amazon-cloudwatch-agent/package.nix @@ -16,13 +16,13 @@ buildGoModule rec { src = fetchFromGitHub { owner = "aws"; repo = "amazon-cloudwatch-agent"; - rev = "refs/tags/v${version}"; + tag = "v${version}"; hash = "sha256-gJrK+ai+EEKvBErjOyvu677WykUPuxYy9NrR+qV2yyo="; }; vendorHash = "sha256-OQSl7nFvnDjJbs756QN5ZE/Dx/AZqxsijG0Ks7FYCB8="; - # See the list in https://github.com/aws/amazon-cloudwatch-agent/blob/v1.300048.1/Makefile#L68-L77. + # See the list in https://github.com/aws/amazon-cloudwatch-agent/blob/v1.300049.1/Makefile#L68-L77. subPackages = [ "cmd/config-downloader" "cmd/config-translator" @@ -32,7 +32,7 @@ buildGoModule rec { "cmd/amazon-cloudwatch-agent-config-wizard" ]; - # See https://github.com/aws/amazon-cloudwatch-agent/blob/v1.300048.1/Makefile#L57-L64. + # See https://github.com/aws/amazon-cloudwatch-agent/blob/v1.300049.1/Makefile#L57-L64. # # Needed for "amazon-cloudwatch-agent -version" to not show "Unknown". postInstall = '' @@ -43,6 +43,8 @@ buildGoModule rec { nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgram = "${builtins.placeholder "out"}/bin/amazon-cloudwatch-agent"; + versionCheckProgramArg = "-version"; passthru = { diff --git a/pkgs/by-name/bu/budgie-control-center/package.nix b/pkgs/by-name/bu/budgie-control-center/package.nix index ca114fb1f6ff..622d46eafa83 100644 --- a/pkgs/by-name/bu/budgie-control-center/package.nix +++ b/pkgs/by-name/bu/budgie-control-center/package.nix @@ -21,6 +21,7 @@ glib-networking, glibc, gnome, + gst_all_1, gnome-bluetooth_1_0, gnome-color-manager, gnome-desktop, @@ -117,6 +118,7 @@ stdenv.mkDerivation (finalAttrs: { glib glib-networking gnome-desktop + gst_all_1.gstreamer adwaita-icon-theme cheese gnome-bluetooth_1_0 @@ -183,6 +185,11 @@ stdenv.mkDerivation (finalAttrs: { separateDebugInfo = true; + # Fix GCC 14 build. + # cc-display-panel.c:962:41: error: passing argument 1 of 'gtk_widget_set_sensitive' + # from incompatible pointer type [-Wincompatible-pointer-types] + env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + passthru = { tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; updateScript = nix-update-script { }; diff --git a/pkgs/by-name/bu/budgie-screensaver/package.nix b/pkgs/by-name/bu/budgie-screensaver/package.nix index 339b800800f4..85aeef52ec9e 100644 --- a/pkgs/by-name/bu/budgie-screensaver/package.nix +++ b/pkgs/by-name/bu/budgie-screensaver/package.nix @@ -56,7 +56,9 @@ stdenv.mkDerivation (finalAttrs: { xorg.libXxf86vm ]; - env.NIX_CFLAGS_COMPILE = "-D_POSIX_C_SOURCE"; + # Fix GCC 14 build. + # https://hydra.nixos.org/build/282164464/nixlog/3 + env.NIX_CFLAGS_COMPILE = "-D_POSIX_C_SOURCE -Wno-error=implicit-function-declaration"; passthru = { tests.version = testers.testVersion { diff --git a/pkgs/by-name/ch/cheese/package.nix b/pkgs/by-name/ch/cheese/package.nix index 4da934e9d8eb..e1113fbebe08 100644 --- a/pkgs/by-name/ch/cheese/package.nix +++ b/pkgs/by-name/ch/cheese/package.nix @@ -67,22 +67,25 @@ stdenv.mkDerivation rec { buildInputs = [ adwaita-icon-theme clutter-gst - clutter-gtk dbus - gdk-pixbuf - glib gnome-desktop gnome-video-effects gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good - gst_all_1.gstreamer gtk3 libcanberra-gtk3 librsvg pipewire # PipeWire provides a gstreamer plugin for using PipeWire for video ]; + propagatedBuildInputs = [ + clutter-gtk + gdk-pixbuf + glib + gst_all_1.gstreamer + ]; + preFixup = '' gappsWrapperArgs+=( # Effects @@ -95,6 +98,11 @@ stdenv.mkDerivation rec { ) ''; + # Fix GCC 14 build + # ../libcheese/cheese-flash.c:135:22: error: assignment to 'GtkWidget *' {aka 'struct _GtkWidget *'} from + # incompatible pointer type 'GObject *' {aka 'struct _GObject *'} [-Wincompatible-pointer-types] + env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + passthru = { updateScript = gnome.updateScript { packageName = "cheese"; diff --git a/pkgs/by-name/gl/gltron/package.nix b/pkgs/by-name/gl/gltron/package.nix index c09c8d7e460c..7ea01f14b729 100644 --- a/pkgs/by-name/gl/gltron/package.nix +++ b/pkgs/by-name/gl/gltron/package.nix @@ -20,7 +20,16 @@ stdenv.mkDerivation rec { sha256 = "e0c8ebb41a18a1f8d7302a9c2cb466f5b1dd63e9a9966c769075e6b6bdad8bb0"; }; - patches = [ ./gentoo-prototypes.patch ]; + patches = [ + ./gentoo-prototypes.patch + + # gcc-14 build fix: https://sourceforge.net/p/gltron/patches/7/ + (fetchurl { + name = "gcc-14.patch"; + url = "https://sourceforge.net/p/gltron/patches/7/attachment/gcc-14.patch"; + hash = "sha256-OJAUAM/OQVwxYnIacBkncNxMLn/HDCoysbi+Txe+DC8="; + }) + ]; postPatch = '' # Fix https://sourceforge.net/p/gltron/bugs/15 @@ -41,6 +50,8 @@ stdenv.mkDerivation rec { SDL_sound ]; + enableParallelBuilding = true; + meta = { homepage = "http://www.gltron.org/"; description = "Game based on the movie Tron"; diff --git a/pkgs/by-name/hy/hyprcursor/package.nix b/pkgs/by-name/hy/hyprcursor/package.nix index 69c4a3c41cb8..3c13f0a3a2dc 100644 --- a/pkgs/by-name/hy/hyprcursor/package.nix +++ b/pkgs/by-name/hy/hyprcursor/package.nix @@ -11,17 +11,16 @@ xcur2png, tomlplusplus, nix-update-script, - fetchpatch, }: gcc14Stdenv.mkDerivation (finalAttrs: { pname = "hyprcursor"; - version = "0.1.10"; + version = "0.1.11"; src = fetchFromGitHub { owner = "hyprwm"; repo = "hyprcursor"; rev = "refs/tags/v${finalAttrs.version}"; - hash = "sha256-NqihN/x8T4+wumSP1orwCCdEmD2xWgLR5QzfY+kAtuU="; + hash = "sha256-LOTmvTIxmaWtXF8OP6b6oENSdG/quWxhsO3dJQACBUw="; }; nativeBuildInputs = [ @@ -44,14 +43,6 @@ gcc14Stdenv.mkDerivation (finalAttrs: { "lib" ]; - patches = [ - # NOTE: remove after next release - (fetchpatch { - name = "001-add-fstream-include"; - url = "https://github.com/hyprwm/hyprcursor/commit/c18572a92eb39e4921b4f4c2bca8521b6f701b58.patch"; - hash = "sha256-iHRRd/18xEAgvJgmZeSzMp53s+zdIpuaP/sayRfcft4="; - }) - ]; passthru.updateScript = nix-update-script { }; meta = { diff --git a/pkgs/by-name/jx/jx/package.nix b/pkgs/by-name/jx/jx/package.nix index 839055db0812..befb1831504d 100644 --- a/pkgs/by-name/jx/jx/package.nix +++ b/pkgs/by-name/jx/jx/package.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "jx"; - version = "3.11.3"; + version = "3.11.4"; src = fetchFromGitHub { owner = "jenkins-x"; repo = "jx"; rev = "v${version}"; - sha256 = "sha256-4bQGggo9N7XMwUGEd3wFDB2kSfTMHuFi718JqkHqFME="; + sha256 = "sha256-6M5mY3VoKyoKRd3K6TstGdJ6sfYcIHkCESDUWhl3VCc="; }; vendorHash = "sha256-GzkAIGy9CCBIbIWUkPOPM3GlKvlEVm6YXnQUUGjItXE="; diff --git a/pkgs/by-name/ma/magpie/package.nix b/pkgs/by-name/ma/magpie/package.nix index b5893def7984..65ff728acba0 100644 --- a/pkgs/by-name/ma/magpie/package.nix +++ b/pkgs/by-name/ma/magpie/package.nix @@ -32,7 +32,7 @@ pipewire, libgudev, libwacom, - libgbm, + mesa, meson, nix-update-script, validatePkgConfig, @@ -86,13 +86,13 @@ stdenv.mkDerivation (finalAttrs: { libXtst libcap_ng graphene + mesa # actually uses eglmesaext ]; nativeBuildInputs = [ desktop-file-utils gettext libxcvt - libgbm meson ninja xvfb-run diff --git a/pkgs/by-name/ob/objfw/package.nix b/pkgs/by-name/ob/objfw/package.nix index 6dd746184f35..f315d4c0a9f8 100644 --- a/pkgs/by-name/ob/objfw/package.nix +++ b/pkgs/by-name/ob/objfw/package.nix @@ -33,44 +33,7 @@ clangStdenv.mkDerivation (finalAttrs: { doCheck = true; passthru.tests = { - build-hello-world = clangStdenv.mkDerivation { - name = "ObjFW test"; - buildInputs = [ objfw ]; - - src = writeTextDir "helloworld.m" '' - #import - int main() { - OFLog(@"Hello world from objc"); - return 0; - } - ''; - - buildPhase = '' - runHook preBuild - clang -o testbinary \ - -x objective-c -Xclang \ - -fobjc-runtime=objfw \ - -funwind-tables \ - -fconstant-string-class=OFConstantString \ - -Xclang -fno-constant-cfstrings \ - helloworld.m \ - -lobjfw -lobjfwrt - runHook postBuild - ''; - - checkPhase = '' - runHook preCheck - ./testbinary - runHook postCheck - ''; - doCheck = true; - - installPhase = '' - runHook preInstall - touch $out - runHook postInstall - ''; - }; + build-hello-world = (import ./test-build-and-run.nix) { inherit clangStdenv objfw writeTextDir; }; }; meta = { diff --git a/pkgs/by-name/ob/objfw/test-build-and-run.nix b/pkgs/by-name/ob/objfw/test-build-and-run.nix new file mode 100644 index 000000000000..f2b74ca1196e --- /dev/null +++ b/pkgs/by-name/ob/objfw/test-build-and-run.nix @@ -0,0 +1,44 @@ +{ + clangStdenv, + objfw, + writeTextDir, +}: + +clangStdenv.mkDerivation { + name = "ObjFW test"; + buildInputs = [ objfw ]; + + src = writeTextDir "helloworld.m" '' + #import + int main() { + OFLog(@"Hello world from objc"); + return 0; + } + ''; + + buildPhase = '' + runHook preBuild + clang -o testbinary \ + -x objective-c -Xclang \ + -fobjc-runtime=objfw \ + -funwind-tables \ + -fconstant-string-class=OFConstantString \ + -Xclang -fno-constant-cfstrings \ + helloworld.m \ + -lobjfw -lobjfwrt + runHook postBuild + ''; + + checkPhase = '' + runHook preCheck + ./testbinary + runHook postCheck + ''; + doCheck = true; + + installPhase = '' + runHook preInstall + touch $out + runHook postInstall + ''; +} diff --git a/pkgs/development/python-modules/radish-bdd/default.nix b/pkgs/development/python-modules/radish-bdd/default.nix index 6ce30ff6f81c..d32ca821346e 100644 --- a/pkgs/development/python-modules/radish-bdd/default.nix +++ b/pkgs/development/python-modules/radish-bdd/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "radish-bdd"; - version = "0.17.1"; + version = "0.18.1"; format = "setuptools"; disabled = pythonOlder "3.10"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = pname; repo = "radish"; rev = "refs/tags/v${version}"; - hash = "sha256-9Wt+W7PWUVijzAeZMvcOl/Na60OCCGJJqxh2UaAxAcM="; + hash = "sha256-VCxqhTr0vHJ14tm/0zw/v9bCOQ2q4rzHv40NVYwI254="; }; propagatedBuildInputs = [