Skip to content

Commit

Permalink
feat: add nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
wozeparrot committed Apr 15, 2023
1 parent 4953913 commit 4f75d24
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 2 deletions.
1 change: 0 additions & 1 deletion .envrc

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@ compile_commands.json

# VIA(L) json files that don't belong in QMK repo
via*.json

# direnv
.direnv/
130 changes: 130 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
description = "qmk dev flake";

inputs.nixpkgs.url = "github:nixos/nixpkgs/c0e881852006b132236cbf0301bd1939bb50867e";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.poetry2nix.url = "github:nix-community/poetry2nix/11c0df8e348c0f169cd73a2e3d63f65c92baf666";

outputs = inputs @ {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: {
python3 = prev.python3.override {
packageOverrides = self: super: {
tomlkit = super.tomlkit.overridePythonAttrs (old: rec {
version = "0.11.4";
src = super.fetchPypi {
inherit (old) pname;
inherit version;
sha256 = "sha256-MjWpAQ+uVDI+cnw6wG+3IHUv5mNbNCbjedrsYPvUSoM=";
};
});
};
};
})
];
};
poetry2nix = import inputs.poetry2nix {
inherit pkgs;
};
in {
devShell = import ./shell.nix {
inherit pkgs poetry2nix;
};
}
);
}
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ in
[clang-tools dfu-programmer dfu-util diffutils git pythonEnv niv]
++ lib.optional avr [
pkgsCross.avr.buildPackages.binutils
pkgsCross.avr.buildPackages.gcc
pkgsCross.avr.buildPackages.gcc8
avrlibc
avrdude
]
Expand Down

0 comments on commit 4f75d24

Please sign in to comment.