-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
52 lines (48 loc) · 1.77 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
description = "A wrapper for CharaChorder's Serial API written in Python";
inputs = {
flakey-devShells.url = "https://flakehub.com/f/GetPsyched/not-so-flakey-devshells/0.x.x.tar.gz";
flakey-devShells.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ nixpkgs, flakey-devShells, ... }:
let
systems = [ "i686-linux" "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs systems;
nixpkgsFor = function: forAllSystems (system: function nixpkgs.legacyPackages.${system});
in
{
packages = nixpkgsFor (pkgs: {
default = pkgs.python3.withPackages (py-pkgs: with py-pkgs; [
(callPackage ./package.nix { })
] ++ (callPackage ./package.nix { }).nativeBuildInputs);
});
devShells = forAllSystems (system: {
default =
let
flakey-devShell-pkgs = flakey-devShells.outputs.packages.${system};
pkgs = nixpkgs.legacyPackages.${system};
in
with pkgs; mkShell {
buildInputs = [
mdbook
(python39.withPackages (py-pkgs: with py-pkgs; [
(inquirer.overrideAttrs {
patches = [ ./inquirer-symbol.patch ];
})
pyserial
setuptools
]))
(flakey-devShell-pkgs.default.override { environments = [ "nix" ]; })
(flakey-devShell-pkgs.vscodium.override {
environments = [ "nix" "python" ];
extensions = with vscode-extensions; [
redhat.vscode-yaml
tamasfe.even-better-toml
yzhang.markdown-all-in-one
];
})
];
};
});
};
}