mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 16:23:26 +00:00
ce789e7e35
- merge libcxxabi into libcxx for LLVM 12, 13, 14, 15, 16, 17, and git. - remove the link time workaround `-lc++ -lc++abi` from 58 packages as it is no longer required. - fixes https://github.com/NixOS/nixpkgs/issues/166205 - provides alternative fixes for. https://github.com/NixOS/nixpkgs/issues/269548 https://github.com/NixOS/nix/issues/9640 - pkgsCross.x86_64-freebsd builds work again This change can be represented in 3 stages 1. merge libcxxabi into libcxx -- files: pkgs/development/compilers/llvm/[12, git]/{libcxx, libcxxabi} 2. update stdenv to account for merge -- files: stdenv.{adapters, cc.wrapper, darwin} 3. remove all references to libcxxabi outside of llvm (about 58 packages modified) ### merging libcxxabi into libcxx - take the union of the libcxxabi and libcxx cmake flags - eliminate the libcxx-headers-only package - it was only needed to break libcxx <-> libcxxabi circular dependency - libcxx.cxxabi is removed. external cxxabi (freebsd) will symlink headers / libs into libcxx. - darwin will re-export the libcxxabi symbols into libcxx so linking `-lc++` is sufficient. - linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient. - libcxx/default.nix [12, 17] are identical except for patches and `LIBCXX_ADDITIONAL_LIBRARIES` (only used in 16+) - git/libcxx/defaul.nix does not link with -nostdlib when useLLVM is true so flag is removed. this is not much different than before as libcxxabi used -nostdlib where libcxx did not, so libc was linked in anyway. ### stdenv changes - darwin bootstrap, remove references to libcxxabi and cxxabi - cc-wrapper: remove c++ link workaround when libcxx.cxxabi doesn't exist (still exists for LLVM pre 12) - adapter: update overrideLibcxx to account for a pkgs.stdenv that only has libcxx ### 58 package updates - remove `NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}` as no longer needed - swift, nodejs_v8 remove libcxxabi references in the clang override https://github.com/NixOS/nixpkgs/pull/292043
88 lines
2.7 KiB
Nix
88 lines
2.7 KiB
Nix
{ lib
|
|
, stdenv
|
|
, makeWrapper
|
|
, makeDesktopItem
|
|
, copyDesktopItems
|
|
, icoutils
|
|
, mono
|
|
, jre
|
|
, androidenv
|
|
, gtk-sharp-2_0
|
|
, gtk2
|
|
, libcxx
|
|
, coreutils
|
|
, requireFile
|
|
, archive ? requireFile {
|
|
name = "snapdragonprofiler_external_linux.tar.gz";
|
|
message = ''
|
|
This nix expression requires that "snapdragonprofiler_external_linux.tar.gz" is
|
|
already part of the store. To get this archive, you need to download it from:
|
|
https://developer.qualcomm.com/software/snapdragon-profiler
|
|
and add it to the nix store with nix-store --add-fixed sha256 <FILE>.
|
|
'';
|
|
sha256 = "c6731c417ca39fa9b0f190bd80c99b1603cf97d23becab9e47db6beafd6206b7";
|
|
}
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "snapdragon-profiler";
|
|
version = "2021.2";
|
|
|
|
src = archive;
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
icoutils
|
|
copyDesktopItems
|
|
];
|
|
|
|
buildInputs = [
|
|
mono
|
|
gtk-sharp-2_0
|
|
gtk2
|
|
libcxx
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/{bin,lib/snapdragon-profiler}
|
|
mkdir -p $out/share/icons/hicolor/{16x16,32x32,48x48}/apps
|
|
|
|
mv *.so $out/lib
|
|
cp -r * $out/lib/snapdragon-profiler
|
|
makeWrapper "${mono}/bin/mono" $out/bin/snapdragon-profiler \
|
|
--add-flags "$out/lib/snapdragon-profiler/SnapdragonProfiler.exe" \
|
|
--suffix PATH : ${lib.makeBinPath [ jre androidenv.androidPkgs_9_0.platform-tools coreutils ]} \
|
|
--prefix MONO_GAC_PREFIX : ${gtk-sharp-2_0} \
|
|
--suffix LD_LIBRARY_PATH : $(echo $NIX_LDFLAGS | sed 's/ -L/:/g;s/ -rpath /:/g;s/-rpath //') \
|
|
--chdir "$out/lib/snapdragon-profiler" # Fixes themes not loading correctly
|
|
|
|
wrestool -x -t 14 SnapdragonProfiler.exe > snapdragon-profiler.ico
|
|
icotool -x -i 1 -o $out/share/icons/hicolor/16x16/apps/snapdragon-profiler.png snapdragon-profiler.ico
|
|
icotool -x -i 2 -o $out/share/icons/hicolor/32x32/apps/snapdragon-profiler.png snapdragon-profiler.ico
|
|
icotool -x -i 3 -o $out/share/icons/hicolor/48x48/apps/snapdragon-profiler.png snapdragon-profiler.ico
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
desktopItems = [(makeDesktopItem {
|
|
name = pname;
|
|
desktopName = "Snapdragon Profiler";
|
|
exec = "snapdragon-profiler";
|
|
icon = "snapdragon-profiler";
|
|
comment = meta.description;
|
|
categories = [ "Development" "Debugger" "Graphics" "3DGraphics" ];
|
|
})];
|
|
|
|
dontStrip = true; # Always needed on Mono
|
|
dontPatchELF = true; # Certain libraries are to be deployed to the remote device, they should not be patched
|
|
|
|
meta = with lib; {
|
|
homepage = "https://developer.qualcomm.com/software/snapdragon-profiler";
|
|
description = "An profiler for Android devices running Snapdragon chips";
|
|
license = licenses.unfree;
|
|
maintainers = [ maintainers.ivar ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|