-
Notifications
You must be signed in to change notification settings - Fork 54
/
default.nix
60 lines (53 loc) · 1.47 KB
/
default.nix
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
let sources = import ./nix/sources.nix;
in { system ? builtins.currentSystem
, nixpkgs ? sources.nixpkgs
, multiversal_src ? if builtins.pathExists ./multiversal/make-multiverse.rb then
./multiversal
else
sources.multiversal
, ...
}:
let
retroPlatforms = import nix/platforms.nix;
lib = ((import nixpkgs) { inherit system; }).lib;
# A Nixpkgs overlay.
overlay = lib.composeManyExtensions [
((import nix/overlay.nix) { inherit multiversal_src; })
(import nix/universal.nix)
(import nix/samples.nix)
];
overlaidPkgs = import nixpkgs {
inherit system;
overlays = [ overlay ];
};
crossPkgs = lib.mapAttrs
(name: plat:
import nixpkgs {
inherit system;
overlays = [ overlay ];
crossSystem = plat;
config = { allowUnsupportedSystem = true; };
})
retroPlatforms;
targetPkgs = lib.mapAttrs (name: cross: cross.buildPackages) crossPkgs;
shell = lib.mapAttrs
(name: cross:
cross.mkShell
{
nativeBuildInputs = with overlaidPkgs; [
retro68.hfsutils
retro68.tools
cmake
gnumake
];
buildInputs = [ cross.retro68.console ];
} // cross)
crossPkgs;
in
builtins.trace
"Warning: Retro68's default.nix is deprecated and will disappear soon. Please use the flake instead."
(shell.m68k // shell // {
inherit overlay;
inherit (overlaidPkgs) retro68;
targetPkg = targetPkgs;
})