Not quite done - something fishy about the name attr

This commit is contained in:
Judson 2017-06-10 17:38:49 -07:00
parent 78cb9163a6
commit fc302bc07f
No known key found for this signature in database
GPG Key ID: 1817B08954BF0B7D
2 changed files with 11 additions and 8 deletions

View File

@ -1,4 +1,4 @@
{ stdenv }@defs:
{ lib, stdenv, callPackage, runCommand, ruby }@defs:
{
name
@ -8,25 +8,26 @@
, exes ? []
# Scripts are ruby programs depend on gems in the Gemfile (e.g. scripts/rails)
, scripts ? []
, ruby ? defs.ruby
, gemfile ? null
, lockfile ? null
, gemset ? null
, preferLocalBuild ? false
, allowSubstitutes ? false
, meta ? {}
, postBuild
, postBuild ? ""
}@args:
let
basicEnv = (callPackage ../bundled-common {}) args;
args = removeAttrs args_ [ "name" "postBuild" ]
cmdArgs = removeAttrs args [ "name" "postBuild" ]
// { inherit preferLocalBuild allowSubstitutes; }; # pass the defaults
in
runCommand name args ''
mkdir -p ${out}/bin; cd $out;
runCommand name cmdArgs ''
mkdir -p $out/bin; cd $out;
${(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_PATH ${basicEnv}/${ruby.gemPath} "+
"--set BUNDLE_FROZEN 1 "+

View File

@ -1,9 +1,11 @@
{ rubyTool }:
{ lib, rubyTool }:
rubyTool {
name = "corundum-0.6.2";
gemdir = ./.;
meta = {
exes = [ "corundum-skel" ];
meta = with lib; {
description = "Tool and libraries for maintaining Ruby gems.";
homepage = http://sass-lang.com/;
license = licenses.mit;