Skip to content

Commit

Permalink
gst_all_1.gstreamer: use a better libunwind check (#339006)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilazy authored Sep 3, 2024
2 parents 9b619f2 + 52b0b4e commit b4aa6a4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
5 changes: 3 additions & 2 deletions pkgs/development/libraries/gstreamer/core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
, buildPackages
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
, libunwind
# darwin.libunwind doesn't have pkg-config definitions so meson doesn't detect it.
, withLibunwind ? !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform libunwind
, withLibunwind ?
lib.meta.availableOn stdenv.hostPlatform libunwind &&
lib.elem "libunwind" libunwind.meta.pkgConfigModules or []
# Checks meson.is_cross_build(), so even canExecute isn't enough.
, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
}:
Expand Down
17 changes: 13 additions & 4 deletions pkgs/development/libraries/libunwind/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{ stdenv, lib, fetchpatch, fetchFromGitHub, autoreconfHook, xz, buildPackages }:
{ stdenv, lib, fetchpatch, fetchFromGitHub, autoreconfHook, buildPackages
, xz
, testers
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libunwind";
version = "1.8.1";

src = fetchFromGitHub {
owner = "libunwind";
repo = "libunwind";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-rCFBHs6rCSnp5FEwbUR5veNNTqSQpFblAv8ebSPX0qE=";
};

Expand Down Expand Up @@ -50,12 +53,18 @@ stdenv.mkDerivation rec {

doCheck = false; # fails

passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
versionCheck = true;
};

meta = with lib; {
homepage = "https://www.nongnu.org/libunwind";
description = "Portable and efficient API to determine the call-chain of a program";
maintainers = with maintainers; [ orivej ];
pkgConfigModules = [ "libunwind" "libunwind-coredump" "libunwind-generic" "libunwind-ptrace" "libunwind-setjmp" ];
# https://github.com/libunwind/libunwind#libunwind
platforms = [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "i686-freebsd" "i686-linux" "loongarch64-linux" "mips64el-linux" "mipsel-linux" "powerpc64-linux" "powerpc64le-linux" "riscv64-linux" "s390x-linux" "x86_64-freebsd" "x86_64-linux" "x86_64-solaris" ];
license = licenses.mit;
};
}
})

0 comments on commit b4aa6a4

Please sign in to comment.