42 lines
900 B
Nix
42 lines
900 B
Nix
{
|
|
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 = "json"; #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;
|
|
});
|
|
}
|