Create BASE engine Nix derivation

This commit is contained in:
2025-07-10 12:02:07 +02:00
parent 0cb61384e9
commit 682f80d45f
7 changed files with 2216 additions and 45 deletions

View File

@@ -1,42 +1,28 @@
{
description = "BASE engine";
description = "The BASE engine";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11;
nixpkgs.url = "nixpkgs/nixos-25.05";
flake-utils.url = "github:numtide/flake-utils";
gradle2nix.url = "github:tadfisher/gradle2nix/v2";
gradle2nix.inputs.nixpkgs.follows = "nixpkgs";
gradle2nix.inputs.flake-utils.follows = "flake-utils";
};
outputs = { self, nixpkgs }:
let
pkgs = import nixpkgs { inherit system; };
system = "x86_64-linux";
opengl = "/run/opengl-driver";
in {
devShells.${system}.default = with pkgs; mkShell {
name = "base-editor";
buildInputs = [
xorg.libXtst
alsa-lib
gradle_7
jdk17
protobuf
];
shellHook = ''
echo
echo
echo "======================================================================================================"
echo "Welcome to BASE NixOS flake shell environment"
echo "Remember to provide following LD environment variable in order to run application outside this shell:"
echo
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo "======================================================================================================"
echo
echo
'';
LD_LIBRARY_PATH = "${opengl}/lib:${xorg.libXtst}/lib:${alsa-lib}/lib";
PROTOBUF_EXECUTABLE = "${protobuf}/bin/protoc";
};
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
in {
packages = rec {
base = pkgs.callPackage ./editor.nix (inputs // {inherit system;});
default = base;
};
});
}