1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 11:11:03 -04:00
Commit graph

732 commits

Author SHA1 Message Date
Eelco Dolstra 2382a729e0 * Don't need extern "C". 2006-09-04 21:50:39 +00:00
Eelco Dolstra e3ce954582 * Compile the lexer as C++ code. Remove all the redundant C/C++
marshalling code.
2006-09-04 21:36:15 +00:00
Eelco Dolstra 75068e7d75 * Use a proper namespace.
* Optimise header file usage a bit.
* Compile the parser as C++.
2006-09-04 21:06:23 +00:00
Eelco Dolstra aab8812732 * Store the Nix libraries in ${libdir}/nix instead of ${libdir}. 2006-09-04 15:12:24 +00:00
Eelco Dolstra 7974aae81c * New primop: builtins.toFile, which writes a string into the store
and returns its path.  This can be used to (for instance) write
  builders inside a Nix expression, e.g.,

  stdenv.mkDerivation {
    builder = "
      source $stdenv/setup
      ...
    ";
    ...
  }
2006-09-01 12:07:31 +00:00
Eelco Dolstra de90fdf908 * Allow "$" in strings as long as they are not followed by "{". (Too
bad flex doesn't have lexical restrictions, the current solution
  isn't quite right...)
2006-09-01 12:04:06 +00:00
Eelco Dolstra c25f688e23 * Doh! Doh! Doh! 2006-08-31 15:38:43 +00:00
Eelco Dolstra 354d58b3d7 * Better error checking. 2006-08-31 11:40:39 +00:00
Eelco Dolstra f93f7b75be * Okay, that's a bit harder than expected. 2006-08-30 13:10:04 +00:00
Eelco Dolstra 3151bdea55 * Uninitialised variable. 2006-08-30 12:00:27 +00:00
Eelco Dolstra 547b119f25 * Support singleton values and nested lists again in `args', but print
a warning.
2006-08-29 15:40:49 +00:00
Eelco Dolstra 2132d9ddeb * Fix the ~ operator. 2006-08-29 15:29:38 +00:00
Eelco Dolstra 1ec9f55741 * In toString, deal with nested lists properly (i.e., flatten them). 2006-08-28 21:47:42 +00:00
Eelco Dolstra 1fca76870b * Removed processBinding, instead we now apply toString to all
derivation attributes to flatten them into strings.  This is
  possible since string can nowadays be wrapped in contexts that
  describe the derivations/sources referenced by the evaluation of the
  string.
2006-08-28 13:31:06 +00:00
Eelco Dolstra 8a6080eb14 * Refactoring. 2006-08-26 16:48:01 +00:00
Eelco Dolstra 4b66cebe7b * Remove those storePath attribute sets, we don't need 'em. 2006-08-25 17:09:55 +00:00
Eelco Dolstra 3e8dccf6ab * Escape newlines in XML attributes to prevent them from being
normalised away.
2006-08-24 15:02:39 +00:00
Eelco Dolstra 215ec2ddc6 * New primop __toXML (or builtins.toXML) to convert an expression to
an XML representation stored in a string.  This should be useful to
  pass structured information to builders.
2006-08-24 14:34:29 +00:00
Eelco Dolstra f793caf936 * Refactoring. 2006-08-24 14:16:55 +00:00
Eelco Dolstra da25d80152 * Strict evaluation and XML printing of lists. 2006-08-24 14:03:39 +00:00
Eelco Dolstra 943ab38a0d * Refactoring: move strictEval to libexpr. 2006-08-24 13:39:22 +00:00
Eelco Dolstra f41297fdce * Allow --arg in nix-env as well, example:
$ nix-env -qa --system-filter \* --arg system '"powerpc-darwin"'

  to override the system from the default value (__currentSystem in
  all-packages.nix).
2006-08-23 16:33:21 +00:00
Eelco Dolstra 9638f3f393 * Pass the autoArgs to findAlongAttrPath so that "nix-instantiate
foo.nix -A attr --arg name value" will work if (name, value) is
  needed in the evaluation leading up to "attr".
2006-08-23 16:20:14 +00:00
Eelco Dolstra b19cebc513 * Quotes. 2006-08-23 15:46:27 +00:00
Eelco Dolstra 38f18aa6d4 * New primop: abort "error message". 2006-08-23 15:46:00 +00:00
Eelco Dolstra 4a053bfdfd * A new primop `builtins', which returns an attribute set containing
all the primops.  This allows Nix expressions to test for new
  primops and take appropriate action if they're not available.  For
  instance, rather than calling a primop `foo' directly, they could
  say `if builtins ? foo then builtins.foo ... else ...'.
2006-08-23 14:39:11 +00:00
Eelco Dolstra 24e234a2fa * Print attributes in sorted order, rather than the arbitrary order
produced by ATermMap.  Necessary for testing.
* `--strict' should also work on stdin.
2006-08-17 08:53:08 +00:00
Eelco Dolstra 22ba63df16 * More XML output. `--strict' to strictly evaluate attribute sets and
so on.
* Removed `--print-args', it's subsumed by `--eval-only --xml'.
2006-08-16 21:59:53 +00:00
Eelco Dolstra 18e4ac0fc6 * `nix-instantiate --{eval|parse}-only --xml': print an XML
representation instead of an ATerm.
* Indent XML output.
2006-08-16 10:32:30 +00:00
Eelco Dolstra 2670642733 * Handle carriage returns. Fixes NIX-53. 2006-08-16 10:28:44 +00:00
Martin Bravenboer 3e5b68068b On cygwin, disable the check that the output is not group or world
writable. File permissions on Cygwin are rather complex, and in this
case this check introduced a problem with build jobs invoke from
outside of Cygwin (MSYS). It seemed almost impossible to fix the
permissions of the directory, so for now this safety check is disabled
on Cygwin.
2006-08-15 21:37:48 +00:00
Eelco Dolstra 7455fd8835 * Put the value in an attribute. 2006-08-14 14:24:18 +00:00
Eelco Dolstra 4250b641d8 * `nix-store --gc --print-dead': print the total size of the store
objects that would be freed.
2006-08-11 20:26:49 +00:00
Eelco Dolstra 92f7dfa5b7 * Don't assume that paths returned by the runtime root finder are
valid.
2006-08-11 20:15:20 +00:00
Eelco Dolstra d19b6521fc * New configuration setting `build-max-jobs' which sets the default
for the `-j' flag (i.e., the maximum number of jobs to execute in
  parallel).  Useful on multi-processor machines.
