nixpkgs/pkgs/tools/misc/ldmtool/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

47 lines
1.5 KiB
Nix

{ lib, stdenv, fetchFromGitHub, autoconf, automake, gtk-doc, pkgconfig, libuuid,
libtool, readline, gobject-introspection, json-glib, lvm2, libxslt, docbook_xsl
, fetchpatch }:
stdenv.mkDerivation rec {
pname = "ldmtool";
version = "0.2.4";
src = fetchFromGitHub {
owner = "mdbooth";
repo = "libldm";
rev = "libldm-${version}";
sha256 = "1fy5wbmk8kwl86lzswq0d1z2j5y023qzfm2ppm8knzv9c47kniqk";
};
patches = [
# Remove useage of deprecrated G_PARAM_PRIVATE
(fetchpatch {
url = "https://github.com/mdbooth/libldm/commit/ee1b37a034038f09d61b121cc8b3651024acc46f.patch";
sha256 = "02y34kbcpcpffvy1n9yqngvdldmxmvdkha1v2xjqvrnclanpigcp";
})
];
preConfigure = ''
sed -i docs/reference/ldmtool/Makefile.am \
-e 's|-nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl|--nonet ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl|g'
'';
# glib-2.62 deprecations
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
configureScript = "sh autogen.sh";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ autoconf automake gtk-doc lvm2 libxslt.bin
libtool readline gobject-introspection json-glib libuuid
];
meta = with lib; {
description = "Tool and library for managing Microsoft Windows Dynamic Disks";
homepage = "https://github.com/mdbooth/libldm";
maintainers = with maintainers; [ jensbin ];
license = licenses.gpl3;
platforms = platforms.linux;
};
}