summaryrefslogtreecommitdiffstats
path: root/flake.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-03-19 07:45:14 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-03-19 07:45:14 +0100
commitf6a3fb9c4d8dd86f78c9f75a23c1ac35bf35d4eb (patch)
tree5f28fbca03d83921b568f7cb1708374456d9ec42 /flake.nix
parentfeat(treewide): Add further buttons (diff)
downloadweb-client-f6a3fb9c4d8dd86f78c9f75a23c1ac35bf35d4eb.zip
feat(treewide): Commit MVP
Diffstat (limited to '')
-rw-r--r--flake.nix24
1 files changed, 19 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 776e8bd..425a1a9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -26,6 +26,7 @@
nixpkgs.follows = "nixpkgs";
};
};
+ crane.url = "github:ipetkov/crane";
};
outputs = {
@@ -33,6 +34,7 @@
nixpkgs,
treefmt-nix,
rust-overlay,
+ crane,
}: let
system = "x86_64-linux";
pkgs = import nixpkgs {
@@ -48,11 +50,23 @@
pkgs.pkg-config
];
- rocie = pkgs.callPackage ./nix/package.nix {};
+ rust =
+ pkgs.rust-bin.stable.latest.default.override {
+ targets = ["wasm32-unknown-unknown"];
+ };
- rust = pkgs.rust-bin.stable.latest.default.override {
- targets = ["wasm32-unknown-unknown"];
- };
+ # NB: we don't need to overlay our custom toolchain for the *entire*
+ # pkgs (which would require rebuidling anything else which uses rust).
+ # Instead, we just want to update the scope that crane will use by appending
+ # our specific toolchain there.
+ craneLib = (crane.mkLib pkgs).overrideToolchain (
+ p:
+ p.rust-bin.stable.latest.default.override {
+ targets = ["wasm32-unknown-unknown"];
+ }
+ );
+
+ rocie = pkgs.callPackage ./nix/package.nix {inherit craneLib;};
treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;};
in {
@@ -74,7 +88,7 @@
packages = [
# rust stuff
rust
- pkgs.mold-wrapped
+ pkgs.mold
pkgs.cargo-edit
pkgs.cargo-expand