nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 qt6,
5 libsForQt5,
6 fetchFromGitHub,
7 gst_all_1,
8 cmake,
9 libglvnd,
10 tbb,
11 ninja,
12 pkg-config,
13}:
14let
15 inherit (libsForQt5) qcoro;
16in
17stdenv.mkDerivation (finalAttrs: {
18 pname = "brickstore";
19 version = "2024.12.3";
20
21 src = fetchFromGitHub {
22 owner = "rgriebl";
23 repo = "brickstore";
24 rev = "v${finalAttrs.version}";
25 hash = "sha256-4sxPplZ1t8sSfwTCeeBtfU4U0gcE9FROt6dKvkfyO6Q=";
26 fetchSubmodules = true;
27 };
28
29 nativeBuildInputs = [
30 cmake
31 libglvnd
32 ninja
33 pkg-config
34 qcoro
35 qt6.qtdoc
36 qt6.qtdeclarative
37 qt6.qtimageformats
38 qt6.qtmultimedia
39 qt6.qtquick3d
40 qt6.qtquicktimeline
41 qt6.qtshadertools
42 qt6.qttools
43 qt6.qtwayland
44 qt6.wrapQtAppsHook
45 tbb
46 ];
47
48 patches = [
49 ./qcoro-cmake.patch # Don't have CMake fetch qcoro from github, get it from nixpkgs
50 ./qjsonvalue-include.patch # Add a required '#include <QtCore/QJsonValue>'
51 ];
52
53 # Since we get qcoro from nixpkgs instead, change the CMake file to reflect the right directory
54 preConfigure = ''
55 substituteInPlace cmake/BuildQCoro.cmake \
56 --replace-fail \
57 'add_subdirectory(''${qcoro_SOURCE_DIR} ''${qcoro_BINARY_DIR} EXCLUDE_FROM_ALL)' \
58 'add_subdirectory(${qcoro.src} ${qcoro}bin/qcoro)'
59 '';
60
61 qtWrapperArgs = [
62 ''
63 --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${
64 lib.makeLibraryPath [
65 gst_all_1.gstreamer
66 gst_all_1.gst-plugins-base
67 gst_all_1.gst-plugins-good
68 gst_all_1.gst-plugins-bad
69 gst_all_1.gst-plugins-ugly
70 gst_all_1.gst-libav
71 ]
72 }
73 ''
74 ];
75
76 meta = {
77 changelog = "https://github.com/rgriebl/brickstore/blob/main/CHANGELOG.md";
78 description = "BrickLink offline management tool";
79 homepage = "https://www.brickstore.dev/";
80 license = lib.licenses.gpl3Plus;
81 longDescription = ''
82 BrickStore is a BrickLink offline management tool.
83 It is multi-platform (Windows, macOS and Linux as well as iOS and Android),
84 multilingual (currently English, German, Spanish, Swedish and French), fast and stable.
85 '';
86 maintainers = with lib.maintainers; [ legojames ];
87 mainProgram = "brickstore";
88 platforms = lib.platforms.linux;
89 };
90})