udisks2: 2.1.6 → 2.7.6
supersedes #35551 closes #34999 /cc https://github.com/NixOS/nixpkgs/pull/38382
This commit is contained in:
@@ -1,43 +1,55 @@
|
||||
{ stdenv, fetchurl, pkgconfig, intltool, gnused
|
||||
, expat, acl, systemd, glib, libatasmart, polkit
|
||||
, libxslt, docbook_xsl, utillinux, mdadm, libgudev
|
||||
, gobjectIntrospection
|
||||
{ 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
|
||||
, gobjectIntrospection, docbook_xml_dtd_412, docbook_xml_dtd_43
|
||||
, libxfs, f2fs-tools, dosfstools, e2fsprogs, btrfs-progs, exfat, nilfs-utils, udftools, ntfs3g
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "udisks-2.1.8";
|
||||
let
|
||||
version = "2.7.6";
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "udisks-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://udisks.freedesktop.org/releases/${name}.tar.bz2";
|
||||
sha256 = "1nkxhnqh39c9pzvm4zfj50rgv6apqawdx09bv3sfaxrah4a6jhfs";
|
||||
src = fetchFromGitHub {
|
||||
owner = "storaged-project";
|
||||
repo = "udisks";
|
||||
rev = name;
|
||||
sha256 = "16kf104vv2xbk8cdgaqygszcl69d7lz9gf3vmi7ggywn7nfbp2ks";
|
||||
};
|
||||
|
||||
outputs = [ "out" "man" "dev" ];
|
||||
outputs = [ "out" "man" "dev" "devdoc" ];
|
||||
|
||||
patches = [ ./force-path.patch ];
|
||||
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;
|
||||
path = stdenv.lib.makeBinPath [ btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils libxfs ntfs3g parted utillinux ];
|
||||
})
|
||||
];
|
||||
|
||||
# FIXME remove /var/run/current-system/sw/* references
|
||||
# FIXME add references to parted, cryptsetup, etc (see the sources)
|
||||
postPatch =
|
||||
''
|
||||
substituteInPlace src/main.c --replace \
|
||||
"@path@" \
|
||||
"${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 "
|
||||
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
substituteInPlace udisks/udisksclient.c \
|
||||
--replace 'defined( __GNUC_PREREQ)' 1 \
|
||||
--replace '__GNUC_PREREQ(4,6)' 1
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
pkgconfig gnome3.gnome-common libtool intltool gobjectIntrospection
|
||||
gtk-doc libxslt docbook_xml_dtd_412 docbook_xml_dtd_43 docbook_xsl
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig intltool gobjectIntrospection ];
|
||||
buildInputs = [
|
||||
expat libgudev libblockdev acl systemd glib libatasmart polkit
|
||||
];
|
||||
|
||||
buildInputs = [ libxslt docbook_xsl libgudev expat acl systemd glib libatasmart polkit ];
|
||||
preConfigure = "./autogen.sh";
|
||||
|
||||
configureFlags = [
|
||||
"--enable-gtk-doc"
|
||||
"--localstatedir=/var"
|
||||
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
||||
"--with-udevdir=$(out)/lib/udev"
|
||||
@@ -50,9 +62,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = false; # fails
|
||||
|
||||
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;
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user