-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
48 lines (42 loc) · 1.38 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
{
description = "A template for Nix based C++ project setup.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, ... }@inputs: inputs.utils.lib.eachSystem [
# Add the system/architecture you would like to support here. Note that not
# all packages in the official nixpkgs support all platforms.
"x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"
] (system: let
pkgs = import nixpkgs {
inherit system;
};
in {
devShells.default = pkgs.mkShell rec {
# Update the name to something that suites your project.
name = "wikidice";
stdenv = pkgs.llvmPackages_17.libcxxStdenv;
packages = with pkgs; [
# Development Tools
cmake
ninja
extra-cmake-modules
pkg-config
llvmPackages_17.clang
# Development time dependencies
cppcheck
# Build time and Run time dependencies
zstd
];
# Setting up the environment variables you need during
# development.
shellHook = let
icon = "f121";
in ''
export PS1="$(echo -e '\u${icon}') {\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]} (${name}) \\$ \[$(tput sgr0)\]"
'';
};
packages.default = pkgs.callPackage ./default.nix {};
});
}