3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/archivers/wimlib/default.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

2017-11-21 20:40:52 +00:00
{ stdenv, fetchurl, makeWrapper
, pkgconfig, openssl, fuse, libxml2
2017-11-21 13:35:07 +00:00
, cabextract ? null
, cdrkit ? null
, mtools ? null
, ntfs3g ? null
, syslinux ? null
}:
stdenv.mkDerivation rec {
version = "1.13.1";
pname = "wimlib";
2017-11-21 13:35:07 +00:00
2017-11-21 20:40:52 +00:00
nativeBuildInputs = [ pkgconfig makeWrapper ];
buildInputs = [ openssl fuse libxml2 ntfs3g ];
2017-11-21 13:35:07 +00:00
src = fetchurl {
url = "https://wimlib.net/downloads/${pname}-${version}.tar.gz";
sha256 = "0pxgrpr3dr81rcf2jh71aiiq3v4anc5sj1nld18f2vhvbijbrx27";
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
path = stdenv.lib.makeBinPath [ cabextract cdrkit mtools ntfs3g syslinux ];
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
'';
2017-11-21 20:40:52 +00:00
meta = with stdenv.lib; {
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 ];
};
}