aboutsummaryrefslogtreecommitdiff
path: root/src/resolve-system-dependencies
AgeCommit message (Collapse)Author
2022-02-21Fix macOS buildEelco Dolstra
2022-01-27convert a for more utilities to string_viewpennae
2021-06-23Apply OS checks to host platform, not buildAlyssa Ross
Previously, the build system used uname(1) output when it wanted to check the operating system it was being built for, which meant that it didn't take into-account cross-compilation when the build and host operating systems were different. To fix this, instead of consulting uname output, we consult the host triple, specifically the third "kernel" part. For "kernel"s with stable ABIs, like Linux or Cygwin, we can use a simple ifeq to test whether we're compiling for that system, but for other platforms, like Darwin, FreeBSD, or Solaris, we have to use a more complicated check to take into account the version numbers at the end of the "kernel"s. I couldn't find a way to just strip these version numbers in GNU Make without shelling out, which would be even more ugly IMO. Because these checks differ between kernels, and the patsubst ones are quite fiddly, I've added variables for each host OS we might want to check to make them easier to reuse.
2021-01-21Fix macOS buildEelco Dolstra
2020-09-23lstat() cleanupEelco 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-06-15Remove trailing whitespaceEelco Dolstra
2020-06-02elide the 'ErrorInfo' in logError and logWarning callsBen Burdette
2020-05-03convert some printError calls to logErrorBen Burdette
2020-03-30Fix macOS buildEelco Dolstra
2019-12-10Make the Store API more type-safeEelco Dolstra
Most functions now take a StorePath argument rather than a Path (which is just an alias for std::string). The StorePath constructor ensures that the path is syntactically correct (i.e. it looks like <store-dir>/<base32-hash>-<name>). Similarly, functions like buildPaths() now take a StorePathWithOutputs, rather than abusing Path by adding a '!<outputs>' suffix. Note that the StorePath type is implemented in Rust. This involves some hackery to allow Rust values to be used directly in C++, via a helper type whose destructor calls the Rust type's drop() function. The main issue is the dynamic nature of C++ move semantics: after we have moved a Rust value, we should not call the drop function on the original value. So when we move a value, we set the original value to bitwise zero, and the destructor only calls drop() if the value is not bitwise zero. This should be sufficient for most types. Also lots of minor cleanups to the C++ API to make it more modern (e.g. using std::optional and std::string_view in some places).
2019-10-09OCD performance fix: {find,count}+insert => insertEelco Dolstra
2019-01-05Remove mentions of `libformat`, it no longer existsJohn Ericson
2017-07-30Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-05-31resolve-system-dependencies: Misc fixesEelco Dolstra
This fixes Could not find any mach64 blobs in file ‘/usr/lib/libSystem.B.dylib’, continuing...
2017-05-31resolve-system-dependencies: SimplifyEelco Dolstra
2017-05-30resolve-system-dependencies: Fix another segfaultEelco Dolstra
runResolver() was barfing on directories like /System/Library/Frameworks/Security.framework/Versions/Current/PlugIns. It should probably do something sophisticated for frameworks, but let's ignore them for now.
2017-05-30resolve-system-dependencies: Several fixesEelco Dolstra
This fixes error: getting attributes of path ‘Versions/Current/CoreFoundation’: No such file or directory when /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation is a symlink. Also fixes a segfault when encounting a file that is not a MACH binary (such as /dev/null, which is included in __impureHostDeps in Nixpkgs). Possibly fixes #786.
2016-11-26Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25Get rid of unicode quotes (#1140)Guillaume Maudoux
2016-09-21printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra
2016-08-17iterate through fat_headers correctlyJude Taylor
2016-08-16remove double castingJude Taylor
2016-08-16account for unknown magic numbersJude Taylor
2016-08-16switch to mmap strategyJude Taylor
2016-08-15ensure presence of directoriesJude Taylor
2016-08-15code review commentsJude Taylor
2016-08-14make inclusion conditionalJude Taylor
2016-08-14add a missing load commandJude Taylor
2016-08-13remove old traces of resolve-system-dependenciesJude Taylor
2016-08-13resolve-system-dependencies: implement in C++Jude Taylor