1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7 libsForQt5,
8 dtkcore,
9 coreutils,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "dde-api-proxy";
14 version = "1.0.20";
15
16 src = fetchFromGitHub {
17 owner = "linuxdeepin";
18 repo = "dde-api-proxy";
19 rev = version;
20 hash = "sha256-QE31BOh2LFlY6te+2+nSHGbhLsikSX8V7xSvcLzCWRA=";
21 };
22
23 postPatch = ''
24 for file in $(grep -rl "/usr/bin/false"); do
25 substituteInPlace $file --replace-fail "/usr/bin/false" "${coreutils}/bin/false"
26 done
27 for file in $(grep -rl "/usr/lib/dde-api-proxy"); do
28 substituteInPlace $file --replace-fail "/usr/lib/dde-api-proxy" "$out/lib/dde-api-proxy"
29 done
30 '';
31
32 nativeBuildInputs = [
33 cmake
34 pkg-config
35 libsForQt5.wrapQtAppsHook
36 libsForQt5.polkit-qt
37 ];
38
39 buildInputs = [
40 dtkcore
41 libsForQt5.qtbase
42 ];
43
44 meta = {
45 description = "Proxy service for dde";
46 homepage = "https://github.com/linuxdeepin/dde-api-proxy";
47 license = lib.licenses.gpl3Plus;
48 platforms = lib.platforms.linux;
49 teams = [ lib.teams.deepin ];
50 };
51}