-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
42 lines (38 loc) · 1.24 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
# Make sure you replace this so it points to the actual nimble2nix repo:
# nimble2nix.url = "github:bandithedoge/nimble2nix";
nimble2nix.url = "path:../.";
};
outputs = {
self,
nixpkgs,
flake-utils,
nimble2nix,
...
} @ inputs:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [nimble2nix.overlay];
};
in {
# This function is defined at:
# https://github.com/bandithedoge/nimble2nix/blob/main/buildNimblePackage.nix
defaultPackage = pkgs.buildNimblePackage {
# Name and version of your package
pname = "example_package";
version = "0.1";
# Where your package is located
# Must contain `nimble2nix.json` generated by running `nimble2nix`
src = ./.;
# Uncomment the following line if your `nimble2nix.json` has a different name:
# deps = ./my-custom-deps.json;
# Extra libraries required by Nim packages or build scripts
buildInputs = with pkgs; [SDL2];
nativeBuildInputs = with pkgs; [neofetch];
};
});
}