2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper
|
2021-01-17 03:51:22 +00:00
|
|
|
, pkg-config, openssl, fuse, libxml2
|
2017-11-21 13:35:07 +00:00
|
|
|
, cabextract ? null
|
|
|
|
, cdrkit ? null
|
|
|
|
, mtools ? null
|
|
|
|
, ntfs3g ? null
|
|
|
|
, syslinux ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-07-07 23:13:37 +00:00
|
|
|
version = "1.13.2";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "wimlib";
|
2017-11-21 13:35:07 +00:00
|
|
|
|
2021-01-17 03:51:22 +00:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
2017-11-21 20:40:52 +00:00
|
|
|
buildInputs = [ openssl fuse libxml2 ntfs3g ];
|
2017-11-21 13:35:07 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://wimlib.net/downloads/${pname}-${version}.tar.gz";
|
2020-07-07 23:13:37 +00:00
|
|
|
sha256 = "0id9ym3hzij4kpdrk0sz3ijxp5r0z1md5jch83pml9hdy1zbx5bj";
|
2017-11-21 13:35:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = ''
|
2017-11-21 20:40:52 +00:00
|
|
|
substituteInPlace programs/mkwinpeimg.in \
|
|
|
|
--replace '/usr/lib/syslinux' "${syslinux}/share/syslinux"
|
2017-11-21 13:35:07 +00:00
|
|
|
'';
|
|
|
|
|
2017-11-21 20:40:52 +00:00
|
|
|
postInstall = let
|
2021-01-15 09:19:50 +00:00
|
|
|
path = lib.makeBinPath [ cabextract cdrkit mtools ntfs3g syslinux ];
|
2017-11-21 20:40:52 +00:00
|
|
|
in ''
|
2017-11-21 13:35:07 +00:00
|
|
|
for prog in $out/bin/*; do
|
2017-11-21 20:40:52 +00:00
|
|
|
wrapProgram $prog --prefix PATH : ${path}
|
2017-11-21 13:35:07 +00:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2017-11-21 20:40:52 +00:00
|
|
|
preCheck = ''
|
|
|
|
patchShebangs tests
|
2017-11-21 13:35:07 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://wimlib.net";
|
2017-11-21 13:35:07 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|