summary refs log tree commit diff
path: root/pkgs/tools/archivers/wimlib
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2017-11-21 14:35:07 +0100
committerAndreas Rammhold <andreas@rammhold.de>2017-11-21 20:43:12 +0100
commit40180335a96e71aeff288809868b75ef7f73babe (patch)
treed261ebbe7488031af6b3495e72d94830059754b8 /pkgs/tools/archivers/wimlib
parentb8f7027360855faee9d72956092be2e030a12a5f (diff)
downloadnixpkgs-40180335a96e71aeff288809868b75ef7f73babe.tar
nixpkgs-40180335a96e71aeff288809868b75ef7f73babe.tar.gz
nixpkgs-40180335a96e71aeff288809868b75ef7f73babe.tar.bz2
nixpkgs-40180335a96e71aeff288809868b75ef7f73babe.tar.lz
nixpkgs-40180335a96e71aeff288809868b75ef7f73babe.tar.xz
nixpkgs-40180335a96e71aeff288809868b75ef7f73babe.tar.zst
nixpkgs-40180335a96e71aeff288809868b75ef7f73babe.zip
wimlib: init at 1.12.0
Diffstat (limited to 'pkgs/tools/archivers/wimlib')
-rw-r--r--pkgs/tools/archivers/wimlib/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/tools/archivers/wimlib/default.nix b/pkgs/tools/archivers/wimlib/default.nix
new file mode 100644
index 00000000000..2faf39b671f
--- /dev/null
+++ b/pkgs/tools/archivers/wimlib/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, lib, fetchurl, pkgs, makeWrapper, bash
+, cabextract ? null
+, cdrkit ? null
+, mtools ? null
+, ntfs3g ? null
+, syslinux ? null
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.12.0";
+  name = "wimlib-${version}";
+
+  nativeBuildInputs = with pkgs; [ pkgconfig makeWrapper ];
+  buildInputs = with pkgs; [ openssl fuse libxml2 ntfs3g ];
+
+  src = fetchurl {
+    url = "https://wimlib.net/downloads/${name}.tar.gz";
+    sha256 = "852cf59d682a91974f715f09fa98cab621b740226adcfea7a42360be0f86464f";
+  };
+
+ prefixPackages = [ cabextract cdrkit mtools ntfs3g syslinux ];
+
+  preBuild = ''
+    substituteInPlace programs/mkwinpeimg.in --replace '/usr/lib/syslinux' "${syslinux}/share/syslinux"
+  '';
+
+  postInstall = ''
+    for prog in $out/bin/*; do
+      wrapProgram $prog --prefix PATH : ${lib.makeBinPath prefixPackages}
+    done
+  '';
+
+  doCheck = true;
+
+  checkPhase = ''
+    patchShebangs tests/
+    for testfile in tests/test-*; do
+      wrapProgram $testfile --prefix PATH : ${lib.makeBinPath prefixPackages}
+    done
+    make check
+  '';
+
+  meta = with lib; {
+    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 ];
+  };
+}