about summary refs log tree commit diff
path: root/third_party
AgeCommit message (Collapse)AuthorFilesLines
2020-05-29 r/869 feat(3p/glog): Check in derivation for glogVincent Ambo1-0/+18
Instead of overriding the upstream one, lets keep it local.
2020-05-28 r/868 refactor(3p/nix): Introduce CMake as the build system for NixVincent Ambo10-22/+500
Completes the switch from Meson to CMake for the core build system in Nix. Meson was added originally because someone else had already done the work for integrating it in Nix and it was an upgrade from the previous setup. However over time it became clear that Meson is not quite mature enough for projects like Nix that have occasionally peculiar configuration constraints. Some issues encountered with Meson (some of these are due to the Meson setup in Nix): * Difficulty with generating correct compile_commands.json for external tools like clangd * Difficulty linking to libc++ when using clang * Ugly shell invocations for certain parts of the build system (I want these to be gone!!!) This CMake setup mimics the Meson configuration, but there are some differences (some temporary): * headers are now included separately for each library (see a previous commit that changes includes appropriately) * autoheaders-style configuration is currently hardcoded. Before blindly copying this I want to evaluate how much of it actually exists for portability concerns that I don't have (such as support for OS X). * Nix is built with libc++ by default. * [libstore] SQL schema is now inlined via a generated header, not an included string literal Abseil is still built as part of this build, rather than an external dependency, because it chokes on differently configured compiler invocations. Note that because of the move to libc++ an unwanted behaviour is introduced: glog log messages no longer have a body. I have yet to debug what is going on there.
2020-05-27 r/867 chore(3p/nix): Remove meson build files for core packagesVincent Ambo7-1188/+0
2020-05-27 r/866 chore(3p/nix): Move Abseil symlink one layer upVincent Ambo2-1/+1
This is required for upcoming build system changes.
2020-05-27 r/865 refactor(3p/nix): Anchor local includes at src/Vincent Ambo159-656/+661
Previously all includes were anchored in one global mess of header files. This moves the includes into filesystem "namespaces" (if you will) for each sub-package of Nix. Note: This commit does not introduce the relevant build system changes.
2020-05-27 r/864 refactor(3p/abseil_cpp): Inline Nix derivationVincent Ambo2-4/+14
2020-05-27 r/863 merge(3p/glog): Vendor glog from commit 'afe04691'Vincent Ambo133-0/+23455
2020-05-27 r/862 chore(3p): Remove glog overrideVincent Ambo2-16/+1
This library is being vendored, hence the override doesn't matter anymore.
2020-05-27 r/861 fix(3p/nix): Default-import depot from a relative pathVincent Ambo1-1/+1
2020-05-27 r/859 fix(3p/git): Use git derivation from stable channel as baseVincent Ambo1-1/+2
unstable is, of course, not working correctly at the moment
2020-05-26 r/857 chore(3p): Expose nixpkgs commit to depotVincent Ambo1-3/+3
2020-05-26 r/852 revert(3p/git): Revert merge of git upstream at v2.26.2Vincent Ambo1006-146045/+57858
This causes cgit to serve error pages, which is undesirable. This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing changes made to f2b211131f2347342dde63975b09cf603149f1a3.
2020-05-25 r/850 feat(3p/hound): Init hound packageVincent Ambo1-0/+14
Hound is a code searching tool that I intend to use while finding something more fully featured.
2020-05-25 r/849 chore(3p/naersk): Update to latest 'master'Vincent Ambo2-6/+8
2020-05-25 r/847 docs(3p/nix): Add a README explaining the goals of the forkVincent Ambo1-12/+147
2020-05-25 r/846 refactor(3p/nix): Replace tokenizeStrings with absl::StrSplitVincent Ambo29-145/+146
This function was a custom (and inefficient in the case of single-character delimiters) string splitter which was used all over the codebase. Abseil provides an appropriate replacement function.
2020-05-25 r/845 refactor(3p/nix/libutil): Replace hasPrefix/Suffix with AbseilVincent Ambo21-57/+69
Uses the equivalent absl::StartsWith and absl::EndsWith functions instead.
2020-05-25 r/844 fix(3p/nix/libstore): Fix error condition when parsing generationsVincent Ambo1-1/+1
2020-05-25 r/843 refactor(3p/nix/libutil): Replace string2Int & trim functionsVincent Ambo19-72/+84
Replaces these functions with corresponding functions from Abseil, namely absl::StripAsciiWhitespace and absl::SimpleAtoi. In the course of doing this some minor things I encountered along the way were also refactored. This also changes the signatures of the various custom readFile functions to use absl::string_view types.
2020-05-24 r/842 chore(3p/nix/libstore): Remove progress bar remnants from downloadVincent Ambo1-19/+0
2020-05-24 r/841 style(3p/nix): Remove 'using std::*' from xml-writer.hhVincent Ambo2-7/+3
See previous commit for more details on why.
2020-05-24 r/840 style(3p/nix): Remove 'using std::*' from types.hhVincent Ambo85-824/+862
It is considered bad form to use things from includes in headers, as these directives propagate to everywhere else and can make it confusing. types.hh (which is includes almost literally everywhere) had some of these directives, which this commit removes.
2020-05-24 r/839 chore(3p/nix): Enable cross-file-rename in clangdVincent Ambo1-1/+1
2020-05-24 r/838 chore(3p/nix): Make build type configurableVincent Ambo1-3/+3
2020-05-24 r/835 refactor(3p/nix/libutil): Replace chomp() with absl::stringsVincent Ambo15-26/+40
2020-05-24 r/834 chore(3p/nix): Remove some OS X specific definesVincent Ambo9-281/+3
This project will be dropping OS X support until the core is simplified.
2020-05-24 r/833 fix(3p/nix): Fix long paths permanently breaking GCAlyssa Ross1-13/+45
Suppose I have a path /nix/store/[hash]-[name]/a/a/a/a/a/[...]/a, long enough that everything after "/nix/store/" is longer than 4096 (MAX_PATH) bytes. Nix will happily allow such a path to be inserted into the store, because it doesn't look at all the nested structure. It just cares about the /nix/store/[hash]-[name] part. But, when the path is deleted, we encounter a problem. Nix will move the path to /nix/store/trash, but then when it's trying to recursively delete the trash directory, it will at some point try to unlink /nix/store/trash/[hash]-[name]/a/a/a/a/a/[...]/a. This will fail, because the path is too long. After this has failed, any store deletion operation will never work again, because Nix needs to delete the trash directory before recreating it to move new things to it. (I assume this is because otherwise a path being deleted could already exist in the trash, and then moving it would fail.) This means that if I can trick somebody into just fetching a tarball containing a path of the right length, they won't be able to delete store paths or garbage collect ever again, until the offending path is manually removed from /nix/store/trash. (And even fixing this manually is quite difficult if you don't understand the issue, because the absolute path that Nix says it failed to remove is also too long for rm(1).) This patch fixes the issue by making Nix's recursive delete operation use unlinkat(2). This function takes a relative path and a directory file descriptor. We ensure that the relative path is always just the name of the directory entry, and therefore its length will never exceed 255 bytes. This means that it will never even come close to AX_PATH, and Nix will therefore be able to handle removing arbitrarily deep directory hierachies. Since the directory file descriptor is used for recursion after being used in readDirectory, I made a variant of readDirectory that takes an already open directory stream, to avoid the directory being opened multiple times. As we have seen from this issue, the less we have to interact with paths, the better, and so it's good to reuse file descriptors where possible. I left _deletePath as succeeding even if the parent directory doesn't exist, even though that feels wrong to me, because without that early return, the linux-sandbox test failed. Reported-by: Alyssa Ross <hi@alyssa.is> Thanks-to: Puck Meerburg <puck@puckipedia.com> Tested-by: Puck Meerburg <puck@puckipedia.com> Reviewed-by: Puck Meerburg <puck@puckipedia.com> (cherry picked from commit c05e20daa1abb3446e378331697938b78af2b3d7)
2020-05-23 r/832 style(3p/nix): Rename derivation to 'tazjix'Vincent Ambo1-1/+1
This makes it easier to distinguish which thing I'm dealing with in the store paths. It does not affect anything else.
2020-05-23 r/831 fix(3p/nix): Set Meson build type to 'release'Vincent Ambo1-0/+2
Gotta go fast ... (well, not while compiling)
2020-05-23 r/829 fix(3p/nix/libexpr): Ensure ExprOpUpdate merges into destinationVincent Ambo1-17/+5
... this fixes nixpkgs eval!
2020-05-23 r/828 refactor(3p/nix/libexpr): Make other 'const' in Bindings::mergeVincent Ambo2-8/+5
2020-05-23 r/827 fix(3p/nix/libexpr): Actually use AttributeMap type aliasVincent Ambo1-2/+2
Without this alias, the garbage-collecting allocator won't be used and allocated attribute set values won't be visible during GC.
2020-05-23 r/826 docs(3p/nix/libexpr): Add comment on ExprSelectVincent Ambo1-1/+8
2020-05-23 r/825 docs(3p/nix/libexpr): Add some comments about function callsVincent Ambo2-5/+10
These were things that took me a moment to realise.
2020-05-23 r/824 chore(3p/nix/tests): Remove leftover '__overrides' testsVincent Ambo2-5/+0
2020-05-23 r/823 fix(3p/nix/libexpr): Fix attrNames/attrValues builtins for btree_mapVincent Ambo1-21/+9
Replaces the previous implementations which performed sorting with one that instead walks through the map (which is already sorted) and yields values from it. This fixes a handful of language tests because the previous implementation did not actually yield useful values on the new implementation.
2020-05-23 r/822 fix(3p/nix/libexpr): Ensure symbols are compared by valueVincent Ambo1-1/+1
2020-05-23 r/821 fix(3p/nix/libexpr): Remove the global empty attribute setVincent Ambo3-10/+0
In the change to the backing structure of attribute sets, the requirement to manually balance the capacity of the structure went away. This is a) because Abseil's data structures manage this on their own, and b) because the new Bindings class is allocated using `new (GC)` rather than writing into a predefined memory area. As part of this change functions related to the capacity were deprecated and set to 0 values, which in turn caused the creation of new attribute sets to return the same (mutable!) default value in various cases, leading to "side effects" that caused evaluation failures. FWIW, I'm not sure if this optimisation had noticeable performance impact, but while untangling libexpr it definitely doesn't help trying to follow what it's doing - so bye, bye!
2020-05-23 r/820 chore(3p/nix/libexpr): Minor readability improvements in eval/valueVincent Ambo4-19/+7
2020-05-23 r/819 chore(3p/nix/libexpr): Remove unused __overrides featureVincent Ambo3-57/+11
This feature does not appear in nixpkgs, so I don't care about it. My only goal is evaluating nixpkgs.
2020-05-23 r/818 chore(3p/nix/libexpr): Expose separate insert & "upsert" methodsVincent Ambo2-3/+10
Reading more through the old code, it seems like the intention /sometimes/ is to replace values.
2020-05-22 r/817 fix(3p/nix/libexpr): Use gc_allocator<T> as the btree_map allocatorVincent Ambo1-1/+8
This will make all Attr values visible to the GC.
2020-05-22 r/816 feat(3p/nix): Add a derivation to launch clangdVincent Ambo2-1/+31
This wrapper derivation (which assumes that the depot is available at ~/depot) can be used to actually get clangd working with //third_party/nix. In my setup I can launch this with M-x eglot, followed by env CLANGD_FLAGS='--compile-commands-dir=/home/tazjin/projects/nix-build' nix-shell -A third_party.nix --run 'nix-clangd' /home/tazjin/depot
2020-05-22 r/815 feat(third_party): Switch to LLVM 10 by defaultVincent Ambo1-1/+3
2020-05-22 r/814 fix(ops/nixos): Pin systems to stable channelVincent Ambo1-3/+3
NixOS unstable has some software I want when building things, but it's also broken. This pins systems to the stable channel for now.
2020-05-22 r/813 fix(3p/nix/libexpr): Do not allow duplicate attribute insertionVincent Ambo1-3/+17
This is closer to bug-for-bug compatibility with the previous version, which would put new elements at the end of the array and (due to the linear scan) return previous ones.
2020-05-22 r/811 fix(third_party): Pick Emacs from stable NixOS channelVincent Ambo1-6/+17
Emacs is currently subtly broken on nixos-unstable, but I don't care about debugging that. To work around it, this reintroduces the NixOS stable channel (20.03) but as a separate attribute set from which attributes like Emacs can be picked into //third_party.
2020-05-22 r/810 chore: Update from Clang 9 to Clang 10 for all projectsVincent Ambo3-3/+3
2020-05-22 r/808 merge(3p/git): Merge git upstream at v2.26.2Vincent Ambo1006-57858/+146045
2020-05-22 r/807 chore(ops/nixos/nugget): Use upstream Chromium againVincent Ambo1-6/+0
Ostensibly there is also a new way to enable VAAPI, need to look into that.