use nix build & meson & zlog

This commit is contained in:
Rongsong Shen 2025-11-03 18:19:59 +08:00
parent 0123623742
commit 346768a144
60 changed files with 13739 additions and 0 deletions

38
src/flake.nix Normal file
View file

@ -0,0 +1,38 @@
{
description = "Flake for NEXA xce";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
xbuild.url = "github:shen390s/my-nix-channel?ref=master";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, xbuild, flake-utils }:
let
supportedSystems = [ "x86_64-linux" ];
myCommitId =
if builtins.hasAttr "shortRev" self
then self.shortRev
else self.dirtyShortRev;
in
flake-utils.lib.eachSystem supportedSystems (
system: let
mypkgs = xbuild.packages.${system};
overlays = [
(final: prev: prev // mypkgs)
];
pkgs = import nixpkgs { inherit overlays system;};
xpkgs = import ./default.nix {
inherit pkgs myCommitId;
};
in rec {
packages = pkgs // xpkgs;
defaultPackage = xpkgs.xce_withoutdb_debug;
devShells.default = pkgs.mkShell {
nativeBuildInputs = xpkgs.xce.nativeBuildInputs;
};
devShell = self.devShells.${system}.default;
}
);
}