This commit is contained in:
adisbladis 2024-09-02 23:34:33 +02:00 committed by GitHub
commit 4bcd9be0dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 274 additions and 0 deletions

222
flake.lock generated Normal file
View file

@ -0,0 +1,222 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"zephyr-nix",
"pyproject-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"mdbook-nixdoc": {
"inputs": {
"nix-github-actions": [
"zephyr-nix",
"pyproject-nix",
"nix-github-actions"
],
"nixpkgs": [
"zephyr-nix",
"pyproject-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1708395692,
"narHash": "sha256-smf0VmxGbjJDZqKvxxG3ZVqubgbVwAWG26wPo+BT/A0=",
"owner": "adisbladis",
"repo": "mdbook-nixdoc",
"rev": "d6a71b114b9221c0b4f20d31b81766d072cc26be",
"type": "github"
},
"original": {
"owner": "adisbladis",
"repo": "mdbook-nixdoc",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"zephyr-nix",
"pyproject-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701208414,
"narHash": "sha256-xrQ0FyhwTZK6BwKhahIkUVZhMNk21IEI1nUcWSONtpo=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "93e39cc1a087d65bcf7a132e75a650c44dd2b734",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1708294118,
"narHash": "sha256-evZzmLW7qoHXf76VCepvun1esZDxHfVRFUJtumD7L2M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e0da498ad77ac8909a980f07eff060862417ccf7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pyproject-nix": {
"inputs": {
"flake-parts": "flake-parts",
"mdbook-nixdoc": "mdbook-nixdoc",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"zephyr-nix",
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1708398443,
"narHash": "sha256-hK1nTAzhqM0C3gxAexLS5uvHa3aA4/ReGFxoVVX6qR8=",
"owner": "nix-community",
"repo": "pyproject.nix",
"rev": "b8a5076ab323a63035dc0fb7b622109a52585c14",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "pyproject.nix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"zephyr": "zephyr",
"zephyr-nix": "zephyr-nix"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"zephyr-nix",
"pyproject-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1702979157,
"narHash": "sha256-RnFBbLbpqtn4AoJGXKevQMCGhra4h6G2MPcuTSZZQ+g=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "2961375283668d867e64129c22af532de8e77734",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"zephyr": {
"flake": false,
"locked": {
"lastModified": 1706300580,
"narHash": "sha256-0o/mVvFoFKTN0IqtrGm0xy0tiHxFfEqFW9UVp4MVoFg=",
"owner": "zmkfirmware",
"repo": "zephyr",
"rev": "339570e2393b108bf8f9241018ecaf5615c25469",
"type": "github"
},
"original": {
"owner": "zmkfirmware",
"ref": "v3.5.0+zmk-fixes",
"repo": "zephyr",
"type": "github"
}
},
"zephyr-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"pyproject-nix": "pyproject-nix",
"zephyr": [
"zephyr"
]
},
"locked": {
"lastModified": 1708401020,
"narHash": "sha256-nx3ZKpwzZS2LNPMRiapkxWPWEYKImjSR/rNPNMbJdcY=",
"owner": "adisbladis",
"repo": "zephyr-nix",
"rev": "6ad6ae9ed9b8d4684dd37d4bf390bdd05a810a98",
"type": "github"
},
"original": {
"owner": "adisbladis",
"repo": "zephyr-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

52
flake.nix Normal file
View file

@ -0,0 +1,52 @@
{
description = "# Zephyr Mechanical Keyboard (ZMK) Firmware";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
# Customize the version of Zephyr used by the flake here
zephyr = {
type = "github";
owner = "zmkfirmware";
repo = "zephyr";
ref = "v3.5.0+zmk-fixes";
flake = false;
};
zephyr-nix.url = "github:adisbladis/zephyr-nix";
zephyr-nix.inputs.nixpkgs.follows = "nixpkgs";
zephyr-nix.inputs.zephyr.follows = "zephyr";
};
outputs =
{ nixpkgs
, flake-utils
, zephyr-nix
, ...
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
zephyr = zephyr-nix.packages.x86_64-linux;
in
{
devShell =
pkgs.mkShellNoCC {
packages = [
(zephyr.sdk.override {
targets = [
"arm-zephyr-eabi"
];
})
zephyr.pythonEnv
zephyr.hosttools-nix
pkgs.cmake
pkgs.ccache
pkgs.ninja
pkgs.dfu-util
];
};
});
}