clox/flake.nix
2026-01-13 19:52:23 +00:00

43 lines
942 B
Nix

{
description = "C Template";
inputs = {
nixpkgs.url = "nixpkgs";
systems.url = "github:nix-systems/x86_64-linux";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
};
outputs =
{ self
, 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; [
ninja
cmake
clang-tools
lldb
];
in
{
devShells.default = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
inherit buildInputs nativeBuildInputs;
};
packages.default = pkgs.stdenv.mkDerivation {
inherit buildInputs nativeBuildInputs pname version src;
};
});
}