-
Notifications
You must be signed in to change notification settings - Fork 202
/
Copy pathflake.nix
60 lines (53 loc) · 1.48 KB
/
flake.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
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:edolstra/flake-compat";
};
outputs =
{ nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
in
{
packages = rec {
glasgow = pkgs.glasgow.overrideAttrs {
version = "0+unstable-memory-24x-emu";
src = ./.;
doInstallCheck = false;
};
default = glasgow;
};
devShell = pkgs.mkShell {
packages = with pkgs; [
# Must come before yosys in this array, so it has precedence
# over the propagatedBuildInput python3 from yosys.
(python3.withPackages (
pypkgs: with pypkgs; [
typing-extensions
amaranth
packaging
platformdirs
fx2
libusb1
pyvcd
aiohttp
unittestCheckHook
]
))
yosys
icestorm
nextpnr
sdcc
];
YOSYS = "${lib.getBin pkgs.yosys}/bin/yosys";
ICEPACK = "${lib.getBin pkgs.icestorm}/bin/icepack";
NEXTPNR_ICE40 = "${lib.getBin pkgs.nextpnr}/bin/nextpnr-ice40";
};
formatter = pkgs.nixfmt-rfc-style;
}
);
}