Eelco Dolstra
e4b0666f8e
* builtins.filterSource: pass the type of the file ("regular",
...
"directory", "symlink") as the second argument to the filter
predicate.
2007-01-15 08:54:51 +00:00
Eelco Dolstra
8659edc098
* Don't forget the .flags files.
2007-01-14 12:33:04 +00:00
Eelco Dolstra
e418976107
* Option --argstr for passing string arguments easily. (NIX-75)
2007-01-14 12:32:44 +00:00
Eelco Dolstra
f23dcdd603
* Canonicalise ASTs in `nix-instantiate --eval': remove position
...
info, sort attribute sets.
2007-01-13 16:17:07 +00:00
Eelco Dolstra
a3e6415ba8
* New primop builtins.filterSource, which can be used to filter files
...
from a source directory. All files for which a predicate function
returns true are copied to the store. Typical example is to leave
out the .svn directory:
stdenv.mkDerivation {
...
src = builtins.filterSource
(path: baseNameOf (toString path) != ".svn")
./source-dir;
# as opposed to
# src = ./source-dir;
}
This is important because the .svn directory influences the hash in
a rather unpredictable and variable way.
2006-12-12 23:05:01 +00:00
Eelco Dolstra
1a7e88bbd9
* New built-in function `builtins.attrNames' that returns the
...
names of the attributes in an attribute set.
2006-12-12 16:14:31 +00:00
Eelco Dolstra
626f8ee42f
* Clear NIX_REMOTE in the tests.
2006-12-02 14:33:39 +00:00
Eelco Dolstra
7a4497d98c
* Checks for allowedReferences and some other features.
...
* Use nix-build in a test.
2006-10-19 17:44:51 +00:00
Eelco Dolstra
dfc042a0c1
* Another test.
2006-10-17 11:16:02 +00:00
Eelco Dolstra
9e30694f98
* Fix the tests wrt the AST changes, i.e., Str(s) -> Str(s, []), and
...
the semantic changes.
2006-10-17 11:08:59 +00:00
Eelco Dolstra
7d4567f2cc
* Removed URIs from the evaluator (NIX-66). They are now just another
...
kind of notation for strings.
2006-10-11 21:59:33 +00:00
Eelco Dolstra
d20c3011a0
* toFile: added an additional argument to specify the store path
...
suffix, e.g., `builtins.toFile "builder.sh" "..."'.
* toFile: handle references to other files correctly.
2006-10-03 14:55:54 +00:00
Eelco Dolstra
ac19b333b3
* Finally, a real "let" syntax: `let x = ...; ... z = ...; in ...'.
2006-10-02 15:52:44 +00:00
Eelco Dolstra
0e705391db
* Primop `toPath' to convert a string to a path.
...
* Primop `pathExists' to check for path existence.
2006-09-24 18:23:32 +00:00
Eelco Dolstra
e47e0c2dbe
* Builtin function `getEnv' for getting environment variables.
2006-09-24 17:48:41 +00:00
Eelco Dolstra
df8873e14a
* lessThan primitive for integer comparison.
2006-09-24 15:21:48 +00:00
Eelco Dolstra
2ab4bc44c7
* Builtin function `add' to add integers.
...
* Put common test functions in tests/lang/lib.nix.
2006-09-22 15:29:21 +00:00
Eelco Dolstra
d315210612
* Added a builtin function `isList' to test whether a value is a list.
...
With this primitive, a list-flattening function can be implemented
(NIX-55, example is in tests/lang/eval-okay-flatten.nix).
2006-09-22 14:55:19 +00:00
Eelco Dolstra
c02a44183f
* Builtin functions head' and
tail' to return the head and tail of
...
list. Useful for lots of things, such as implementing a fold
function (see NIX-30, example is in tests/lang/eval-okay-list.nix).
2006-09-22 14:46:36 +00:00
Eelco Dolstra
8a1ab709a4
* New builtin functions builtins.{hasAttr, getAttr} to check for
...
attribute existence and to return an attribute from an attribute
set, respectively. Example: `hasAttr "foo" {foo = 1;}'. They
differ from the `?' and `.' operators in that the attribute name is
an arbitrary expression. (NIX-61)
2006-09-22 14:31:55 +00:00
Eelco Dolstra
0bd5eb71a0
* `nix-install-package --url': install from a URL (NIX-12).
...
* `nix-install-package --help' (NIX-9).
* `nix-install-package --non-interactive': don't prompt or pause.
* Tests for nix-install-package.
* Security fixes: filter the values obtained from the nixpkg.
2006-09-21 18:54:08 +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
c9586b6c3f
* Fix race condition in the test.
2006-09-01 12:02:39 +00:00
Eelco Dolstra
f93f7b75be
* Okay, that's a bit harder than expected.
2006-08-30 13:10:04 +00:00
Eelco Dolstra
dce1afdc67
* TDD: == should do a deep equality test, i.e., it should strictly
...
evaluate its arguments.
2006-08-30 12:25:27 +00:00
Eelco Dolstra
1f6616dabf
* Backwards compatibility test for ~.
2006-08-29 15:29:19 +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
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
93d9797eda
* Urgh (see NIX-56).
2006-08-22 09:34:38 +00:00
Eelco Dolstra
cc0505f033
* Distribute *.exp.xml.
2006-08-17 12:21:39 +00:00
Eelco Dolstra
4874fd2d9a
* Test for `nix-instantiate --eval-only --xml'.
2006-08-17 11:28:29 +00:00
Eelco Dolstra
fe101fa785
* Meh.
2006-08-16 10:29:43 +00:00
Eelco Dolstra
bfe19b3c37
* A test for NIX-53.
2006-08-16 10:23:02 +00:00
Eelco Dolstra
f4c5531d92
* New language feature: domain checks, which check whether a function
...
argument has a valid value, i.e., is in a certain domain. E.g.,
{ foo : [true false]
, bar : ["a" "b" "c"]
}: ...
This previously could be done using assertions, but domain checks
will allow the buildfarm to automatically extract the configuration
space from functions.
2006-07-24 16:35:34 +00:00
Eelco Dolstra
88acffa20a
* `touch' might not be in $PATH.
2006-07-24 16:19:08 +00:00
Eelco Dolstra
b545c669a0
* Tests for domain checks.
2006-07-24 15:50:29 +00:00
Eelco Dolstra
57751fdb55
* Refactoring to support domain checks.
2006-07-24 15:16:03 +00:00
Eelco Dolstra
9c3099d328
* Purify `make check'.
2006-07-21 13:21:43 +00:00
Eelco Dolstra
7adaa6d446
* Test for runtime root finding.
2006-07-21 12:46:54 +00:00
Eelco Dolstra
410760c5ab
* Doh.
2006-07-20 12:58:51 +00:00
Eelco Dolstra
c15f544356
* Call find-runtime-roots.pl from the garbage collector to prevent
...
running applications etc. from being garbage collected.
2006-07-20 12:17:25 +00:00
Eelco Dolstra
88e54153dc
* Add a precise test for hashDerivatioModulo.
2006-07-19 15:49:29 +00:00
Eelco Dolstra
2b4b0658fa
* This expression has an undefined variable which isn't detected, so
...
evaluation fails:
error: impossible: undefined variable `gcc'
2006-07-10 17:35:00 +00:00
Eelco Dolstra
d7f40357e3
* Skip this test on Cygwin, too slow (and doesn't test anything Cygwin-specific).
2006-06-16 13:27:36 +00:00
Eelco Dolstra
c7d9397fc9
* Handle $PATHs with spaces.
2006-05-29 21:53:58 +00:00
Eelco Dolstra
5cabd47394
* Allow function argument default values to refer to other arguments
...
of the function. Implements NIX-45.
2006-05-08 12:52:47 +00:00
Eelco Dolstra
ae55e79541
* More tests.
2006-05-02 11:20:55 +00:00
Eelco Dolstra
dca43ef795
* Tests for NIX-45.
2006-05-02 11:15:04 +00:00
Eelco Dolstra
0064599a27
* String interpolation. Expressions like
...
"--with-freetype2-library=" + freetype + "/lib"
can now be written as
"--with-freetype2-library=${freetype}/lib"
An arbitrary expression can be enclosed within ${...}, not just
identifiers.
* Escaping in string literals: \n, \r, \t interpreted as in C, any
other character following \ is interpreted as-is.
* Newlines are now allowed in string literals.
2006-05-01 14:01:47 +00:00
Eelco Dolstra
6cecad2be0
* Allow string concatenations involving derivations, e.g.,
...
configureFlags = "--with-freetype2-library="
+ freetype + "/lib";
2006-05-01 09:56:56 +00:00
Eelco Dolstra
03162f8f47
* Unless --with-bzip2 is specified, use a copy of bzip2 in the
...
externals directory. This is in particular useful because though
most systems have bzip2/bunzip2, they don't always have libbz2,
which we need for bsdiff/bspatch.
2006-04-25 10:45:53 +00:00
Eelco Dolstra
fdea084c36
* Allow `make check' to work in directories that have symlink
...
components.
2006-03-10 22:27:26 +00:00
Eelco Dolstra
37d1b1cafd
* `nix-env -qa --description' shows human-readable descriptions of
...
packages (provided that they have a `meta.description' attribute).
E.g.,
$ ./src/nix-env/nix-env -qa --description gcc
gcc-4.0.2 GNU Compiler Collection, 4.0.x (cross-compiler for sparc-linux)
gcc-4.0.2 GNU Compiler Collection, 4.0.x (cross-compiler for mips-linux)
gcc-4.0.2 GNU Compiler Collection, 4.0.x (cross-compiler for arm-linux)
gcc-4.0.2 GNU Compiler Collection, 4.0.x
2006-03-10 16:20:42 +00:00
Eelco Dolstra
a33fb2d287
* Oops.
2006-03-10 16:14:30 +00:00
Eelco Dolstra
4ada6db1fc
* `nix-env -q' now accepts arguments that allow specific derivations
...
to be queried, e.g., `nix-env -qa firefox'. This does require the
argument '*' to be passed if one wants information about all
derivations, so the old `nix-env -qa' now is `nix-env -qa "*"'.
2006-03-10 10:24:46 +00:00
Eelco Dolstra
78d84f5631
* Tests for fixed-output derivations (and attribute selection, incidentally).
2006-03-01 18:26:21 +00:00
Eelco Dolstra
2167bf6b72
* Tests to prevent a repeat of the parseHash32 debacle.
2006-03-01 18:11:41 +00:00
Eelco Dolstra
1bdceb421f
* Doh!
2006-03-01 16:52:55 +00:00
Eelco Dolstra
fa95f4be3f
* More test coverage.
2006-03-01 16:26:13 +00:00
Eelco Dolstra
80b5c71684
* Doh!
2006-03-01 16:03:32 +00:00
Eelco Dolstra
e3daee919d
* Test `nix-store -q --binding'.
2006-03-01 15:46:22 +00:00
Eelco Dolstra
ea9c35d3cc
* Test nix-store --add' and
nix-store -q --hash'.
2006-03-01 15:43:37 +00:00
Eelco Dolstra
b90787290d
* TDD! Woohoo!
2006-03-01 14:26:03 +00:00
Eelco Dolstra
089c41a0c2
* Oops!
2006-03-01 14:17:00 +00:00
Eelco Dolstra
ca0b23c831
* Test the nix-store --gc subflags.
2006-03-01 14:00:27 +00:00
Eelco Dolstra
5cb6c42088
* Test nix-build. This also tests indirect roots.
2006-03-01 13:49:12 +00:00
Eelco Dolstra
8cd646b6af
* Clear the substitutes prior to running the test.
2006-03-01 13:33:12 +00:00
Eelco Dolstra
e48bd8c8b5
* Add a test for nix-log2xml.
2006-03-01 13:25:08 +00:00
Eelco Dolstra
84c4631221
* Simplification.
2006-03-01 12:51:18 +00:00
Eelco Dolstra
a4c63c6e8e
* Make it easy to run individual tests from the command line.
2006-03-01 12:15:33 +00:00
Eelco Dolstra
9d3bee50ad
* Aha!
2006-02-22 15:20:11 +00:00
Eelco Dolstra
17f39049cf
* WTF?
2006-02-22 15:09:47 +00:00
Eelco Dolstra
f0d6318dd1
* More tests.
2006-02-22 14:02:44 +00:00
Eelco Dolstra
ddb78dfc3d
* Check whether "nix-store -q --graph" generates a valid dot graph.
...
* Test "nix-store -q --tree" as well.
2006-02-22 13:55:41 +00:00
Eelco Dolstra
7a3e715980
* Fix for NIX-31: "nix-env -i foo" installing all derivations named
...
foo. Now it will only install the one with the highest version
number.
2006-02-17 17:47:54 +00:00
Eelco Dolstra
58fc420b36
* And another test.
2006-02-17 17:05:34 +00:00
Eelco Dolstra
4ddd5ff39c
* Regression test for NIX-31.
2006-02-17 17:03:19 +00:00
Eelco Dolstra
da0a6b6499
* Doh.
2006-02-12 21:00:36 +00:00
Eelco Dolstra
f8aadf14c3
* Test-driven development, woohoo! nix-env should work on functions,
...
provided that all arguments have defaults.
2006-02-08 15:21:57 +00:00
Eelco Dolstra
e771e59178
* Tests for nix-env, finally!
2006-02-08 14:32:06 +00:00
Eelco Dolstra
5144f750c4
* Typo.
2005-12-15 17:04:02 +00:00
Eelco Dolstra
ab5c6bb3a3
* Change referer' to
referrer' throughout. In particular, the
...
nix-store query options `--referer' and `--referer-closure' have
been changed to `--referrer' and `--referrer-closure' (but the old
ones are still accepted for compatibility).
2005-12-13 21:04:48 +00:00
Eelco Dolstra
18bbcb1214
* Add a test to demonstrate the quadratic complexity of referrer
...
(de)registration, in particular garbage collection (NIX-23).
2005-12-11 19:25:48 +00:00
Eelco Dolstra
44409f52c1
* "Fix" the test, since we cannot feasibly support the intended semantics.
2005-11-17 11:58:22 +00:00
Eelco Dolstra
1f285cf556
* Scoping bug in `with'.
2005-11-04 14:50:33 +00:00
Eelco Dolstra
deb75bb414
* Remove debugging code.
2005-09-13 15:54:36 +00:00
Eelco Dolstra
116e939d57
* More debugging.
2005-09-13 14:07:22 +00:00
Eelco Dolstra
55b84357a1
* Debugging.
2005-09-13 13:17:14 +00:00
Eelco Dolstra
991a130b1e
* Added a list concatenation operator:
...
[1 2 3] ++ [4 5 6] => [1 2 3 4 5 6]
2005-07-25 15:05:34 +00:00
Eelco Dolstra
33efb52e02
* Hack to get around the libtool wrapper script around nix-store not
...
working when PATH is unset.
2005-07-25 07:25:18 +00:00
Eelco Dolstra
040140dd1c
* Added a primop `removeAttrs' to remove attributes from a set, e.g.,
...
`removeAttrs attrs ["x", "y"]' returns the set `attrs' with the
attributes named `x' and `y' removed. It is not an error for the
named attributes to be missing from the input set.
2005-05-18 17:19:21 +00:00
Eelco Dolstra
d8cda7c3dc
* Mac OS X (and POSIX) doesn't have readlink.
2005-05-06 14:43:14 +00:00
Eelco Dolstra
c702dfca3f
* nix-store: --substitute' ->
--register-substitutes'.
2005-04-08 13:48:41 +00:00
Eelco Dolstra
7d876f8fa7
* Get rid of fetchurl, we don't need it anymore.
2005-04-07 14:35:44 +00:00
Eelco Dolstra
590e5a0d65
* Add a test for base-32 encoding of hashes since it seems to be
...
broken on Mac OS X.
2005-03-23 17:13:42 +00:00
Eelco Dolstra
a1e00bf6aa
* Remove non-POSIX flag.
2005-03-21 16:28:58 +00:00
Eelco Dolstra
08df443618
* Check for duplicate attributes and formal parameters in Nix
...
expressions.
2005-03-10 11:33:46 +00:00
Eelco Dolstra
398463a72a
* `make check' fix.
2005-02-18 08:40:52 +00:00