ci: nix flake

This commit is contained in:
Himadri Bhattacharjee
2025-07-25 20:34:03 +05:30
parent a00603ec3a
commit 3cf0675874
3 changed files with 50 additions and 0 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

25
flake.lock generated Normal file
View File

@@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1753399495,
"narHash": "sha256-7XG/QBqhrYOyA2houjRTL2NMa7IKZZ/somBqr+Q/6Wo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d00f23f023b7215b3f1035adb5247c8ec180dbc",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

24
flake.nix Normal file
View File

@@ -0,0 +1,24 @@
{
description = "devshell";
outputs =
{ nixpkgs, ... }:
let
forAllSystems =
f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (s: f nixpkgs.legacyPackages.${s});
in
{
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
stdenv.cc.cc
arduino-cli
platformio
];
LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib";
ARDUINO_CONFIG_FILE = "./arduino-cli.yaml";
};
});
};
}