cxxmodules_minimal/flake.nix

45 lines
950 B
Nix
Raw Normal View History

2024-09-11 16:37:20 +02:00
{
nixConfig.bash-prompt = "[shell $(pwd)]$ ";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
};
outputs = { self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
packages.x86_64-linux.default = pkgs.llvmPackages_17.libcxxStdenv.mkDerivation {
name = "modules_test";
src = ./.;
nativeBuildInputs = with pkgs; [
cmake
llvmPackages_17.clang-tools
ninja
];
buildInputs = with pkgs; [
llvmPackages_17.clang-tools
];
configurePhase = ''
cmake . -GNinja
'';
buildPhase = ''
ninja modules_test
'';
installPhase = ''
ls
mkdir -p $out/bin
cp modules_test $out/bin
'';
};
};
}