Add nix flake support
Now that nix 2.4 is out, flakes are no longer experimental.
This commit is contained in:
parent
29af1411ce
commit
23c2ef0556
3 changed files with 57 additions and 3 deletions
43
flake.lock
generated
Normal file
43
flake.lock
generated
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1638910453,
|
||||
"narHash": "sha256-fofA4tsAAdNgE+9Py0VsVbyX2ZQkgV+CVqQKGBA/dLE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f225322e3bea8638304adfcf415cd11de99f2208",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
11
flake.nix
Normal file
11
flake.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
description = "# Zephyr™ Mechanical Keyboard (ZMK) Firmware";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in { devShell = import ./shell.nix { inherit pkgs; }; });
|
||||
}
|
|
@ -6,14 +6,14 @@ let inherit (lib) ;
|
|||
in mkShell {
|
||||
buildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
python3
|
||||
ccache
|
||||
ninja
|
||||
dtc
|
||||
dfu-util
|
||||
gcc-arm-embedded
|
||||
python3
|
||||
python38Packages.west
|
||||
python38Packages.pyelftools
|
||||
python38Packages.pip
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
|
|
Loading…
Add table
Reference in a new issue