diff options
author | arcnmx <arcnmx@users.noreply.github.com> | 2021-11-22 10:14:27 -0800 |
---|---|---|
committer | arcnmx <arcnmx@users.noreply.github.com> | 2021-12-23 07:32:59 -0800 |
commit | 09e39249349e29df791b8c84390dd0e2c690f738 (patch) | |
tree | 53cccff4f570a69eb091ae05bc2292d848c22aa7 /pkgs/development/interpreters/ruby | |
parent | 4e955d210143f1c6c7b8d8af9a0684506dd14c68 (diff) | |
download | nixpkgs-09e39249349e29df791b8c84390dd0e2c690f738.tar nixpkgs-09e39249349e29df791b8c84390dd0e2c690f738.tar.gz nixpkgs-09e39249349e29df791b8c84390dd0e2c690f738.tar.bz2 nixpkgs-09e39249349e29df791b8c84390dd0e2c690f738.tar.lz nixpkgs-09e39249349e29df791b8c84390dd0e2c690f738.tar.xz nixpkgs-09e39249349e29df791b8c84390dd0e2c690f738.tar.zst nixpkgs-09e39249349e29df791b8c84390dd0e2c690f738.zip |
ruby: configure via {enable,with}Feature
Diffstat (limited to 'pkgs/development/interpreters/ruby')
-rw-r--r-- | pkgs/development/interpreters/ruby/default.nix | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 96214f011f7..3fc14665da2 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -128,22 +128,24 @@ let sed -i ext/io/console/io-console.gemspec -e '/s\.date/d' ''; - configureFlags = ["--enable-shared" "--enable-pthread" "--with-soname=ruby-${version}"] - ++ op useBaseRuby "--with-baseruby=${baseRuby}/bin/ruby" - ++ op (!jitSupport) "--disable-jit-support" - ++ op (!docSupport) "--disable-install-doc" - ++ op jemallocSupport "--with-jemalloc" - ++ ops stdenv.isDarwin [ - # on darwin, we have /usr/include/tk.h -- so the configure script detects - # that tk is installed - "--with-out-ext=tk" - # on yosemite, "generating encdb.h" will hang for a very long time without this flag - "--with-setjmp-type=setjmp" - ]; + configureFlags = [ + (lib.enableFeature (!stdenv.hostPlatform.isStatic) "shared") + (lib.enableFeature true "pthread") + (lib.withFeatureAs true "soname" "ruby-${version}") + (lib.withFeatureAs useBaseRuby "baseruby" "${baseRuby}/bin/ruby") + (lib.enableFeature jitSupport "jit-support") + (lib.enableFeature docSupport "install-doc") + (lib.withFeature jemallocSupport "jemalloc") + (lib.withFeatureAs docSupport "ridir" "${placeholder "devdoc"}/share/ri") + ] ++ ops stdenv.isDarwin [ + # on darwin, we have /usr/include/tk.h -- so the configure script detects + # that tk is installed + "--with-out-ext=tk" + # on yosemite, "generating encdb.h" will hang for a very long time without this flag + "--with-setjmp-type=setjmp" + ]; preConfigure = opString docSupport '' - configureFlagsArray+=("--with-ridir=$devdoc/share/ri") - # rdoc creates XDG_DATA_DIR (defaulting to $HOME/.local/share) even if # it's not going to be used. export HOME=$TMPDIR |