30 lines
704 B
Nix
30 lines
704 B
Nix
|
{
|
||
|
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;
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|