Skip to content

nixos/tests/mpv: adapt to the new mpv wrapper#318588

Merged
marsam merged 2 commits intoNixOS:masterfrom
1sixth:fix-mpv-test
Jun 10, 2024
Merged

nixos/tests/mpv: adapt to the new mpv wrapper#318588
marsam merged 2 commits intoNixOS:masterfrom
1sixth:fix-mpv-test

Conversation

@1sixth
Copy link
Contributor

@1sixth 1sixth commented Jun 9, 2024

Description of changes

The test fails because wrapMpv has been removed in #304349.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Jun 9, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jun 9, 2024
@marsam
Copy link
Contributor

marsam commented Jun 9, 2024

Would you mind adding the following to allow Ofborg to execute this test?

diff --git c/pkgs/applications/video/mpv/default.nix i/pkgs/applications/video/mpv/default.nix
index b5672d7afa46..4600cfb48cb6 100644
--- c/pkgs/applications/video/mpv/default.nix
+++ i/pkgs/applications/video/mpv/default.nix
@@ -50,6 +50,7 @@
   meson,
   mujs,
   ninja,
+  nixosTests,
   nv-codec-headers-11,
   openalSoft,
   pipewire,
@@ -60,6 +61,7 @@
   speex,
   stdenv,
   swift,
+  testers,
   vapoursynth,
   vulkan-headers,
   vulkan-loader,
@@ -351,6 +353,18 @@ stdenv'.mkDerivation (finalAttrs: {
 
     wrapper = callPackage ./wrapper.nix { };
     scripts = callPackage ./scripts { };
+
+    tests = {
+      inherit (nixosTests) mpv;
+
+      version = testers.testVersion {
+        package = finalAttrs.finalPackage;
+      };
+      pkg-config = testers.hasPkgConfigModules {
+        package = finalAttrs.finalPackage;
+        moduleNames = [ "mpv" ];
+      };
+    };
   };

@GrahamcOfBorg build mpv-unwrapped.tests

Copy link
Contributor

@marsam marsam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@marsam marsam merged commit cfbeda8 into NixOS:master Jun 10, 2024
@1sixth 1sixth deleted the fix-mpv-test branch June 10, 2024 04:41
@keysmashes keysmashes mentioned this pull request Jun 12, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants