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