2018-05-30 00:19:46 +02:00
|
|
|
{ stdenv, fetchFromGitHub, substituteAll, libtool, pkgconfig, intltool, gnused
|
|
|
|
, gnome3, gtk-doc, acl, systemd, glib, libatasmart, polkit, coreutils, bash
|
|
|
|
, expat, libxslt, docbook_xsl, utillinux, mdadm, libgudev, libblockdev, parted
|
2018-12-02 12:41:15 +01:00
|
|
|
, gobject-introspection, docbook_xml_dtd_412, docbook_xml_dtd_43
|
2018-10-11 17:57:50 +02:00
|
|
|
, xfsprogs, f2fs-tools, dosfstools, e2fsprogs, btrfs-progs, exfat, nilfs-utils, ntfs3g
|
2013-04-01 18:12:32 +02:00
|
|
|
}:
|
|
|
|
|
2018-05-30 00:19:46 +02:00
|
|
|
let
|
2018-09-27 15:32:48 +02:00
|
|
|
version = "2.8.1";
|
2018-05-30 00:19:46 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "udisks-${version}";
|
2013-04-01 18:12:32 +02:00
|
|
|
|
2018-05-30 00:19:46 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "storaged-project";
|
|
|
|
repo = "udisks";
|
|
|
|
rev = name;
|
2018-09-27 15:32:48 +02:00
|
|
|
sha256 = "073iqa0pwa7ab0qw33h3ic89508a78incmg6rq914d6br7s030zy";
|
2013-04-01 18:12:32 +02:00
|
|
|
};
|
|
|
|
|
2018-05-30 00:19:46 +02:00
|
|
|
outputs = [ "out" "man" "dev" "devdoc" ];
|
2015-07-26 13:43:49 +02:00
|
|
|
|
2018-05-30 00:19:46 +02:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
bash = "${bash}/bin/bash";
|
|
|
|
blkid = "${utillinux}/bin/blkid";
|
|
|
|
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;
|
2018-10-11 17:57:50 +02:00
|
|
|
path = stdenv.lib.makeBinPath [ btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils xfsprogs ntfs3g parted utillinux ];
|
2018-05-30 00:19:46 +02:00
|
|
|
})
|
|
|
|
];
|
2013-04-02 13:37:32 +02:00
|
|
|
|
2018-05-30 00:19:46 +02:00
|
|
|
nativeBuildInputs = [
|
2018-12-02 12:41:15 +01:00
|
|
|
pkgconfig gnome3.gnome-common libtool intltool gobject-introspection
|
2018-05-30 00:19:46 +02:00
|
|
|
gtk-doc libxslt docbook_xml_dtd_412 docbook_xml_dtd_43 docbook_xsl
|
|
|
|
];
|
2013-04-01 18:12:32 +02:00
|
|
|
|
2018-06-25 16:25:25 +02: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-30 00:19:46 +02:00
|
|
|
buildInputs = [
|
|
|
|
expat libgudev libblockdev acl systemd glib libatasmart polkit
|
|
|
|
];
|
2013-04-01 18:12:32 +02:00
|
|
|
|
2018-05-30 00:19:46 +02:00
|
|
|
preConfigure = "./autogen.sh";
|
2013-04-01 18:12:32 +02:00
|
|
|
|
|
|
|
configureFlags = [
|
2018-05-30 00:19:46 +02:00
|
|
|
"--enable-gtk-doc"
|
2013-04-01 18:12:32 +02:00
|
|
|
"--localstatedir=/var"
|
2014-03-13 21:44:51 +01:00
|
|
|
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
2013-04-01 18:12:32 +02:00
|
|
|
"--with-udevdir=$(out)/lib/udev"
|
|
|
|
];
|
|
|
|
|
2018-02-24 17:28:41 +01:00
|
|
|
makeFlags = [
|
|
|
|
"INTROSPECTION_GIRDIR=$(dev)/share/gir-1.0"
|
|
|
|
"INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0"
|
|
|
|
];
|
|
|
|
|
2018-04-25 05:20:18 +02:00
|
|
|
doCheck = false; # fails
|
|
|
|
|
2018-05-30 00:19:46 +02:00
|
|
|
meta = with stdenv.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 = licenses.gpl2Plus; # lgpl2Plus for the library, gpl2Plus for the tools & daemon
|
|
|
|
maintainers = with maintainers; [];
|
|
|
|
platforms = platforms.linux;
|
2013-04-01 18:12:32 +02:00
|
|
|
};
|
|
|
|
}
|