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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
{ lib, stdenv, fetchFromGitHub, substituteAll, libtool, pkg-config, gettext, gnused
, gtk-doc, acl, systemd, glib, libatasmart, polkit, coreutils, bash, which
, expat, libxslt, docbook_xsl, util-linux, mdadm, libgudev, libblockdev, parted
, gobject-introspection, docbook_xml_dtd_412, docbook_xml_dtd_43, autoconf, automake
, xfsprogs, f2fs-tools, dosfstools, e2fsprogs, btrfs-progs, exfat, nilfs-utils, ntfs3g
}:
stdenv.mkDerivation rec {
pname = "udisks";
version = "2.9.4";
src = fetchFromGitHub {
owner = "storaged-project";
repo = "udisks";
rev = "${pname}-${version}";
sha256 = "sha256-MYQztzIyp5kh9t1bCIlj08/gaOmZfuu/ZOwo3F+rZiw=";
};
outputs = [ "out" "man" "dev" ] ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "devdoc";
patches = [
(substituteAll {
src = ./fix-paths.patch;
bash = "${bash}/bin/bash";
blkid = "${util-linux}/bin/blkid";
false = "${coreutils}/bin/false";
mdadm = "${mdadm}/bin/mdadm";
mkswap = "${util-linux}/bin/mkswap";
sed = "${gnused}/bin/sed";
sh = "${bash}/bin/sh";
sleep = "${coreutils}/bin/sleep";
swapon = "${util-linux}/bin/swapon";
true = "${coreutils}/bin/true";
})
(substituteAll {
src = ./force-path.patch;
path = lib.makeBinPath [
btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils
xfsprogs ntfs3g parted util-linux
];
})
];
nativeBuildInputs = [
autoconf automake pkg-config libtool gettext which gobject-introspection
gtk-doc libxslt docbook_xml_dtd_412 docbook_xml_dtd_43 docbook_xsl
];
postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace udisks/udisksclient.c \
--replace 'defined( __GNUC_PREREQ)' 1 \
--replace '__GNUC_PREREQ(4,6)' 1
'';
buildInputs = [
expat libgudev libblockdev acl systemd glib libatasmart polkit util-linux
];
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
configureFlags = [
(lib.enableFeature (stdenv.buildPlatform == stdenv.hostPlatform) "gtk-doc")
"--localstatedir=/var"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
"--with-udevdir=$(out)/lib/udev"
"--with-tmpfilesdir=no"
];
makeFlags = [
"INTROSPECTION_GIRDIR=$(dev)/share/gir-1.0"
"INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0"
];
enableParallelBuilding = true;
doCheck = true;
meta = with lib; {
description = "A daemon, tools and libraries to access and manipulate disks, storage devices and technologies";
homepage = "https://www.freedesktop.org/wiki/Software/udisks/";
license = with licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the tools & daemon
maintainers = teams.freedesktop.members ++ (with maintainers; [ johnazoidberg ]);
platforms = platforms.linux;
};
}
|