2006-08-10 20:19:13 +00:00
Eelco Dolstra f1aa71a92f * Fix the help message wrt --attr. 2006-08-09 15:12:34 +00:00
Eelco Dolstra a18d02e0b0 * Print a warning that the subpath operator (~) is deprecated. 2006-08-09 15:08:47 +00:00
Eelco Dolstra a0607be7f4 * Workaround for a bug (?) in GCC 2.95. 2006-08-07 19:48:38 +00:00
Eelco Dolstra 1854f84e83 * Fix a few warnings. 2006-08-04 17:07:13 +00:00
Eelco Dolstra dcff8cdb76 * Weird issue on Cygwin with the include file order. 2006-08-04 16:01:26 +00:00
Eelco Dolstra 339e6f0e1d * `nix-env -q --xml': show query result in XML format for easier
automated processing.
2006-08-03 15:52:09 +00:00
Eelco Dolstra 0e267e2625 * `nix-instantiate --print-args': produce XML output so that the
result can be used more easily by scripts.
2006-08-03 14:49:57 +00:00
Eelco Dolstra 4750f6c5ed * Simple class for writing XML files. 2006-08-03 13:21:21 +00:00
Eelco Dolstra 6ac237e242 * Show some progress. 2006-08-01 09:43:41 +00:00
Eelco Dolstra 4661282fde * `nix-instantiate ... --arg NAME VALUE': allow arguments to be passed
to functions from the command line.
* nix-build: started removing backticks.
2006-07-28 16:03:28 +00:00
Eelco Dolstra c11839d7b2 * `nix-instantiate --print-args': print out the valid values for
functions arguments that have a domain.
2006-07-28 14:01:29 +00:00
Eelco Dolstra ca2238cf81 * Refactoring: get the selection path stuff out of getDerivations()
and put it into a separate function findAlongAttrPath().
2006-07-26 15:05:15 +00:00
Eelco Dolstra 2317d8f671 * `nix-instantiate --print-args' prints out the arguments of a
top-level function.
2006-07-25 21:21:50 +00:00
Eelco Dolstra 0e6dc72a7a * Applied rbroek's patch from the branch at
https://svn.cs.uu.nl:12443/repos/trace/buildfarm-control/trunk/ext/nix/,
  with some modifications.  This allows `nix-env -qa' to show the
  attribute path that can be used to unambiguously install a package
  using `nix-env -i -A'.  Example:

    $ nix-env -f top-level/all-packages.nix -qaA subversion xorg-server
    subversionWithJava  subversion-1.2.3
    subversion          subversion-1.3.2
    subversion14        subversion-1.4.0pre-rc1
    xorg.xorgserver     xorg-server-1.1.0
2006-07-25 16:40:38 +00:00
Eelco Dolstra 5744dd5480 * Support the --attr / -A flag in nix-env as well. So now we can do,
e.g.,

  $ nix-env -i -A subversion xorg.xorgserver

  The main advantage over using symbolic names is that using attribute
  names is unambiguous and much, much faster.
2006-07-25 11:53:22 +00:00