diff options
Diffstat (limited to '_articles')
-rw-r--r-- | _articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md | 12 | ||||
-rw-r--r-- | _articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md | 11 |
2 files changed, 11 insertions, 12 deletions
diff --git a/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md b/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md index 85dfe4f..368b62a 100644 --- a/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md +++ b/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md @@ -15,14 +15,13 @@ ref: cargo2nix-dramatically-simpler-rust-in-nix In the same vein of my earlier post on [swift2nix]({% link _articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md %}), I was able to quickly prototype a Rust and Cargo variation of it: -[cargo2nix][cargo2nix]. +[cargo2nix]. The initial prototype is even smaller than swift2nix: it has only -[37 lines of code][37-lines]. +37 lines of code. -[cargo2nix]: https://euandreh.xyz/cargo2nix.git/ -[37-lines]: https://euandreh.xyz/cargo2nix.git/tree/default.nix?id=472dde8898296c8b6cffcbd10b3b2c3ba195846d +[cargo2nix]: https://euandre.org/static/attachments/cargo2nix.tar.gz Here's how to use it (snippet taken from the repo's README): @@ -74,9 +73,10 @@ Try out the demo (also taken from the repo's README): ```shell pushd "$(mktemp -d)" -git clone https://euandreh.xyz/cargo2nix-demo.git +wget -O- https://euandre.org/static/attachments/cargo2nix-demo.tar.gz | + tar -xv cd cargo2nix-demo/ nix-build ``` -Report back if you wish. Again, patches welcome. +Report back if you wish. diff --git a/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md b/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md index 030b2e3..c922589 100644 --- a/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md +++ b/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md @@ -18,7 +18,7 @@ problem arises when using the package manager. It has many of the same problems that other package managers have when trying to integrate with Nix, more on this below. -I wrote a simple little tool called [swift2nix][swift2nix] that allows you trick +I wrote a simple little tool called [swift2nix] that allows you trick Swift's package manager into assuming everything is set up. Here's the example from swift2nix's README file: @@ -53,11 +53,10 @@ Swift believes it has already downloaded and checked-out all dependencies, and just moves on to building them. I've worked on it just enough to make it usable for myself, so beware of -unimplemented cases. Patches welcome. +unimplemented cases. [nix]: https://nixos.org/ -[swift2nix]: https://euandreh.xyz/swift2nix.git/ -[actual-code]: https://euandreh.xyz/swift2nix.git/tree/default.nix?id=2af83ffe43fac631a8297ffaa8be3ff93b2b9e7c +[swift2nix]: https://euandre.org/static/attachments/swift2nix.tar.gz ## Design @@ -69,7 +68,7 @@ requires, and readily get out of the way: 2. I didn't want to have an "easy" interface right out of the gate, after fighting with "*2nix" tools that focus too much on that. -The final [actual code][actual-code] was so small (46 lines) that it made me +The final actual code was so small (46 lines) that it made me think about package managers, "*2nix" tools and some problems with many of them. ## Problems with package managers @@ -148,7 +147,7 @@ tool, I just want to let it download some of the dependencies and get out of the way. I want to stick with `npm test` or `cargo build`, and Nix should only provide the environment. -This is something that [node2nix][node2nix] does right. It allows you to build +This is something that [node2nix] does right. It allows you to build the Node.js environment to satisfy NPM, and you can keep using NPM for everything else: |