aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
AgeCommit message (Collapse)Author
2015-11-25Merge branch 'auto-call-functor'Shea Levy
autoCallFunction now auto-calls functors
2015-11-25autoCallFunction: Auto-call functorsShea Levy
2015-11-24Merge pull request #704 from ysangkok/freebsd-supportEelco Dolstra
FreeBSD support with knowledge about Linux emulation
2015-10-29int2String() -> std::to_string()Eelco Dolstra
2015-10-08isFunctor: SimplifyEelco Dolstra
2015-10-08forceFunction: allow functors as wellMathnerd314
2015-10-06Don't try to link libdl on FreeBSD.Manuel Jacob
There is no libdl on FreeBSD. Instead the symbols are included in libc.
2015-09-18Shut up clang warningsEelco Dolstra
2015-08-03Removed unnecessary includedIwan Aucamp
2015-07-31Fix stack consumptionEelco Dolstra
2015-07-31Output line number on infinite recursionIwan Aucamp
2015-07-28Add sort primopEelco Dolstra
2015-07-28Add primop genListEelco Dolstra
This can be used to implement functions like ‘imap’ (or for that matter, ‘map’) without the quadratic complexity incurred by calling ‘++’ repeatedly.
2015-07-24Add replaceStrings primopEelco Dolstra
This is a generalisation of replaceChars in Nixpkgs.
2015-07-24Add concatStringsSep as a primopEelco Dolstra
This fixes the quadratic behaviour of concatStrings/concatStringsSep in Nixpkgs.
2015-07-23CleanupEelco Dolstra
2015-07-23Optimize empty setsEelco Dolstra
This reduces the number of Bindings allocations by about 10%.
2015-07-23Merge branch 'attr-set-hh' of https://github.com/nbp/nixEelco Dolstra
Conflicts: src/libexpr/eval.cc
2015-07-23Optimize small listsEelco Dolstra
The value pointers of lists with 1 or 2 elements are now stored in the list value itself. In particular, this makes the "concatMap (x: if cond then [(f x)] else [])" idiom cheaper.
2015-07-23Add primops all and anyEelco Dolstra
These are used thousands of times during NixOS evaluation, so it's useful to speed them up.
2015-07-23Importing derivations: Add name attribute to make a valid drvShea Levy
2015-07-23Allow derivations-as-srcs in the context of builtins.toFile filesShea Levy
2015-07-23Add foldl' primopEelco Dolstra
2015-07-20Make <nix/fetchurl.nix> a builtin builderEelco Dolstra
This ensures that 1) the derivation doesn't change when Nix changes; 2) the derivation closure doesn't contain Nix and its dependencies; 3) we don't have to rely on ugly chroot hacks.
2015-07-17OCD: foreach -> C++11 ranged forEelco Dolstra
2015-07-17Make printValue() interruptibleEelco Dolstra
Fixes #572.
2015-07-14Move attribute set data structures into their own header file.Nicolas B. Pierron
This modification moves Attr and Bindings structures into their own header file which is dedicated to the attribute set representation. The goal of to isolate pieces of code which are related to the attribute set representation. Thus future modifications of the attribute set representation will only have to modify these files, and not every other file across the evaluator.
2015-07-03Fix the parsing of "$"'s in strings.Guillaume Maudoux
2015-07-03Fix the hack that resets the scanner state.Guillaume Maudoux
2015-06-17Support URLs in $NIX_PATHEelco Dolstra
This didn't work (despite claims in the manual), because the colon in "http://" was parsed as a element separator. So handle "://" specially.
2015-06-01Add tarball testsEelco Dolstra
2015-06-01Document tarball downloadingEelco Dolstra
2015-06-01Fix fetchurl/fetchTarballEelco Dolstra
2015-06-01readFile: Check against nul bytesEelco Dolstra
2015-05-22Fix import-from-derivation in restricted eval modeEelco Dolstra
This relaxes restricted mode to allow access to anything in the store. In the future, it would be better to allow access to only paths that have been constructed in the current evaluation (so a hard-coded /nix/store/blabla in a Nix expression would still be rejected). However, note that reading /nix/store itself is still rejected, so you can't use this so get access to things you don't know about.
2015-05-06nix-env/nix-instantiate/nix-build: Support URIsEelco Dolstra
For instance, you can install Firefox from a specific Nixpkgs revision like this: $ nix-env -f https://github.com/NixOS/nixpkgs/archive/63def04891a0abc328b1b0b3a78ec02c58f48583.tar.gz -iA firefox Or build a package from the latest nixpkgs-unstable channel: $ nix-build https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz -A hello
2015-05-05Allow URLs in the Nix search pathEelco Dolstra
E.g. to install "hello" from the latest Nixpkgs: $ nix-build '<nixpkgs>' -A hello -I nixpkgs=https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz Or to install a specific version of NixOS: $ nixos-rebuild switch -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/63def04891a0abc328b1b0b3a78ec02c58f48583.tar.gz
2015-05-05Make downloads interruptableEelco Dolstra
2015-04-16Fix using restricted mode with chrootsEelco Dolstra
2015-04-09Use cached result if there is a network errorEelco Dolstra
2015-04-09Move curl stuff into a separate fileEelco Dolstra
2015-04-09Implement a TTL on cached fetchurl/fetchTarball resultsEelco Dolstra
This is because we don't want to do HTTP requests on every evaluation, even though we can prevent a full redownload via the cached ETag. The default is one hour.
2015-04-09Implement caching of fetchurl/fetchTarball resultsEelco Dolstra
ETags are used to prevent redownloading unchanged files.
2015-03-25Add fetchTarball builtinEelco Dolstra
This function downloads and unpacks the given URL at evaluation time. This is primarily intended to make it easier to deal with Nix expressions that have external dependencies. For instance, to fetch Nixpkgs 14.12: with import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-14.12.tar.gz) {}; Or to fetch a specific revision: with import (fetchTarball https://github.com/NixOS/nixpkgs/archive/2766a4b44ee6eafae03a042801270c7f6b8ed32a.tar.gz) {}; This patch also adds a ‘fetchurl’ builtin that downloads but doesn't unpack its argument. Not sure if it's useful though.
2015-03-25addToStore(): Take explicit name argumentEelco Dolstra
2015-03-24Don't rely on __noChroot for corepkgsEelco Dolstra
This doesn't work anymore if the "strict" chroot mode is enabled. Instead, add Nix's store path as a dependency. This ensures that its closure is present in the chroot.
2015-03-19Disable scanning for interior pointersEelco Dolstra
This may remove the "Repeated allocation of very large block" warnings.
2015-03-19Fix Boehm API violationEelco Dolstra
We were calling GC_INIT() after doing an allocation (in the baseEnv construction), which is not allowed.
2015-03-19Check return values from malloc/strdupEelco Dolstra
2015-03-18Print some Boehm GC statsEelco Dolstra