about summary refs log tree commit diff
path: root/src/libstore/globals.cc
AgeCommit message (Collapse)AuthorFilesLines
2017-03-15 Store: Add a method for getting build logsEelco Dolstra1-1/+0
This allows various Store implementations to provide different ways to get build logs. For example, BinaryCacheStore can get the build logs from the binary cache. Also, remove the log-servers option since we can use substituters for this.
2017-03-08 Add option to disable import-from-derivation completely, even if the drv is ↵Shea Levy1-0/+2
already realized
2017-03-06 Properly set the caFile for aws-sdk-cpp s3Shea Levy1-0/+1
2017-02-28 Support auto-configuration of build-max-jobsEelco Dolstra1-1/+8
"build-max-jobs" and the "-j" option can now be set to "auto" to use the number of CPUs in the system. (Unlike build-cores, it doesn't use 0 to imply auto-configuration, because a) magic values are a bad idea in general; b) 0 is a legitimate value used to disable local building.) Fixes #1198.
2017-02-27 _SC_NPROCESSORS_ONLN -> std::thread::hardware_concurrency()Eelco Dolstra1-7/+3
2017-02-16 Move netrcFile to SettingsEelco Dolstra1-19/+17
Also get rid of Settings::processEnvironment(), it appears to be useless.
2017-02-08 Include config.h implicitly with '-include config.h' in CFLAGSTuomas Tynkkynen1-2/+0
Because config.h can #define things like _FILE_OFFSET_BITS=64 and not every compilation unit includes config.h, we currently compile half of Nix with _FILE_OFFSET_BITS=64 and other half with _FILE_OFFSET_BITS unset. This causes major havoc with the Settings class on e.g. 32-bit ARM, where different compilation units disagree with the struct layout. E.g.: diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc @@ -166,6 +166,8 @@ void Settings::update() _get(useSubstitutes, "build-use-substitutes"); + fprintf(stderr, "at Settings::update(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); _get(buildUsersGroup, "build-users-group"); diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -138,6 +138,8 @@ void RemoteStore::initConnection(Connection & conn) void RemoteStore::setOptions(Connection & conn) { + fprintf(stderr, "at RemoteStore::setOptions(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); conn.to << wopSetOptions Gave me: at Settings::update(): &useSubstitutes = 0xb6e5c5cb at RemoteStore::setOptions(): &useSubstitutes = 0xb6e5c5c7 That was not a fun one to debug!
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-3/+3
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-3/+3
2016-10-27 Add nix.conf options for -k and -KShea Levy1-0/+2
Fixes #1084
2016-08-13 remove old traces of resolve-system-dependenciesJude Taylor1-1/+1
2016-08-10 Remove $NIX_DB_DIREelco Dolstra1-1/+0
This variable has no reason to exist, given $NIX_STATE_DIR.
2016-04-29 Eliminate the substituter mechanismEelco Dolstra1-13/+0
Substitution is now simply a Store -> Store copy operation, most typically from BinaryCacheStore to LocalStore.
2016-04-25 Show the log tail when a build failsEelco Dolstra1-1/+0
If --no-build-output is given (which will become the default for the "nix" command at least), show the last 10 lines of the build output if the build fails.
2016-04-25 Remove --print-build-traceEelco Dolstra1-1/+0
This was added to support Hydra, but Hydra no longer uses it.
2016-04-11 Remove manifest supportEelco Dolstra1-1/+0
Manifests have been superseded by binary caches for years. This also gets rid of nix-pull, nix-generate-patches and bsdiff/bspatch.
2016-04-08 Remove failed build cachingEelco Dolstra1-2/+0
This feature was implemented for Hydra, but Hydra no longer uses it.
2015-10-21 move preBuildHook defaulting to globals.ccJude Taylor1-0/+5
2015-07-17 OCD: foreach -> C++11 ranged forEelco Dolstra1-8/+8
2015-06-22 Make /nix/var/nix/db/reserved biggerEelco Dolstra1-1/+1
Issue #564.
2015-04-18 Add the pre-build hook.Shea Levy1-0/+1
This hook can be used to set system-specific per-derivation build settings that don't fit into the derivation model and are too complex or volatile to be hard-coded into nix. Currently, the pre-build hook can only add chroot dirs/files through the interface, but it also has full access to the chroot root. The specific use case for this is systems where the operating system ABI is more complex than just the kernel-support system calls. For example, on OS X there is a set of system-provided frameworks that can reliably be accessed by any program linked to them, no matter the version the program is running on. Unfortunately, those frameworks do not necessarily live in the same locations on each version of OS X, nor do their dependencies, and thus nix needs to know the specific version of OS X currently running in order to make those frameworks available. The pre-build hook is a perfect mechanism for doing just that.
2015-04-18 Revert "Add the pre-build hook."Shea Levy1-1/+0
Going to reimplement differently. This reverts commit 1e4a4a2e9fc382f47f58b448f3ee034cdd28218a.
2015-04-16 Fix using restricted mode with chrootsEelco Dolstra1-0/+1
2015-04-12 Add the pre-build hook.Shea Levy1-0/+1
This hook can be used to set system specific per-derivation build settings that don't fit into the derivation model and are too complex or volatile to be hard-coded into nix. Currently, the pre-build hook can only add chroot dirs/files. The specific use case for this is systems where the operating system ABI is more complex than just the kernel-supported system calls. For example, on OS X there is a set of system-provided frameworks that can reliably be accessed by any program linked to them, no matter the version the program is running on. Unfortunately, those frameworks do not necessarily live in the same locations on each version of OS X, nor do their dependencies, and thus nix needs to know the specific version of OS X currently running in order to make those frameworks available. The pre-build hook is a perfect mechanism for doing just that.
2015-04-09 Implement a TTL on cached fetchurl/fetchTarball resultsEelco Dolstra1-0/+8
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-02-23 Use chroots for all derivationsEelco Dolstra1-2/+0
If ‘build-use-chroot’ is set to ‘true’, fixed-output derivations are now also chrooted. However, unlike normal derivations, they don't get a private network namespace, so they can still access the network. Also, the use of the ‘__noChroot’ derivation attribute is no longer allowed. Setting ‘build-use-chroot’ to ‘relaxed’ gives the old behaviour.
2014-09-17 Settings: Add bool get()Eelco Dolstra1-0/+8
2014-08-20 Use proper quotes everywhereEelco Dolstra1-3/+3
2014-08-04 Move some options out of globalsEelco Dolstra1-4/+8
2014-08-04 RefactorEelco Dolstra1-36/+36
2014-08-04 Add option ‘build-extra-chroot-dirs’Eelco Dolstra1-4/+0
This is useful for extending (rather than overriding) the default set of chroot paths.
2014-08-04 Make chroot builds easier to set upEelco Dolstra1-0/+3
By default, we now include /bin/sh as a bind-mount of bash.
2014-07-25 nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituterEelco Dolstra1-0/+8
2014-07-25 Change the default for use-ssh-substituter to ‘true’Eelco Dolstra1-2/+2
Now you only have to pass ‘--option ssh-substituter-hosts nix-ssh@bla’ to enable SSH substitution.
2014-07-19 Revert old useBuildHook behaviourEelco Dolstra1-1/+1
2014-07-17 nix-daemon: Add trusted-users and allowed-users optionsEelco Dolstra1-0/+4
‘trusted-users’ is a list of users and groups that have elevated rights, such as the ability to specify binary caches. It defaults to ‘root’. A typical value would be ‘@wheel’ to specify all users in the wheel group. ‘allowed-users’ is a list of users and groups that are allowed to connect to the daemon. It defaults to ‘*’. A typical value would be ‘@users’ to specify the ‘users’ group.
2014-07-16 Handle case collisions on case-insensitive systemsEelco Dolstra1-0/+2
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-11 Allow $NIX_BUILD_HOOK to be relative to Nix libexec directoryEelco Dolstra1-1/+1
2014-06-27 allow-arbitrary-code-during-evaluation -> ↵Eelco Dolstra1-1/+1
allow-unsafe-native-code-during-evaluation
2014-06-24 Only add the importNative primop if the ↵Shea Levy1-0/+2
allow-arbitrary-code-during-evaluation option is true (default false)
2014-05-21 nix-store -l: Fetch build logs from the InternetEelco Dolstra1-0/+1
If a build log is not available locally, then ‘nix-store -l’ will now try to download it from the servers listed in the ‘log-servers’ option in nix.conf. For instance, if you have: log-servers = http://hydra.nixos.org/log then it will try to get logs from http://hydra.nixos.org/log/<base name of the store path>. So you can do things like: $ nix-store -l $(which xterm) and get a log even if xterm wasn't built locally.
2014-05-02 Set build-max-jobs to the number of available cores by defaultEelco Dolstra1-0/+5
More zero configuration.
2014-05-02 When running as root, use build users by defaultEelco Dolstra1-0/+1
This removes the need to have a nix.conf, and prevents people from accidentally running Nix builds as root.
2014-02-27 Set up a private /dev/pts in the chrootEelco Dolstra1-1/+0
2014-02-27 Set up a minimal /dev in chrootsEelco Dolstra1-1/+0
Not bind-mounting the /dev from the host also solves the problem with /dev/shm being a symlink to something not in the chroot.
2014-02-26 Only start download-via-ssh if it's enabledEelco Dolstra1-12/+14
2014-02-26 Add use-ssh-substituter setting.Shea Levy1-0/+2
It defaults to false and can be overridden by RemoteStore. Untested currently, just quickly put this together
2014-02-14 Minor style fixesEelco Dolstra1-1/+1
2014-02-10 Pass in params by const refShea Levy1-1/+1
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-08 Add download-via-ssh substituterShea Levy1-0/+20
This substituter connects to a remote host, runs nix-store --serve there, and then forwards substituter commands on to the remote host and sends their results to the calling program. The ssh-substituter-hosts option can be specified as a list of hosts to try. This is an initial implementation and, while it works, it has some limitations: * Only the first host is used * There is no caching of query results (all queries are sent to the remote machine) * There is no informative output (such as progress bars) * Some failure modes may cause unhelpful error messages * There is no concept of trusted-ssh-substituter-hosts Signed-off-by: Shea Levy <shea@shealevy.com>