diff options
Diffstat (limited to 'pkgs/development/interpreters')
7 files changed, 50 insertions, 41 deletions
diff --git a/pkgs/development/interpreters/picoc/default.nix b/pkgs/development/interpreters/picoc/default.nix index 72e89def4f50..e78b74347198 100644 --- a/pkgs/development/interpreters/picoc/default.nix +++ b/pkgs/development/interpreters/picoc/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchFromGitHub, readline }: -let version = "2015-05-04"; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "picoc-${version}"; + version = "2015-05-04"; src = fetchFromGitHub { sha256 = "01w3jwl0vn9fsmh7p20ad4nl9ljzgfn576yvncd9pk9frx3pd8y4"; @@ -11,26 +11,6 @@ stdenv.mkDerivation { owner = "zsaleeba"; }; - meta = with stdenv.lib; { - inherit version; - description = "Very small C interpreter for scripting"; - longDescription = '' - PicoC is a very small C interpreter for scripting. It was originally - written as a script language for a UAV's on-board flight system. It's - also very suitable for other robotic, embedded and non-embedded - applications. The core C source code is around 3500 lines of code. It's - not intended to be a complete implementation of ISO C but it has all the - essentials. When compiled it only takes a few k of code space and is also - very sparing of data space. This means it can work well in small embedded - devices. - ''; - homepage = https://github.com/zsaleeba/picoc; - downloadPage = https://code.google.com/p/picoc/downloads/list; - license = licenses.bsd3; - platforms = platforms.linux; - maintainers = with maintainers; [ nckx ]; - }; - buildInputs = [ readline ]; postPatch = '' @@ -50,4 +30,23 @@ stdenv.mkDerivation { mkdir -p $out/include install -m644 *.h $out/include ''; + + meta = with stdenv.lib; { + description = "Very small C interpreter for scripting"; + longDescription = '' + PicoC is a very small C interpreter for scripting. It was originally + written as a script language for a UAV's on-board flight system. It's + also very suitable for other robotic, embedded and non-embedded + applications. The core C source code is around 3500 lines of code. It's + not intended to be a complete implementation of ISO C but it has all the + essentials. When compiled it only takes a few k of code space and is also + very sparing of data space. This means it can work well in small embedded + devices. + ''; + homepage = https://github.com/zsaleeba/picoc; + downloadPage = https://code.google.com/p/picoc/downloads/list; + license = licenses.bsd3; + platforms = platforms.linux; + maintainers = with maintainers; [ nckx ]; + }; } diff --git a/pkgs/development/interpreters/racket/default.nix b/pkgs/development/interpreters/racket/default.nix index 129c0ac60774..d22d3849b1bf 100644 --- a/pkgs/development/interpreters/racket/default.nix +++ b/pkgs/development/interpreters/racket/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { FONTCONFIG_FILE = fontsConf; LD_LIBRARY_PATH = libPath; - NIX_LDFLAGS = "-lgcc_s"; + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.cc.isGNU "-lgcc_s"; buildInputs = [ fontconfig libffi libtool makeWrapper sqlite ]; @@ -51,8 +51,10 @@ stdenv.mkDerivation rec { cd src/build ''; - configureFlags = [ "--enable-shared" "--enable-lt=${libtool}/bin/libtool" ] - ++ stdenv.lib.optional disableDocs [ "--disable-docs" ]; + shared = if stdenv.isDarwin then "dylib" else "shared"; + configureFlags = [ "--enable-${shared}" "--enable-lt=${libtool}/bin/libtool" ] + ++ stdenv.lib.optional disableDocs [ "--disable-docs" ] + ++ stdenv.lib.optional stdenv.isDarwin [ "--enable-xonx" ]; configureScript = "../configure"; @@ -78,6 +80,6 @@ stdenv.mkDerivation rec { homepage = http://racket-lang.org/; license = licenses.lgpl3; maintainers = with maintainers; [ kkallio henrytill ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix b/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix index d050faca2454..c5b9fba37aa0 100644 --- a/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix +++ b/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix @@ -18,7 +18,8 @@ # Normal gem packages can be used outside of bundler; a binstub is created in # $out/bin. -{ lib, ruby, rubygems, bundler, fetchurl, fetchgit, makeWrapper, git, buildRubyGem +{ lib, ruby, rubygems, bundler, fetchurl, fetchgit, makeWrapper, git, + buildRubyGem, darwin } @ defs: lib.makeOverridable ( @@ -85,6 +86,7 @@ stdenv.mkDerivation (attrs // { buildInputs = [ ruby rubygems makeWrapper ] ++ lib.optionals (type == "git") [ git bundler ] + ++ lib.optional stdenv.isDarwin darwin.libobjc ++ buildInputs; name = attrs.name or (namePrefix + gemName); diff --git a/pkgs/development/interpreters/ruby/build-ruby-gem/nix-bundle-install.rb b/pkgs/development/interpreters/ruby/build-ruby-gem/nix-bundle-install.rb index 647b83b52c38..48ab5270c22f 100644 --- a/pkgs/development/interpreters/ruby/build-ruby-gem/nix-bundle-install.rb +++ b/pkgs/development/interpreters/ruby/build-ruby-gem/nix-bundle-install.rb @@ -107,7 +107,6 @@ if spec.executables.any? spec.executables.each do |exe| wrapper = File.join(bin_dir, exe) File.open(wrapper, "w") do |f| - stub = generate_stub(spec.name, exe) f.write(<<-EOF) #!#{ruby} # diff --git a/pkgs/development/interpreters/ruby/bundler-env/default.nix b/pkgs/development/interpreters/ruby/bundler-env/default.nix index c7570d815e3b..0c9ed40d3f82 100644 --- a/pkgs/development/interpreters/ruby/bundler-env/default.nix +++ b/pkgs/development/interpreters/ruby/bundler-env/default.nix @@ -65,8 +65,24 @@ let "${bundler}/${ruby.gemPath}" \ ${shellEscape (toString envPaths)} '' + lib.optionalString (postBuild != null) postBuild; - passthru = { + passthru = rec { inherit ruby bundler meta gems; + + wrappedRuby = stdenv.mkDerivation { + name = "wrapped-ruby-${name}"; + nativeBuildInputs = [ makeWrapper ]; + buildCommand = '' + mkdir -p $out/bin + for i in ${ruby}/bin/*; do + makeWrapper "$i" $out/bin/$(basename "$i") \ + --set BUNDLE_GEMFILE ${confFiles}/Gemfile \ + --set BUNDLE_PATH ${bundlerEnv}/${ruby.gemPath} \ + --set GEM_HOME ${bundlerEnv}/${ruby.gemPath} \ + --set GEM_PATH ${bundlerEnv}/${ruby.gemPath} + done + ''; + }; + env = let irbrc = builtins.toFile "irbrc" '' if !(ENV["OLD_IRBRC"].nil? || ENV["OLD_IRBRC"].empty?) @@ -77,12 +93,8 @@ let ''; in stdenv.mkDerivation { name = "interactive-${name}-environment"; - nativeBuildInputs = [ ruby bundlerEnv ]; + nativeBuildInputs = [ wrappedRuby bundlerEnv ]; shellHook = '' - export BUNDLE_GEMFILE=${confFiles}/Gemfile - export BUNDLE_PATH=${bundlerEnv}/${ruby.gemPath} - export GEM_HOME=${bundlerEnv}/${ruby.gemPath} - export GEM_PATH=${bundlerEnv}/${ruby.gemPath} export OLD_IRBRC="$IRBRC" export IRBRC=${irbrc} ''; diff --git a/pkgs/development/interpreters/ruby/gemconfig/default.nix b/pkgs/development/interpreters/ruby/gemconfig/default.nix index 84470a26302c..1f122ced83d5 100644 --- a/pkgs/development/interpreters/ruby/gemconfig/default.nix +++ b/pkgs/development/interpreters/ruby/gemconfig/default.nix @@ -79,7 +79,6 @@ in "--with-exslt-lib=${libxslt.out}/lib" "--with-exslt-include=${libxslt.dev}/include" ] ++ lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}"; - buildInputs = lib.optional stdenv.isDarwin darwin.libobjc; }; patron = attrs: { @@ -143,10 +142,6 @@ in ''; }; - unf_ext = attrs: { - buildInputs = lib.optional stdenv.isDarwin darwin.libobjc; - }; - xapian-ruby = attrs: { # use the system xapian dontBuild = false; diff --git a/pkgs/development/interpreters/ruby/rubygems.nix b/pkgs/development/interpreters/ruby/rubygems.nix index b6ac04808979..fb210ceff4bf 100644 --- a/pkgs/development/interpreters/ruby/rubygems.nix +++ b/pkgs/development/interpreters/ruby/rubygems.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation rec { name = "rubygems-${version}"; - version = "2.4.1"; + version = "2.4.8"; src = fetchurl { url = "http://production.cf.rubygems.org/rubygems/${name}.tgz"; - sha256 = "0cpr6cx3h74ykpb0cp4p4xg7a8j0bhz3sk271jq69l4mm4zy4h4f"; + sha256 = "0pl4civyf0vhqsqbqaivvxrb3fsg8sid9a8jv5vfnk4hypz3ahss"; }; patches = [ ./gem_hook.patch ]; |