forked from gpac/gpac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
55 lines (54 loc) · 1.2 KB
/
flake.nix
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 = "GPAC Multimedia Open Source Project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }@inputs:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
buildInputs = with pkgs; [
zlib
git
freetype
libjpeg_turbo
libpng
libmad
faad2
libogg
libvorbis
libtheora
a52dec
ffmpeg
xorg.libX11
xorg.libXv
xorg.xorgproto
mesa
xvidcore
openssl
alsa-lib
jack2
pulseaudio
SDL2
mesa-demos
];
nativeBuildInputs = with pkgs; [ pkg-config ];
in
with pkgs; {
devShells.x86_64-linux.default = mkShell {
inherit buildInputs nativeBuildInputs;
};
packages.x86_64-linux.default = with import nixpkgs { system = "x86_64-linux"; };
stdenv.mkDerivation {
name = "gpac";
src = self;
inherit buildInputs nativeBuildInputs;
configurePhase = ''
runHook preConfigure
./configure --prefix=$out
runHook postConfigure
'';
buildPhase = "make -j $NIX_BUILD_CORES";
installPhase = "make install";
};
};
}