2023-11-22 17:43:05 +00:00
|
|
|
{
|
|
|
|
description = ''
|
2023-12-01 17:12:16 +00:00
|
|
|
CLI for initializing new projects deterministically with flakes.
|
2023-11-22 17:43:05 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
inputs = {
|
2023-11-26 19:56:13 +00:00
|
|
|
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
2023-11-22 17:43:05 +00:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2023-11-26 19:56:13 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2023-11-22 17:43:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
|
|
|
codelldb = pkgs.writeShellScriptBin "codelldb" ''
|
2023-11-22 20:43:34 +00:00
|
|
|
exec ${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb "$@"
|
2023-11-22 17:43:05 +00:00
|
|
|
'';
|
|
|
|
in
|
|
|
|
{
|
2023-11-26 15:40:55 +00:00
|
|
|
packages = {
|
2023-12-21 21:54:49 +00:00
|
|
|
app = pkgs.stdenv.mkDerivation {
|
2023-11-26 15:40:55 +00:00
|
|
|
pname = "bootstrap";
|
|
|
|
src = ./.;
|
2023-12-13 16:27:11 +00:00
|
|
|
version = "0.1.3";
|
2024-01-06 18:12:44 +00:00
|
|
|
nativeBuildInputs = with pkgs; [ cmake doxygen ];
|
2023-12-21 21:50:32 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ./bootstrap $out/bin
|
|
|
|
'';
|
2023-11-26 15:40:55 +00:00
|
|
|
};
|
|
|
|
|
2023-11-26 15:57:58 +00:00
|
|
|
default = pkgs.writeShellScriptBin "bootstrap" ''
|
|
|
|
if [ -z "$BOOTSTRAP_ROOT_DIR" ]; then
|
|
|
|
export BOOTSTRAP_ROOT_DIR="${./specs}"
|
|
|
|
fi
|
2023-12-21 21:54:49 +00:00
|
|
|
exec ${self.packages.${system}.app}/bin/bootstrap "$@"
|
2023-11-26 15:57:58 +00:00
|
|
|
'';
|
2023-11-26 15:40:55 +00:00
|
|
|
};
|
2023-11-22 18:15:12 +00:00
|
|
|
devShells.default = pkgs.mkShell.override {
|
|
|
|
# https://nixos.wiki/wiki/Using_Clang_instead_of_GCC
|
|
|
|
stdenv = pkgs.clangStdenv;
|
|
|
|
} {
|
2023-11-22 17:43:05 +00:00
|
|
|
packages = with pkgs; [
|
|
|
|
clang-tools
|
2023-12-19 23:58:19 +00:00
|
|
|
cmake
|
2023-12-21 23:13:17 +00:00
|
|
|
cmakeCurses
|
2023-11-22 17:43:05 +00:00
|
|
|
codelldb
|
2023-11-25 18:51:42 +00:00
|
|
|
doxygen
|
2023-11-22 17:43:05 +00:00
|
|
|
];
|
2023-11-22 20:43:34 +00:00
|
|
|
shellHook = ''
|
2023-11-23 18:02:40 +00:00
|
|
|
export BOOTSTRAP_ROOT_DIR="${./specs}"
|
2023-11-22 20:43:34 +00:00
|
|
|
'';
|
2023-11-22 17:43:05 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|