forked from mirrors/nixpkgs
* Helper function `writeText' to write a plain text file to the Nix
store. * Helper function `cleanSource' to bring in a path as a source, filtering out all hidden Subversion directories. svn path=/nixpkgs/trunk/; revision=7334
This commit is contained in:
parent
e7304dcf48
commit
5a7b2515e1
|
@ -192,10 +192,23 @@ rec {
|
|||
|
||||
makeWrapper = ../build-support/make-wrapper/make-wrapper.sh;
|
||||
|
||||
# Run the shell command `buildCommand' to produce a store object
|
||||
# named `name'. The attributes in `env' are added to the
|
||||
# environment prior to running the command.
|
||||
runCommand = name: env: buildCommand: stdenvNew.mkDerivation ({
|
||||
inherit name buildCommand;
|
||||
} // env);
|
||||
|
||||
# Write a plain text file to the Nix store. (The advantage over
|
||||
# plain sources is that `text' can refer to the output paths of
|
||||
# derivations, e.g., "... ${somePkg}/bin/foo ...".
|
||||
writeText = name: text: runCommand name {inherit text;} "echo \"$text\" > $out";
|
||||
|
||||
# Bring in a path as a source, filtering out all hidden Subversion
|
||||
# directories. TODO: filter out backup files (*~) etc.
|
||||
cleanSource = builtins.filterSource
|
||||
(name: baseNameOf (toString name) != ".svn");
|
||||
|
||||
# !!! obsolete
|
||||
substitute = ../build-support/substitute/substitute.sh;
|
||||
|
||||
|
|
Loading…
Reference in a new issue