fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 replaceVars,
6 pkg-config,
7 gnused,
8 autoreconfHook,
9 gtk-doc,
10 acl,
11 systemd,
12 glib,
13 libatasmart,
14 polkit,
15 coreutils,
16 bash,
17 which,
18 expat,
19 libxslt,
20 docbook_xsl,
21 util-linux,
22 mdadm,
23 libgudev,
24 libblockdev,
25 parted,
26 gobject-introspection,
27 docbook_xml_dtd_412,
28 docbook_xml_dtd_43,
29 xfsprogs,
30 f2fs-tools,
31 dosfstools,
32 e2fsprogs,
33 btrfs-progs,
34 exfat,
35 nilfs-utils,
36 ntfs3g,
37 nixosTests,
38 udevCheckHook,
39}:
40
41stdenv.mkDerivation rec {
42 pname = "udisks";
43 version = "2.10.2";
44
45 src = fetchFromGitHub {
46 owner = "storaged-project";
47 repo = "udisks";
48 rev = "${pname}-${version}";
49 sha256 = "sha256-W0vZY6tYxAJbqxNF3F6F6J6h6XxLT+Fon+LqR6jwFUQ=";
50 };
51
52 outputs = [
53 "out"
54 "man"
55 "dev"
56 ]
57 ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "devdoc";
58
59 patches = [
60 (replaceVars ./fix-paths.patch {
61 false = "${coreutils}/bin/false";
62 mdadm = "${mdadm}/bin/mdadm";
63 sed = "${gnused}/bin/sed";
64 sh = "${bash}/bin/sh";
65 sleep = "${coreutils}/bin/sleep";
66 true = "${coreutils}/bin/true";
67 })
68 (replaceVars ./force-path.patch {
69 path = lib.makeBinPath [
70 btrfs-progs
71 coreutils
72 dosfstools
73 e2fsprogs
74 exfat
75 f2fs-tools
76 nilfs-utils
77 xfsprogs
78 ntfs3g
79 parted
80 util-linux
81 ];
82 })
83 ];
84
85 strictDeps = true;
86 # pkg-config had to be in both to find gtk-doc and gobject-introspection
87 depsBuildBuild = [ pkg-config ];
88 nativeBuildInputs = [
89 autoreconfHook
90 which
91 gobject-introspection
92 pkg-config
93 gtk-doc
94 libxslt
95 docbook_xml_dtd_412
96 docbook_xml_dtd_43
97 docbook_xsl
98 udevCheckHook
99 ];
100
101 postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
102 substituteInPlace udisks/udisksclient.c \
103 --replace 'defined( __GNUC_PREREQ)' 1 \
104 --replace '__GNUC_PREREQ(4,6)' 1
105 '';
106
107 buildInputs = [
108 expat
109 libgudev
110 libblockdev
111 acl
112 systemd
113 glib
114 libatasmart
115 polkit
116 util-linux
117 ];
118
119 preConfigure = "NOCONFIGURE=1 ./autogen.sh";
120
121 configureFlags = [
122 (lib.enableFeature (stdenv.buildPlatform == stdenv.hostPlatform) "gtk-doc")
123 "--sysconfdir=/etc"
124 "--localstatedir=/var"
125 "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
126 "--with-udevdir=$(out)/lib/udev"
127 "--with-tmpfilesdir=no"
128 ];
129
130 makeFlags = [
131 "INTROSPECTION_GIRDIR=$(dev)/share/gir-1.0"
132 "INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0"
133 ];
134
135 installFlags = [
136 "sysconfdir=${placeholder "out"}/etc"
137 ];
138
139 enableParallelBuilding = true;
140
141 doCheck = true;
142 doInstallCheck = true;
143
144 passthru = {
145 inherit libblockdev;
146 tests.vm = nixosTests.udisks2;
147 };
148
149 meta = with lib; {
150 description = "Daemon, tools and libraries to access and manipulate disks, storage devices and technologies";
151 homepage = "https://www.freedesktop.org/wiki/Software/udisks/";
152 license = with licenses; [
153 lgpl2Plus
154 gpl2Plus
155 ]; # lgpl2Plus for the library, gpl2Plus for the tools & daemon
156 maintainers = with maintainers; [ johnazoidberg ];
157 teams = [ teams.freedesktop ];
158 platforms = platforms.linux;
159 };
160}