Fix nix flake overlays (#236)

This commit is contained in:
StepBroBD 2023-08-16 14:29:39 -04:00 committed by GitHub
parent 92ed4bd87d
commit 6a6b981979
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 17 deletions

6
flake.lock generated
View file

@ -41,11 +41,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {

View file

@ -4,17 +4,12 @@
utils.url = "flake:flake-utils";
};
outputs = { self, nixpkgs, utils, ... }: utils.lib.eachSystem [
"aarch64-darwin"
"x86_64-darwin"
"aarch64-linux"
"x86_64-linux"
]
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
# enable musl on Linux makes the build time 100x slower
# since it will trigger a toolchain rebuild
# enable musl on Linux will trigger a toolchain rebuild
# making the build very slow
pkgs = import nixpkgs { inherit system; };
# if nixpkgs.legacyPackages.${system}.stdenv.hostPlatform.isLinux
# then nixpkgs.legacyPackages.${system}.pkgsMusl
# else nixpkgs.legacyPackages.${system};
@ -49,10 +44,6 @@
{
packages.default = crunchy-cli;
overlays.default = _: prev: {
crunchy-cli = prev.crunchy-cli.override { };
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
cargo
@ -77,5 +68,9 @@
formatter = pkgs.nixpkgs-fmt;
}
);
) // {
overlays.default = final: prev: {
inherit (self.packages.${final.system}) crunchy-cli;
};
};
}