add package for cxx template

This commit is contained in:
ulic-youthlic 2025-05-23 22:28:12 +08:00
parent 3614b353bb
commit 03636438a0
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721

View file

@ -18,14 +18,34 @@
};
in {
formatter = pkgs.alejandra;
checks = {
inherit (self.packages.${system}) default;
};
devShells.default = pkgs.mkShell {
inputsFrom = [] ++ (builtins.attrValues self.checks.${system});
packages = with pkgs; [
clang-tools
gcc
xmake
];
};
packages = rec {
cxx-demo = pkgs.stdenv.mkDerivation {
pname = "cxx-demo";
version = "unstable";
src = ./.;
strictDeps = true;
nativeBuildInputs = with pkgs; [
xmake
gnumake
];
preConfigure = ''
xmake project -k xmakefile
'';
env = {
INSTALLDIR = "${placeholder "out"}";
};
};
default = cxx-demo;
};
});
nixConfig = {
keepOutputs = true;