Closer to a full flake build via naersk.

Blocked on https://github.com/NixOS/nix/issues/4423, build doesn't see
submodules.
This commit is contained in:
Blaž Hrastnik 2021-05-03 22:39:53 +09:00
parent 3038c2ef6d
commit b6a22e955b
5 changed files with 65 additions and 64 deletions

View file

@ -12,8 +12,15 @@
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlay ]; };
naerskLib = pkgs.callPackage naersk {
inherit (pkgs.rust-bin.stable.latest.default) rustc cargo;
rust = (pkgs.rustChannelOf {
date = "2021-05-01";
channel = "nightly";
}).minimal; # cargo, rustc and rust-std
naerskLib = naersk.lib."${system}".override {
# naersk can't build with stable?!
# inherit (pkgs.rust-bin.stable.latest) rustc cargo;
rustc = rust;
cargo = rust;
};
in rec {
packages.helix = naerskLib.buildPackage {