Skip to content

Commit

Permalink
Merge master into staging-next
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 7, 2024
2 parents 5aa86ae + dfec583 commit ecc75d2
Show file tree
Hide file tree
Showing 61 changed files with 745 additions and 207 deletions.
32 changes: 28 additions & 4 deletions doc/stdenv/meta.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,41 @@ $ cd path/to/nixpkgs
$ nix-build -A your-package.tests
```

Note that Hydra and [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review) don't build these derivations by default, and that ([`@ofborg`](https://github.com/NixOS/ofborg)) only builds them when evaluating PRs for that particular package (or when manually instructed).

#### Package tests {#var-meta-tests-packages}

Tests that are part of the source package are often executed in the `installCheckPhase`.
Tests that are part of the source package are often executed in the `installCheckPhase`. This phase is also suitable for performing a `--version` test for packages that support such flag. Here's an example:

```nix
# Say the package is git
stdenv.mkDerivation(finalAttrs: {
pname = "git";
version = "...";
# ...
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
Prefer `passthru.tests` for tests that are introduced in nixpkgs because:
echo checking if 'git --version' mentions ${finalAttrs.version}
$out/bin/git --version | grep ${finalAttrs.version}
runHook postInstallCheck
'';
# ...
})
```

Most programs distributed by Nixpkgs support such a `--version` flag, and it can help give confidence that the package at least got compiled properly. However, tests that are slightly non trivial will better fit into `passthru.tests`, because:

* `passthru.tests` tests the 'real' package, independently from the environment in which it was built
* we can run `passthru.tests` independently
* We can run and debug a `passthru.tests` independently, after the package was built (useful if it takes a long time).
* `installCheckPhase` adds overhead to each build

For more on how to write and run package tests, see [](#sec-package-tests).
It is also possible to still use `passthru.tests` to test the version, with [testVersion](#tester-testVersion).

For more on how to write and run package tests, see [`pkgs/README.md`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests).

#### NixOS tests {#var-meta-tests-nixos}

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/hardware/opengl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ in

systemd.tmpfiles.settings.opengl = {
"/run/opengl-driver"."L+".argument = toString package;
"/run/opengl-drive-32" =
"/run/opengl-driver-32" =
if pkgs.stdenv.isi686 then
{ "L+".argument = "opengl-driver"; }
else if cfg.driSupport32Bit then
Expand Down
5 changes: 0 additions & 5 deletions nixos/modules/installer/netboot/netboot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ with lib;
# here and it causes a cyclic dependency.
boot.loader.grub.enable = false;

# !!! Hack - attributes expected by other modules.
environment.systemPackages = [ pkgs.grub2_efi ]
++ (lib.optionals (lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.syslinux)
[pkgs.grub2 pkgs.syslinux]);

fileSystems."/" = mkImageMediaOverride
{ fsType = "tmpfs";
options = [ "mode=0755" ];
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/inadyn.nix
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ in
startAt = cfg.interval;
serviceConfig = {
Type = "oneshot";
ExecStart = ''${lib.getExe pkgs.inadyn} -f ${configFile} --cache-dir ''${CACHE_DIRECTORY}/inadyn -1 --foreground -l ${cfg.logLevel}'';
ExecStart = ''${lib.getExe pkgs.inadyn} -f ${configFile} --cache-dir ''${CACHE_DIRECTORY} -1 --foreground -l ${cfg.logLevel}'';
LoadCredential = "config:${configFile}";
CacheDirectory = "inadyn";

Expand Down
16 changes: 12 additions & 4 deletions pkgs/applications/audio/goodvibes/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{ lib
, stdenv
, fetchFromGitLab
, fetchpatch
, meson
, ninja
, pkg-config
, glib
, glib-networking
, gtk3
, libsoup
, libsoup_3
, keybinder3
, gst_all_1
, wrapGAppsHook3
Expand All @@ -17,14 +18,21 @@

stdenv.mkDerivation rec {
pname = "goodvibes";
version = "0.7.9";
version = "0.8.0";

src = fetchFromGitLab {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-yXrCE3nsdZP4JHKVslzQafjZ380zC8sZv5TJf8dJqJw=";
hash = "sha256-KflLEc6BFA3pBY9HukEm5NluGi2igFNP6joOMdmZ0Ds=";
};
patches = [
# Fixes a compilation error
(fetchpatch {
url = "https://gitlab.com/goodvibes/goodvibes/-/commit/e332f831b91ee068a1a58846d7607b30ab010116.patch";
hash = "sha256-PzbTltbD0xWJAytCGg1TAwBLrICP+9QZbCbG1QQ8Qmw=";
})
];

nativeBuildInputs = [
meson
Expand All @@ -40,7 +48,7 @@ stdenv.mkDerivation rec {
# for libsoup TLS support
glib-networking
gtk3
libsoup
libsoup_3
keybinder3
] ++ (with gst_all_1; [
gstreamer
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/emulators/mame/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ let
in
stdenv.mkDerivation rec {
pname = "mame";
version = "0.265";
version = "0.266";
srcVersion = builtins.replaceStrings [ "." ] [ "" ] version;

src = fetchFromGitHub {
owner = "mamedev";
repo = "mame";
rev = "mame${srcVersion}";
hash = "sha256-jXGmABFeoT8g2UtVV159gUpdWcBvb9aX3uiFi2neVQI=";
hash = "sha256-nggpDKcZURwC4SQHiRnF7lJNaAWSniVHvsF/IjAPd9E=";
};

outputs = [ "out" "tools" ];
Expand Down
18 changes: 9 additions & 9 deletions pkgs/applications/misc/dialect/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, fetchFromGitHub
, wrapGAppsHook4
, python3
, appstream-glib
, blueprint-compiler
, desktop-file-utils
, meson
Expand All @@ -15,21 +14,21 @@
, libsoup_3
, glib-networking
, libadwaita
, libsecret
, nix-update-script
}:

python3.pkgs.buildPythonApplication rec {
pname = "dialect";
version = "2.3.0";

format = "other";
version = "2.4.1";
pyproject = false; # built with meson

src = fetchFromGitHub {
owner = "dialect-app";
repo = "dialect";
rev = version;
fetchSubmodules = true;
hash = "sha256-A6jZHcSzHSmHLvyegyzxjQ6+jL6rLb7oefhryXoSrH4=";
hash = "sha256-WEeTdUdhDSfStu+rBYcuk6miuh5e0AsodbyF93Mg4mo=";
};

nativeBuildInputs = [
Expand All @@ -51,6 +50,7 @@ python3.pkgs.buildPythonApplication rec {
libsoup_3
glib-networking
libadwaita
libsecret
];

propagatedBuildInputs = with python3.pkgs; [
Expand All @@ -74,12 +74,12 @@ python3.pkgs.buildPythonApplication rec {

passthru.updateScript = nix-update-script { };

meta = with lib; {
meta = {
homepage = "https://github.com/dialect-app/dialect";
description = "A translation app for GNOME";
maintainers = with maintainers; [ aleksana ];
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with lib.maintainers; [ aleksana ];
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
mainProgram = "dialect";
};
}
6 changes: 3 additions & 3 deletions pkgs/applications/networking/cluster/werf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@

buildGoModule rec {
pname = "werf";
version = "2.3.3";
version = "2.4.1";

src = fetchFromGitHub {
owner = "werf";
repo = "werf";
rev = "v${version}";
hash = "sha256-nodWxHLVg5bSuixQirAsVfQZ1g38IgZJEl/3O/b3NIE=";
hash = "sha256-kHNjdwAIGJi1/ryEioRwZIYm4UziT2Ig1y2PgnbA0ZE=";
};

vendorHash = "sha256-mAA5S9t+mHMxSV8l7H9XxJ80k4pJRWDDZ0BSJrmQO1I=";
vendorHash = "sha256-cWOnIEvVer+USqNQJmhZ7pYSJfzY2xjq2oTxRd/y94w=";

proxyVendor = true;

Expand Down
16 changes: 10 additions & 6 deletions pkgs/applications/science/robotics/mujoco/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

let
pin = {

# TODO: Check the following file and ensure the dependencies are up-to-date
# See https://github.com/google-deepmind/mujoco/blob/<VERSION>/cmake/MujocoDependencies.cmake#L17-L64
abseil-cpp = fetchFromGitHub {
owner = "abseil";
Expand Down Expand Up @@ -129,15 +129,15 @@ let

in stdenv.mkDerivation rec {
pname = "mujoco";
version = "3.1.5";
version = "3.1.6";

# Bumping version? Make sure to look though the MuJoCo's commit
# history for bumped dependency pins!
src = fetchFromGitHub {
owner = "google-deepmind";
repo = "mujoco";
rev = "refs/tags/${version}";
hash = "sha256-XKN489oexHf2/Gv0MVxXUzqyeJJTJXV99+fNi8shdsg=";
hash = "sha256-64zUplr1E5WSb5RpTW9La1zKVT67a1VrftiUqc2SHlU=";
};

patches = [ ./mujoco-system-deps-dont-fetch.patch ];
Expand Down Expand Up @@ -177,12 +177,16 @@ in stdenv.mkDerivation rec {

passthru.pin = { inherit (pin) lodepng eigen3 abseil-cpp; };

meta = with lib; {
meta = {
description = "Multi-Joint dynamics with Contact. A general purpose physics simulator.";
homepage = "https://mujoco.org/";
changelog = "https://github.com/google-deepmind/mujoco/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ samuela tmplt ];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
GaetanLepage
samuela
tmplt
];
broken = stdenv.isDarwin;
};
}
11 changes: 4 additions & 7 deletions pkgs/by-name/al/alt-tab-macos/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
lib,
stdenvNoCC,
fetchurl,
gitUpdater,
nix-update-script,
unzip,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "alt-tab-macos";
version = "6.69.0";
version = "6.70.1";

src = fetchurl {
url = "https://github.com/lwouis/alt-tab-macos/releases/download/v${finalAttrs.version}/AltTab-${finalAttrs.version}.zip";
hash = "sha256-v0HeucpDGdnK0p9zoYUbEBoHzRMlcJBEIIS1vQZ00A0=";
hash = "sha256-4LdlLoc6hMF1jIlHeC89m1unStCsID6/nWJuuYUX96o=";
};

sourceRoot = ".";
Expand All @@ -28,10 +28,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postInstall
'';

passthru.updateScript = gitUpdater {
url = "https://github.com/lwouis/alt-tab-macos";
rev-prefix = "v";
};
passthru.updateScript = nix-update-script { };

meta = {
description = "Windows alt-tab on macOS";
Expand Down
81 changes: 81 additions & 0 deletions pkgs/by-name/ch/challenger/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
lib,
stdenv,
fetchgit,
autoreconfHook,
libgcrypt,
pkg-config,
texinfo,
curl,
gnunet,
jansson,
libgnurl,
libmicrohttpd,
libsodium,
libtool,
postgresql,
taler-exchange,
taler-merchant,
runtimeShell,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "challenger";
version = "0.10.0";

src = fetchgit {
url = "https://git.taler.net/challenger.git";
rev = "v${finalAttrs.version}";
hash = "sha256-fjT3igPQ9dQtOezwZVfK5fBaL22FKOCbjUF0U1urK0g=";
};

# https://git.taler.net/challenger.git/tree/bootstrap
preAutoreconf = ''
# Generate Makefile.am in contrib/
pushd contrib
rm -f Makefile.am
find wallet-core/challenger/ -type f -printf ' %p \\\n' | sort > Makefile.am.ext
# Remove extra '\' at the end of the file
truncate -s -2 Makefile.am.ext
cat Makefile.am.in Makefile.am.ext >> Makefile.am
# Prevent accidental editing of the generated Makefile.am
chmod -w Makefile.am
popd
'';

strictDeps = true;

nativeBuildInputs = [
autoreconfHook
libgcrypt
pkg-config
texinfo
];

buildInputs = [
curl
gnunet
jansson
libgcrypt
libgnurl
libmicrohttpd
libsodium
libtool
postgresql
taler-exchange
taler-merchant
];

preFixup = ''
substituteInPlace $out/bin/challenger-{dbconfig,send-post.sh} \
--replace-fail "/bin/bash" "${runtimeShell}"
'';

meta = {
description = "OAuth 2.0-based authentication service that validates user can receive messages at a certain address";
homepage = "https://git.taler.net/challenger.git";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ wegank ];
platforms = lib.platforms.linux;
};
})
Loading

0 comments on commit ecc75d2

Please sign in to comment.