templates/c/flake.nix

30 lines
704 B
Nix
Raw Permalink Normal View History

2024-03-13 23:33:31 +01:00
{
description = "A bare minimum c flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (sys:
let pkgs = import nixpkgs { system = sys; };
devTools = [
pkgs.meson
pkgs.ninja
pkgs.pkg-config
];
in rec {
packages.default = packages.mypkg;
packages.mypkg = pkgs.stdenv.mkDerivation {
name = "mypkg";
version = "0.1.0";
src = ./.;
nativeBuildInputs = devTools;
};
devShells.default = pkgs.mkShell {
packages = devTools;
};
}
);
}