4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
47 lines
1.4 KiB
Nix
47 lines
1.4 KiB
Nix
{ lib, stdenv, fetchurl, pkgconfig, sg3_utils, udev, glib, dbus, dbus-glib
|
|
, polkit, parted, lvm2, libatasmart, intltool, libuuid, mdadm
|
|
, libxslt, docbook_xsl, util-linux, libgudev }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "udisks-1.0.5";
|
|
|
|
src = fetchurl {
|
|
url = "https://hal.freedesktop.org/releases/${name}.tar.gz";
|
|
sha256 = "0wbg3jrv8limdgvcygf4dqin3y6d30y9pcmmk711vq571vmq5v7j";
|
|
};
|
|
|
|
patches = [ ./purity.patch ./no-pci-db.patch ./glibc.patch ];
|
|
|
|
preConfigure =
|
|
''
|
|
configureFlagsArray+=(--with-systemdsystemunitdir=$out/lib/systemd/system)
|
|
'';
|
|
|
|
postPatch =
|
|
''
|
|
sed -e 's,/sbin/mdadm,${mdadm}&,g' -e "s,@slashlibdir@,$out/lib,g" -i data/80-udisks.rules
|
|
|
|
substituteInPlace src/main.c --replace \
|
|
"/sbin:/bin:/usr/sbin:/usr/bin" \
|
|
"${util-linux}/bin:${mdadm}/sbin:/run/current-system/sw/bin:/run/current-system/sw/bin"
|
|
'';
|
|
|
|
buildInputs =
|
|
[ sg3_utils udev glib dbus dbus-glib polkit parted libgudev
|
|
lvm2 libatasmart intltool libuuid libxslt docbook_xsl
|
|
];
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
configureFlags = [ "--localstatedir=/var" "--enable-lvm2" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.freedesktop.org/wiki/Software/udisks";
|
|
description = "A daemon and command-line utility for querying and manipulating storage devices";
|
|
platforms = platforms.linux;
|
|
license = with licenses; [ gpl2 lgpl2Plus ];
|
|
broken = true;
|
|
hydraPlatforms = [];
|
|
};
|
|
}
|