Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 3e2200f

Browse files
committed
feat: bump all software & kernel, fix libcamera issues, load versions dynamically
1 parent 628e512 commit 3e2200f

File tree

6 files changed

+80
-55
lines changed

6 files changed

+80
-55
lines changed

flake.lock

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
66
u-boot-src = {
77
flake = false;
8-
url = "https://ftp.denx.de/pub/u-boot/u-boot-2024.07.tar.bz2";
8+
url = "https://ftp.denx.de/pub/u-boot/u-boot-2025.01.tar.bz2";
99
};
1010
rpi-linux-stable-src = {
1111
flake = false;
1212
url = "github:raspberrypi/linux/stable_20241008";
1313
};
14-
rpi-linux-6_6_67-src = {
14+
rpi-linux-6_6_y-src = {
1515
flake = false;
1616
url = "github:raspberrypi/linux/rpi-6.6.y";
1717
};
18-
rpi-linux-6_10_12-src = {
18+
rpi-linux-6_12_y-src = {
1919
flake = false;
20-
url = "github:raspberrypi/linux/rpi-6.10.y";
20+
url = "github:raspberrypi/linux/rpi-6.12.y";
2121
};
2222
rpi-firmware-src = {
2323
flake = false;
24-
url = "github:raspberrypi/firmware/1.20241008";
24+
url = "github:raspberrypi/firmware/1.20241126";
2525
};
2626
rpi-firmware-nonfree-src = {
2727
flake = false;
@@ -33,11 +33,11 @@
3333
};
3434
rpicam-apps-src = {
3535
flake = false;
36-
url = "github:raspberrypi/rpicam-apps/v1.5.2";
36+
url = "github:raspberrypi/rpicam-apps/v1.5.3";
3737
};
3838
libcamera-src = {
3939
flake = false;
40-
url = "github:raspberrypi/libcamera/69a894c4adad524d3063dd027f5c4774485cf9db"; # v0.3.1+rpt20240906
40+
url = "github:raspberrypi/libcamera/v0.3.2+rpt20241119";
4141
};
4242
libpisp-src = {
4343
flake = false;
@@ -51,15 +51,18 @@
5151
system = "aarch64-linux";
5252
overlays = with self.overlays; [ core libcamera ];
5353
};
54+
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
55+
lib = srcs.nixpkgs.lib;
56+
inputs = lib.recursiveUpdate (builtins.removeAttrs srcs [ "self" ]) { inherit lock; };
5457
in
5558
{
5659
overlays = {
57-
core = import ./overlays (builtins.removeAttrs srcs [ "self" ]);
58-
libcamera = import ./overlays/libcamera.nix (builtins.removeAttrs srcs [ "self" ]);
60+
core = import ./overlays inputs;
61+
libcamera = import ./overlays/libcamera.nix inputs;
5962
};
6063
nixosModules = {
6164
raspberry-pi = import ./rpi {
62-
inherit pinned;
65+
inherit pinned inputs;
6366
core-overlay = self.overlays.core;
6467
libcamera-overlay = self.overlays.libcamera;
6568
};

overlays/default.nix

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{ u-boot-src
22
, rpi-linux-stable-src
3-
, rpi-linux-6_6_67-src
4-
, rpi-linux-6_10_12-src
3+
, rpi-linux-6_6_y-src
4+
, rpi-linux-6_12_y-src
55
, rpi-firmware-src
66
, rpi-firmware-nonfree-src
77
, rpi-bluez-firmware-src
8+
, lock
89
, ...
910
}:
1011
final: prev:
1112
let
1213
versions = {
1314
v6_6_51.src = rpi-linux-stable-src;
14-
v6_6_67.src = rpi-linux-6_6_67-src;
15-
v6_10_12 = {
16-
src = rpi-linux-6_10_12-src;
15+
v6_6_70.src = rpi-linux-6_6_y-src;
16+
v6_12_9 = {
17+
src = rpi-linux-6_12_y-src;
1718
patches = [
1819
{
1920
name = "remove-readme-target.patch";
@@ -87,7 +88,7 @@ in
8788
defconfig = "rpi_arm64_defconfig";
8889
extraMeta.platforms = [ "aarch64-linux" ];
8990
filesToInstall = [ "u-boot.bin" ];
90-
version = "2024.04";
91+
version = builtins.head (builtins.match ".*-(.*?).tar.*" lock.nodes.u-boot-src.original.url);
9192
patches = [ ];
9293
makeFlags = [ ];
9394
src = u-boot-src;
@@ -118,7 +119,7 @@ in
118119
# rpi kernels and firmware are available at
119120
# `pkgs.rpi-kernels.<VERSION>.<BOARD>'.
120121
#
121-
# For example: `pkgs.rpi-kernels.v6_6_67.bcm2712'
122+
# Check all available versions/boards with: nix flake show --all-systems
122123
rpi-kernels = rpi-kernels (
123124
final.lib.cartesianProduct
124125
{ board = boards; version = (builtins.attrNames versions); }

overlays/libcamera.nix

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{ rpicam-apps-src
22
, libcamera-src
33
, libpisp-src
4+
, lock
45
, ...
56
}:
67
final: prev: {
@@ -10,18 +11,23 @@ final: prev: {
1011

1112
libpisp = final.stdenv.mkDerivation {
1213
name = "libpisp";
13-
version = "1.0.7";
14+
version = lock.nodes.libpisp-src.original.ref;
1415
src = libpisp-src;
1516
nativeBuildInputs = with final; [ pkg-config meson ninja ];
1617
buildInputs = with final; [ nlohmann_json boost ];
1718
# Meson is no longer able to pick up Boost automatically.
1819
# https://github.com/NixOS/nixpkgs/issues/86131
1920
BOOST_INCLUDEDIR = "${prev.lib.getDev final.boost}/include";
2021
BOOST_LIBRARYDIR = "${prev.lib.getLib final.boost}/lib";
22+
# Copy image filters into lib
23+
postInstall = ''
24+
mkdir -p $out/lib/libpisp/backend
25+
cp src/libpisp/backend/*.json $out/lib/libpisp/backend
26+
'';
2127
};
2228

2329
libcamera = prev.libcamera.overrideAttrs (old: {
24-
version = "0.3.1";
30+
version = lock.nodes.libcamera-src.original.ref;
2531
src = libcamera-src;
2632
buildInputs = old.buildInputs ++ (with final; [
2733
libpisp
@@ -50,8 +56,12 @@ final: prev: {
5056
"-Dlc-compliance=disabled"
5157
"-Dcam=disabled"
5258
"-Dqcam=disabled"
53-
"-Ddocumentation=enabled"
59+
"-Ddocumentation=disabled"
5460
"-Dpycamera=enabled"
5561
];
62+
63+
# Issue introduced recently
64+
# https://github.com/raspberrypi/libcamera/issues/226
65+
CXXFLAGS = "-Wno-sign-compare -Wno-stringop-truncation";
5666
});
5767
}

overlays/rpicam-apps.nix

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ stdenv.mkDerivation {
66

77
src = rpicam-apps-src;
88

9-
nativeBuildInputs = with pkgs; [ meson pkg-config ];
9+
nativeBuildInputs = with pkgs; [ meson pkg-config makeWrapper ];
1010
buildInputs = with pkgs; [ libjpeg libtiff libcamera libepoxy boost libexif libpng ffmpeg libdrm ninja ];
1111
mesonFlags = [
1212
"-Denable_qt=disabled"
@@ -21,6 +21,17 @@ stdenv.mkDerivation {
2121
BOOST_INCLUDEDIR = "${lib.getDev pkgs.boost}/include";
2222
BOOST_LIBRARYDIR = "${lib.getLib pkgs.boost}/lib";
2323

24+
postFixup = let
25+
wrap = "wrapProgram $out/bin/rpicam";
26+
ipa-var = "--set LIBCAMERA_IPA_PROXY_PATH ${pkgs.libcamera}/libexec/libcamera";
27+
in ''
28+
${wrap}-hello ${ipa-var}
29+
${wrap}-raw ${ipa-var}
30+
${wrap}-vid ${ipa-var}
31+
${wrap}-jpeg ${ipa-var}
32+
${wrap}-still ${ipa-var}
33+
'';
34+
2435
meta = with lib; {
2536
description = "Userland tools interfacing with Raspberry Pi cameras";
2637
homepage = "https://github.com/raspberrypi/libcamera-apps";

rpi/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ pinned, core-overlay, libcamera-overlay }:
1+
{ pinned, core-overlay, libcamera-overlay, ... }:
22
{ lib, pkgs, config, ... }:
33

44
let

0 commit comments

Comments
 (0)