aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/ruby-modules
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/ruby-modules')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem-config/default.nix16
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem/default.nix9
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/ruby-modules/rbenv/default.nix41
3 files changed, 61 insertions, 5 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem-config/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem-config/default.nix
index 9ccc369429df..83749bd21a5d 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem-config/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem-config/default.nix
@@ -19,7 +19,7 @@
{ lib, fetchurl, writeScript, ruby, kerberos, libxml2, libxslt, python, stdenv, which
, libiconv, postgresql, v8, clang, sqlite, zlib, imagemagick
-, pkgconfig , ncurses, xapian, gpgme, utillinux, tzdata, icu, libffi
+, pkgconfig , ncurses, xapian, gpgme, util-linux, tzdata, icu, libffi
, cmake, libssh2, openssl, libmysqlclient, darwin, git, perl, pcre, gecode_3, curl
, msgpack, libsodium, snappy, libossp_uuid, lxc, libpcap, xorg, gtk2, buildRubyGem
, cairo, re2, rake, gobject-introspection, gdk-pixbuf, zeromq, czmq, graphicsmagick, libcxx
@@ -196,11 +196,21 @@ in
gio2 = attrs: {
nativeBuildInputs = [ pkgconfig ];
- buildInputs = [ gtk2 pcre gobject-introspection ] ++ lib.optionals stdenv.isLinux [ utillinux libselinux libsepol ];
+ buildInputs = [ gtk2 pcre gobject-introspection ] ++ lib.optionals stdenv.isLinux [ util-linux libselinux libsepol ];
};
gitlab-markup = attrs: { meta.priority = 1; };
+ gitlab-pg_query = attrs: lib.optionalAttrs (attrs.version == "1.3.0") {
+ dontBuild = false;
+ postPatch = ''
+ sed -i 's;"https://gitlab.com.*";"${fetchurl {
+ url = "https://gitlab.com/gitlab-org/libpg_query/-/archive/gitlab-10-1.0.3/libpg_query-gitlab-10-1.0.3.tar.gz";
+ sha256 = "1519x4v6wrk189mjg4hlfah0f7hjy3syg8kk8b6g644gdspzs26j";
+ }}";' ext/pg_query/extconf.rb
+ '';
+ };
+
glib2 = attrs: {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gtk2 pcre ];
@@ -210,7 +220,7 @@ in
nativeBuildInputs = [
binutils pkgconfig
] ++ lib.optionals stdenv.isLinux [
- utillinux libselinux libsepol
+ util-linux libselinux libsepol
];
propagatedBuildInputs = [
atk
diff --git a/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem/default.nix
index 158d5891ec3a..9e64b120af85 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/gem/default.nix
@@ -49,6 +49,11 @@ lib.makeOverridable (
, propagatedUserEnvPkgs ? []
, buildFlags ? []
, passthru ? {}
+# bundler expects gems to be stored in the cache directory for certain actions
+# such as `bundler install --redownload`.
+# At the cost of increasing the store size, you can keep the gems to have closer
+# alignment with what Bundler expects.
+, keepGemCache ? false
, ...} @ attrs:
let
@@ -207,8 +212,8 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {
# looks like useless files which break build repeatability and consume space
pushd $out/${ruby.gemPath}
rm -fv doc/*/*/created.rid || true
- rm -fv {gems/*/ext/*,extensions/*/*/*}/{mkmf.log,gem_make.out} || true
- rm -fvr cache
+ rm -fv {gems/*/ext/*,extensions/*/*/*}/{Makefile,mkmf.log,gem_make.out} || true
+ ${if keepGemCache then "" else "rm -fvr cache"}
popd
# write out metadata and binstubs
diff --git a/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/rbenv/default.nix b/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/rbenv/default.nix
new file mode 100644
index 000000000000..dd6b1d95b4b6
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/development/ruby-modules/rbenv/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, bash, installShellFiles }:
+
+stdenv.mkDerivation rec {
+ pname = "rbenv";
+ version = "1.1.2";
+
+ nativeBuildInputs = [ installShellFiles ];
+
+ src = fetchFromGitHub {
+ owner = "rbenv";
+ repo = "rbenv";
+ rev = "v${version}";
+ sha256 = "12i050vs35iiblxga43zrj7xwbaisv3mq55y9ikagkr8pj1vmq53";
+ };
+
+ postPatch = ''
+ patchShebangs src/configure
+ pushd src
+ '';
+
+ installPhase = ''
+ popd
+ mkdir -p $out/bin
+ mv libexec $out
+ ln -s $out/libexec/rbenv $out/bin/rbenv
+
+ installShellCompletion completions/rbenv.{bash,zsh}
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Groom your app’s Ruby environment";
+ longDescription = ''
+ Use rbenv to pick a Ruby version for your application and guarantee that your development environment matches production.
+ Put rbenv to work with Bundler for painless Ruby upgrades and bulletproof deployments.
+ '';
+ homepage = "https://github.com/rbenv/rbenv";
+ license = licenses.mit;
+ maintainers = with maintainers; [ fzakaria ];
+ platforms = platforms.all;
+ };
+}