2022-01-02 19:12:11 +00:00
|
|
|
let sources = import ./nix/sources.nix;
|
|
|
|
in { system ? builtins.currentSystem, nixpkgs ? sources.nixpkgs, ... }:
|
2020-10-04 13:35:11 +00:00
|
|
|
|
2021-11-27 00:29:55 +00:00
|
|
|
let
|
2022-01-02 11:12:58 +00:00
|
|
|
retroPlatforms = import nix/platforms.nix;
|
2021-11-27 00:29:55 +00:00
|
|
|
|
2022-01-02 19:12:11 +00:00
|
|
|
lib = ((import <nixpkgs>) { }).lib;
|
|
|
|
|
|
|
|
multiversal_src = if builtins.pathExists ./multiversal/make-multiverse.rb then
|
|
|
|
./multiversal
|
|
|
|
else
|
|
|
|
sources.multiversal;
|
|
|
|
|
2021-11-27 00:29:55 +00:00
|
|
|
# A Nixpkgs overlay.
|
2022-01-02 11:12:58 +00:00
|
|
|
overlay = lib.composeManyExtensions [
|
2022-01-02 19:12:11 +00:00
|
|
|
((import nix/overlay.nix) { inherit multiversal_src; })
|
2022-01-02 11:12:58 +00:00
|
|
|
(import nix/universal.nix)
|
|
|
|
(import nix/samples.nix)
|
|
|
|
];
|
2022-01-02 19:12:11 +00:00
|
|
|
|
2022-01-02 11:12:58 +00:00
|
|
|
overlaidPkgs = import nixpkgs {
|
2021-11-27 00:29:55 +00:00
|
|
|
inherit system;
|
|
|
|
overlays = [ overlay ];
|
|
|
|
};
|
|
|
|
|
2022-01-03 12:32:18 +00:00
|
|
|
crossPkgs = lib.mapAttrs (name: plat:
|
2022-01-02 11:12:58 +00:00
|
|
|
import nixpkgs {
|
2021-11-27 00:29:55 +00:00
|
|
|
inherit system;
|
|
|
|
overlays = [ overlay ];
|
|
|
|
crossSystem = plat;
|
|
|
|
config = { allowUnsupportedSystem = true; };
|
2021-11-28 01:06:00 +00:00
|
|
|
}) retroPlatforms;
|
2021-11-27 00:29:55 +00:00
|
|
|
|
2022-01-03 12:32:18 +00:00
|
|
|
shell = lib.mapAttrs (name: cross:
|
2021-11-27 00:29:55 +00:00
|
|
|
cross.mkShell {
|
2022-01-02 11:12:58 +00:00
|
|
|
nativeBuildInputs = with overlaidPkgs; [
|
2021-11-28 00:02:08 +00:00
|
|
|
retro68.hfsutils
|
|
|
|
retro68.tools
|
|
|
|
cmake
|
|
|
|
gnumake
|
|
|
|
];
|
2021-11-28 01:06:00 +00:00
|
|
|
buildInputs = [ cross.retro68.console ];
|
2021-11-27 11:34:02 +00:00
|
|
|
} // cross) crossPkgs;
|
2021-11-27 00:32:30 +00:00
|
|
|
|
2021-12-08 22:39:19 +00:00
|
|
|
in shell.m68k // shell // {
|
|
|
|
inherit overlay;
|
2022-01-02 11:12:58 +00:00
|
|
|
inherit (overlaidPkgs) retro68;
|
2021-12-08 22:39:19 +00:00
|
|
|
}
|