blob: 2c4a2808c53464a736978d26ef669df52ca6aba7 (
plain)
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
|
#!/usr/bin/env bash
set -eu
if [ -f ./flake.nix ]; then
echo "There is already existing flake.nix file!" >&2
exit 1
fi
cat >./flake.nix <<"EOF"
{
outputs = { self, nixpkgs, flake-utils, personal }:
with flake-utils.lib;
eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells = filterPackages system {
default = pkgs.mkShell {
packages = with pkgs; [
clang-tools
gcc gdb pkg-config
cppcheck flawfinder bear
meson
];
inputsFrom = with pkgs; [
personal.devShells.${system}.default
];
};
};
});
}
EOF
|