about summary refs log tree commit diff
path: root/users/Profpatsch/lib.nix (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-01-31 r/3723 style: format entire depot with nixpkgs-fmtVincent Ambo1-26/+53
This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: cynthia <cynthia@tvl.fyi> Reviewed-by: edef <edef@edef.eu> Reviewed-by: eta <tvl@eta.st> Reviewed-by: grfn <grfn@gws.fyi>
2021-11-13 r/3045 docs(users/Profpatsch/lib): move split-stdin to lib & documentProfpatsch1-1/+24
Change-Id: I39e81ed766cb209ded5309ea962a59a6f1c811c9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3285 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-05-17 r/2595 feat(tools): add rust-crates-advisoryProfpatsch1-6/+1
We have a bunch of crates in `third_party/rust-crates`; it would be great if we could check them for existing CVEs. This tool does that, it takes the rust security advisory database, parses the applicable CVEs, and cross-checks them against the actual crate versions we list in our package database. The dumb parser we wrote is tested against all entries in the database, so we will notice when upstream breaks their shit. Checking the semver stuff is easy enough with the semver crate. If an advisory matches, it prints the whole thing and fails the build. Change-Id: I9e912c43d37a685d9d7a4424defc467a171ea3c4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2818 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-23 r/2545 feat(users/Profpatsch/lib): add eprint-stdin-netencodeProfpatsch1-0/+14
Like `eprint-stdin`, but reads stdin as netencode and pretty-prints it to stderr. Change-Id: I430c010b0cac45f077cde9dadfd79adfa7a53eca Reviewed-on: https://cl.tvl.fyi/c/depot/+/2533 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-02-13 r/2212 fix(users/Profpatsch/lib/eprintenv): don’t crash when env is missingProfpatsch1-1/+4
eprintenv is a debugging tool, as such the code should probably not crash when the environment variable we want to look at is missing. But we can print a warning instead. Change-Id: I41a24dc0c1cc488587563b85c1adbd089dd364f2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2525 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-02-13 r/2208 feat(users/Profpatsch/lib): add runInEmptyEnvProfpatsch1-0/+11
Small helper that empties out the environment, except for the given list of variables. Change-Id: I5e265496aaa5c248136318aa1c6cd91a67d3f028 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2506 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-31 r/2168 fix(users/Profpatsch/lib): eprintenv should exec into progProfpatsch1-1/+1
Change-Id: I2eab4ce24871121381011c1cfc8ef5e042502cb2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2450 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-17 r/2121 feat(users/Profpatsch): set up a file watcher for tree sitterProfpatsch1-1/+13
Uses inotify to watch a file and print when it is modified, so we can update the parser and display the sexp on the terminal. Now the setup is good enough to start experiementing with queries on the syntax tree. Change-Id: I091587fc495ff627c79a69a52915aaaa8c51fcd2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2411 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-11 r/2071 feat(users/Profpatsch): add script for randomly evaling nixpkgsProfpatsch1-1/+1
Running this after a codified refactor acts as a good smoke test, if a big subset of packages is broken or any central packages are broken, this should find them quite quickly, thanks to randomness™. Just let it run for a few minutes and check the errors that pop up. Change-Id: I1505dd31ca25b29254474a15cd6cb71d9743038a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2346 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: lukegb <lukegb@tvl.fyi>
2021-01-10 r/2070 feat(users/Profpatsch): add a rewriter for lib.stdenv changesProfpatsch1-0/+23
This is in order to advance the rewriting from stdenv.lib to lib. https://github.com/NixOS/nixpkgs/issues/108938 The hard part about changing the argument is that a package might not include lib in its arguments, which is why I use hnix to check whether lib is included and add it to the import list if it doesn’t already exist there. So far, only the really common pattern of meta = with stdenv.lib; is rewritten. Change-Id: I370f0a321b0e5a5bd21ec21fc7cefdd65ec845ed Reviewed-on: https://cl.tvl.fyi/c/depot/+/2345 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>