-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathflake.nix
31 lines (29 loc) · 1.1 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
{
description = "NES Emulator";
inputs = {
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
let supportedSystems = [ "x86_64-linux" ];
in
flake-utils.lib.eachSystem supportedSystems (system:
let
overlays = [ (import rust-overlay)];
pkgs = import nixpkgs { inherit system overlays; };
rust = pkgs.rust-bin.nightly."2021-11-20".default;
rustPlatform = pkgs.makeRustPlatform { cargo = rust; rustc = rust; };
pkg = rustPlatform.buildRustPackage {
name = "nes-emulator";
src = ./.;
buildInputs = [ pkgs.SDL2 ];
cargoSha256 = "sha256-IPZyBBrqi4kroBIfdLXPoHLKfZiwrjmkwC2bKDNw/XA=";
};
in {
packages = {
nes-emulator = pkg;
};
defaultPackage = pkg;
defaultApp = pkg;
});
}