FreeKill/flake.nix
Xinyang Li 8aa8775fd6
Initial support for building with nix. (#106)
Add flake.nix to project, so this project can be built with nix. 

Also:
- Fix a died link in README.
- Add missing dependencies in docs for Ubuntu and Arch (not tested).
2023-04-08 11:25:29 +08:00

39 lines
874 B
Nix

{
description = "Sanguosha (a.k.a. Legend of Three Kingdoms, LTK) written in Qt and Lua.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
};
outputs = { self, nixpkgs }: {
defaultPackage.x86_64-linux =
with import nixpkgs { system = "x86_64-linux"; };
stdenv.mkDerivation {
name = "freekill";
version = "0.0.7";
src = self;
buildInputs = with qt6; [
qtbase
qtdeclarative
qt5compat
qtmultimedia
qttools
sqlite
swig
openssl
flex
bison
readline
libgit2
lua5_4
];
nativeBuildInputs = [ cmake qt6.wrapQtAppsHook ];
postPatch = ''
substituteInPlace src/CMakeLists.txt --replace "LUA_LIB lua5.4" "LUA_LIB lua";
'';
};
};
}