nixpkgs/pkgs/tools/archivers/wimlib/default.nix
2021-08-14 04:14:46 +00:00

49 lines
1.1 KiB
Nix

{ lib, stdenv, fetchurl, makeWrapper
, pkg-config, openssl, fuse, libxml2
, cabextract ? null
, cdrkit ? null
, mtools ? null
, ntfs3g ? null
, syslinux ? null
}:
stdenv.mkDerivation rec {
version = "1.13.4";
pname = "wimlib";
nativeBuildInputs = [ pkg-config makeWrapper ];
buildInputs = [ openssl fuse libxml2 ntfs3g ];
src = fetchurl {
url = "https://wimlib.net/downloads/${pname}-${version}.tar.gz";
sha256 = "sha256-S4fdCtnMGljO5XIa/ruYAR2rVJ5y8rVVM/MV8Isu3hI=";
};
preBuild = ''
substituteInPlace programs/mkwinpeimg.in \
--replace '/usr/lib/syslinux' "${syslinux}/share/syslinux"
'';
postInstall = let
path = lib.makeBinPath [ cabextract cdrkit mtools ntfs3g syslinux ];
in ''
for prog in $out/bin/*; do
wrapProgram $prog --prefix PATH : ${path}
done
'';
doCheck = true;
preCheck = ''
patchShebangs tests
'';
meta = with lib; {
homepage = "https://wimlib.net";
description = "A library and program to extract, create, and modify WIM files";
platforms = platforms.unix;
maintainers = with maintainers; [ andir ];
license = with licenses; [ gpl3 lgpl3 cc0 ];
};
}