Skip to content

Commit 12901aa

Browse files
committed
flake: replace qt6 with upstream version
1 parent 2115fa5 commit 12901aa

File tree

2 files changed

+41
-158
lines changed

2 files changed

+41
-158
lines changed

flake.lock

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

flake.nix

Lines changed: 30 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
flake = false;
1010
};
1111
single_application = {
12-
url = "github:itay-grudev/SingleApplication/v3.2.0";
12+
url = "github:itay-grudev/SingleApplication/0d7b2630bda26f7dd4752c90faa9719455cab433";
1313
flake = false;
1414
};
15-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
15+
nixpkgs.url = "github:NixOS/nixpkgs?ref=pull/141883/head";
1616
flake-utils.url = "github:numtide/flake-utils";
1717
};
1818
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
@@ -27,16 +27,41 @@
2727
}
2828
) // {
2929
overlay = final: prev: {
30-
across = final.stdenv.mkDerivation {
30+
across = final.qt6.mkDerivation {
3131
name = "across";
3232
src = self;
33+
inherit (final.qt6.qtbase) qtDocPrefix qtQmlPrefix qtPluginPrefix;
3334
cmakeFlags = [ "-DFETCH_SINGLE_APPLICATION=OFF" ];
34-
nativeBuildInputs = with final; [ cmake pkg-config ];
35-
buildInputs = with final;[ qt6 libGL curl spdlog zxing-cpp protobuf grpc gtest c-ares libxkbcommon nlohmann_json magic_enum semver ];
35+
nativeBuildInputs = with final; [
36+
cmake
37+
pkg-config
38+
qt6.wrapQtAppsHook
39+
];
40+
buildInputs = with final;[
41+
curl
42+
spdlog
43+
zxing-cpp
44+
protobuf
45+
grpc
46+
gtest
47+
c-ares
48+
nlohmann_json
49+
magic_enum
50+
semver
51+
qt6.qtwayland
52+
qt6.qt5compat
53+
qt6.qttools
54+
qt6.qttranslations
55+
qt6.qtsvg
56+
];
3657
postPatch = ''
3758
rm -fr 3rdpart/*
3859
ln -s ${inputs.single_application} 3rdpart/SingleApplication
3960
'';
61+
dontWrapQtApps = true;
62+
preFixup = with final.qt6;''
63+
wrapQtApp "$out/bin/across" --prefix QML2_IMPORT_PATH : "${qtdeclarative}/qml:${qt5compat}/qml:${qtimageformats}/qml"
64+
'';
4065
};
4166
magic_enum = final.stdenv.mkDerivation {
4267
name = "magic_enum";
@@ -48,148 +73,6 @@
4873
src = inputs.semver;
4974
nativeBuildInputs = with final; [ cmake ];
5075
};
51-
qt6 = final.stdenv.mkDerivation rec {
52-
pname = "qt";
53-
version = "6.2.1";
54-
src = final.fetchurl {
55-
url = "https://download.qt.io/official_releases/qt/${final.lib.versions.majorMinor version}/${version}/single/qt-everywhere-src-${version}.tar.xz";
56-
sha256 = "sha256-4D//xcO1/qCdzBYURN99+74k6KjOk3cBTsIbZvSNQ80=";
57-
};
58-
nativeBuildInputs = with final; [ cmake perl python pkg-config xmlstarlet ];
59-
buildInputs = with final; [
60-
xorg.libxcb
61-
xorg.libX11
62-
xorg.libXau
63-
xorg.libXdmcp
64-
xorg.libXtst
65-
xorg.xrandr
66-
xorg.libXext
67-
xorg.libXi
68-
xorg.libXft
69-
xorg.libICE
70-
xorg.libSM
71-
xorg.libXres
72-
xorg.libXaw
73-
xorg.libXcomposite
74-
xorg.libXcursor
75-
xorg.libXinerama
76-
xorg.libXmu
77-
xorg.libXpm
78-
xorg.libXrandr
79-
xorg.libXt
80-
xorg.libXv
81-
xorg.libXxf86misc
82-
xorg.libxkbfile
83-
xorg.xcbproto
84-
xorg.xcbutilcursor
85-
xorg.xcbutilimage
86-
xorg.xcbutil
87-
xorg.xcbutilwm
88-
xorg.xcbutilrenderutil
89-
xorg.xcbutilerrors
90-
xorg.xcbutilkeysyms
91-
xorg.xkbutils
92-
xorg.xkbevd
93-
xorg.xkbprint
94-
xorg.xkbevd
95-
xorg.xkbcomp
96-
xorg.libXext
97-
xorg.libXdmcp
98-
xorg.libXi
99-
xorg.libXau
100-
xorg.libxshmfence
101-
xorg.libXtst
102-
xorg.xcbutilwm
103-
libthai
104-
libdatrie
105-
epoxy
106-
libselinux
107-
libsepol
108-
sqlite
109-
libxkbcommon
110-
libiconv
111-
mtdev
112-
util-linux
113-
directfb
114-
md4c
115-
libdrm
116-
at-spi2-core
117-
gtk3
118-
libinput
119-
snappy
120-
nss
121-
libxslt
122-
libxml2
123-
valgrind
124-
libGL
125-
double-conversion
126-
glib
127-
icu
128-
libb2
129-
lttng-ust
130-
re2
131-
pcre
132-
pcre2
133-
libjpeg
134-
brotli
135-
openssl
136-
freetype
137-
fontconfig
138-
wayland
139-
zstd
140-
dbus
141-
systemdMinimal
142-
libproxy
143-
mesa
144-
harfbuzz
145-
];
146-
cmakeFlags = [
147-
"-Wno-dev"
148-
] ++ builtins.map (x: "-DBUILD_${x}=OFF") [
149-
"qtwebengine"
150-
"qtwebview"
151-
"qtwebchannel"
152-
"qtwebsockets"
153-
"qtvirtualkeyboard"
154-
"qttranslations"
155-
"qtserialbus"
156-
"qtsensors"
157-
"qtimageformats"
158-
"qt3d"
159-
"qtactiveqt"
160-
"qtmultimedia"
161-
"qtcharts"
162-
"qtcoap"
163-
"qtconnectivity"
164-
"qtdatavis3d"
165-
"qtdoc"
166-
"qtserialport"
167-
"qtlocation"
168-
"qtlottie"
169-
"qtmqtt"
170-
"qtnetworkauth"
171-
"qtopcua"
172-
"qtquicktimeline"
173-
"qtquick3d"
174-
"qtremoteobjects"
175-
"qtscxml"
176-
"qtwayland"
177-
];
178-
preBuild = ''
179-
export LD_LIBRARY_PATH="$PWD/qtbase/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
180-
'';
181-
};
182-
zxing-cpp = (prev.zxing-cpp.overrideAttrs (attrs: {
183-
version = "master";
184-
src = final.fetchFromGitHub {
185-
owner = "nu-book";
186-
repo = "zxing-cpp";
187-
rev = "b6938ec2ae8dae387b4db0d148b57218a0ee8616";
188-
hash = "sha256-ALhYpjyH5Ts5Ofx3P1ptdT7Ah606IhzO6C1K7KnEC0w=";
189-
};
190-
cmakeFlags = attrs.cmakeFlags ++ [ "-DBUILD_SYSTEM_DEPS=ALWAYS" ];
191-
buildInputs = [ final.fmt_8 ];
192-
}));
19376
};
19477
};
19578
}

0 commit comments

Comments
 (0)