-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
42 lines (39 loc) · 946 Bytes
/
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
{
description = "Tiny but powerfull logging for C++";
outputs = {
self,
flake-utils,
nixpkgs,
}: let
inherit (flake-utils.lib) eachDefaultSystem;
inherit (nixpkgs.lib) hasSuffix;
rev = self.shortRev or self.dirtyShortRev or "unknown";
necrolog = {
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation {
name = "necrolog-${rev}";
src = builtins.path {
path = ./.;
filter = path: type: ! hasSuffix ".nix" path;
};
nativeBuildInputs = [cmake];
};
in
{
overlays = {
default = final: prev: {
necrolog = final.callPackage necrolog {};
};
};
}
// eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system}.extend self.overlays.default;
in {
packages.default = pkgs.necrolog;
legacyPackages = pkgs;
formatter = pkgs.alejandra;
});
}