aboutsummaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2021-06-02Install zsh completion scriptChua Hou
2021-01-26Move command plugin interface to libnixcmdShea Levy
2020-12-22Move <nix/fetchurl.nix> into the nix binaryEelco Dolstra
This makes the statically linked nix binary just work, without needing any additional files.
2020-09-22Disable `FORTIFY_SOURCE` when compiling without optimsregnat
Otherwise the build is cluttered with ``` /nix/store/fwpn2f7a4iqszyydw7ag61zlnp6xk5d3-glibc-2.30-dev/include/features.h:382:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] 382 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ ``` when building with `OPTIMIZE=0`
2020-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-16StorePath: Rewrite in C++Eelco Dolstra
On nix-env -qa -f '<nixpkgs>', this reduces maximum RSS by 20970 KiB and runtime by 0.8%. This is mostly because we're not parsing the hash part as a hash anymore (just validating that it consists of base-32 characters). Also, replace storePathToHash() by StorePath::hashPart().
2020-05-28Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-05-10nix: Implement basic bash completionEelco Dolstra
2020-05-08Move unit tests to sr/libutil/tests, use mk make rulesEelco Dolstra
2020-05-06WIP: add unit tests for libutilTobias Pflug
This is a proof on concept to evaluate writing unit tests for Nix using google test (https://github.com/google/googletest). In order to execute tests: $ make unit-tests $ ./unit-tests The Makefile rules for `unit-tests` is a complete hack.
2020-04-22Don't install error-demoEelco Dolstra
2020-04-22Merge branch 'error-format' of https://github.com/bburdette/nixEelco Dolstra
2020-04-07Backport libfetchers from the flakes branchEelco Dolstra
This provides a pluggable mechanism for defining new fetchers. It adds a builtin function 'fetchTree' that generalizes existing fetchers like 'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a set of attributes, e.g. fetchTree { type = "git"; url = "https://example.org/repo.git"; ref = "some-branch"; rev = "abcdef..."; } The existing fetchers are just wrappers around this. Note that the input attributes to fetchTree are the same as flake input specifications and flake lock file entries. All fetchers share a common cache stored in ~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}). This also adds support for Git worktrees (c169ea59049f861aaba429f48b828d0820b74d1d).
2020-04-03move out of tests/Ben Burdette
2020-03-30build with makeBen Burdette
2020-03-30Move fetchers from libstore to libfetchersEelco Dolstra
2019-11-26Add some Rust codeEelco Dolstra
2019-11-07Fix Perl bindingsEelco Dolstra
2019-11-07Revert "autoconf: Allow overriding CFLAGS/CXXFLAGS from outside."Eelco Dolstra
This reverts commit 717e821b99797845e1bef47d862f8cb0fb69cfc9. It's much more convenient to do 'make OPTIMIZE=0'.
2019-11-07Precompile headersEelco Dolstra
This cuts 'make install -j6' on my laptop from 170s to 134s.
2019-07-03autoconf: Allow overriding CFLAGS/CXXFLAGS from outside.Niklas Hambüchen
As is normal for autoconf-based projects. For example, it is a common use case to do ./configure CXXFLAGS=-O0 This did not work for nix until now, because the `CXXFLAGS=` declaration would unconditionally erase what the user had specified. The custom `OPTIMIZE` flag is removed, but the default `-O3` is retained; autoconf would default to `-g -O2` by default otherwise as documented on: https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/C-Compiler.html https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/C_002b_002b-Compiler.html
2018-10-26Merge all nix-* binaries into nixEelco Dolstra
These are all symlinks to 'nix' now, reducing the installed size by about ~1.7 MiB.
2018-03-20Merge pull request #1997 from dtzWill/fix/cxx14-std-consistencyEelco Dolstra
ask autotools for c++14 support flags, not c++11; don't override later
2018-03-20ask autotools for c++14 support flags, not c++11; don't override laterWill Dietz
2018-03-20Make <nix/buildenv.nix> a builtin builderEelco Dolstra
This avoids sandbox annoyances.
2018-03-14Use boost::format from the boost packageEelco Dolstra
Note that this only requires headers from boost so it doesn't add a runtime dependency. Also, use Nixpkgs 18.03.
2018-02-08Add plugins to make Nix more extensible.Shea Levy
All plugins in plugin-files will be dlopened, allowing them to statically construct instances of the various Register* types Nix supports.
2017-08-19Remove nix-mode.el from Nix.Matthew Bauer
This removes the file nix-mode.el from Nix. The file is now available within the repository https://github.com/NixOS/nix-mode. Fixes #662 Fixes #1040 Fixes #1054 Fixes #1055 Closes #1119 Fixes #1419 NOTE: all of the above should be fixed within NixOS/nix-mode. If one of those hasn’t please reopen within NixOS/nix-mode and not within NixOS/nix.
2017-03-31Merge branch 'remove-perl' of https://github.com/shlevy/nixEelco Dolstra
2017-02-08Include config.h implicitly with '-include config.h' in CFLAGSTuomas Tynkkynen
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!
2017-02-07Remove perl dependency.Shea Levy
Fixes #341
2017-02-07Merge branch 'nix-copy-closure-c++' of https://github.com/shlevy/nixEelco Dolstra
2017-02-07Remove download-via-sshEelco Dolstra
Replaced by SSHStore.
2017-01-20nix-copy-closure: Implement in C++.Shea Levy
Tests fail currently because the database is not given proper hashes in the VM
2017-01-19Merge pull request #981 from shlevy/build-remote-c++Eelco Dolstra
build-remote: Implement in C++
2017-01-16AutoDeleteArray -> std::unique_ptrEelco Dolstra
Also, switch to C++14 for std::make_unique.
2016-11-10build-remote: Implement in C++Shea Levy
2016-08-31Merge branch 'nix-build-c++'Shea Levy
2016-08-31Merge branch 'nix-channel-c++'Shea Levy
2016-08-13resolve-system-dependencies: implement in C++Jude Taylor
2016-08-11nix-channel: implement in c++Shea Levy
2016-08-11buildenv: perl -> c++Shea Levy
2016-08-09nix-build: Port to c++Shea Levy
This was a dumb line-for-line rewrite, because nix build/nix run/etc. will replace it.
2016-06-01Make the store directory a member variable of StoreEelco Dolstra
2016-05-04Make the aws-cpp-sdk dependency optionalEelco Dolstra
2016-04-25Remove nix-log2xmlEelco Dolstra
2016-04-11Remove manifest supportEelco Dolstra
Manifests have been superseded by binary caches for years. This also gets rid of nix-pull, nix-generate-patches and bsdiff/bspatch.
2016-02-09Start of new Nix command-line interfaceEelco Dolstra
2015-10-01nix-prefetch-url: Rewrite in C++Eelco Dolstra
2015-04-22nix-collect-garbage: translate to C++Luca Bruno