nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 fetchpatch,
6 gitUpdater,
7 glib,
8 meson,
9 ninja,
10 pkg-config,
11 rustc,
12 libbsd,
13 libcamera,
14 gtk3,
15 libtiff,
16 zbar,
17 libjpeg,
18 libexif,
19 libraw,
20 libpulseaudio,
21 ffmpeg-headless,
22 v4l-utils,
23 makeWrapper,
24 python3,
25}:
26
27stdenv.mkDerivation (finalAttrs: {
28 pname = "millipixels";
29 version = "0.23.0";
30
31 src = fetchFromGitLab {
32 owner = "Librem5";
33 repo = "millipixels";
34 rev = "v${finalAttrs.version}";
35 domain = "source.puri.sm";
36 hash = "sha256-Sj14t6LeZWNONcgrwJxN4J1/85m1SLgmmcRnHQUULHI=";
37 };
38 patches = [
39 # fix for https://source.puri.sm/Librem5/millipixels/-/issues/87, can be removed with the next release (if there ever will be one)
40 (fetchpatch {
41 url = "https://source.puri.sm/Librem5/millipixels/-/commit/5a0776993051a0af54c148702f36dbbf1064b917.patch?merge_request_iid=105";
42 hash = "sha256-OdjTFHMx64eb94/kSCaxeM/Ju/JxOPoorw2ogwTPP3s=";
43 })
44 ];
45
46 nativeBuildInputs = [
47 glib
48 meson
49 ninja
50 pkg-config
51 rustc
52 makeWrapper
53 ];
54
55 buildInputs = [
56 libbsd
57 libcamera
58 gtk3
59 libtiff
60 zbar
61 libpulseaudio
62 libraw
63 libexif
64 libjpeg
65 python3
66 ];
67
68 postInstall = ''
69 wrapProgram $out/bin/millipixels \
70 --prefix PATH : ${
71 lib.makeBinPath [
72 v4l-utils
73 ffmpeg-headless
74 ]
75 }
76 '';
77
78 passthru.updateScript = gitUpdater {
79 rev-prefix = "v";
80 };
81
82 meta = {
83 description = "Camera application for the Librem 5";
84 homepage = "https://source.puri.sm/Librem5/millipixels";
85 license = lib.licenses.gpl3Only;
86 maintainers = with lib.maintainers; [ _999eagle ];
87 platforms = lib.platforms.linux;
88 };
89})