···1313 libglvnd,
1414 gtest,
1515 brotli,
1616+ enableGui ? true,
1617}:
17181819stdenv.mkDerivation rec {
···29303031 # LD_PRELOAD wrappers need to be statically linked to work against all kinds
3132 # of games -- so it's fine to use e.g. bundled snappy.
3232- buildInputs = [
3333- libX11
3434- procps
3535- python3
3636- libdwarf
3737- qtbase
3838- gtest
3939- brotli
4040- ];
3333+ buildInputs =
3434+ [
3535+ libX11
3636+ procps
3737+ libdwarf
3838+ gtest
3939+ brotli
4040+ ]
4141+ ++ lib.optionals enableGui [
4242+ qtbase
4343+ ];
4444+4545+ nativeBuildInputs =
4646+ [
4747+ cmake
4848+ pkg-config
4949+ python3
5050+ ]
5151+ ++ lib.optionals enableGui [
5252+ wrapQtAppsHook
5353+ ];
41544242- nativeBuildInputs = [
4343- cmake
4444- pkg-config
4545- wrapQtAppsHook
5555+ cmakeFlags = [
5656+ (lib.cmakeBool "ENABLE_GUI" enableGui)
4657 ];
47584859 # Don't automatically wrap all binaries, I prefer to explicitly only wrap
4960 # `qapitrace`.
5061 dontWrapQtApps = true;
51625252- postFixup = ''
6363+ postFixup =
6464+ ''
53655454- # Since https://github.com/NixOS/nixpkgs/pull/60985, we add `/run-opengl-driver[-32]`
5555- # to the `RUNPATH` of dispatcher libraries `dlopen()` ing OpenGL drivers.
5656- # `RUNPATH` doesn't propagate throughout the whole application, but only
5757- # from the module performing the `dlopen()`.
5858- #
5959- # Apitrace wraps programs by running them with `LD_PRELOAD` pointing to `.so`
6060- # files in $out/lib/apitrace/wrappers.
6161- #
6262- # Theses wrappers effectively wrap the `dlopen()` calls from `libglvnd`
6363- # and other dispatcher libraries, and run `dlopen()` by themselves.
6464- #
6565- # As `RUNPATH` doesn't propagate through the whole library, and they're now the
6666- # library doing the real `dlopen()`, they also need to have
6767- # `/run-opengl-driver[-32]` added to their `RUNPATH`.
6868- #
6969- # To stay simple, we add paths for 32 and 64 bits unconditionally.
7070- # This doesn't have an impact on closure size, and if the 32 bit drivers
7171- # are not available, that folder is ignored.
7272- for i in $out/lib/apitrace/wrappers/*.so
7373- do
7474- echo "Patching OpenGL driver path for $i"
7575- patchelf --set-rpath "/run/opengl-driver/lib:/run/opengl-driver-32/lib:$(patchelf --print-rpath $i)" $i
7676- done
6666+ # Since https://github.com/NixOS/nixpkgs/pull/60985, we add `/run-opengl-driver[-32]`
6767+ # to the `RUNPATH` of dispatcher libraries `dlopen()` ing OpenGL drivers.
6868+ # `RUNPATH` doesn't propagate throughout the whole application, but only
6969+ # from the module performing the `dlopen()`.
7070+ #
7171+ # Apitrace wraps programs by running them with `LD_PRELOAD` pointing to `.so`
7272+ # files in $out/lib/apitrace/wrappers.
7373+ #
7474+ # Theses wrappers effectively wrap the `dlopen()` calls from `libglvnd`
7575+ # and other dispatcher libraries, and run `dlopen()` by themselves.
7676+ #
7777+ # As `RUNPATH` doesn't propagate through the whole library, and they're now the
7878+ # library doing the real `dlopen()`, they also need to have
7979+ # `/run-opengl-driver[-32]` added to their `RUNPATH`.
8080+ #
8181+ # To stay simple, we add paths for 32 and 64 bits unconditionally.
8282+ # This doesn't have an impact on closure size, and if the 32 bit drivers
8383+ # are not available, that folder is ignored.
8484+ for i in $out/lib/apitrace/wrappers/*.so
8585+ do
8686+ echo "Patching OpenGL driver path for $i"
8787+ patchelf --set-rpath "/run/opengl-driver/lib:/run/opengl-driver-32/lib:$(patchelf --print-rpath $i)" $i
8888+ done
77897878- # Theses open the OpenGL driver at runtime, but it is not listed as NEEDED libraries. They need
7979- # a reference to libglvnd.
8080- for i in $out/bin/eglretrace $out/bin/glretrace
8181- do
8282- echo "Patching RPath for $i"
8383- patchelf --set-rpath "${lib.makeLibraryPath [ libglvnd ]}:$(patchelf --print-rpath $i)" $i
8484- done
9090+ # Theses open the OpenGL driver at runtime, but it is not listed as NEEDED libraries. They need
9191+ # a reference to libglvnd.
9292+ for i in $out/bin/eglretrace $out/bin/glretrace
9393+ do
9494+ echo "Patching RPath for $i"
9595+ patchelf --set-rpath "${lib.makeLibraryPath [ libglvnd ]}:$(patchelf --print-rpath $i)" $i
9696+ done
85978686- wrapQtApp $out/bin/qapitrace
8787- '';
9898+ ''
9999+ + lib.optionalString enableGui ''
100100+ wrapQtApp $out/bin/qapitrace
101101+ '';
8810289103 meta = with lib; {
90104 homepage = "https://apitrace.github.io";
···4444# If one wishes to use a different src or name for a very custom build
4545, overrideSrc ? {}
4646, pname ? "gnuradio"
4747-, version ? "3.10.11.0"
4747+, version ? "3.10.12.0"
4848}:
49495050let
5151- sourceSha256 = "sha256-QOZXUj+ZmfpazsrHEs8Gx3WSmoHG/zO43NEpyhIjpN8=";
5151+ sourceSha256 = "sha256-489Pc6z6Ha7jkTzZSEArDQJGkWdWRDIn1uhfFyLLiCo=";
5252 featuresInfo = {
5353 # Needed always
5454 basic = {
···290290 patches = [
291291 # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
292292 ./modtool-newmod-permissions.patch
293293- # https://github.com/gnuradio/gnuradio/issues/7458
294294- (fetchpatch {
295295- name = "gnuradio-numpy_2-compatibility.patch";
296296- url = "https://github.com/gnuradio/gnuradio/commit/8fbc5eb4b7214a4cb029ccae97205a85d49bdd48.patch";
297297- hash = "sha256-xYvjlyZ/Bcn23gT3EOee/GhkXzdpA+q33LgURVWOUQI=";
298298- })
299293 ];
300294 passthru = shared.passthru // {
301295 # Deps that are potentially overridden and are used inside GR plugins - the same version must
+56-46
pkgs/by-name/az/azure-cli/package.nix
···5050 description,
5151 ...
5252 }@args:
5353- python3.pkgs.buildPythonPackage (
5454- {
5555- format = "wheel";
5656- src = fetchurl { inherit url hash; };
5757- passthru = {
5858- updateScript = extensionUpdateScript { inherit pname; };
5959- } // args.passthru or { };
6060- meta = {
6161- inherit description;
6262- inherit (azure-cli.meta) platforms maintainers;
6363- homepage = "https://github.com/Azure/azure-cli-extensions";
6464- changelog = "https://github.com/Azure/azure-cli-extensions/blob/main/src/${pname}/HISTORY.rst";
6565- license = lib.licenses.mit;
6666- sourceProvenance = [ lib.sourceTypes.fromSource ];
6767- } // args.meta or { };
6868- }
6969- // (removeAttrs args [
7070- "url"
7171- "hash"
7272- "description"
7373- "passthru"
7474- "meta"
7575- ])
7676- );
5353+ let
5454+ self = python3.pkgs.buildPythonPackage (
5555+ {
5656+ format = "wheel";
5757+ src = fetchurl { inherit url hash; };
5858+ passthru = {
5959+ updateScript = extensionUpdateScript { inherit pname; };
6060+ tests.azWithExtension = testAzWithExts [ self ];
6161+ } // args.passthru or { };
6262+ meta = {
6363+ inherit description;
6464+ inherit (azure-cli.meta) platforms maintainers;
6565+ homepage = "https://github.com/Azure/azure-cli-extensions";
6666+ changelog = "https://github.com/Azure/azure-cli-extensions/blob/main/src/${pname}/HISTORY.rst";
6767+ license = lib.licenses.mit;
6868+ sourceProvenance = [ lib.sourceTypes.fromSource ];
6969+ } // args.meta or { };
7070+ }
7171+ // (removeAttrs args [
7272+ "url"
7373+ "hash"
7474+ "description"
7575+ "passthru"
7676+ "meta"
7777+ ])
7878+ );
7979+ in
8080+ self;
8181+7782 # Update script for azure cli extensions. Currently only works for manual extensions.
7883 extensionUpdateScript =
7984 { pname }:
···8489 "--extension"
8590 "${pname}"
8691 ];
9292+9393+ # Test that the Azure CLI can be built with the given extensions, and that
9494+ # the extensions are recognized by the CLI and listed in the output.
9595+ testAzWithExts =
9696+ extensions:
9797+ let
9898+ extensionNames = map (ext: ext.pname) extensions;
9999+ az = (azure-cli.withExtensions extensions);
100100+ in
101101+ runCommand "test-az-with-extensions" { } ''
102102+ export HOME=$TMPDIR
103103+ ${lib.getExe az} extension list > $out
104104+ for ext in ${lib.concatStringsSep " " extensionNames}; do
105105+ if ! grep -q $ext $out; then
106106+ echo "Extension $ext not found in list"
107107+ exit 1
108108+ fi
109109+ done
110110+ '';
8711188112 extensions-generated = lib.mapAttrs (
89113 name: ext: mkAzExtension (ext // { passthru.updateScript = [ ]; })
···362386 inherit extensions;
363387 withExtensions = extensions: azure-cli.override { withExtensions = extensions; };
364388 tests = {
365365- # Test the package builds with some extensions configured, and the
366366- # wanted extensions are recognized by the CLI and listed in the output.
367367- azWithExtensions =
368368- let
369369- extensions = with azure-cli.extensions; [
370370- aks-preview
371371- azure-devops
372372- rdbms-connect
373373- ];
374374- extensionNames = map (ext: ext.pname) extensions;
375375- az = (azure-cli.withExtensions extensions);
376376- in
377377- runCommand "test-az-with-extensions" { } ''
378378- export HOME=$TMPDIR
379379- ${lib.getExe az} extension list > $out
380380- for ext in ${lib.concatStringsSep " " extensionNames}; do
381381- if ! grep -q $ext $out; then
382382- echo "Extension $ext not found in list"
383383- exit 1
384384- fi
385385- done
386386- '';
389389+ azWithExtensions = testAzWithExts (
390390+ with azure-cli.extensions;
391391+ [
392392+ aks-preview
393393+ azure-devops
394394+ rdbms-connect
395395+ ]
396396+ );
387397 # Test the package builds with mutable config.
388398 # TODO: Maybe we can install an extension from local python wheel to
389399 # check mutable extension install still works.