about summary refs log tree commit diff
path: root/nix (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-02-18 r/2218 fix(nix/readTree): make nixFileName only match .nix extensionssterni1-1/+1
Nix unfortunately has terrible escaping syntax: If something is an escape sequence it does not know, like \0, it just swallows the backslash and returns the second character (byte) as is (yes, "\0" == "0" is true). This created the following bug in nixFileName which should have resulted in at least a parse error: "(.*)\.nix" is the same as "(.*).nix" which meant that nixFileName matched anything that is at least 4 characters long and ends in "nix". This lead to readTree creating double attributes when directories are involved or attributes for non-nix files. Change-Id: Ibf3be2bd189d48881c82ee795c50151bfb365627 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2535 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-14 r/2217 test(users/Profpatsch/writers): use testRustSimple on transitive libsterni2-3/+14
This adds a trivial test case on the transitive lib in tests and builds it by wrapping in with testRustSimple. This should check: * testRustSimple doesn't change the output and other packages can just use it as a normal dependency * tests are built and executed Change-Id: Ia4ea7425432b8b0da09f63054f51f0c480300aa4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2531 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-02-14 r/2216 feat(users/Profpatsch/netencode-rs): run tests with testRustSimplesterni1-15/+10
The rust tests are now automatically built and run if users.Profpatsch.netencode-rs is built without changing the content of its output. users.Profpatsch.netencode-rs-tests has been removed in favor of this, but can still be accessed as builtins.head users.Profpatsch.netencode.netencode-rs.drvDeps Change-Id: I25e8191f5b9efa08ace4a584a75978565c79d8d0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2530 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-02-14 r/2215 feat(users/Profpatsch/writers): testRustSimple to test rust cratessterni1-1/+30
testRustSimple is intended to wrap rustSimpleLib and rustSimpleBin and theoretically pkgs.buildRustCrate with { buildTests = false; } while building and running their tests, making them fail if the tests don't succeed. This is implemented using nix.drvSeqL which is a perfect fit here: * { buildTests = true; } only returns an output with the test binaries and does not actually run the tests. With drvSeqL we can easily wrap this derivation. * { buildTests = true } doesn't contain anything other derivations want to depend on, so it is an derivation output we don't want to have. drvSeqL hides the tests derivation away and only requires us to build