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-01-03 16:56:52 +00:00
|
|
|
version = "1.13.5";
|
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-01-03 16:56:52 +00:00
|
|
|
sha256 = "sha256-MvzJ6bFEt8sdtMhuEEyngoPNwiXhP+grJzZgWGrv4yM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace programs/mkwinpeimg.in \
|
|
|
|
--replace '/usr/lib/syslinux' "${syslinux}/share/syslinux"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = let
|
2021-01-15 22:18:51 +00:00
|
|
|
path = lib.makeBinPath [ cabextract cdrkit mtools ntfs3g syslinux ];
|
2020-04-24 23:36:52 +00:00
|
|
|
in ''
|
|
|
|
for prog in $out/bin/*; do
|
|
|
|
wrapProgram $prog --prefix PATH : ${path}
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ andir ];
|
|
|
|
license = with licenses; [ gpl3 lgpl3 cc0 ];
|
|
|
|
};
|
|
|
|
}
|