about summary refs log tree commit diff
path: root/tests (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-07-03 Fix the parsing of "$"'s in strings.Guillaume Maudoux2-1/+3
2015-06-02 Fix tarball testEelco Dolstra1-0/+3
The tarball cache is stored in $HOME, so the test should set up its own $HOME.
2015-06-01 Add tarball testsEelco Dolstra2-1/+21
2015-05-21 Merge branch 'submit/sparse-generation-symlinks' of ↵Eelco Dolstra1-0/+10
https://github.com/ctheune/nix
2015-05-20 Mis-read Eelko's request to not make this an option: now, let's not makeChristian Theune1-12/+3
it an option. :)
2015-05-19 Implement alternative to lazy generations:Christian Theune1-4/+14
* only the last generation can be lazy * depend on the '--lazy-generation' flag to be set
2015-05-18 Enable lazy/sparse allocation of generation symlinks: avoid creatingChristian Theune1-0/+9
new generations if a generation already exists. Alternatively or additionally I propose a mode where only the *last* generation will be sparse.
2015-04-29 tests: Fix wrong channel name in nix-channel.sh.aszlig1-1/+1
The $channelName variable passed to the channel builder is the last portion of the URL and while that works in the previous test for channels prior to #519, it doesn't work if the last portion is nixexprs.tar.bz2. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-04-20 Support tarballs in nix channel URLsDan Peebles1-0/+23
2015-02-18 nix-store --generate-binary-cache-key: Write key to diskEelco Dolstra1-9/+7
This ensures proper permissions for the secret key.
2015-02-17 Use $<attr>Path instead of $<attr> for passAsFileEelco Dolstra1-1/+1
2015-02-17 Allow passing attributes via files instead of environment variablesEelco Dolstra2-1/+18
Closes #473.
2015-02-16 Test chroot buildingEelco Dolstra1-0/+1
2015-02-10 Make libsodium an optional dependencyEelco Dolstra2-0/+5
2015-02-04 Use libsodium instead of OpenSSL for binary cache signingEelco Dolstra1-0/+50
Sodium's Ed25519 signatures are much shorter than OpenSSL's RSA signatures. Public keys are also much shorter, so they're now specified directly in the nix.conf option ‘binary-cache-public-keys’. The new command ‘nix-store --generate-binary-cache-key’ generates and prints a public and secret key.
2015-01-29 Merge remote-tracking branch 'shlevy/baseNameOf-no-copy'Shea Levy1-1/+1
baseNameOf: Don't copy paths to the store first
2014-12-11 UrghEelco Dolstra1-1/+1
2014-12-05 Shut up a warningEelco Dolstra1-1/+1
2014-11-25 Add a primop for regular expression pattern matchingEelco Dolstra2-0/+27
The function ‘builtins.match’ takes a POSIX extended regular expression and an arbitrary string. It returns ‘null’ if the string does not match the regular expression. Otherwise, it returns a list containing substring matches corresponding to parenthesis groups in the regex. The regex must match the entire string (i.e. there is an implied "^<pat>$" around the regex). For example: match "foo" "foobar" => null match "foo" "foo" => [] match "f(o+)(.*)" "foooobar" => ["oooo" "bar"] match "(.*/)?([^/]*)" "/dir/file.nix" => ["/dir/" "file.nix"] match "(.*/)?([^/]*)" "file.nix" => [null "file.nix"] The following example finds all regular files with extension .nix or .patch underneath the current directory: let findFiles = pat: dir: concatLists (mapAttrsToList (name: type: if type == "directory" then findFiles pat (dir + "/" + name) else if type == "regular" && match pat name != null then [(dir + "/" + name)] else []) (readDir dir)); in findFiles ".*\\.(nix|patch)" (toString ./.)
2014-11-15 Add functors (callable attribute sets).Shea Levy2-0/+2
With this, attribute sets with a `__functor` attribute can be applied just like normal functions. This can be used to attach arbitrary metadata to a function without callers needing to treat it specially.
2014-10-18 Fix context testShea Levy1-1/+1
2014-10-04 Add primop ‘catAttrs’Eelco Dolstra2-0/+2
2014-10-04 Add primop ‘attrValues’Eelco Dolstra1-1/+1
2014-10-03 Add test for readDir primopShea Levy4-0/+2
2014-09-23 Fix use of PAGER during testsEelco Dolstra1-0/+1
2014-09-22 Add ‘deepSeq’ primopEelco Dolstra3-0/+3
Note that unlike ‘lib.deepSeq’ in Nixpkgs, this handles cycles.
2014-09-22 Add ‘seq’ primopEelco Dolstra3-0/+3
2014-09-05 tests/remote-builds.nix: Time out fasterEelco Dolstra1-2/+3
2014-08-28 Add disallowedReferences / disallowedRequisitesEelco Dolstra4-2/+35
For the "stdenv accidentally referring to bootstrap-tools", it seems easier to specify the path that we don't want to depend on, e.g. disallowedRequisites = [ bootstrapTools ];
2014-08-28 Introduce allowedRequisites featureGergely Risko3-1/+57
2014-08-21 Fix testsEelco Dolstra9-26/+20
So all these years I was totally deluded about the meaning of "set -e". You might think that it causes statements like "false && true" or "! true" to fail, but it doesn't...
2014-08-20 Use proper quotes everywhereEelco Dolstra2-2/+2
2014-08-20 Reduce test verbosityEelco Dolstra1-2/+2
2014-08-13 Remove log2html.xsl and friendsEelco Dolstra2-10/+0
It's part of Hydra now.
2014-07-30 Rename nixPath to __nixPathEelco Dolstra1-4/+4
The name ‘nixPath’ breaks existing code.
2014-07-24 tests/remote-builds.nix: Test failing buildEelco Dolstra1-1/+4
2014-07-24 tests/remote-builds.nix: Don't try cache.nixos.orgEelco Dolstra1-0/+1
2014-07-16 Handle case collisions on case-insensitive systemsEelco Dolstra3-1/+20
When running NixOps under Mac OS X, we need to be able to import store paths built on Linux into the local Nix store. However, HFS+ is usually case-insensitive, so if there are directories with file names that differ only in case, then importing will fail. The solution is to add a suffix ("~nix~case~hack~<integer>") to colliding files. For instance, if we have a directory containing xt_CONNMARK.h and xt_connmark.h, then the latter will be renamed to "xt_connmark.h~nix~case~hack~1". If a store path is dumped as a NAR, the suffixes are removed. Thus, importing and exporting via a case-insensitive Nix store is round-tripping. So when NixOps calls nix-copy-closure to copy the path to a Linux machine, you get the original file names back. Closes #119.
2014-07-14 build-remote.pl: Fix building multiple output derivationsEelco Dolstra1-2/+3
We were importing paths without sorting them topologically, leading to "path is not valid" errors. See e.g. http://hydra.nixos.org/build/12451761
2014-07-11 Fix testEelco Dolstra1-1/+1
2014-07-10 Add a test for the SSH substituterEelco Dolstra1-2/+11
2014-07-04 Add builtin function ‘fromJSON’Eelco Dolstra2-0/+33
Fixes #294.
2014-06-10 == operator: Ignore string contextEelco Dolstra1-1/+1
There really is no case I can think of where taking the context into account is useful. Mostly it's just very inconvenient.
2014-05-29 Fix testEelco Dolstra2-2/+2
2014-05-26 Make the Nix search path declarativeEelco Dolstra2-1/+2
Nix search path lookups like <nixpkgs> are now desugared to ‘findFile nixPath <nixpkgs>’, where ‘findFile’ is a new primop. Thus you can override the search path simply by saying let nixPath = [ { prefix = "nixpkgs"; path = "/my-nixpkgs"; } ]; in ... <nixpkgs> ... In conjunction with ‘scopedImport’ (commit c273c15cb13bb86420dda1e5341a4e19517532b5), the Nix search path can be propagated across imports, e.g. let overrides = { nixPath = [ ... ] ++ builtins.nixPath; import = fn: scopedImport overrides fn; scopedImport = attrs: fn: scopedImport (overrides // attrs) fn; builtins = builtins // overrides; }; in scopedImport overrides ./nixos
2014-05-26 Ensure that -I flags get included in nixPathEelco Dolstra1-1/+1
Also fixes #261.
2014-05-26 Add constant ‘nixPath’Eelco Dolstra2-2/+9
It contains the Nix expression search path as a list of { prefix, path } sets, e.g. [ { path = "/nix/var/nix/profiles/per-user/root/channels/nixos"; prefix = ""; } { path = "/etc/nixos/configuration.nix"; prefix = "nixos-config"; } { path = "/home/eelco/Dev/nix/inst/share/nix/corepkgs"; prefix = "nix"; } ]
2014-05-26 Add primop ‘scopedImport’Eelco Dolstra4-0/+16
‘scopedImport’ works like ‘import’, except that it takes a set of attributes to be added to the lexical scope of the expression, essentially extending or overriding the builtin variables. For instance, the expression scopedImport { x = 1; } ./foo.nix where foo.nix contains ‘x’, will evaluate to 1. This has a few applications: * It allows getting rid of function argument specifications in package expressions. For instance, a package expression like: { stdenv, fetchurl, libfoo }: stdenv.mkDerivation { ... buildInputs = [ libfoo ]; } can now we written as just stdenv.mkDerivation { ... buildInputs = [ libfoo ]; } and imported in all-packages.nix as: bar = scopedImport pkgs ./bar.nix; So whereas we once had dependencies listed in three places (buildInputs, the function, and the call site), they now only need to appear in one place. * It allows overriding builtin functions. For instance, to trace all calls to ‘map’: let overrides = { map = f: xs: builtins.trace "map called!" (map f xs); # Ensure that our override gets propagated by calls to # import/scopedImport. import = fn: scopedImport overrides fn; scopedImport = attrs: fn: scopedImport (overrides // attrs) fn; # Also update ‘builtins’. builtins = builtins // overrides; }; in scopedImport overrides ./bla.nix * Similarly, it allows extending the set of builtin functions. For instance, during Nixpkgs/NixOS evaluation, the Nixpkgs library functions could be added to the default scope. There is a downside: calls to scopedImport are not memoized, unlike import. So importing a file multiple times leads to multiple parsings / evaluations. It would be possible to construct the AST only once, but that would require careful handling of variables/environments.
2014-05-22 Disable parallel.sh testEelco Dolstra1-1/+2
It breaks randomly: http://hydra.nixos.org/build/11152871
2014-05-02 Fix Debian testsEelco Dolstra1-0/+1
These actually run as root in a VM, so they get confused. http://hydra.nixos.org/build/10775854