-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
30 lines (30 loc) · 942 Bytes
/
flake.nix
File metadata and controls
30 lines (30 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
description = "SML# package repository";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs =
{ self, nixpkgs }:
let
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
pkgs = system: import ./. { pkgs = nixpkgs.legacyPackages.${system}; };
packages = nixpkgs.lib.genAttrs systems pkgs;
addDefault = k: packages: packages // { default = packages.${k}; };
in
{
packages = nixpkgs.lib.mapAttrs (_: addDefault "smlsharp") packages;
devShells = nixpkgs.lib.mapAttrs (
system: packages:
packages // { default = nixpkgs.legacyPackages.${system}.mkShell {
inputsFrom = [ packages.smlsharp ];
packages = [ nixpkgs.legacyPackages.${system}.autoconf ];
}; }
) packages;
overlays = {
packages = final: prev: pkgs final.system;
};
};
}