1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
{
stdenv,
lib,
fetchFromGitHub,
dtkwidget,
deepin-gettext-tools,
qt5integration,
qmake,
qtbase,
qttools,
qtx11extras,
pkg-config,
wrapQtAppsHook,
udisks2-qt5,
}:
stdenv.mkDerivation rec {
pname = "dde-device-formatter";
version = "0.0.1.16";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-l2D+j+u5Q6G45KTM7eg1QNEakEPtEJ0tzlDlQO5/08I=";
};
postPatch = ''
substituteInPlace translate_desktop2ts.sh translate_ts2desktop.sh \
--replace "/usr/bin/deepin-desktop-ts-convert" "deepin-desktop-ts-convert"
substituteInPlace dde-device-formatter.pro dde-device-formatter.desktop \
--replace "/usr" "$out"
patchShebangs *.sh
'';
nativeBuildInputs = [
qmake
qttools
pkg-config
wrapQtAppsHook
deepin-gettext-tools
];
buildInputs = [
dtkwidget
udisks2-qt5
qtx11extras
];
cmakeFlags = [ "-DVERSION=${version}" ];
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
qtWrapperArgs = [ "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}" ];
meta = with lib; {
description = "Simple graphical interface for creating file system in a block device";
mainProgram = "dde-device-formatter";
homepage = "https://github.com/linuxdeepin/dde-device-formatter";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}
|