Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25956,6 +25956,11 @@
githubId = 91203390;
name = "Felix Kimmel";
};
thesn = {
github = "thesn10";
githubId = 38666407;
name = "TheSN";
};
thesola10 = {
email = "me@thesola.io";
github = "Thesola10";
Expand Down
126 changes: 110 additions & 16 deletions pkgs/by-name/gp/gpac/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,131 @@
lib,
stdenv,
fetchFromGitHub,
gitUpdater,
unstableGitUpdater,
cctools,
pkg-config,
zlib,
}:
ffmpeg-headless,
freetype,
libjpeg_turbo,
libpng,
libmad,
faad2,
libogg,
libvorbis,
libtheora,
a52dec,
nghttp2,
openjpeg,
libcaca,
mesa,
mesa_glu,
xvidcore,
openssl,
jack2,
alsa-lib,
pulseaudio,
SDL2,
curl,
xorg,

stdenv.mkDerivation rec {
pname = "gpac";
version = "2.4.0";
withFullDeps ? false,
withFfmpeg ? withFullDeps,
releaseChannel ? "stable",
}:

src = fetchFromGitHub {
owner = "gpac";
repo = "gpac";
rev = "v${version}";
hash = "sha256-RADDqc5RxNV2EfRTzJP/yz66p0riyn81zvwU3r9xncM=";
let
stable = rec {
version = "2.4.0"; # See below TODO.
src = fetchFromGitHub {
owner = "gpac";
repo = "gpac";
rev = "v${version}";
hash = "sha256-RADDqc5RxNV2EfRTzJP/yz66p0riyn81zvwU3r9xncM=";
};
updateScript = gitUpdater {
odd-unstable = true;
rev-prefix = "v";
ignoredVersions = "^(abi|test)";
};
}
// {
# ffmpeg 7.0.2 works, but 7.1.1 (which is packaged in nixpkgs) doesn't
# because v2.4.0 of this package relies on internal private ffmpeg fields.
# TODO: remove this, and switch to simply using ffmpeg-headless,
# when updating stable to 2.6
ffmpeg-headless = ffmpeg-headless.override {
version = "7.0.2";
hash = "sha256-6bcTxMt0rH/Nso3X7zhrFNkkmWYtxsbUqVQKh25R1Fs=";
};
};
unstable = {
version = "2.4-unstable-2025-10-26";
src = fetchFromGitHub {
owner = "gpac";
repo = "gpac";
rev = "e1a54e81b3befba2b0bffd1d4c1cf50da516c5f3";
hash = "sha256-jSMBPuWPmTDCebImdmAcCZl0hEQpJK4QMNGcEXgs3A4=";
};
updateScript = unstableGitUpdater {
tagFormat = "v*";
tagPrefix = "v";
};
inherit ffmpeg-headless;
};
channelToUse = if releaseChannel == "unstable" then unstable else stable;
in
stdenv.mkDerivation (finalAttrs: {
pname = "gpac";
inherit (channelToUse) version src;

# this is the bare minimum configuration, as I'm only interested in MP4Box
# For most other functionality, this should probably be extended
nativeBuildInputs = [
pkg-config
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
cctools
]
++ lib.optionals withFfmpeg [
channelToUse.ffmpeg-headless
];

# ref: https://wiki.gpac.io/Build/build/GPAC-Build-Guide-for-Linux/#gpac-easy-build-recommended-for-most-users
buildInputs = [
zlib
]
++ lib.optionals withFullDeps [
freetype
libjpeg_turbo
libpng
libmad
faad2
libogg
libvorbis
libtheora
a52dec
nghttp2
openjpeg
libcaca
xorg.libX11
xorg.libXv
xorg.xorgproto
mesa
mesa_glu
xvidcore
openssl
jack2
alsa-lib
pulseaudio
SDL2
curl
];

enableParallelBuilding = true;

meta = with lib; {
passthru.updateScript = channelToUse.updateScript;

meta = {
description = "Open Source multimedia framework for research and academic purposes";
longDescription = ''
GPAC is an Open Source multimedia framework for research and academic purposes.
Expand All @@ -48,10 +141,11 @@ stdenv.mkDerivation rec {
And some server tools included in MP4Box and MP42TS applications.
'';
homepage = "https://gpac.wp.imt.fr";
license = licenses.lgpl21;
maintainers = with maintainers; [
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [
mgdelacroix
thesn
];
platforms = platforms.unix;
platforms = lib.platforms.unix;
};
}
})
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14539,4 +14539,8 @@ with pkgs;
davis = callPackage ../by-name/da/davis/package.nix {
php = php83; # https://github.com/tchapi/davis/issues/195
};

gpac-unstable = callPackage ../by-name/gp/gpac/package.nix {
releaseChannel = "unstable";
};
}
Loading