diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix b/nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix new file mode 100644 index 000000000000..02a96184812e --- /dev/null +++ b/nixpkgs/pkgs/tools/graphics/snapdragon-profiler/default.nix @@ -0,0 +1,91 @@ +{ lib +, stdenv +, makeWrapper +, makeDesktopItem +, copyDesktopItems +, icoutils +, mono +, jre +, androidenv +, gtk-sharp-2_0 +, gtk2 +, libcxx +, libcxxabi +, 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 = "v2021.2"; + + src = archive; + + nativeBuildInputs = [ + makeWrapper + icoutils + copyDesktopItems + ]; + + buildInputs = [ + mono + gtk-sharp-2_0 + gtk2 + libcxx + libcxxabi + ]; + + 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 //') \ + --run "cd $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 = "$out/bin/snapdragon-profiler"; + icon = "snapdragon-profiler"; + type = "Application"; + comment = meta.description; + categories = "Development;Debugger;Graphics;3DGraphics"; + terminal = "false"; + })]; + + 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" ]; + }; +} |