Flake for other systems too
This commit is contained in:
@@ -9,7 +9,6 @@ You can play around with it via a command-line interface (`RaftExplorer`, which
|
||||
|
||||
The Node ecosystem being what it is, it is *strongly* recommended that you use the associated Nix flake to give you an environment in which you can run the Fable UI.
|
||||
Simply `nix develop` (optionally `--profile .profile` if you want to persist the configuration into a [profile](https://nixos.org/manual/nix/stable/package-management/profiles.html) so that it doesn't get garbage-collected).
|
||||
If you're running on a non-`aarch64-darwin` platform, please feel free to contribute the appropriate changes to `flake.nix`; it should be easy to generalise using e.g. `flake-utils`.
|
||||
|
||||
There are pull request checks on this repo, enforcing [Fantomas](https://github.com/fsprojects/fantomas/)-compliant formatting.
|
||||
After checking out the repo, you may wish to add a pre-push hook to ensure locally that formatting is complete, rather than having to wait for the CI checks to tell you that you haven't formatted your code.
|
||||
|
16
flake.lock
generated
16
flake.lock
generated
@@ -45,6 +45,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flakeCompat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -79,6 +94,7 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"alejandra": "alejandra",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
|
30
flake.nix
30
flake.nix
@@ -5,21 +5,31 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:kamadorueda/alejandra/3.0.0";
|
||||
};
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
alejandra,
|
||||
flake-utils,
|
||||
...
|
||||
}: {
|
||||
devShell.aarch64-darwin = let
|
||||
system = "aarch64-darwin";
|
||||
in let
|
||||
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [alejandra.defaultPackage.aarch64-darwin pkgs.nodejs-14_x pkgs.dotnet-sdk_6 pkgs.darwin.apple_sdk.frameworks.CoreServices];
|
||||
};
|
||||
};
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs =
|
||||
[alejandra.defaultPackage.${system} pkgs.nodejs-14_x pkgs.dotnet-sdk_6]
|
||||
++ (
|
||||
if pkgs.stdenv.isDarwin
|
||||
then [pkgs.darwin.apple_sdk.frameworks.CoreServices]
|
||||
else []
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user