Add nix stuff
This commit is contained in:
parent
c3c5068e62
commit
36dba1e373
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -4,3 +4,7 @@
|
|||
*data*.txt
|
||||
main
|
||||
main-[0-9]
|
||||
|
||||
# Nix stuff
|
||||
result*
|
||||
/.direnv/
|
26
flake.lock
Normal file
26
flake.lock
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1701718080,
|
||||
"narHash": "sha256-6ovz0pG76dE0P170pmmZex1wWcQoeiomUZGggfH9XPs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2c7f3c0fb7c08a0814627611d9d7d45ab6d75335",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
48
flake.nix
Normal file
48
flake.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
description = "It's Adventing Time";
|
||||
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
inherit (nixpkgs) lib;
|
||||
genSystems = lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
pkgsFor = system: import nixpkgs {inherit system;};
|
||||
in {
|
||||
devShells = genSystems (
|
||||
system: let
|
||||
pkgs = pkgsFor system;
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
pkgs.clang-tools
|
||||
(pkgs.sbcl.withPackages (p:
|
||||
with p; [
|
||||
alexandria
|
||||
cl-ppcre
|
||||
iterate
|
||||
split-sequence
|
||||
str
|
||||
]))
|
||||
(pkgs.ghc.withPackages (p:
|
||||
with p; [
|
||||
containers
|
||||
regex-compat
|
||||
split
|
||||
unordered-containers
|
||||
vector
|
||||
]))
|
||||
];
|
||||
CXXFLAGS = "-std=c++20 -Wall";
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
formatter = genSystems (system: (pkgsFor system).alejandra);
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue