4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, makeWrapper
|
|
, pkgconfig, openssl, fuse, libxml2
|
|
, cabextract ? null
|
|
, cdrkit ? null
|
|
, mtools ? null
|
|
, ntfs3g ? null
|
|
, syslinux ? null
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.13.2";
|
|
pname = "wimlib";
|
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper ];
|
|
buildInputs = [ openssl fuse libxml2 ntfs3g ];
|
|
|
|
src = fetchurl {
|
|
url = "https://wimlib.net/downloads/${pname}-${version}.tar.gz";
|
|
sha256 = "0id9ym3hzij4kpdrk0sz3ijxp5r0z1md5jch83pml9hdy1zbx5bj";
|
|
};
|
|
|
|
preBuild = ''
|
|
substituteInPlace programs/mkwinpeimg.in \
|
|
--replace '/usr/lib/syslinux' "${syslinux}/share/syslinux"
|
|
'';
|
|
|
|
postInstall = let
|
|
path = stdenv.lib.makeBinPath [ cabextract cdrkit mtools ntfs3g syslinux ];
|
|
in ''
|
|
for prog in $out/bin/*; do
|
|
wrapProgram $prog --prefix PATH : ${path}
|
|
done
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
|
patchShebangs tests
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|