26 gobject-introspection,
40 stdenv.mkDerivation rec {
44 src = fetchFromGitHub {
45 owner = "storaged-project";
47 rev = "${pname}-${version}";
48 sha256 = "sha256-L8jr1+SJWsCizkPXC8VKDy2eVa7/FpqdB8SkBYq6vwc=";
55 ] ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "devdoc";
59 src = ./fix-paths.patch;
60 bash = "${bash}/bin/bash";
61 false = "${coreutils}/bin/false";
62 mdadm = "${mdadm}/bin/mdadm";
63 mkswap = "${util-linux}/bin/mkswap";
64 sed = "${gnused}/bin/sed";
65 sh = "${bash}/bin/sh";
66 sleep = "${coreutils}/bin/sleep";
67 swapon = "${util-linux}/bin/swapon";
68 true = "${coreutils}/bin/true";
71 src = ./force-path.patch;
72 path = lib.makeBinPath [
89 # pkg-config had to be in both to find gtk-doc and gobject-introspection
90 depsBuildBuild = [ pkg-config ];
103 postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
104 substituteInPlace udisks/udisksclient.c \
105 --replace 'defined( __GNUC_PREREQ)' 1 \
106 --replace '__GNUC_PREREQ(4,6)' 1
121 preConfigure = "NOCONFIGURE=1 ./autogen.sh";
124 (lib.enableFeature (stdenv.buildPlatform == stdenv.hostPlatform) "gtk-doc")
126 "--localstatedir=/var"
127 "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
128 "--with-udevdir=$(out)/lib/udev"
129 "--with-tmpfilesdir=no"
133 "INTROSPECTION_GIRDIR=$(dev)/share/gir-1.0"
134 "INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0"
138 "sysconfdir=${placeholder "out"}/etc"
141 enableParallelBuilding = true;
147 tests.vm = nixosTests.udisks2;
151 description = "Daemon, tools and libraries to access and manipulate disks, storage devices and technologies";
152 homepage = "https://www.freedesktop.org/wiki/Software/udisks/";
153 license = with licenses; [
156 ]; # lgpl2Plus for the library, gpl2Plus for the tools & daemon
157 maintainers = teams.freedesktop.members ++ (with maintainers; [ johnazoidberg ]);
158 platforms = platforms.linux;