packaging
This commit is contained in:
parent
36dc98f776
commit
afa0145241
28
flake.nix
28
flake.nix
@ -6,20 +6,30 @@
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
in {
|
||||
imgui_dir = "${pkgs.imgui}/include/imgui";
|
||||
in rec {
|
||||
packages.x86_64-linux.microsa = pkgs.stdenv.mkDerivation {
|
||||
name = "microsa";
|
||||
src = self;
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
propagatedBuildInputs = [ pkgs.wayland pkgs.glfw-wayland pkgs.libffi ];
|
||||
preBuild = ''
|
||||
export IMGUI_DIR=${imgui_dir}
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp microsa $out/bin
|
||||
'';
|
||||
};
|
||||
devShell.x86_64-linux = pkgs.mkShell {
|
||||
name = "microsa-dev-shell";
|
||||
buildInputs = [
|
||||
pkgs.gnumake
|
||||
pkgs.gcc
|
||||
pkgs.pkg-config
|
||||
pkgs.wayland
|
||||
pkgs.glfw-wayland
|
||||
pkgs.libffi
|
||||
];
|
||||
shellHook = ''
|
||||
export IMGUI_DIR=${pkgs.imgui}/include/imgui
|
||||
'';
|
||||
] ++ packages.x86_64-linux.microsa.nativeBuildInputs
|
||||
++ packages.x86_64-linux.microsa.propagatedBuildInputs;
|
||||
shellHook = packages.x86_64-linux.microsa.preBuild;
|
||||
};
|
||||
defaultPackage.x86_64-linux = packages.x86_64-linux.microsa;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user