nixpkgs-suyu/pkgs/tools/archivers/wimlib/default.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

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