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" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1689068808,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

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