Skip to content

Commit c1a2a95

Browse files
committed
ruby_3_1,ruby_3_0,ruby_2_7: allow enabling dtrace support on linux
1 parent c5f7581 commit c1a2a95

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkgs/development/interpreters/ruby/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
, buildEnv, bundler, bundix
66
, makeWrapper, buildRubyGem, defaultGemConfig, removeReferencesTo
77
, openssl, openssl_1_1
8+
, linuxPackages, libsystemtap
89
} @ args:
910

1011
let
@@ -34,6 +35,7 @@ let
3435
, libyaml, yamlSupport ? true
3536
, libffi, fiddleSupport ? true
3637
, jemalloc, jemallocSupport ? false
38+
, linuxPackages, systemtap ? linuxPackages.systemtap, libsystemtap, dtraceSupport ? false
3739
# By default, ruby has 3 observed references to stdenv.cc:
3840
#
3941
# - If you run:
@@ -71,6 +73,7 @@ let
7173

7274
nativeBuildInputs = [ autoreconfHook bison ]
7375
++ (op docSupport groff)
76+
++ (ops (dtraceSupport && stdenv.isLinux) [ systemtap libsystemtap ])
7477
++ op useBaseRuby baseRuby;
7578
buildInputs = [ autoconf ]
7679
++ (op fiddleSupport libffi)
@@ -141,6 +144,7 @@ let
141144
(lib.enableFeature true "pthread")
142145
(lib.withFeatureAs true "soname" "ruby-${version}")
143146
(lib.withFeatureAs useBaseRuby "baseruby" "${baseRuby}/bin/ruby")
147+
(lib.enableFeature dtraceSupport "dtrace")
144148
(lib.enableFeature jitSupport "jit-support")
145149
(lib.enableFeature docSupport "install-doc")
146150
(lib.withFeature jemallocSupport "jemalloc")

0 commit comments

Comments
 (0)