-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
49 lines (42 loc) · 1.14 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
{
description = "LC-3.2 Simulator Development and Build Environment";
inputs = {
nixpkgs-23-05.url = "github:NixOS/nixpkgs/release-23.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs-23-05, flake-utils }@inputs :
flake-utils.lib.eachSystem ["x86_64-linux"] (system:
let
name = "lc32sim-dev";
pkgs = nixpkgs-23-05.legacyPackages.${system};
inherit (pkgs) stdenv;
nativeBuildInputs = [
pkgs.cmake
pkgs.ninja
pkgs.boost
pkgs.argparse
pkgs.git
];
propagatedBuildInputs = [
pkgs.SDL2
];
in {
packages = rec {
default = lc32sim;
lc32sim = stdenv.mkDerivation {
inherit name nativeBuildInputs propagatedBuildInputs;
src = self;
cmakeFlags = ["-DLC32SIM_SYSTEM_ARGPARSE=ON"];
};
};
devShells = rec {
default = lc32sim;
lc32sim = pkgs.mkShell {
inherit name nativeBuildInputs propagatedBuildInputs;
shellHook = ''
export PS1="(${name}) [\u@\h \W]\$ "
'';
};
};
});
}