2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config, openssl, fuse, libxml2
|
2020-04-24 23:36:52 +00:00
|
|
|
, cabextract ? null
|
|
|
|
, cdrkit ? null
|
|
|
|
, mtools ? null
|
|
|
|
, ntfs3g ? null
|
|
|
|
, syslinux ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "1.13.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "wimlib";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ openssl fuse libxml2 ntfs3g ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://wimlib.net/downloads/${pname}-${version}.tar.gz";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-Cg+cHA06KnZkVTWusPYuA/xVkUymXzpNVZm7iwJg29k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
preBuild = lib.optionalString (!stdenv.isDarwin) ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace programs/mkwinpeimg.in \
|
|
|
|
--replace '/usr/lib/syslinux' "${syslinux}/share/syslinux"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = let
|
2022-04-27 09:35:20 +00:00
|
|
|
path = lib.makeBinPath ([ cabextract mtools ntfs3g ] ++ lib.optionals (!stdenv.isDarwin) [ cdrkit syslinux ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
in ''
|
|
|
|
for prog in $out/bin/*; do
|
|
|
|
wrapProgram $prog --prefix PATH : ${path}
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
doCheck = (!stdenv.isDarwin);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://wimlib.net";
|
|
|
|
description = "A library and program to extract, create, and modify WIM files";
|
|
|
|
platforms = platforms.unix;
|
2022-01-19 23:45:15 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ gpl3 lgpl3 cc0 ];
|
|
|
|
};
|
|
|
|
}
|