fix: make flake work for aarch64 and darwin
This commit is contained in:
parent
0cbd36088f
commit
d83955f001
2 changed files with 40 additions and 11 deletions
43
flake.nix
43
flake.nix
|
@ -1,13 +1,42 @@
|
|||
{
|
||||
description = "Repo RS";
|
||||
description = "repo-rs";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }: {
|
||||
devShells.x86_64-linux.default = import ./shell.nix { pkgs = nixpkgs.legacyPackages.x86_64-linux; };
|
||||
packages.x86_64-linux.repo-rs = nixpkgs.legacyPackages.x86_64-linux.callPackage ./. { };
|
||||
packages.x86_64-linux.default = self.packages.x86_64-linux.repo-rs;
|
||||
};
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
systems = [
|
||||
"aarch64-darwin"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"x86_64-linux"
|
||||
];
|
||||
eachSystem =
|
||||
f:
|
||||
nixpkgs.lib.genAttrs systems (
|
||||
system:
|
||||
f rec {
|
||||
inherit system;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
devShells = eachSystem (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
default = import ./shell.nix { inherit pkgs; };
|
||||
}
|
||||
);
|
||||
packages = eachSystem (
|
||||
{ pkgs, system, ... }:
|
||||
{
|
||||
repo-rs = pkgs.callPackage ./. { };
|
||||
default = self.packages.${system}.repo-rs;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue