2014-08-31 19:32:34 +02:00
|
|
|
# The standard set of gems in nixpkgs including potential fixes.
|
|
|
|
#
|
|
|
|
# The gemset is derived from two points of entry:
|
|
|
|
# - An attrset describing a gem, including version, source and dependencies
|
|
|
|
# This is just meta data, most probably automatically generated by a tool
|
|
|
|
# like Bundix (https://github.com/aflatter/bundix).
|
|
|
|
# {
|
|
|
|
# name = "bundler";
|
|
|
|
# version = "1.6.5";
|
|
|
|
# sha256 = "1s4x0f5by9xs2y24jk6krq5ky7ffkzmxgr4z1nhdykdmpsi2zd0l";
|
|
|
|
# dependencies = [ "rake" ];
|
|
|
|
# }
|
|
|
|
# - An optional derivation that may override how the gem is built. For popular
|
|
|
|
# gems that don't behave correctly, fixes are already provided in the form of
|
|
|
|
# derivations.
|
|
|
|
#
|
2022-12-17 19:39:44 -05:00
|
|
|
# This separates "what to build" (the exact gem versions) from "how to build"
|
2014-08-31 19:32:34 +02:00
|
|
|
# (to make gems behave if necessary).
|
|
|
|
|
2024-12-25 01:47:56 -08:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchurl,
|
|
|
|
fetchpatch,
|
|
|
|
fetchpatch2,
|
|
|
|
writeScript,
|
|
|
|
ruby,
|
|
|
|
libkrb5,
|
|
|
|
libxml2,
|
|
|
|
libxslt,
|
|
|
|
python2,
|
|
|
|
stdenv,
|
|
|
|
which,
|
2024-11-23 23:36:23 +01:00
|
|
|
libiconv,
|
|
|
|
libpq,
|
|
|
|
nodejs,
|
|
|
|
clang,
|
|
|
|
sqlite,
|
|
|
|
zlib,
|
|
|
|
imagemagick,
|
|
|
|
lasem,
|
2020-12-31 14:48:55 +07:00
|
|
|
pkg-config,
|
|
|
|
ncurses,
|
|
|
|
xapian,
|
|
|
|
gpgme,
|
|
|
|
util-linux,
|
|
|
|
tzdata,
|
|
|
|
icu,
|
|
|
|
libffi,
|
2024-10-06 10:33:37 +08:00
|
|
|
cmake,
|
|
|
|
libssh2,
|
|
|
|
openssl,
|
|
|
|
openssl_1_1,
|
|
|
|
libmysqlclient,
|
|
|
|
git,
|
|
|
|
perl,
|
|
|
|
pcre2,
|
|
|
|
gecode_3,
|
|
|
|
curl,
|
|
|
|
libsodium,
|
|
|
|
snappy,
|
|
|
|
libossp_uuid,
|
|
|
|
lxc,
|
|
|
|
libpcap,
|
|
|
|
xorg,
|
|
|
|
gtk3,
|
|
|
|
lerc,
|
|
|
|
buildRubyGem,
|
2023-10-20 21:40:36 +00:00
|
|
|
cairo,
|
|
|
|
expat,
|
|
|
|
re2,
|
|
|
|
rake,
|
|
|
|
gobject-introspection,
|
|
|
|
gdk-pixbuf,
|
|
|
|
zeromq,
|
|
|
|
czmq,
|
|
|
|
graphicsmagick,
|
|
|
|
libcxx,
|
2025-02-11 13:04:19 +01:00
|
|
|
file,
|
|
|
|
libvirt,
|
|
|
|
glib,
|
|
|
|
vips,
|
2025-04-03 12:49:10 -04:00
|
|
|
taglib,
|
2025-02-11 13:04:19 +01:00
|
|
|
libopus,
|
|
|
|
linux-pam,
|
|
|
|
libidn,
|
|
|
|
protobuf,
|
|
|
|
fribidi,
|
|
|
|
harfbuzz,
|
2024-04-26 22:24:03 +02:00
|
|
|
bison,
|
|
|
|
flex,
|
|
|
|
pango,
|
|
|
|
python3,
|
|
|
|
patchelf,
|
|
|
|
binutils,
|
|
|
|
freetds,
|
|
|
|
wrapGAppsHook3,
|
|
|
|
atk,
|
2023-06-26 17:44:57 +12:00
|
|
|
bundler,
|
|
|
|
libsass,
|
|
|
|
dart-sass,
|
|
|
|
libexif,
|
|
|
|
libselinux,
|
|
|
|
libsepol,
|
|
|
|
shared-mime-info,
|
|
|
|
libthai,
|
|
|
|
libdatrie,
|
2023-11-17 15:57:03 +11:00
|
|
|
CoreServices,
|
|
|
|
DarwinTools,
|
|
|
|
cctools,
|
|
|
|
libtool,
|
|
|
|
discount,
|
|
|
|
exiv2,
|
|
|
|
libepoxy,
|
|
|
|
libxkbcommon,
|
|
|
|
libmaxminddb,
|
|
|
|
libyaml,
|
2025-03-12 19:08:15 +01:00
|
|
|
cargo,
|
|
|
|
rustc,
|
|
|
|
rustPlatform,
|
|
|
|
libsysprof-capture,
|
|
|
|
imlib2,
|
2024-05-24 02:43:14 +02:00
|
|
|
autoSignDarwinBinariesHook,
|
2016-09-21 14:29:12 +02:00
|
|
|
}@args:
|
2014-08-31 19:32:34 +02:00
|
|
|
|
|
|
|
let
|
2017-05-12 08:52:18 -04:00
|
|
|
rainbow_rake = buildRubyGem {
|
2018-11-05 00:32:52 +01:00
|
|
|
pname = "rake";
|
2017-05-12 08:52:18 -04:00
|
|
|
gemName = "rake";
|
2017-10-05 04:10:57 -04:00
|
|
|
source.sha256 = "01j8fc9bqjnrsxbppncai05h43315vmz9fwg28qdsgcjw9ck1d7n";
|
2017-05-12 08:52:18 -04:00
|
|
|
type = "gem";
|
|
|
|
version = "12.0.0";
|
|
|
|
};
|
2014-10-28 04:16:14 +00:00
|
|
|
in
|
2014-08-31 19:32:34 +02:00
|
|
|
|
2014-10-28 04:16:14 +00:00
|
|
|
{
|
2022-08-08 19:36:27 +00:00
|
|
|
ZenTest = attrs: {
|
|
|
|
meta.mainProgram = "zentest";
|
|
|
|
};
|
|
|
|
|
2017-09-05 18:03:42 -04:00
|
|
|
atk = attrs: {
|
2019-05-18 17:45:38 +00:00
|
|
|
dependencies = attrs.dependencies ++ [ "gobject-introspection" ];
|
2021-04-18 02:17:13 +09:00
|
|
|
nativeBuildInputs = [
|
|
|
|
rake
|
|
|
|
bundler
|
|
|
|
pkg-config
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
2024-04-26 22:24:03 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook3
|
|
|
|
atk
|
|
|
|
];
|
2017-09-05 18:03:42 -04:00
|
|
|
};
|
2017-05-18 09:47:45 +09:00
|
|
|
|
2016-08-26 14:08:39 +01:00
|
|
|
bundler =
|
|
|
|
attrs:
|
|
|
|
let
|
|
|
|
templates = "${attrs.ruby.gemPath}/gems/${attrs.gemName}-${attrs.version}/lib/bundler/templates/";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
# patching shebangs would fail on the templates/Executable file, so we
|
|
|
|
# temporarily remove the executable flag.
|
|
|
|
preFixup = "chmod -x $out/${templates}/Executable";
|
|
|
|
postFixup = ''
|
|
|
|
chmod +x $out/${templates}/Executable
|
|
|
|
|
|
|
|
# Allows to load another bundler version
|
|
|
|
sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2017-05-18 09:47:45 +09:00
|
|
|
cairo = attrs: {
|
2021-04-18 02:17:13 +09:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
2024-10-06 10:33:37 +08:00
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
expat
|
|
|
|
glib
|
|
|
|
libsysprof-capture
|
|
|
|
pcre2
|
|
|
|
xorg.libpthreadstubs
|
|
|
|
xorg.libXdmcp
|
|
|
|
];
|
2017-05-18 09:47:45 +09:00
|
|
|
};
|
|
|
|
|
2017-10-31 13:33:52 +09:00
|
|
|
cairo-gobject = attrs: {
|
2021-04-18 02:17:13 +09:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
2024-10-06 10:33:37 +08:00
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
expat
|
|
|
|
libsysprof-capture
|
|
|
|
pcre2
|
|
|
|
xorg.libpthreadstubs
|
|
|
|
xorg.libXdmcp
|
|
|
|
];
|
2017-10-31 13:33:52 +09:00
|
|
|
};
|
|
|
|
|
2015-01-25 16:01:48 -05:00
|
|
|
charlock_holmes = attrs: {
|
2015-04-15 19:24:04 -04:00
|
|
|
buildInputs = [
|
|
|
|
which
|
|
|
|
icu
|
|
|
|
zlib
|
|
|
|
];
|
2015-01-25 16:01:48 -05:00
|
|
|
};
|
2017-10-31 13:33:52 +09:00
|
|
|
|
2019-05-02 02:37:35 +02:00
|
|
|
cld3 = attrs: {
|
2020-12-31 14:48:55 +07:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-05-02 02:37:35 +02:00
|
|
|
buildInputs = [ protobuf ];
|
|
|
|
};
|
|
|
|
|
2019-05-18 17:45:38 +00:00
|
|
|
cocoapods-acknowledgements = attrs: {
|
|
|
|
dependencies = attrs.dependencies ++ [ "cocoapods" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
cocoapods-deploy = attrs: {
|
|
|
|
dependencies = [ "cocoapods" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
cocoapods-disable-podfile-validations = attrs: {
|
|
|
|
dependencies = [ "cocoapods" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
cocoapods-generate = attrs: {
|
|
|
|
dependencies = attrs.dependencies ++ [ "cocoapods" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
cocoapods-git_url_rewriter = attrs: {
|
|
|
|
dependencies = [ "cocoapods" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
cocoapods-keys = attrs: {
|
|
|
|
dependencies = attrs.dependencies ++ [ "cocoapods" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
cocoapods-open = attrs: {
|
|
|
|
dependencies = [ "cocoapods" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
cocoapods-try-release-fix = attrs: {
|
|
|
|
dependencies = [ "cocoapods" ];
|
|
|
|
};
|
|
|
|
|
2017-09-20 23:53:25 -07:00
|
|
|
curb = attrs: {
|
|
|
|
buildInputs = [ curl ];
|
|
|
|
};
|
2015-01-25 16:01:48 -05:00
|
|
|
|
2018-08-15 15:32:50 +02:00
|
|
|
curses = attrs: {
|
2024-07-25 21:18:29 -04:00
|
|
|
dontBuild = false;
|
2018-08-15 15:32:50 +02:00
|
|
|
buildInputs = [ ncurses ];
|
2024-07-25 21:18:29 -04:00
|
|
|
patches = lib.optionals (lib.versionOlder attrs.version "1.4.5") [
|
|
|
|
# Fixes incompatible function pointer type error with clang 16. Fixed in 1.4.5 and newer.
|
|
|
|
# Upstream issue: https://github.com/ruby/curses/issues/85
|
|
|
|
(fetchpatch2 {
|
|
|
|
url = "https://github.com/ruby/curses/commit/13e00d07c3aaed83d5f138cf268cc33c9f025d0e.patch?full_index=1";
|
|
|
|
hash = "sha256-ZJ2egqj3Uwmi4KrF79dtwczpwUqFCp52/xQYUymYDmc=";
|
|
|
|
})
|
|
|
|
];
|
2018-08-15 15:32:50 +02:00
|
|
|
};
|
|
|
|
|
ruby: new bundler infrastructure
This improves our Bundler integration (i.e. `bundlerEnv`).
Before describing the implementation differences, I'd like to point a
breaking change: buildRubyGem now expects `gemName` and `version` as
arguments, rather than a `name` attribute in the form of
"<gem-name>-<version>".
Now for the differences in implementation.
The previous implementation installed all gems at once in a single
derivation. This was made possible by using a set of monkey-patches to
prevent Bundler from downloading gems impurely, and to help Bundler
find and activate all required gems prior to installation. This had
several downsides:
* The patches were really hard to understand, and required subtle
interaction with the rest of the build environment.
* A single install failure would cause the entire derivation to fail.
The new implementation takes a different approach: we install gems into
separate derivations, and then present Bundler with a symlink forest
thereof. This has a couple benefits over the existing approach:
* Fewer patches are required, with less interplay with the rest of the
build environment.
* Changes to one gem no longer cause a rebuild of the entire dependency
graph.
* Builds take 20% less time (using gitlab as a reference).
It's unfortunate that we still have to muck with Bundler's internals,
though it's unavoidable with the way that Bundler is currently designed.
There are a number improvements that could be made in Bundler that would
simplify our packaging story:
* Bundler requires all installed gems reside within the same prefix
(GEM_HOME), unlike RubyGems which allows for multiple prefixes to
be specified through GEM_PATH. It would be ideal if Bundler allowed
for packages to be installed and sourced from multiple prefixes.
* Bundler installs git sources very differently from how RubyGems
installs gem packages, and, unlike RubyGems, it doesn't provide a
public interface (CLI or programmatic) to guide the installation of a
single gem. We are presented with the options of either
reimplementing a considerable portion Bundler, or patch and use parts
of its internals; I choose the latter. Ideally, there would be a way
to install gems from git sources in a manner similar to how we drive
`gem` to install gem packages.
* When a bundled program is executed (via `bundle exec` or a
binstub that does `require 'bundler/setup'`), the setup process reads
the Gemfile.lock, activates the dependencies, re-serializes the lock
file it read earlier, and then attempts to overwrite the Gemfile.lock
if the contents aren't bit-identical. I think the reasoning is that
by merely running an application with a newer version of Bundler, you'll
automatically keep the Gemfile.lock up-to-date with any changes in the
format. Unfortunately, that doesn't play well with any form of
packaging, because bundler will immediately cause the application to
abort when it attempts to write to the read-only Gemfile.lock in the
store. We work around this by normalizing the Gemfile.lock with the
version of Bundler that we'll use at runtime before we copy it into
the store. This feels fragile, but it's the best we can do without
changes upstream, or resorting to more delicate hacks.
With all of the challenges in using Bundler, one might wonder why we
can't just cut Bundler out of the picture and use RubyGems. After all,
Nix provides most of the isolation that Bundler is used for anyway.
The problem, however, is that almost every Rails application calls
`Bundler::require` at startup (by way of the default project templates).
Because bundler will then, by default, `require` each gem listed in the
Gemfile, Rails applications are almost always written such that none of
the source files explicitly require their dependencies. That leaves us
with two options: support and use Bundler, or maintain massive patches
for every Rails application that we package.
Closes #8612
2015-11-14 21:17:29 -05:00
|
|
|
dep-selector-libgecode = attrs: {
|
|
|
|
USE_SYSTEM_GECODE = true;
|
|
|
|
postInstall = ''
|
|
|
|
installPath=$(cat $out/nix-support/gem-meta/install-path)
|
|
|
|
sed -i $installPath/lib/dep-selector-libgecode.rb -e 's@VENDORED_GECODE_DIR =.*@VENDORED_GECODE_DIR = "${gecode_3}"@'
|
|
|
|
'';
|
|
|
|
};
|
2018-03-13 10:16:03 +00:00
|
|
|
|
2019-01-18 13:48:48 +03:00
|
|
|
digest-sha3 = attrs: {
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
};
|
|
|
|
|
2022-01-18 16:27:04 +01:00
|
|
|
rdiscount = attrs: {
|
|
|
|
# Use discount from nixpkgs instead of vendored version
|
|
|
|
dontBuild = false;
|
|
|
|
buildInputs = [ discount ];
|
|
|
|
patches = [
|
|
|
|
# Adapted from Debian:
|
|
|
|
# https://sources.debian.org/data/main/r/ruby-rdiscount/2.1.8-1/debian/patches/01_use-system-libmarkdown.patch
|
|
|
|
./rdiscount-use-nixpkgs-libmarkdown.patch
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2018-02-19 22:56:17 +01:00
|
|
|
ethon = attrs: {
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace lib/ethon/curls/settings.rb \
|
2018-02-20 11:29:07 +01:00
|
|
|
--replace "libcurl" "${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary}"
|
2018-02-19 22:56:17 +01:00
|
|
|
'';
|
2018-03-13 10:16:03 +00:00
|
|
|
};
|
ruby: new bundler infrastructure
This improves our Bundler integration (i.e. `bundlerEnv`).
Before describing the implementation differences, I'd like to point a
breaking change: buildRubyGem now expects `gemName` and `version` as
arguments, rather than a `name` attribute in the form of
"<gem-name>-<version>".
Now for the differences in implementation.
The previous implementation installed all gems at once in a single
derivation. This was made possible by using a set of monkey-patches to
prevent Bundler from downloading gems impurely, and to help Bundler
find and activate all required gems prior to installation. This had
several downsides:
* The patches were really hard to understand, and required subtle
interaction with the rest of the build environment.
* A single install failure would cause the entire derivation to fail.
The new implementation takes a different approach: we install gems into
separate derivations, and then present Bundler with a symlink forest
thereof. This has a couple benefits over the existing approach:
* Fewer patches are required, with less interplay with the rest of the
build environment.
* Changes to one gem no longer cause a rebuild of the entire dependency
graph.
* Builds take 20% less time (using gitlab as a reference).
It's unfortunate that we still have to muck with Bundler's internals,
though it's unavoidable with the way that Bundler is currently designed.
There are a number improvements that could be made in Bundler that would
simplify our packaging story:
* Bundler requires all installed gems reside within the same prefix
(GEM_HOME), unlike RubyGems which allows for multiple prefixes to
be specified through GEM_PATH. It would be ideal if Bundler allowed
for packages to be installed and sourced from multiple prefixes.
* Bundler installs git sources very differently from how RubyGems
installs gem packages, and, unlike RubyGems, it doesn't provide a
public interface (CLI or programmatic) to guide the installation of a
single gem. We are presented with the options of either
reimplementing a considerable portion Bundler, or patch and use parts
of its internals; I choose the latter. Ideally, there would be a way
to install gems from git sources in a manner similar to how we drive
`gem` to install gem packages.
* When a bundled program is executed (via `bundle exec` or a
binstub that does `require 'bundler/setup'`), the setup process reads
the Gemfile.lock, activates the dependencies, re-serializes the lock
file it read earlier, and then attempts to overwrite the Gemfile.lock
if the contents aren't bit-identical. I think the reasoning is that
by merely running an application with a newer version of Bundler, you'll
automatically keep the Gemfile.lock up-to-date with any changes in the
format. Unfortunately, that doesn't play well with any form of
packaging, because bundler will immediately cause the application to
abort when it attempts to write to the read-only Gemfile.lock in the
store. We work around this by normalizing the Gemfile.lock with the
version of Bundler that we'll use at runtime before we copy it into
the store. This feels fragile, but it's the best we can do without
changes upstream, or resorting to more delicate hacks.
With all of the challenges in using Bundler, one might wonder why we
can't just cut Bundler out of the picture and use RubyGems. After all,
Nix provides most of the isolation that Bundler is used for anyway.
The problem, however, is that almost every Rails application calls
`Bundler::require` at startup (by way of the default project templates).
Because bundler will then, by default, `require` each gem listed in the
Gemfile, Rails applications are almost always written such that none of
the source files explicitly require their dependencies. That leaves us
with two options: support and use Bundler, or maintain massive patches
for every Rails application that we package.
Closes #8612
2015-11-14 21:17:29 -05:00
|
|
|
|
2022-02-23 21:17:31 +11:00
|
|
|
exiv2 = attrs: {
|
|
|
|
buildFlags = [
|
|
|
|
"--with-exiv2-lib=${exiv2}/lib"
|
|
|
|
"--with-exiv2-include=${exiv2.dev}/include"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2019-05-18 17:45:38 +00:00
|
|
|
fog-dnsimple =
|
|
|
|
attrs:
|
|
|
|
lib.optionalAttrs (lib.versionOlder attrs.version "1.0.1") {
|
|
|
|
postInstall = ''
|
|
|
|
cd $(cat $out/nix-support/gem-meta/install-path)
|
|
|
|
rm {$out/bin,bin,../../bin}/{setup,console}
|
|
|
|
'';
|
|
|
|
};
|
2018-06-15 13:27:31 +02:00
|
|
|
|
|
|
|
redis-rack = attrs: {
|
|
|
|
dontBuild = false;
|
|
|
|
preBuild = ''
|
|
|
|
exec 3>&1
|
|
|
|
output="$(gem build $gemspec | tee >(cat - >&3))"
|
|
|
|
exec 3>&-
|
|
|
|
sed -i 's!"rake".freeze!!' $gemspec
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
ffi-rzmq-core = attrs: {
|
|
|
|
postInstall = ''
|
|
|
|
installPath=$(cat $out/nix-support/gem-meta/install-path)
|
|
|
|
sed -i $installPath/lib/ffi-rzmq-core/libzmq.rb -e 's@inside_gem =.*@inside_gem = "${zeromq}/lib"@'
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-04-07 16:52:15 +02:00
|
|
|
mimemagic = attrs: {
|
|
|
|
FREEDESKTOP_MIME_TYPES_PATH = "${shared-mime-info}/share/mime/packages/freedesktop.org.xml";
|
|
|
|
};
|
|
|
|
|
2018-06-15 13:27:31 +02:00
|
|
|
mini_magick = attrs: {
|
|
|
|
postInstall = ''
|
|
|
|
installPath=$(cat $out/nix-support/gem-meta/install-path)
|
|
|
|
echo -e "\nENV['PATH'] += ':${graphicsmagick}/bin'\n" >> $installPath/lib/mini_magick/configuration.rb
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2025-03-12 19:08:15 +01:00
|
|
|
mini_racer = attrs: {
|
|
|
|
buildFlags = [
|
|
|
|
"--with-v8-dir=\"${nodejs.libv8}\""
|
|
|
|
];
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ext/mini_racer_extension/extconf.rb \
|
|
|
|
--replace Libv8.configure_makefile '$CPPFLAGS += " -x c++"; Libv8.configure_makefile'
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2017-09-21 00:18:01 +02:00
|
|
|
do_sqlite3 = attrs: {
|
|
|
|
buildInputs = [ sqlite ];
|
|
|
|
};
|
|
|
|
|
2016-01-25 10:22:00 +00:00
|
|
|
eventmachine = attrs: {
|
2023-02-18 00:14:45 +11:00
|
|
|
dontBuild = false;
|
2016-01-25 10:22:00 +00:00
|
|
|
buildInputs = [ openssl ];
|
2023-02-18 00:14:45 +11:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ext/em.cpp \
|
|
|
|
--replace 'if (bind (' 'if (::bind ('
|
|
|
|
'';
|
2016-01-25 10:22:00 +00:00
|
|
|
};
|
|
|
|
|
2020-11-10 22:41:08 +03:00
|
|
|
exif = attrs: {
|
|
|
|
buildFlags = [ "--with-exif-dir=${libexif}" ];
|
|
|
|
buildInputs = [ libexif ];
|
|
|
|
};
|
|
|
|
|
2015-01-25 16:01:48 -05:00
|
|
|
ffi = attrs: {
|
2020-12-31 14:48:55 +07:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 17:26:13 -04:00
|
|
|
buildInputs = [ libffi ];
|
2015-01-25 16:01:48 -05:00
|
|
|
};
|
|
|
|
|
2023-02-28 21:23:57 +11:00
|
|
|
fiddle = attrs: {
|
|
|
|
buildInputs = [ libffi ];
|
|
|
|
};
|
|
|
|
|
2017-10-31 13:33:52 +09:00
|
|
|
gdk_pixbuf2 = attrs: {
|
2021-04-18 02:17:13 +09:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
bundler
|
|
|
|
rake
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
2024-04-26 22:24:03 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook3
|
|
|
|
gdk-pixbuf
|
|
|
|
];
|
2017-10-31 13:33:52 +09:00
|
|
|
};
|
|
|
|
|
2023-11-17 15:57:03 +11:00
|
|
|
gdk3 = attrs: {
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
bundler
|
|
|
|
rake
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
2024-04-26 22:24:03 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook3
|
|
|
|
gdk-pixbuf
|
|
|
|
cairo
|
|
|
|
];
|
2023-11-17 15:57:03 +11:00
|
|
|
};
|
|
|
|
|
2015-01-21 20:33:19 -05:00
|
|
|
gpgme = attrs: {
|
|
|
|
buildInputs = [ gpgme ];
|
2023-02-25 00:00:00 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-09-10 14:05:19 +02:00
|
|
|
buildFlags = [ "--use-system-libraries" ];
|
2015-01-21 20:33:19 -05:00
|
|
|
};
|
|
|
|
|
2017-09-05 18:03:42 -04:00
|
|
|
gio2 = attrs: {
|
2023-06-22 14:49:31 +03:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
gobject-introspection
|
2021-04-18 02:17:13 +09:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
2024-10-06 10:33:37 +08:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
glib
|
|
|
|
libsysprof-capture
|
|
|
|
pcre2
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
util-linux
|
|
|
|
libselinux
|
|
|
|
libsepol
|
|
|
|
];
|
2017-09-05 18:03:42 -04:00
|
|
|
};
|
2017-05-18 09:47:45 +09:00
|
|
|
|
2017-09-03 15:38:28 +02:00
|
|
|
gitlab-markup = attrs: { meta.priority = 1; };
|
|
|
|
|
2021-02-17 22:55:14 +01:00
|
|
|
gitlab-pg_query =
|
|
|
|
attrs:
|
|
|
|
lib.optionalAttrs (attrs.version == "1.3.1") {
|
2020-11-20 21:02:55 +01:00
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
2021-02-17 22:55:14 +01:00
|
|
|
sed -i "s;'https://codeload.github.com.*';'${
|
|
|
|
fetchurl {
|
|
|
|
url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/10-1.0.3";
|
|
|
|
sha256 = "0jfij8apzxsdabl70j42xgd5f3ka1gdcrk764nccp66164gpcchk";
|
2025-04-01 20:10:43 +02:00
|
|
|
}
|
2021-02-17 22:55:14 +01:00
|
|
|
}';" ext/pg_query/extconf.rb
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-08-08 19:36:27 +00:00
|
|
|
parser = attrs: {
|
|
|
|
meta.mainProgram = "ruby-parse";
|
|
|
|
};
|
|
|
|
|
2021-04-02 17:50:24 +13:00
|
|
|
pg_query =
|
|
|
|
attrs:
|
|
|
|
lib.optionalAttrs (attrs.version == "2.0.2") {
|
2021-03-19 09:59:09 +13:00
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s;'https://codeload.github.com.*';'${
|
|
|
|
fetchurl {
|
2021-04-02 17:50:24 +13:00
|
|
|
url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/13-2.0.2";
|
|
|
|
sha256 = "0ms2s6hmy8qyzv4g1hj4i2p5fws1v8lrj73b2knwbp2ipd45yj7y";
|
2025-04-01 20:10:43 +02:00
|
|
|
}
|
2021-03-19 09:59:09 +13:00
|
|
|
}';" ext/pg_query/extconf.rb
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
// lib.optionalAttrs (attrs.version == "1.3.0") {
|
|
|
|
# Needed for gitlab
|
2021-02-17 22:55:14 +01:00
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s;'https://codeload.github.com.*';'${
|
|
|
|
fetchurl {
|
|
|
|
url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/10-1.0.4";
|
|
|
|
sha256 = "0f0kshhai0pnkqj0w4kgz3fssnvwidllc31n1fysxjjzdqlr1k48";
|
2025-04-01 20:10:43 +02:00
|
|
|
}
|
2021-02-17 22:55:14 +01:00
|
|
|
}';" ext/pg_query/extconf.rb
|
2020-11-20 21:02:55 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-08-08 19:36:27 +00:00
|
|
|
prettier = attrs: {
|
|
|
|
meta.mainProgram = "rbprettier";
|
|
|
|
};
|
|
|
|
|
2023-05-25 09:25:14 +02:00
|
|
|
prometheus-client-mmap =
|
|
|
|
attrs:
|
|
|
|
{
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch =
|
|
|
|
let
|
|
|
|
getconf = if stdenv.hostPlatform.isGnu then stdenv.cc.libc else getconf;
|
|
|
|
in
|
2025-04-01 20:10:43 +02:00
|
|
|
''
|
2024-01-08 00:50:26 +01:00
|
|
|
substituteInPlace lib/prometheus/client/page_size.rb --replace "getconf" "${lib.getBin getconf}/bin/getconf"
|
|
|
|
'';
|
2025-04-01 20:10:43 +02:00
|
|
|
}
|
2024-01-08 00:50:26 +01:00
|
|
|
// lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") {
|
2025-01-26 16:04:57 +01:00
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
2024-01-08 00:50:26 +01:00
|
|
|
src = stdenv.mkDerivation {
|
|
|
|
inherit (buildRubyGem { inherit (attrs) gemName version source; })
|
2025-04-01 20:10:43 +02:00
|
|
|
name
|
|
|
|
src
|
2024-01-08 00:50:26 +01:00
|
|
|
unpackPhase
|
2020-06-19 13:27:21 +08:00
|
|
|
nativeBuildInputs
|
2025-04-01 20:10:43 +02:00
|
|
|
;
|
2024-01-08 00:50:26 +01:00
|
|
|
dontBuilt = true;
|
|
|
|
installPhase = ''
|
|
|
|
cp -R ext/fast_mmaped_file_rs $out
|
2025-02-21 11:57:07 +01:00
|
|
|
cp Cargo.lock $out
|
2025-04-01 20:10:43 +02:00
|
|
|
'';
|
|
|
|
};
|
2025-02-21 11:57:07 +01:00
|
|
|
hash = "sha256-KVbmDAa9EFwTUTHPF/8ZzycbieMhAuiidiz5rqGIKOo=";
|
2024-01-08 00:50:26 +01:00
|
|
|
};
|
2025-02-21 11:57:07 +01:00
|
|
|
|
2024-01-08 00:50:26 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cargo
|
|
|
|
rustc
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustPlatform.bindgenHook
|
|
|
|
];
|
2025-02-21 11:57:07 +01:00
|
|
|
|
2024-01-26 12:33:48 +01:00
|
|
|
disallowedReferences = [
|
|
|
|
rustc.unwrapped
|
|
|
|
];
|
2025-02-21 11:57:07 +01:00
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
export CARGO_HOME="$PWD/../.cargo/"
|
2024-01-08 00:50:26 +01:00
|
|
|
'';
|
2025-02-21 11:57:07 +01:00
|
|
|
|
2024-01-26 12:33:48 +01:00
|
|
|
postInstall = ''
|
|
|
|
find $out -type f -name .rustc_info.json -delete
|
|
|
|
'';
|
2023-05-25 09:25:14 +02:00
|
|
|
};
|
|
|
|
|
2017-09-05 18:03:42 -04:00
|
|
|
glib2 = attrs: {
|
2021-04-18 02:17:13 +09:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
2024-10-06 10:33:37 +08:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
libsysprof-capture
|
|
|
|
pcre2
|
|
|
|
];
|
2017-05-18 09:47:45 +09:00
|
|
|
};
|
|
|
|
|
2023-11-17 15:57:03 +11:00
|
|
|
gtk3 = attrs: {
|
|
|
|
nativeBuildInputs =
|
|
|
|
[
|
|
|
|
binutils
|
|
|
|
pkg-config
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
util-linux
|
|
|
|
libselinux
|
|
|
|
libsepol
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
atk
|
|
|
|
gdk-pixbuf
|
|
|
|
fribidi
|
|
|
|
gobject-introspection
|
|
|
|
gtk3
|
|
|
|
cairo
|
|
|
|
harfbuzz
|
2024-07-25 21:19:25 -04:00
|
|
|
lerc
|
2023-11-17 15:57:03 +11:00
|
|
|
libdatrie
|
2024-10-06 10:33:37 +08:00
|
|
|
libsysprof-capture
|
2023-11-17 15:57:03 +11:00
|
|
|
libthai
|
|
|
|
pcre2
|
|
|
|
xorg.libpthreadstubs
|
|
|
|
xorg.libXdmcp
|
|
|
|
xorg.libXtst
|
|
|
|
libxkbcommon
|
|
|
|
libepoxy
|
|
|
|
];
|
|
|
|
dontStrip = stdenv.hostPlatform.isDarwin;
|
|
|
|
};
|
|
|
|
|
2017-10-31 13:33:52 +09:00
|
|
|
gobject-introspection = attrs: {
|
2021-04-18 02:17:13 +09:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
2024-10-06 10:33:37 +08:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook3
|
|
|
|
glib
|
|
|
|
pcre2
|
|
|
|
libsysprof-capture
|
|
|
|
];
|
2017-10-31 13:33:52 +09:00
|
|
|
};
|
2017-05-18 09:47:45 +09:00
|
|
|
|
2022-06-17 13:43:03 +02:00
|
|
|
gollum = attrs: {
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bin/gollum \
|
|
|
|
--replace "/usr/bin/env -S ruby" "${ruby}/bin/ruby"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-11-11 11:23:56 +00:00
|
|
|
google-protobuf =
|
|
|
|
attrs:
|
|
|
|
lib.optionalAttrs (lib.versionAtLeast attrs.version "3.25.0") {
|
|
|
|
# Fails on 3.25.0 with:
|
|
|
|
# convert.c:312:32: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
};
|
|
|
|
|
2017-07-05 23:53:31 +02:00
|
|
|
grpc = attrs: {
|
2023-05-01 11:51:27 +03:00
|
|
|
nativeBuildInputs =
|
|
|
|
[ pkg-config ]
|
|
|
|
++ lib.optional stdenv.hostPlatform.isDarwin cctools
|
|
|
|
++ lib.optional (
|
|
|
|
lib.versionAtLeast attrs.version "1.53.0"
|
|
|
|
&& stdenv.hostPlatform.isDarwin
|
|
|
|
&& stdenv.hostPlatform.isAarch64
|
|
|
|
) autoSignDarwinBinariesHook;
|
2017-09-05 17:26:13 -04:00
|
|
|
buildInputs = [ openssl ];
|
2018-04-26 00:14:38 +02:00
|
|
|
hardeningDisable = [ "format" ];
|
2024-12-27 22:09:58 -08:00
|
|
|
env = lib.optionalAttrs (lib.versionOlder attrs.version "1.68.1") {
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
|
|
|
|
};
|
|
|
|
patches = lib.optionals (lib.versionOlder attrs.version "1.65.0") [
|
2024-12-25 01:47:56 -08:00
|
|
|
(fetchpatch {
|
|
|
|
name = "gcc-14-fixes.patch";
|
|
|
|
url = "https://boringssl.googlesource.com/boringssl/+/c70190368c7040c37c1d655f0690bcde2b109a0d%5E%21/?format=TEXT";
|
|
|
|
decode = "base64 -d";
|
|
|
|
stripLen = 1;
|
|
|
|
extraPrefix = "third_party/boringssl-with-bazel/src/";
|
|
|
|
hash = "sha256-1QyQm5s55op268r72dfExNGV+UyV5Ty6boHa9DQq40U=";
|
|
|
|
})
|
2019-01-11 09:31:18 +01:00
|
|
|
];
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch =
|
|
|
|
''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '-Wno-invalid-source-encoding' ""
|
2023-05-01 11:51:27 +03:00
|
|
|
''
|
|
|
|
+ lib.optionalString (lib.versionOlder attrs.version "1.53.0" && stdenv.hostPlatform.isDarwin) ''
|
2022-07-19 19:26:08 -04:00
|
|
|
# For < v1.48.0
|
2021-12-09 19:57:32 +01:00
|
|
|
substituteInPlace src/ruby/ext/grpc/extconf.rb \
|
|
|
|
--replace "ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/" ""
|
2022-07-19 19:26:08 -04:00
|
|
|
# For >= v1.48.0
|
|
|
|
substituteInPlace src/ruby/ext/grpc/extconf.rb \
|
|
|
|
--replace 'apple_toolchain = ' 'apple_toolchain = false && '
|
2019-01-11 09:31:18 +01:00
|
|
|
'';
|
2017-07-05 23:53:31 +02:00
|
|
|
};
|
|
|
|
|
2016-05-04 16:41:44 -06:00
|
|
|
hitimes = attrs: {
|
2021-04-18 02:17:13 +09:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
|
2016-05-04 16:41:44 -06:00
|
|
|
};
|
|
|
|
|
2024-07-25 21:19:48 -04:00
|
|
|
hpricot = attrs: {
|
|
|
|
dontBuild = false;
|
|
|
|
patches = [
|
|
|
|
# Fix incompatible function pointer conversion errors with clang 16
|
|
|
|
./hpricot-fix-incompatible-function-pointer-conversion.patch
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2018-11-08 16:46:29 +00:00
|
|
|
iconv = attrs: {
|
2024-07-25 21:20:32 -04:00
|
|
|
buildFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
"--with-iconv-dir=${lib.getLib libiconv}"
|
|
|
|
"--with-iconv-include=${lib.getDev libiconv}/include"
|
|
|
|
];
|
2018-11-08 16:46:29 +00:00
|
|
|
};
|
|
|
|
|
2019-05-02 02:37:35 +02:00
|
|
|
idn-ruby = attrs: {
|
|
|
|
buildInputs = [ libidn ];
|
|
|
|
};
|
|
|
|
|
2017-03-03 21:09:04 -05:00
|
|
|
# disable bundle install as it can't install anything in addition to what is
|
2017-03-03 23:05:37 -05:00
|
|
|
# specified in pkgs/applications/misc/jekyll/Gemfile anyway. Also do chmod_R
|
|
|
|
# to compensate for read-only files in site_template in nix store.
|
2017-03-03 21:09:04 -05:00
|
|
|
jekyll = attrs: {
|
|
|
|
postInstall = ''
|
|
|
|
installPath=$(cat $out/nix-support/gem-meta/install-path)
|
2017-03-03 23:05:37 -05:00
|
|
|
sed -i $installPath/lib/jekyll/commands/new.rb \
|
|
|
|
-e 's@Exec.run("bundle", "install"@Exec.run("true"@' \
|
|
|
|
-e 's@FileUtils.cp_r site_template + "/.", path@FileUtils.cp_r site_template + "/.", path; FileUtils.chmod_R "u+w", path@'
|
2017-03-03 21:09:04 -05:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2019-05-18 17:45:38 +00:00
|
|
|
execjs = attrs: {
|
2024-05-30 11:53:55 +02:00
|
|
|
propagatedBuildInputs = [ nodejs.libv8 ];
|
2019-05-18 17:45:38 +00:00
|
|
|
};
|
|
|
|
|
2018-07-26 19:51:17 +02:00
|
|
|
libxml-ruby = attrs: {
|
|
|
|
buildFlags =
|
|
|
|
[
|
|
|
|
"--with-xml2-lib=${libxml2.out}/lib"
|
|
|
|
"--with-xml2-include=${libxml2.dev}/include/libxml2"
|
2023-02-28 21:27:20 +11:00
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-07-25 21:22:31 -04:00
|
|
|
"--with-iconv-dir=${lib.getLib libiconv}"
|
|
|
|
"--with-opt-include=${lib.getDev libiconv}/include"
|
2018-07-26 19:51:17 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2019-07-04 12:39:29 +01:00
|
|
|
mathematical = attrs: {
|
2020-06-19 13:27:21 +08:00
|
|
|
nativeBuildInputs = [
|
|
|
|
ruby
|
2019-07-04 12:39:29 +01:00
|
|
|
cmake
|
|
|
|
bison
|
|
|
|
flex
|
2020-12-31 14:48:55 +07:00
|
|
|
pkg-config
|
2020-06-19 13:27:21 +08:00
|
|
|
python3
|
2020-05-14 18:52:05 +01:00
|
|
|
patchelf
|
2020-06-19 13:27:21 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2019-07-04 12:39:29 +01:00
|
|
|
cairo
|
2020-06-19 13:27:21 +08:00
|
|
|
fribidi
|
2019-05-22 07:03:39 -04:00
|
|
|
gdk-pixbuf
|
2020-06-19 13:27:21 +08:00
|
|
|
glib
|
2019-07-04 12:39:29 +01:00
|
|
|
libxml2
|
2020-06-19 13:27:21 +08:00
|
|
|
pango
|
2019-07-04 12:39:29 +01:00
|
|
|
];
|
|
|
|
|
2020-06-19 13:27:21 +08:00
|
|
|
strictDeps = true;
|
|
|
|
|
2019-07-04 12:39:29 +01:00
|
|
|
# The ruby build script takes care of this
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2020-01-06 23:02:58 +00:00
|
|
|
postInstall = ''
|
|
|
|
# Reduce output size by a lot, and remove some unnecessary references.
|
|
|
|
# The ext directory should only be required at build time, so
|
|
|
|
# can be deleted now.
|
|
|
|
rm -r $out/${ruby.gemPath}/gems/mathematical-${attrs.version}/ext \
|
|
|
|
$out/${ruby.gemPath}/extensions/*/*/mathematical-${attrs.version}/gem_make.out
|
|
|
|
'';
|
|
|
|
|
2020-05-14 18:52:05 +01:00
|
|
|
# For some reason 'mathematical.so' is missing cairo, glib, and
|
|
|
|
# lasem in its RPATH, add them explicitly here
|
2019-07-04 12:39:29 +01:00
|
|
|
postFixup =
|
|
|
|
lib.optionalString stdenv.hostPlatform.isLinux ''
|
|
|
|
soPath="$out/${ruby.gemPath}/gems/mathematical-${attrs.version}/lib/mathematical/mathematical.so"
|
2020-05-14 18:52:05 +01:00
|
|
|
rpath="$(patchelf --print-rpath "$soPath")"
|
|
|
|
patchelf --set-rpath "${
|
|
|
|
lib.makeLibraryPath [
|
|
|
|
lasem
|
|
|
|
glib
|
|
|
|
cairo
|
|
|
|
]
|
|
|
|
}:$rpath" "$soPath"
|
|
|
|
patchelf --replace-needed liblasem.so liblasem-0.4.so "$soPath"
|
2025-02-23 23:32:55 +08:00
|
|
|
''
|
|
|
|
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
|
|
soPath="$out/${ruby.gemPath}/gems/mathematical-${attrs.version}/lib/mathematical/mathematical.bundle"
|
|
|
|
install_name_tool -add_rpath "${
|
|
|
|
lib.makeLibraryPath [
|
|
|
|
lasem
|
|
|
|
glib
|
|
|
|
cairo
|
|
|
|
]
|
|
|
|
}/lib" "$soPath"
|
|
|
|
install_name_tool -change @rpath/liblasem.dylib "${lib.getLib lasem}/lib/liblasem-0.4.dylib" "$soPath"
|
2019-07-04 12:39:29 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2018-10-23 16:09:43 +02:00
|
|
|
magic = attrs: {
|
|
|
|
buildInputs = [ file ];
|
|
|
|
postInstall = ''
|
|
|
|
installPath=$(cat $out/nix-support/gem-meta/install-path)
|
|
|
|
sed -e 's@ENV\["MAGIC_LIB"\] ||@ENV\["MAGIC_LIB"\] || "${file}/lib/libmagic.so" ||@' -i $installPath/lib/magic/api.rb
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-02-23 21:17:31 +11:00
|
|
|
maxmind_geoip2 = attrs: {
|
|
|
|
buildFlags = [
|
|
|
|
"--with-maxminddb-lib=${libmaxminddb}/lib"
|
|
|
|
"--with-maxminddb-include=${libmaxminddb}/include"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2018-11-09 09:41:49 +00:00
|
|
|
metasploit-framework = attrs: {
|
|
|
|
preInstall = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2016-11-03 17:19:25 -07:00
|
|
|
mysql = attrs: {
|
2019-09-22 09:38:09 +02:00
|
|
|
buildInputs = [
|
|
|
|
libmysqlclient
|
|
|
|
zlib
|
|
|
|
openssl
|
|
|
|
];
|
2016-11-03 17:19:25 -07:00
|
|
|
};
|
2016-01-25 10:22:00 +00:00
|
|
|
|
2015-01-25 16:01:48 -05:00
|
|
|
mysql2 = attrs: {
|
2019-09-22 09:38:09 +02:00
|
|
|
buildInputs = [
|
|
|
|
libmysqlclient
|
|
|
|
zlib
|
|
|
|
openssl
|
|
|
|
];
|
2015-01-25 16:01:48 -05:00
|
|
|
};
|
|
|
|
|
2015-01-21 20:33:19 -05:00
|
|
|
ncursesw = attrs: {
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
buildFlags = [
|
2015-10-05 20:32:54 +02:00
|
|
|
"--with-cflags=-I${ncurses.dev}/include"
|
2016-02-01 11:16:50 -06:00
|
|
|
"--with-ldflags=-L${ncurses.out}/lib"
|
2015-01-21 20:33:19 -05:00
|
|
|
];
|
2014-10-28 04:16:14 +00:00
|
|
|
};
|
2014-08-31 19:32:34 +02:00
|
|
|
|
2024-05-13 11:11:15 +00:00
|
|
|
nokogiri =
|
|
|
|
attrs:
|
|
|
|
(
|
|
|
|
{
|
2014-10-28 04:16:14 +00:00
|
|
|
buildFlags =
|
|
|
|
[
|
|
|
|
"--use-system-libraries"
|
2021-01-09 04:20:00 +00:00
|
|
|
"--with-zlib-lib=${zlib.out}/lib"
|
|
|
|
"--with-zlib-include=${zlib.dev}/include"
|
2015-10-05 13:23:01 +02:00
|
|
|
"--with-xml2-lib=${libxml2.out}/lib"
|
|
|
|
"--with-xml2-include=${libxml2.dev}/include/libxml2"
|
|
|
|
"--with-xslt-lib=${libxslt.out}/lib"
|
|
|
|
"--with-xslt-include=${libxslt.dev}/include"
|
|
|
|
"--with-exslt-lib=${libxslt.out}/lib"
|
|
|
|
"--with-exslt-include=${libxslt.dev}/include"
|
2021-11-04 16:56:28 +09:00
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
"--with-iconv-dir=${libiconv}"
|
|
|
|
"--with-opt-include=${libiconv}/include"
|
|
|
|
];
|
2024-05-13 11:11:15 +00:00
|
|
|
}
|
|
|
|
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
|
|
|
|
buildInputs = [ libxml2 ];
|
2025-04-01 20:10:43 +02:00
|
|
|
|
2024-06-21 15:16:38 +10:00
|
|
|
# libxml 2.12 upgrade requires these fixes
|
|
|
|
# https://github.com/sparklemotion/nokogiri/pull/3032
|
|
|
|
# which don't trivially apply to older versions
|
|
|
|
meta.broken =
|
|
|
|
(lib.versionOlder attrs.version "1.16.0") && (lib.versionAtLeast libxml2.version "2.12");
|
2024-05-13 11:11:15 +00:00
|
|
|
}
|
|
|
|
);
|
2014-10-29 01:16:02 +00:00
|
|
|
|
2021-02-12 15:09:21 +00:00
|
|
|
openssl = attrs: {
|
2022-07-04 18:30:48 +02:00
|
|
|
# https://github.com/ruby/openssl/issues/369
|
2023-05-21 15:40:53 +02:00
|
|
|
buildInputs = [ (if (lib.versionAtLeast attrs.version "3.0.0") then openssl else openssl_1_1) ];
|
2021-02-12 15:09:21 +00:00
|
|
|
};
|
|
|
|
|
2019-04-07 15:09:15 +02:00
|
|
|
opus-ruby = attrs: {
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace lib/opus-ruby.rb \
|
|
|
|
--replace "ffi_lib 'opus'" \
|
|
|
|
"ffi_lib '${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2019-02-06 23:51:28 +01:00
|
|
|
ovirt-engine-sdk = attrs: {
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
libxml2
|
|
|
|
];
|
2025-04-05 07:39:37 +11:00
|
|
|
# https://github.com/oVirt/ovirt-engine-sdk-ruby/issues/13
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
|
|
"-Wno-error=implicit-function-declaration"
|
|
|
|
"-Wno-error=incompatible-pointer-types"
|
|
|
|
"-Wno-int-conversion"
|
|
|
|
];
|
2023-05-20 21:40:22 +10:00
|
|
|
dontBuild = false;
|
2024-11-17 04:02:57 +09:00
|
|
|
meta.broken = stdenv.hostPlatform.isDarwin; # At least until releasing https://github.com/oVirt/ovirt-engine-sdk-ruby/pull/17
|
2019-02-06 23:51:28 +01:00
|
|
|
};
|
|
|
|
|
2017-05-18 09:47:45 +09:00
|
|
|
pango = attrs: {
|
2019-05-18 17:45:38 +00:00
|
|
|
nativeBuildInputs = [
|
2020-12-31 14:48:55 +07:00
|
|
|
pkg-config
|
2021-04-18 02:17:13 +09:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
|
2024-10-06 10:33:37 +08:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
libdatrie
|
|
|
|
libthai
|
|
|
|
fribidi
|
|
|
|
harfbuzz
|
|
|
|
libsysprof-capture
|
|
|
|
pcre2
|
|
|
|
xorg.libpthreadstubs
|
|
|
|
xorg.libXdmcp
|
|
|
|
]
|
2021-04-18 02:17:13 +09:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
libselinux
|
|
|
|
libsepol
|
|
|
|
util-linux
|
2024-10-06 10:33:37 +08:00
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook3
|
2025-04-01 20:10:43 +02:00
|
|
|
];
|
2017-05-18 09:47:45 +09:00
|
|
|
};
|
|
|
|
|
ruby: new bundler infrastructure
This improves our Bundler integration (i.e. `bundlerEnv`).
Before describing the implementation differences, I'd like to point a
breaking change: buildRubyGem now expects `gemName` and `version` as
arguments, rather than a `name` attribute in the form of
"<gem-name>-<version>".
Now for the differences in implementation.
The previous implementation installed all gems at once in a single
derivation. This was made possible by using a set of monkey-patches to
prevent Bundler from downloading gems impurely, and to help Bundler
find and activate all required gems prior to installation. This had
several downsides:
* The patches were really hard to understand, and required subtle
interaction with the rest of the build environment.
* A single install failure would cause the entire derivation to fail.
The new implementation takes a different approach: we install gems into
separate derivations, and then present Bundler with a symlink forest
thereof. This has a couple benefits over the existing approach:
* Fewer patches are required, with less interplay with the rest of the
build environment.
* Changes to one gem no longer cause a rebuild of the entire dependency
graph.
* Builds take 20% less time (using gitlab as a reference).
It's unfortunate that we still have to muck with Bundler's internals,
though it's unavoidable with the way that Bundler is currently designed.
There are a number improvements that could be made in Bundler that would
simplify our packaging story:
* Bundler requires all installed gems reside within the same prefix
(GEM_HOME), unlike RubyGems which allows for multiple prefixes to
be specified through GEM_PATH. It would be ideal if Bundler allowed
for packages to be installed and sourced from multiple prefixes.
* Bundler installs git sources very differently from how RubyGems
installs gem packages, and, unlike RubyGems, it doesn't provide a
public interface (CLI or programmatic) to guide the installation of a
single gem. We are presented with the options of either
reimplementing a considerable portion Bundler, or patch and use parts
of its internals; I choose the latter. Ideally, there would be a way
to install gems from git sources in a manner similar to how we drive
`gem` to install gem packages.
* When a bundled program is executed (via `bundle exec` or a
binstub that does `require 'bundler/setup'`), the setup process reads
the Gemfile.lock, activates the dependencies, re-serializes the lock
file it read earlier, and then attempts to overwrite the Gemfile.lock
if the contents aren't bit-identical. I think the reasoning is that
by merely running an application with a newer version of Bundler, you'll
automatically keep the Gemfile.lock up-to-date with any changes in the
format. Unfortunately, that doesn't play well with any form of
packaging, because bundler will immediately cause the application to
abort when it attempts to write to the read-only Gemfile.lock in the
store. We work around this by normalizing the Gemfile.lock with the
version of Bundler that we'll use at runtime before we copy it into
the store. This feels fragile, but it's the best we can do without
changes upstream, or resorting to more delicate hacks.
With all of the challenges in using Bundler, one might wonder why we
can't just cut Bundler out of the picture and use RubyGems. After all,
Nix provides most of the isolation that Bundler is used for anyway.
The problem, however, is that almost every Rails application calls
`Bundler::require` at startup (by way of the default project templates).
Because bundler will then, by default, `require` each gem listed in the
Gemfile, Rails applications are almost always written such that none of
the source files explicitly require their dependencies. That leaves us
with two options: support and use Bundler, or maintain massive patches
for every Rails application that we package.
Closes #8612
2015-11-14 21:17:29 -05:00
|
|
|
patron = attrs: {
|
|
|
|
buildInputs = [ curl ];
|
|
|
|
};
|
|
|
|
|
2017-05-14 22:07:26 +01:00
|
|
|
pcaprub = attrs: {
|
|
|
|
buildInputs = [ libpcap ];
|
|
|
|
};
|
|
|
|
|
2014-10-29 01:16:02 +00:00
|
|
|
pg = attrs: {
|
2023-06-15 05:50:06 +03:00
|
|
|
# Force pkg-config lookup for libpq.
|
|
|
|
# See https://github.com/ged/ruby-pg/blob/6629dec6656f7ca27619e4675b45225d9e422112/ext/extconf.rb#L34-L55
|
|
|
|
#
|
postgresql: replace pg_config with custom script
By replacing upstream's pg_config binary with a shell script, we:
- gain the ability to run pg_config easily when cross-compiling,
- can remove the fake pg_config in the default output,
- can remove the pg_config wrapper script dealing with special cases.
Some 20 years ago, pg_config *was* a shell script upstream, too. It was
changed to a binary, when it was made "relocatable", so it would return
paths depending on the location of the "postgres" binary. However, this
is exactly the thing that just hurts us in nixpkgs - we don't want those
paths to change, we want them to always point at the right outputs. By
writing the script ourselves, this becomes a lot less painful.
This approach means more lines of codes, but all of them are dead simple
and we have a lot less complexity overall.
Additionally, pg_config is now made a separate derivation, only exposed
as "postgresql.pg_config". This has the nice side-effect, that all users
of postgresql and libpq in nixpkgs must be very *explicit* about their
dependency on pg_config. This gives a lot more visibility into the state
of affairs regarding pkg-config support for libpq, which ultimately is
the much better solution.
2025-03-10 19:35:50 +01:00
|
|
|
# Note that setting --with-pg-config=${postgresql.pg_config}/bin/pg_config would add
|
2023-06-15 05:50:06 +03:00
|
|
|
# an unnecessary reference to the entire postgresql package.
|
|
|
|
buildFlags = [ "--with-pg-config=ignore" ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2024-11-23 23:36:23 +01:00
|
|
|
buildInputs = [ libpq ];
|
2014-10-29 01:16:02 +00:00
|
|
|
};
|
|
|
|
|
2025-03-12 19:08:15 +01:00
|
|
|
rszr = attrs: {
|
|
|
|
buildInputs = [
|
|
|
|
imlib2
|
|
|
|
imlib2.dev
|
|
|
|
];
|
|
|
|
buildFlags = [ "--without-imlib2-config" ];
|
|
|
|
};
|
|
|
|
|
2023-01-28 17:38:32 -05:00
|
|
|
psych = attrs: {
|
|
|
|
buildInputs = [ libyaml ];
|
|
|
|
};
|
|
|
|
|
ruby: new bundler infrastructure
This improves our Bundler integration (i.e. `bundlerEnv`).
Before describing the implementation differences, I'd like to point a
breaking change: buildRubyGem now expects `gemName` and `version` as
arguments, rather than a `name` attribute in the form of
"<gem-name>-<version>".
Now for the differences in implementation.
The previous implementation installed all gems at once in a single
derivation. This was made possible by using a set of monkey-patches to
prevent Bundler from downloading gems impurely, and to help Bundler
find and activate all required gems prior to installation. This had
several downsides:
* The patches were really hard to understand, and required subtle
interaction with the rest of the build environment.
* A single install failure would cause the entire derivation to fail.
The new implementation takes a different approach: we install gems into
separate derivations, and then present Bundler with a symlink forest
thereof. This has a couple benefits over the existing approach:
* Fewer patches are required, with less interplay with the rest of the
build environment.
* Changes to one gem no longer cause a rebuild of the entire dependency
graph.
* Builds take 20% less time (using gitlab as a reference).
It's unfortunate that we still have to muck with Bundler's internals,
though it's unavoidable with the way that Bundler is currently designed.
There are a number improvements that could be made in Bundler that would
simplify our packaging story:
* Bundler requires all installed gems reside within the same prefix
(GEM_HOME), unlike RubyGems which allows for multiple prefixes to
be specified through GEM_PATH. It would be ideal if Bundler allowed
for packages to be installed and sourced from multiple prefixes.
* Bundler installs git sources very differently from how RubyGems
installs gem packages, and, unlike RubyGems, it doesn't provide a
public interface (CLI or programmatic) to guide the installation of a
single gem. We are presented with the options of either
reimplementing a considerable portion Bundler, or patch and use parts
of its internals; I choose the latter. Ideally, there would be a way
to install gems from git sources in a manner similar to how we drive
`gem` to install gem packages.
* When a bundled program is executed (via `bundle exec` or a
binstub that does `require 'bundler/setup'`), the setup process reads
the Gemfile.lock, activates the dependencies, re-serializes the lock
file it read earlier, and then attempts to overwrite the Gemfile.lock
if the contents aren't bit-identical. I think the reasoning is that
by merely running an application with a newer version of Bundler, you'll
automatically keep the Gemfile.lock up-to-date with any changes in the
format. Unfortunately, that doesn't play well with any form of
packaging, because bundler will immediately cause the application to
abort when it attempts to write to the read-only Gemfile.lock in the
store. We work around this by normalizing the Gemfile.lock with the
version of Bundler that we'll use at runtime before we copy it into
the store. This feels fragile, but it's the best we can do without
changes upstream, or resorting to more delicate hacks.
With all of the challenges in using Bundler, one might wonder why we
can't just cut Bundler out of the picture and use RubyGems. After all,
Nix provides most of the isolation that Bundler is used for anyway.
The problem, however, is that almost every Rails application calls
`Bundler::require` at startup (by way of the default project templates).
Because bundler will then, by default, `require` each gem listed in the
Gemfile, Rails applications are almost always written such that none of
the source files explicitly require their dependencies. That leaves us
with two options: support and use Bundler, or maintain massive patches
for every Rails application that we package.
Closes #8612
2015-11-14 21:17:29 -05:00
|
|
|
puma = attrs: {
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
};
|
|
|
|
|
2022-10-09 17:24:53 +02:00
|
|
|
"pygments.rb" = attrs: {
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
};
|
|
|
|
|
2022-08-08 19:36:27 +00:00
|
|
|
rack = attrs: {
|
|
|
|
meta.mainProgram = "rackup";
|
|
|
|
};
|
|
|
|
|
|
|
|
railties = attrs: {
|
|
|
|
meta.mainProgram = "rails";
|
|
|
|
};
|
|
|
|
|
2017-05-12 08:52:18 -04:00
|
|
|
rainbow = attrs: {
|
|
|
|
buildInputs = [ rainbow_rake ];
|
|
|
|
};
|
|
|
|
|
2019-01-26 21:13:57 +00:00
|
|
|
rbczmq =
|
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
buildInputs = [
|
|
|
|
zeromq
|
2025-04-01 20:10:43 +02:00
|
|
|
czmq
|
|
|
|
];
|
2019-01-18 10:37:38 +03:00
|
|
|
buildFlags = [ "--with-system-libs" ];
|
|
|
|
};
|
2016-06-16 19:33:12 +02:00
|
|
|
|
2025-04-01 20:10:43 +02:00
|
|
|
rbnacl =
|
|
|
|
spec:
|
2019-01-18 10:37:38 +03:00
|
|
|
if lib.versionOlder spec.version "6.0.0" then
|
2025-04-01 20:10:43 +02:00
|
|
|
{
|
2019-01-31 10:12:42 +03:00
|
|
|
postInstall = ''
|
2019-01-18 10:37:38 +03:00
|
|
|
sed -i $(cat $out/nix-support/gem-meta/install-path)/lib/rbnacl.rb -e "2a \
|
|
|
|
RBNACL_LIBSODIUM_GEM_LIB_PATH = '${libsodium.out}/lib/libsodium${stdenv.hostPlatform.extensions.sharedLibrary}'
|
2025-04-01 20:10:43 +02:00
|
|
|
"
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
ruby: new bundler infrastructure
This improves our Bundler integration (i.e. `bundlerEnv`).
Before describing the implementation differences, I'd like to point a
breaking change: buildRubyGem now expects `gemName` and `version` as
arguments, rather than a `name` attribute in the form of
"<gem-name>-<version>".
Now for the differences in implementation.
The previous implementation installed all gems at once in a single
derivation. This was made possible by using a set of monkey-patches to
prevent Bundler from downloading gems impurely, and to help Bundler
find and activate all required gems prior to installation. This had
several downsides:
* The patches were really hard to understand, and required subtle
interaction with the rest of the build environment.
* A single install failure would cause the entire derivation to fail.
The new implementation takes a different approach: we install gems into
separate derivations, and then present Bundler with a symlink forest
thereof. This has a couple benefits over the existing approach:
* Fewer patches are required, with less interplay with the rest of the
build environment.
* Changes to one gem no longer cause a rebuild of the entire dependency
graph.
* Builds take 20% less time (using gitlab as a reference).
It's unfortunate that we still have to muck with Bundler's internals,
though it's unavoidable with the way that Bundler is currently designed.
There are a number improvements that could be made in Bundler that would
simplify our packaging story:
* Bundler requires all installed gems reside within the same prefix
(GEM_HOME), unlike RubyGems which allows for multiple prefixes to
be specified through GEM_PATH. It would be ideal if Bundler allowed
for packages to be installed and sourced from multiple prefixes.
* Bundler installs git sources very differently from how RubyGems
installs gem packages, and, unlike RubyGems, it doesn't provide a
public interface (CLI or programmatic) to guide the installation of a
single gem. We are presented with the options of either
reimplementing a considerable portion Bundler, or patch and use parts
of its internals; I choose the latter. Ideally, there would be a way
to install gems from git sources in a manner similar to how we drive
`gem` to install gem packages.
* When a bundled program is executed (via `bundle exec` or a
binstub that does `require 'bundler/setup'`), the setup process reads
the Gemfile.lock, activates the dependencies, re-serializes the lock
file it read earlier, and then attempts to overwrite the Gemfile.lock
if the contents aren't bit-identical. I think the reasoning is that
by merely running an application with a newer version of Bundler, you'll
automatically keep the Gemfile.lock up-to-date with any changes in the
format. Unfortunately, that doesn't play well with any form of
packaging, because bundler will immediately cause the application to
abort when it attempts to write to the read-only Gemfile.lock in the
store. We work around this by normalizing the Gemfile.lock with the
version of Bundler that we'll use at runtime before we copy it into
the store. This feels fragile, but it's the best we can do without
changes upstream, or resorting to more delicate hacks.
With all of the challenges in using Bundler, one might wonder why we
can't just cut Bundler out of the picture and use RubyGems. After all,
Nix provides most of the isolation that Bundler is used for anyway.
The problem, however, is that almost every Rails application calls
`Bundler::require` at startup (by way of the default project templates).
Because bundler will then, by default, `require` each gem listed in the
Gemfile, Rails applications are almost always written such that none of
the source files explicitly require their dependencies. That leaves us
with two options: support and use Bundler, or maintain massive patches
for every Rails application that we package.
Closes #8612
2015-11-14 21:17:29 -05:00
|
|
|
dontBuild = false;
|
2015-01-21 20:33:19 -05:00
|
|
|
postPatch = ''
|
2019-05-18 17:45:38 +00:00
|
|
|
substituteInPlace lib/rbnacl/sodium.rb \
|
|
|
|
--replace 'ffi_lib ["sodium"' \
|
|
|
|
'ffi_lib ["${libsodium}/lib/libsodium${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
2025-04-01 20:10:43 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2017-08-06 16:27:54 +02:00
|
|
|
re2 = attrs: {
|
|
|
|
buildInputs = [ re2 ];
|
2023-09-21 13:35:05 +02:00
|
|
|
buildFlags = [
|
|
|
|
"--enable-system-libraries"
|
|
|
|
];
|
2017-08-06 16:27:54 +02:00
|
|
|
};
|
|
|
|
|
2022-08-08 19:36:27 +00:00
|
|
|
rest-client = attrs: {
|
|
|
|
meta.mainProgram = "restclient";
|
|
|
|
};
|
|
|
|
|
2014-10-29 01:16:02 +00:00
|
|
|
rmagick = attrs: {
|
2020-12-31 14:48:55 +07:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 17:26:13 -04:00
|
|
|
buildInputs = [
|
|
|
|
imagemagick
|
|
|
|
which
|
|
|
|
];
|
2014-10-29 01:16:02 +00:00
|
|
|
};
|
|
|
|
|
2022-08-08 19:36:27 +00:00
|
|
|
rouge = attrs: {
|
|
|
|
meta.mainProgram = "rougify";
|
|
|
|
};
|
|
|
|
|
2019-05-02 02:37:35 +02:00
|
|
|
rpam2 = attrs: {
|
|
|
|
buildInputs = [ linux-pam ];
|
|
|
|
};
|
|
|
|
|
2022-08-08 19:36:27 +00:00
|
|
|
rspec-core = attrs: {
|
|
|
|
meta.mainProgram = "rspec";
|
|
|
|
};
|
|
|
|
|
2018-12-17 09:36:30 +11:00
|
|
|
ruby-libvirt = attrs: {
|
2022-09-25 05:49:25 +03:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ libvirt ];
|
2018-12-17 09:36:30 +11:00
|
|
|
buildFlags = [
|
|
|
|
"--with-libvirt-include=${libvirt}/include"
|
|
|
|
"--with-libvirt-lib=${libvirt}/lib"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2016-12-18 19:27:48 +01:00
|
|
|
ruby-lxc = attrs: {
|
|
|
|
buildInputs = [ lxc ];
|
|
|
|
};
|
|
|
|
|
2015-10-16 04:20:38 +05:30
|
|
|
ruby-terminfo = attrs: {
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
buildFlags = [
|
|
|
|
"--with-cflags=-I${ncurses.dev}/include"
|
|
|
|
"--with-ldflags=-L${ncurses.out}/lib"
|
|
|
|
];
|
2023-05-20 16:58:39 +10:00
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace extconf.rb --replace 'rubyio.h' 'ruby/io.h'
|
|
|
|
substituteInPlace terminfo.c \
|
|
|
|
--replace 'rubyio.h' 'ruby/io.h' \
|
|
|
|
--replace 'rb_cData' 'rb_cObject'
|
|
|
|
'';
|
2015-10-16 04:20:38 +05:30
|
|
|
};
|
2019-01-31 10:12:42 +03:00
|
|
|
|
|
|
|
ruby-vips = attrs: {
|
|
|
|
postInstall = ''
|
|
|
|
cd "$(cat $out/nix-support/gem-meta/install-path)"
|
|
|
|
|
|
|
|
substituteInPlace lib/vips.rb \
|
2021-05-21 04:20:00 +00:00
|
|
|
--replace 'library_name("vips", 42)' '"${lib.getLib vips}/lib/libvips${stdenv.hostPlatform.extensions.sharedLibrary}"' \
|
|
|
|
--replace 'library_name("glib-2.0", 0)' '"${glib.out}/lib/libglib-2.0${stdenv.hostPlatform.extensions.sharedLibrary}"' \
|
|
|
|
--replace 'library_name("gobject-2.0", 0)' '"${glib.out}/lib/libgobject-2.0${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
2019-01-31 10:12:42 +03:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2015-01-25 16:01:48 -05:00
|
|
|
rugged = attrs: {
|
2021-12-09 19:57:32 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv;
|
2020-12-31 14:48:55 +07:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
libssh2
|
|
|
|
zlib
|
|
|
|
];
|
2018-03-10 12:59:06 +01:00
|
|
|
dontUseCmakeConfigure = true;
|
2015-01-25 16:01:48 -05:00
|
|
|
};
|
|
|
|
|
2018-10-11 21:04:29 +02:00
|
|
|
sassc = attrs: {
|
|
|
|
nativeBuildInputs = [ rake ];
|
2019-05-18 17:45:38 +00:00
|
|
|
dontBuild = false;
|
2019-10-27 13:03:25 +00:00
|
|
|
SASS_LIBSASS_PATH = toString libsass;
|
2019-05-18 17:45:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace lib/sassc/native.rb \
|
|
|
|
--replace 'gem_root = spec.gem_dir' 'gem_root = File.join(__dir__, "../../")'
|
|
|
|
'';
|
2024-07-17 23:10:56 -04:00
|
|
|
};
|
2018-10-11 21:04:29 +02:00
|
|
|
|
2023-06-26 17:44:57 +12:00
|
|
|
sass-embedded = attrs: {
|
|
|
|
# Patch the Rakefile to use our dart-sass and not try to fetch anything.
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ext/sass/Rakefile \
|
|
|
|
--replace \'dart-sass/sass\' \'${dart-sass}/bin/sass\' \
|
|
|
|
--replace ' => %w[dart-sass]' ""
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
scrypt =
|
|
|
|
attrs:
|
|
|
|
lib.optionalAttrs stdenv.hostPlatform.isDarwin {
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e "s/-arch i386//" Rakefile ext/scrypt/Rakefile
|
|
|
|
'';
|
|
|
|
};
|
2016-11-03 01:24:10 +01:00
|
|
|
|
2019-01-25 20:18:33 -08:00
|
|
|
semian = attrs: {
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
};
|
|
|
|
|
2016-12-16 11:36:05 +01:00
|
|
|
sequel_pg = attrs: {
|
2024-11-23 23:36:23 +01:00
|
|
|
buildInputs = [ libpq ];
|
2016-12-16 11:36:05 +01:00
|
|
|
};
|
|
|
|
|
2016-09-21 14:29:12 +02:00
|
|
|
snappy = attrs: {
|
|
|
|
buildInputs = [ args.snappy ];
|
|
|
|
};
|
|
|
|
|
2022-09-11 12:49:42 +10:00
|
|
|
sqlite3 =
|
|
|
|
attrs:
|
|
|
|
if lib.versionAtLeast attrs.version "1.5.0" then
|
|
|
|
{
|
2022-09-12 09:29:31 +10:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ sqlite ];
|
2022-09-11 12:49:42 +10:00
|
|
|
buildFlags = [
|
|
|
|
"--enable-system-libraries"
|
|
|
|
];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-10-29 01:16:02 +00:00
|
|
|
buildFlags = [
|
2015-10-13 22:30:30 +02:00
|
|
|
"--with-sqlite3-include=${sqlite.dev}/include"
|
|
|
|
"--with-sqlite3-lib=${sqlite.out}/lib"
|
2014-10-28 04:16:14 +00:00
|
|
|
];
|
2024-12-31 09:33:50 +01:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
|
|
"-Wno-error=incompatible-pointer-types"
|
|
|
|
"-Wno-error=int-conversion"
|
|
|
|
];
|
2014-10-28 04:16:14 +00:00
|
|
|
};
|
2014-08-31 19:32:34 +02:00
|
|
|
|
2017-05-14 22:13:55 +01:00
|
|
|
rb-readline = attrs: {
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace lib/rbreadline.rb \
|
2019-12-09 19:07:19 -05:00
|
|
|
--replace 'infocmp' '${ncurses}/bin/infocmp'
|
2017-05-14 22:13:55 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2019-02-24 17:58:53 +00:00
|
|
|
taglib-ruby = attrs: {
|
2025-04-03 12:49:10 -04:00
|
|
|
buildInputs = [ taglib ];
|
2019-02-24 17:58:53 +00:00
|
|
|
};
|
|
|
|
|
2015-10-21 19:48:56 +02:00
|
|
|
timfel-krb5-auth = attrs: {
|
2021-03-14 17:11:48 +01:00
|
|
|
buildInputs = [ libkrb5 ];
|
2015-10-21 19:48:56 +02:00
|
|
|
};
|
|
|
|
|
2018-06-27 03:56:18 -07:00
|
|
|
tiny_tds = attrs: {
|
2020-12-31 14:48:55 +07:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
openssl
|
|
|
|
];
|
2019-05-18 17:45:38 +00:00
|
|
|
buildInputs = [ freetds ];
|
2018-06-27 03:56:18 -07:00
|
|
|
};
|
|
|
|
|
2022-08-08 19:36:27 +00:00
|
|
|
treetop = attrs: {
|
|
|
|
meta.mainProgram = "tt";
|
|
|
|
};
|
|
|
|
|
2016-06-16 11:43:21 +02:00
|
|
|
typhoeus = attrs: {
|
|
|
|
buildInputs = [ curl ];
|
|
|
|
};
|
|
|
|
|
2017-04-06 16:14:45 +02:00
|
|
|
tzinfo =
|
|
|
|
attrs:
|
|
|
|
lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") {
|
ruby: new bundler infrastructure
This improves our Bundler integration (i.e. `bundlerEnv`).
Before describing the implementation differences, I'd like to point a
breaking change: buildRubyGem now expects `gemName` and `version` as
arguments, rather than a `name` attribute in the form of
"<gem-name>-<version>".
Now for the differences in implementation.
The previous implementation installed all gems at once in a single
derivation. This was made possible by using a set of monkey-patches to
prevent Bundler from downloading gems impurely, and to help Bundler
find and activate all required gems prior to installation. This had
several downsides:
* The patches were really hard to understand, and required subtle
interaction with the rest of the build environment.
* A single install failure would cause the entire derivation to fail.
The new implementation takes a different approach: we install gems into
separate derivations, and then present Bundler with a symlink forest
thereof. This has a couple benefits over the existing approach:
* Fewer patches are required, with less interplay with the rest of the
build environment.
* Changes to one gem no longer cause a rebuild of the entire dependency
graph.
* Builds take 20% less time (using gitlab as a reference).
It's unfortunate that we still have to muck with Bundler's internals,
though it's unavoidable with the way that Bundler is currently designed.
There are a number improvements that could be made in Bundler that would
simplify our packaging story:
* Bundler requires all installed gems reside within the same prefix
(GEM_HOME), unlike RubyGems which allows for multiple prefixes to
be specified through GEM_PATH. It would be ideal if Bundler allowed
for packages to be installed and sourced from multiple prefixes.
* Bundler installs git sources very differently from how RubyGems
installs gem packages, and, unlike RubyGems, it doesn't provide a
public interface (CLI or programmatic) to guide the installation of a
single gem. We are presented with the options of either
reimplementing a considerable portion Bundler, or patch and use parts
of its internals; I choose the latter. Ideally, there would be a way
to install gems from git sources in a manner similar to how we drive
`gem` to install gem packages.
* When a bundled program is executed (via `bundle exec` or a
binstub that does `require 'bundler/setup'`), the setup process reads
the Gemfile.lock, activates the dependencies, re-serializes the lock
file it read earlier, and then attempts to overwrite the Gemfile.lock
if the contents aren't bit-identical. I think the reasoning is that
by merely running an application with a newer version of Bundler, you'll
automatically keep the Gemfile.lock up-to-date with any changes in the
format. Unfortunately, that doesn't play well with any form of
packaging, because bundler will immediately cause the application to
abort when it attempts to write to the read-only Gemfile.lock in the
store. We work around this by normalizing the Gemfile.lock with the
version of Bundler that we'll use at runtime before we copy it into
the store. This feels fragile, but it's the best we can do without
changes upstream, or resorting to more delicate hacks.
With all of the challenges in using Bundler, one might wonder why we
can't just cut Bundler out of the picture and use RubyGems. After all,
Nix provides most of the isolation that Bundler is used for anyway.
The problem, however, is that almost every Rails application calls
`Bundler::require` at startup (by way of the default project templates).
Because bundler will then, by default, `require` each gem listed in the
Gemfile, Rails applications are almost always written such that none of
the source files explicitly require their dependencies. That leaves us
with two options: support and use Bundler, or maintain massive patches
for every Rails application that we package.
Closes #8612
2015-11-14 21:17:29 -05:00
|
|
|
dontBuild = false;
|
2019-01-29 20:30:56 +00:00
|
|
|
postPatch =
|
|
|
|
let
|
|
|
|
path =
|
|
|
|
if lib.versionAtLeast attrs.version "2.0" then
|
|
|
|
"lib/tzinfo/data_sources/zoneinfo_data_source.rb"
|
|
|
|
else
|
|
|
|
"lib/tzinfo/zoneinfo_data_source.rb";
|
|
|
|
in
|
|
|
|
''
|
|
|
|
substituteInPlace ${path} \
|
|
|
|
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
|
|
|
|
'';
|
2015-01-24 17:59:01 -05:00
|
|
|
};
|
2017-03-06 20:23:02 +01:00
|
|
|
|
2016-11-21 13:41:05 +01:00
|
|
|
uuid4r = attrs: {
|
|
|
|
buildInputs = [
|
|
|
|
which
|
|
|
|
libossp_uuid
|
|
|
|
];
|
|
|
|
};
|
2015-01-24 17:59:01 -05:00
|
|
|
|
2022-08-08 19:36:27 +00:00
|
|
|
whois = attrs: {
|
|
|
|
meta.mainProgram = "whoisrb";
|
|
|
|
};
|
|
|
|
|
2015-01-21 20:33:19 -05:00
|
|
|
xapian-ruby = attrs: {
|
|
|
|
# use the system xapian
|
ruby: new bundler infrastructure
This improves our Bundler integration (i.e. `bundlerEnv`).
Before describing the implementation differences, I'd like to point a
breaking change: buildRubyGem now expects `gemName` and `version` as
arguments, rather than a `name` attribute in the form of
"<gem-name>-<version>".
Now for the differences in implementation.
The previous implementation installed all gems at once in a single
derivation. This was made possible by using a set of monkey-patches to
prevent Bundler from downloading gems impurely, and to help Bundler
find and activate all required gems prior to installation. This had
several downsides:
* The patches were really hard to understand, and required subtle
interaction with the rest of the build environment.
* A single install failure would cause the entire derivation to fail.
The new implementation takes a different approach: we install gems into
separate derivations, and then present Bundler with a symlink forest
thereof. This has a couple benefits over the existing approach:
* Fewer patches are required, with less interplay with the rest of the
build environment.
* Changes to one gem no longer cause a rebuild of the entire dependency
graph.
* Builds take 20% less time (using gitlab as a reference).
It's unfortunate that we still have to muck with Bundler's internals,
though it's unavoidable with the way that Bundler is currently designed.
There are a number improvements that could be made in Bundler that would
simplify our packaging story:
* Bundler requires all installed gems reside within the same prefix
(GEM_HOME), unlike RubyGems which allows for multiple prefixes to
be specified through GEM_PATH. It would be ideal if Bundler allowed
for packages to be installed and sourced from multiple prefixes.
* Bundler installs git sources very differently from how RubyGems
installs gem packages, and, unlike RubyGems, it doesn't provide a
public interface (CLI or programmatic) to guide the installation of a
single gem. We are presented with the options of either
reimplementing a considerable portion Bundler, or patch and use parts
of its internals; I choose the latter. Ideally, there would be a way
to install gems from git sources in a manner similar to how we drive
`gem` to install gem packages.
* When a bundled program is executed (via `bundle exec` or a
binstub that does `require 'bundler/setup'`), the setup process reads
the Gemfile.lock, activates the dependencies, re-serializes the lock
file it read earlier, and then attempts to overwrite the Gemfile.lock
if the contents aren't bit-identical. I think the reasoning is that
by merely running an application with a newer version of Bundler, you'll
automatically keep the Gemfile.lock up-to-date with any changes in the
format. Unfortunately, that doesn't play well with any form of
packaging, because bundler will immediately cause the application to
abort when it attempts to write to the read-only Gemfile.lock in the
store. We work around this by normalizing the Gemfile.lock with the
version of Bundler that we'll use at runtime before we copy it into
the store. This feels fragile, but it's the best we can do without
changes upstream, or resorting to more delicate hacks.
With all of the challenges in using Bundler, one might wonder why we
can't just cut Bundler out of the picture and use RubyGems. After all,
Nix provides most of the isolation that Bundler is used for anyway.
The problem, however, is that almost every Rails application calls
`Bundler::require` at startup (by way of the default project templates).
Because bundler will then, by default, `require` each gem listed in the
Gemfile, Rails applications are almost always written such that none of
the source files explicitly require their dependencies. That leaves us
with two options: support and use Bundler, or maintain massive patches
for every Rails application that we package.
Closes #8612
2015-11-14 21:17:29 -05:00
|
|
|
dontBuild = false;
|
2020-12-31 14:48:55 +07:00
|
|
|
nativeBuildInputs = [
|
|
|
|
rake
|
|
|
|
pkg-config
|
|
|
|
bundler
|
2019-05-18 17:45:38 +00:00
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
xapian
|
|
|
|
zlib
|
2025-04-01 20:10:43 +02:00
|
|
|
];
|
2015-01-21 20:33:19 -05:00
|
|
|
postPatch = ''
|
|
|
|
cp ${./xapian-Rakefile} Rakefile
|
|
|
|
'';
|
|
|
|
preInstall = ''
|
2019-05-18 17:45:38 +00:00
|
|
|
export XAPIAN_CONFIG=${xapian}/bin/xapian-config
|
2015-01-21 20:33:19 -05:00
|
|
|
'';
|
|
|
|
};
|
2016-04-17 22:36:40 +02:00
|
|
|
|
2019-05-08 17:41:13 +02:00
|
|
|
zlib = attrs: {
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
};
|
|
|
|
|
2019-05-08 17:40:53 +02:00
|
|
|
zookeeper = attrs: {
|
2021-04-18 02:17:13 +09:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools ];
|
2019-05-08 17:40:53 +02:00
|
|
|
};
|
2014-10-28 04:16:14 +00:00
|
|
|
}
|