Not quite done - something fishy about the name attr
This commit is contained in:
parent
78cb9163a6
commit
fc302bc07f
@ -1,4 +1,4 @@
|
|||||||
{ stdenv }@defs:
|
{ lib, stdenv, callPackage, runCommand, ruby }@defs:
|
||||||
|
|
||||||
{
|
{
|
||||||
name
|
name
|
||||||
@ -8,25 +8,26 @@
|
|||||||
, exes ? []
|
, exes ? []
|
||||||
# Scripts are ruby programs depend on gems in the Gemfile (e.g. scripts/rails)
|
# Scripts are ruby programs depend on gems in the Gemfile (e.g. scripts/rails)
|
||||||
, scripts ? []
|
, scripts ? []
|
||||||
|
, ruby ? defs.ruby
|
||||||
, gemfile ? null
|
, gemfile ? null
|
||||||
, lockfile ? null
|
, lockfile ? null
|
||||||
, gemset ? null
|
, gemset ? null
|
||||||
, preferLocalBuild ? false
|
, preferLocalBuild ? false
|
||||||
, allowSubstitutes ? false
|
, allowSubstitutes ? false
|
||||||
, meta ? {}
|
, meta ? {}
|
||||||
, postBuild
|
, postBuild ? ""
|
||||||
}@args:
|
}@args:
|
||||||
|
|
||||||
let
|
let
|
||||||
basicEnv = (callPackage ../bundled-common {}) args;
|
basicEnv = (callPackage ../bundled-common {}) args;
|
||||||
|
|
||||||
args = removeAttrs args_ [ "name" "postBuild" ]
|
cmdArgs = removeAttrs args [ "name" "postBuild" ]
|
||||||
// { inherit preferLocalBuild allowSubstitutes; }; # pass the defaults
|
// { inherit preferLocalBuild allowSubstitutes; }; # pass the defaults
|
||||||
in
|
in
|
||||||
runCommand name args ''
|
runCommand name cmdArgs ''
|
||||||
mkdir -p ${out}/bin; cd $out;
|
mkdir -p $out/bin; cd $out;
|
||||||
${(lib.concatMapStrings (x: "ln -s '${basicEnv}/bin/${x}' '${x}';\n") exes)}
|
${(lib.concatMapStrings (x: "ln -s '${basicEnv}/bin/${x}' '${x}';\n") exes)}
|
||||||
${(lib.concatMapStrings (s: "makeWrapper ${out}/bin/$(basename ${s}) $srcdir/${s} " +
|
${(lib.concatMapStrings (s: "makeWrapper $out/bin/$(basename ${s}) $srcdir/${s} " +
|
||||||
"--set BUNDLE_GEMFILE ${basicEnv.confFiles}/Gemfile "+
|
"--set BUNDLE_GEMFILE ${basicEnv.confFiles}/Gemfile "+
|
||||||
"--set BUNDLE_PATH ${basicEnv}/${ruby.gemPath} "+
|
"--set BUNDLE_PATH ${basicEnv}/${ruby.gemPath} "+
|
||||||
"--set BUNDLE_FROZEN 1 "+
|
"--set BUNDLE_FROZEN 1 "+
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
{ rubyTool }:
|
{ lib, rubyTool }:
|
||||||
|
|
||||||
rubyTool {
|
rubyTool {
|
||||||
name = "corundum-0.6.2";
|
name = "corundum-0.6.2";
|
||||||
gemdir = ./.;
|
gemdir = ./.;
|
||||||
meta = {
|
exes = [ "corundum-skel" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "Tool and libraries for maintaining Ruby gems.";
|
description = "Tool and libraries for maintaining Ruby gems.";
|
||||||
homepage = http://sass-lang.com/;
|
homepage = http://sass-lang.com/;
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
Loading…
Reference in New Issue
Block a user