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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.2 KiB
Nix
Raw Normal View History

{ 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 {
2021-12-22 00:14:33 +00:00
version = "1.13.5";
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 {
url = "https://wimlib.net/downloads/${pname}-${version}.tar.gz";
2021-12-22 00:14:33 +00:00
sha256 = "sha256-MvzJ6bFEt8sdtMhuEEyngoPNwiXhP+grJzZgWGrv4yM=";
2017-11-21 13:35:07 +00:00
};
preBuild = lib.optionalString (!stdenv.isDarwin) ''
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 = lib.makeBinPath ([ cabextract mtools ntfs3g ] ++ lib.optionals (!stdenv.isDarwin) [ cdrkit 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 = (!stdenv.isDarwin);
2017-11-21 13:35:07 +00:00
2017-11-21 20:40:52 +00:00
preCheck = ''
patchShebangs tests
2017-11-21 13:35:07 +00:00
'';
meta = with 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; [ ];
2017-11-21 13:35:07 +00:00
license = with licenses; [ gpl3 lgpl3 cc0 ];
};
}