Initial commit
This commit is contained in:
commit
d2182a433c
9 changed files with 421 additions and 0 deletions
42
flake.nix
Normal file
42
flake.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
description = "C Template";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs
|
||||
, flake-utils
|
||||
, ...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pname = "hello-world"; #package name
|
||||
version = "0.0.1";
|
||||
src = ./.;
|
||||
buildInputs = with pkgs; [
|
||||
];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
clang-tools
|
||||
ctags
|
||||
];
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
|
||||
inherit buildInputs nativeBuildInputs;
|
||||
};
|
||||
|
||||
packages.default = pkgs.stdenv.mkDerivation {
|
||||
inherit buildInputs nativeBuildInputs pname version src;
|
||||
};
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue