forked from letoram/arcan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (46 loc) · 1.53 KB
/
flake.nix
File metadata and controls
55 lines (46 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
description = "TODO(akavel)";
outputs = { self, nixpkgs }: {
defaultPackage.x86_64-linux = self.packages.x86_64-linux.all;
packages.x86_64-linux.all =
# TODO(akavel): reuse code here and in default.nix
with import nixpkgs { system = "x86_64-linux"; };
stdenv.mkDerivation rec {
name = "arcan";
version="1";
src = ./.;
nativeBuildInputs = with pkgs; [
cmake git makeWrapper
] ;
CMAKE_CXX_FLAGS = "-msse4.1";
DRM_INCLUDE_DIR = "${pkgs.libdrm.dev}/include/libdrm";
buildInputs = with pkgs; [
freetype openal sqlite mesa_noglu libGL SDL2 libdrm.dev
lua51Packages.lua libusb ffmpeg libxkbcommon
lzma vlc apr harfbuzz
] ;
preConfigurePhases = ["noSuidInstall"];
noSuidInstall = ''
rm -rf build
mkdir -p build
sed -i 's/SETUID//g' src/CMakeLists.txt
'';
cmakeFlags = builtins.concatStringsSep " " [
"-DENABLE_SIMD=Off"
"-DDRM_INCLUDE_DIR=${DRM_INCLUDE_DIR}"
"-DVIDEO_PLATFORM=egl-dri"
"-DHYBRID_SDL=On" # "Produce an arcan_sdl main binary as well"
"../src"
];
hardeningDisable = [ "all" ];
postFixup = ''
data=$src/data
wrapProgram $out/bin/arcan \
--prefix PATH : $out/bin \
--add-flags "-T $data/scripts" \
--add-flags "-p $data/resources" \
--add-flags "-B $out/bin/arcan_frameserver"
'';
};
};
}