-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
50 lines (42 loc) · 1.45 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
{
# _____ __ _ __ _ __
# / ___/____ _/ /_ (_)___ ___ / / (_) /_ _________ ________ __
# \__ \/ __ `/ __ \/ / __ \/ _ \ / / / / __ \/ ___/ __ `/ ___/ / / /
# ___/ / /_/ / /_/ / / / / / __/ / /___/ / /_/ / / / /_/ / / / /_/ /
# /____/\__,_/_.___/_/_/ /_/\___/ /_____/_/_.___/_/ \__,_/_/ \__, /
# /____/
# A library for toy compiler written from scratch on C
description = "Building necessary implementations for a compiler named Sabine";
# Repos
inputs = {
# If you want something stable
# nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
# If you want fresh deps out of oven
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
# A few useful nix functions for painless flake management
utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, utils
} @ inputs:
utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
# Nix script formatter
formatter = pkgs.nixfmt-rfc-style;
# Development environment
devShells = {
default = import ./shell.nix { inherit pkgs; };
};
# Output packages
packages.default = pkgs.callPackage ./. { };
})
// # and
# Possible static attrsets (just in case for the future)
{ };
}