-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
29 lines (26 loc) · 913 Bytes
/
flake.nix
File metadata and controls
29 lines (26 loc) · 913 Bytes
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
{
# I apologize in advance for any mistakes, I am new to Nix flakes
description = "celq - A Common Expression Language (CEL) CLI Tool";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
# I have no clue what I am doing here but I assume this covers 99% of users
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
#
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in
{
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
# Compiles from source with Cargo and installs celq. That part I understood!
default = pkgs.callPackage ./nix/celq.nix { };
# Development version from HEAD
dev = pkgs.callPackage ./nix/celq_dev.nix { };
});
};
}