about summary refs log tree commit diff
path: root/pkgs/sternenseemann/rust
Commit message (Collapse)AuthorAgeFilesLines
* pkgs/{profpatsch/nman,sternenseemann/rust/temp}: fix rust warningsProfpatsch2024-03-031-2/+2
|
* pkgs/{profpatsch/nman,sternenseemann/rust/temp}: add stub Cargo.tomlProfpatsch2024-03-032-0/+11
| | | | | | | | | These are for local development, otherwise rust language server does not work out of the box. We might want to move the `temp` crate into its own dir, because cargo only allows one library per Cargo.toml, but right now I did the minimal setup to make it work.
* pkgs/profpatsch/write-rust: alwyas run tests by defaultProfpatsch2021-04-231-4/+2
| | | | | | testRustSimple wouldn’t work with all the rust functions, so let’s just use it internally and expose the tests via the conventional `doCheck` attribute instead.
* pkgs/sternenseemann/nix-env-diff: I am stupidsternenseemann2021-03-181-1/+1
| | | | https://youtu.be/LB8bhHyPLgk?t=418
* pkgs/sternenseemann/nix-env-diff: utility for comparing nix-env evalssternenseemann2021-03-182-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | nix-env-diff is a tiny utility which parses and compares the output of `nix-env -qaP --out-path`, printing all changed and added out paths (or attributes if desired). This facilitates a simple way to determine rebuilds or changed reverse dependencies when working on nixpkgs in a similar way as nixpkgs-review and ofborg do it. Both the new evaluation and the base evaluation to compare against have to be created manually using nix-env, which in turn also allows considering attribute sets that are normally not evaluated do to missing `lib.recurseIntoAttrs`. As an example, here is an example building all changed attributes in `ocaml-ng.ocamlPackages_4_12`: ``` nix-env -qaP -A ocaml-ng.ocamlPackages_4_12 --out-path -f . \ | nix-env-diff --attrs ./base-ocamlPackages_4_12 \ | xargs -n 1 -P 4 nix-instantiate --quiet -A \ | xargs nix-store --realise --builders 'ssh://edwin' ``` `./base-ocamlPackages_4_12` contains the result of the `nix-env` invocation executed on the master branch.
* pkgs/sternenseemann/temp: test using testRustSimplesternenseemann2021-02-141-13/+9
| | | | | This means we don't need the -common machinery anymore and can remove the -tests attribute altogether.
* pkgs/sternenseemann/temp: add tiny temporary file/dir cratesternenseemann2021-02-132-0/+215
The crate implements a safe wrapper around mkdtemp(3) and mkstemp(3) which provide decent temporary file and directory creation. The key feature we provide is that we wrap the resulting path in a TempFile / TempDir struct. This allows us to implement the Drop trait such that the temporary directory / file is automatically deleted when the value goes out of scope in Rust which saves the programmer from cleaning up temporary artifacts themselves. The API is indeed very tiny currently, only implementing creation and AsRef<Path> which should allow all necessary path / file manipulation.