2015-12-14 23:38:07 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, intltool, gnused
|
2014-12-25 17:08:57 +00:00
|
|
|
, expat, acl, systemd, glib, libatasmart, polkit
|
2015-09-08 12:51:14 +00:00
|
|
|
, libxslt, docbook_xsl, utillinux, mdadm, libgudev
|
2018-02-24 16:28:41 +00:00
|
|
|
, gobjectIntrospection
|
2013-04-01 16:12:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-03-24 20:07:24 +00:00
|
|
|
name = "udisks-2.1.8";
|
2013-04-01 16:12:32 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://udisks.freedesktop.org/releases/${name}.tar.bz2";
|
2018-03-24 20:07:24 +00:00
|
|
|
sha256 = "1nkxhnqh39c9pzvm4zfj50rgv6apqawdx09bv3sfaxrah4a6jhfs";
|
2013-04-01 16:12:32 +00:00
|
|
|
};
|
|
|
|
|
2018-02-24 16:28:41 +00:00
|
|
|
outputs = [ "out" "man" "dev" ];
|
2015-07-26 11:43:49 +00:00
|
|
|
|
2013-04-02 11:37:32 +00:00
|
|
|
patches = [ ./force-path.patch ];
|
|
|
|
|
|
|
|
# FIXME remove /var/run/current-system/sw/* references
|
|
|
|
# FIXME add references to parted, cryptsetup, etc (see the sources)
|
2013-04-01 16:12:32 +00:00
|
|
|
postPatch =
|
|
|
|
''
|
|
|
|
substituteInPlace src/main.c --replace \
|
2013-04-02 11:37:32 +00:00
|
|
|
"@path@" \
|
2015-12-14 23:38:07 +00:00
|
|
|
"${utillinux}/bin:${mdadm}/bin:/run/current-system/sw/bin"
|
|
|
|
substituteInPlace data/80-udisks2.rules \
|
|
|
|
--replace "/bin/sh" "${stdenv.shell}" \
|
|
|
|
--replace "/sbin/mdadm" "${mdadm}/bin/mdadm" \
|
|
|
|
--replace " sed " " ${gnused}/bin/sed "
|
2018-03-24 20:01:04 +00:00
|
|
|
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
|
|
substituteInPlace udisks/udisksclient.c \
|
|
|
|
--replace 'defined( __GNUC_PREREQ)' 1 \
|
|
|
|
--replace '__GNUC_PREREQ(4,6)' 1
|
|
|
|
'';
|
2013-04-01 16:12:32 +00:00
|
|
|
|
2018-02-24 16:28:41 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig intltool gobjectIntrospection ];
|
2013-04-01 16:12:32 +00:00
|
|
|
|
2015-09-08 12:53:14 +00:00
|
|
|
buildInputs = [ libxslt docbook_xsl libgudev expat acl systemd glib libatasmart polkit ];
|
2013-04-01 16:12:32 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--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"
|
|
|
|
];
|
|
|
|
|
2018-02-24 16:28:41 +00:00
|
|
|
makeFlags = [
|
|
|
|
"INTROSPECTION_GIRDIR=$(dev)/share/gir-1.0"
|
|
|
|
"INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0"
|
|
|
|
];
|
|
|
|
|
2013-04-01 16:12:32 +00:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.freedesktop.org/wiki/Software/udisks;
|
|
|
|
description = "A daemon and command-line utility for querying and manipulating storage devices";
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|