ruby: add git fetcher

This commit is contained in:
Charles Strahan 2014-12-29 00:48:01 -05:00
parent 145733c479
commit 74a4f01fe4

View File

@ -1,4 +1,4 @@
{ ruby, lib, callPackage, gemFixes, fetchurl, buildRubyGem }@defs:
{ ruby, lib, callPackage, gemFixes, fetchurl, fetchgit, buildRubyGem }@defs:
# This function builds a set of gems. You first convert your Gemfile to an attrset
# called a "gemset", and then use this function to build the gemset.
@ -36,6 +36,10 @@ let
url = "${attrs.src.source or "https://rubygems.org"}/downloads/${attrs.name}-${attrs.version}.gem";
inherit (attrs.src) sha256;
};
fetchers.git = attrs: fetchgit {
inherit (attrs.src) url rev sha256;
leaveDotGit = true;
};
instantiate = (attrs:
let