2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, substituteAll, libtool, pkgconfig, gettext, gnused
|
2019-03-14 19:46:22 +00:00
|
|
|
, gtk-doc, acl, systemd, glib, libatasmart, polkit, coreutils, bash, which
|
2020-11-24 15:29:28 +00:00
|
|
|
, expat, libxslt, docbook_xsl, util-linux, mdadm, libgudev, libblockdev, parted
|
2019-03-14 19:46:22 +00:00
|
|
|
, gobject-introspection, docbook_xml_dtd_412, docbook_xml_dtd_43, autoconf, automake
|
2018-10-11 15:57:50 +00:00
|
|
|
, xfsprogs, f2fs-tools, dosfstools, e2fsprogs, btrfs-progs, exfat, nilfs-utils, ntfs3g
|
2013-04-01 16:12:32 +00:00
|
|
|
}:
|
|
|
|
|
2019-07-29 21:38:10 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "udisks";
|
|
|
|
version = "2.8.4";
|
2013-04-01 16:12:32 +00:00
|
|
|
|
2018-05-29 22:19:46 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "storaged-project";
|
|
|
|
repo = "udisks";
|
2019-07-29 21:38:10 +00:00
|
|
|
rev = "${pname}-${version}";
|
|
|
|
sha256 = "01wx2x8xyal595dhdih7rva2bz7gqzgwdp56gi0ikjdzayx17wcf";
|
2013-04-01 16:12:32 +00:00
|
|
|
};
|
|
|
|
|
2019-09-14 12:53:04 +00:00
|
|
|
outputs = [ "out" "man" "dev" ] ++ stdenv.lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "devdoc";
|
2015-07-26 11:43:49 +00:00
|
|
|
|
2018-05-29 22:19:46 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
bash = "${bash}/bin/bash";
|
2020-11-24 15:29:28 +00:00
|
|
|
blkid = "${util-linux}/bin/blkid";
|
2018-05-29 22:19:46 +00:00
|
|
|
false = "${coreutils}/bin/false";
|
|
|
|
mdadm = "${mdadm}/bin/mdadm";
|
|
|
|
sed = "${gnused}/bin/sed";
|
|
|
|
sh = "${bash}/bin/sh";
|
|
|
|
sleep = "${coreutils}/bin/sleep";
|
|
|
|
true = "${coreutils}/bin/true";
|
|
|
|
})
|
|
|
|
(substituteAll {
|
|
|
|
src = ./force-path.patch;
|
2019-07-29 21:38:10 +00:00
|
|
|
path = stdenv.lib.makeBinPath [
|
|
|
|
btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils
|
2020-11-24 15:29:28 +00:00
|
|
|
xfsprogs ntfs3g parted util-linux
|
2019-07-29 21:38:10 +00:00
|
|
|
];
|
2018-05-29 22:19:46 +00:00
|
|
|
})
|
2020-02-09 05:39:54 +00:00
|
|
|
|
|
|
|
# Fix tests: https://github.com/storaged-project/udisks/issues/724
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/storaged-project/udisks/commit/60a0c1c967821d317046d9494e45b9a8e4e7a1c1.patch";
|
2020-06-02 20:44:52 +00:00
|
|
|
sha256 = "0rlgqsxn7rb074x6ivm0ya5lywc4llifj5br0zr31mwwckv7hsdm";
|
2020-02-09 05:39:54 +00:00
|
|
|
})
|
2018-05-29 22:19:46 +00:00
|
|
|
];
|
2013-04-02 11:37:32 +00:00
|
|
|
|
2018-05-29 22:19:46 +00:00
|
|
|
nativeBuildInputs = [
|
2019-03-14 19:46:22 +00:00
|
|
|
autoconf automake pkgconfig libtool gettext which gobject-introspection
|
2018-05-29 22:19:46 +00:00
|
|
|
gtk-doc libxslt docbook_xml_dtd_412 docbook_xml_dtd_43 docbook_xsl
|
|
|
|
];
|
2013-04-01 16:12:32 +00:00
|
|
|
|
2018-06-25 14:25:25 +00:00
|
|
|
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
|
|
substituteInPlace udisks/udisksclient.c \
|
|
|
|
--replace 'defined( __GNUC_PREREQ)' 1 \
|
|
|
|
--replace '__GNUC_PREREQ(4,6)' 1
|
|
|
|
'';
|
|
|
|
|
2018-05-29 22:19:46 +00:00
|
|
|
buildInputs = [
|
|
|
|
expat libgudev libblockdev acl systemd glib libatasmart polkit
|
|
|
|
];
|
2013-04-01 16:12:32 +00:00
|
|
|
|
2019-03-14 19:46:22 +00:00
|
|
|
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
|
2013-04-01 16:12:32 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
2019-09-14 12:53:04 +00:00
|
|
|
(stdenv.lib.enableFeature (stdenv.buildPlatform == stdenv.hostPlatform) "gtk-doc")
|
2013-04-01 16:12:32 +00:00
|
|
|
"--localstatedir=/var"
|
2014-03-13 20:44:51 +00:00
|
|
|
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
2013-04-01 16:12:32 +00:00
|
|
|
"--with-udevdir=$(out)/lib/udev"
|
2019-07-29 21:38:10 +00:00
|
|
|
"--with-tmpfilesdir=no"
|
2013-04-01 16:12:32 +00:00
|
|
|
];
|
|
|
|
|
2018-02-24 16:28:41 +00:00
|
|
|
makeFlags = [
|
|
|
|
"INTROSPECTION_GIRDIR=$(dev)/share/gir-1.0"
|
|
|
|
"INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0"
|
|
|
|
];
|
|
|
|
|
2019-07-29 21:38:10 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
2018-04-25 03:20:18 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-05-29 22:19:46 +00:00
|
|
|
description = "A daemon, tools and libraries to access and manipulate disks, storage devices and technologies";
|
2019-07-29 21:38:10 +00:00
|
|
|
homepage = "https://www.freedesktop.org/wiki/Software/udisks/";
|
|
|
|
license = with licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the tools & daemon
|
|
|
|
maintainers = with maintainers; [ johnazoidberg ];
|
2018-05-29 22:19:46 +00:00
|
|
|
platforms = platforms.linux;
|
2013-04-01 16:12:32 +00:00
|
|
|
};
|
|
|
|
}
|