diff options
author | Ben Siraphob <bensiraphob@gmail.com> | 2021-01-15 16:19:50 +0700 |
---|---|---|
committer | Ben Siraphob <bensiraphob@gmail.com> | 2021-01-15 17:12:36 +0700 |
commit | 8c5d37129fc5097d9fb52e95fb07de75392d1c3c (patch) | |
tree | 40cfd341b87811008151e9ecf053cf7449574b98 /pkgs/tools/compression | |
parent | 94f36839357387fd711d17d762d88c69767f265b (diff) |
pkgs/tools: stdenv.lib -> lib
Diffstat (limited to 'pkgs/tools/compression')
25 files changed, 70 insertions, 70 deletions
diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix index 1c80c70b7c1df..af0cbc4fe22ec 100644 --- a/pkgs/tools/compression/brotli/default.nix +++ b/pkgs/tools/compression/brotli/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - patches = stdenv.lib.optional staticOnly (fetchpatch { + patches = lib.optional staticOnly (fetchpatch { # context from https://github.com/google/brotli/pull/655 # updated patch from https://github.com/google/brotli/pull/655 url = "https://github.com/google/brotli/commit/47a554804ceabb899ae924aaee54df806053d0d1.patch"; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { }); cmakeFlags = [] - ++ stdenv.lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF"; + ++ lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF"; outputs = [ "out" "dev" "lib" ]; diff --git a/pkgs/tools/compression/bsc/default.nix b/pkgs/tools/compression/bsc/default.nix index 1f15b3d2f87b4..ac0c0544f0171 100644 --- a/pkgs/tools/compression/bsc/default.nix +++ b/pkgs/tools/compression/bsc/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - buildInputs = stdenv.lib.optional stdenv.isDarwin openmp; + buildInputs = lib.optional stdenv.isDarwin openmp; prePatch = '' substituteInPlace makefile \ diff --git a/pkgs/tools/compression/bsdiff/default.nix b/pkgs/tools/compression/bsdiff/default.nix index a5b527d70b7fd..8b5dfe919c7d3 100644 --- a/pkgs/tools/compression/bsdiff/default.nix +++ b/pkgs/tools/compression/bsdiff/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, bzip2 }: +{ lib, stdenv, fetchurl, bzip2 }: stdenv.mkDerivation rec { pname = "bsdiff"; @@ -30,8 +30,8 @@ stdenv.mkDerivation rec { meta = { description = "An efficient binary diff/patch tool"; homepage = "http://www.daemonology.net/bsdiff"; - license = stdenv.lib.licenses.bsd2; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + license = lib.licenses.bsd2; + platforms = lib.platforms.unix; + maintainers = [ lib.maintainers.thoughtpolice ]; }; } diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix index 7b97c66b3b903..ad680a69f8501 100644 --- a/pkgs/tools/compression/bzip2/default.nix +++ b/pkgs/tools/compression/bzip2/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "man" ]; configureFlags = - stdenv.lib.optionals linkStatic [ "--enable-static" "--disable-shared" ]; + lib.optionals linkStatic [ "--enable-static" "--disable-shared" ]; enableParallelBuilding = true; diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index 9628e100c1cc5..6bcd5ae0c4277 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib, stdenv , fetchurl , xz , writeText @@ -57,8 +57,8 @@ stdenv.mkDerivation rec { is just a bonus. ''; - platforms = stdenv.lib.platforms.all; + platforms = lib.platforms.all; - license = stdenv.lib.licenses.gpl3Plus; + license = lib.licenses.gpl3Plus; }; } diff --git a/pkgs/tools/compression/gzrt/default.nix b/pkgs/tools/compression/gzrt/default.nix index 4367f4b6d61f3..18efc1b64c28f 100644 --- a/pkgs/tools/compression/gzrt/default.nix +++ b/pkgs/tools/compression/gzrt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib }: +{ lib, stdenv, fetchurl, zlib }: stdenv.mkDerivation rec { name = "gzrt-0.8"; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { meta = { homepage = "https://www.urbanophile.com/arenn/hacking/gzrt/"; description = "The gzip Recovery Toolkit"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.unix; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/tools/compression/hactool/default.nix b/pkgs/tools/compression/hactool/default.nix index 2cce7bb8b9298..85b95a6f76947 100644 --- a/pkgs/tools/compression/hactool/default.nix +++ b/pkgs/tools/compression/hactool/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { mv config.mk.template config.mk ''; - makeFlags = stdenv.lib.optionals stdenv.isDarwin [ "CC=cc" ]; + makeFlags = lib.optionals stdenv.isDarwin [ "CC=cc" ]; installPhase = '' install -D hactool $out/bin/hactool diff --git a/pkgs/tools/compression/kzipmix/default.nix b/pkgs/tools/compression/kzipmix/default.nix index f68b0cdc751a2..73931f6bcaea3 100644 --- a/pkgs/tools/compression/kzipmix/default.nix +++ b/pkgs/tools/compression/kzipmix/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{lib, stdenv, fetchurl}: stdenv.mkDerivation { name = "kzipmix-20091108"; @@ -11,15 +11,15 @@ stdenv.mkDerivation { installPhase = '' mkdir -p $out/bin cp kzip zipmix $out/bin - + patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/kzip patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/zipmix ''; meta = { description = "A tool that aggressively optimizes the sizes of Zip archives"; - license = stdenv.lib.licenses.unfree; + license = lib.licenses.unfree; homepage = "http://advsys.net/ken/utils.htm"; - maintainers = [ stdenv.lib.maintainers.sander ]; + maintainers = [ lib.maintainers.sander ]; }; } diff --git a/pkgs/tools/compression/lhasa/default.nix b/pkgs/tools/compression/lhasa/default.nix index edf42266acdb1..77df84879b8d9 100644 --- a/pkgs/tools/compression/lhasa/default.nix +++ b/pkgs/tools/compression/lhasa/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{lib, stdenv, fetchurl}: stdenv.mkDerivation { name = "lhasa-0.3.1"; @@ -13,9 +13,9 @@ stdenv.mkDerivation { decompressing .lzh (LHA / LHarc) and .lzs (LArc) archives. The backend for the tool is a library, so that it can be reused for other purposes. ''; - license = stdenv.lib.licenses.isc; + license = lib.licenses.isc; homepage = "http://fragglet.github.io/lhasa"; - maintainers = with stdenv.lib; [ maintainers.sander ]; - platforms = with stdenv.lib.platforms; linux ++ darwin; + maintainers = with lib; [ maintainers.sander ]; + platforms = with lib.platforms; linux ++ darwin; }; } diff --git a/pkgs/tools/compression/lrzip/default.nix b/pkgs/tools/compression/lrzip/default.nix index aaddb6299c4bc..596ea0531664f 100644 --- a/pkgs/tools/compression/lrzip/default.nix +++ b/pkgs/tools/compression/lrzip/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, zlib, lzo, bzip2, nasm, perl}: +{lib, stdenv, fetchurl, zlib, lzo, bzip2, nasm, perl}: stdenv.mkDerivation rec { version = "0.631"; @@ -14,8 +14,8 @@ stdenv.mkDerivation rec { meta = { homepage = "http://ck.kolivas.org/apps/lrzip/"; description = "The CK LRZIP compression program (LZMA + RZIP)"; - license = stdenv.lib.licenses.gpl2Plus; + license = lib.licenses.gpl2Plus; inherit version; - platforms = stdenv.lib.platforms.unix; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix index 0805045518436..e2bb98a4b8051 100644 --- a/pkgs/tools/compression/lz4/default.nix +++ b/pkgs/tools/compression/lz4/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # TODO(@Ericson2314): Separate binaries and libraries outputs = [ "bin" "out" "dev" ]; - buildInputs = stdenv.lib.optional doCheck valgrind; + buildInputs = lib.optional doCheck valgrind; enableParallelBuilding = true; @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { "WINDRES:=${stdenv.cc.bintools.targetPrefix}windres" ] # TODO make full dictionary - ++ stdenv.lib.optional stdenv.hostPlatform.isMinGW "TARGET_OS=MINGW" + ++ lib.optional stdenv.hostPlatform.isMinGW "TARGET_OS=MINGW" ; doCheck = false; # tests take a very long time @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { # TODO(@Ericson2314): Make resusable setup hook for this issue on Windows. postInstall = - stdenv.lib.optionalString stdenv.hostPlatform.isWindows '' + lib.optionalString stdenv.hostPlatform.isWindows '' mv $out/bin/*.dll $out/lib ln -s $out/lib/*.dll '' diff --git a/pkgs/tools/compression/lzip/default.nix b/pkgs/tools/compression/lzip/default.nix index e55af8b94ed26..9826347cfbb1a 100644 --- a/pkgs/tools/compression/lzip/default.nix +++ b/pkgs/tools/compression/lzip/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, texinfo }: +{ lib, stdenv, fetchurl, texinfo }: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { "CPPFLAGS=-DNDEBUG" "CFLAGS=-O3" "CXXFLAGS=-O3" - ] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) + ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CXX=${stdenv.cc.targetPrefix}c++"; setupHook = ./lzip-setup-hook.sh; @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { meta = { homepage = "https://www.nongnu.org/lzip/lzip.html"; description = "A lossless data compressor based on the LZMA algorithm"; - license = stdenv.lib.licenses.gpl3Plus; - platforms = stdenv.lib.platforms.all; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.all; }; } diff --git a/pkgs/tools/compression/mozlz4a/default.nix b/pkgs/tools/compression/mozlz4a/default.nix index 04323f8c49ecb..dabde674d2eb8 100644 --- a/pkgs/tools/compression/mozlz4a/default.nix +++ b/pkgs/tools/compression/mozlz4a/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python3, runtimeShell }: +{ lib, stdenv, fetchurl, python3, runtimeShell }: stdenv.mkDerivation rec { pname = "mozlz4a"; @@ -26,9 +26,9 @@ stdenv.mkDerivation rec { meta = { inherit version; description = "A script to handle Mozilla's mozlz4 files"; - license = stdenv.lib.licenses.bsd2; - maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.linux; + license = lib.licenses.bsd2; + maintainers = [lib.maintainers.raskin]; + platforms = lib.platforms.linux; homepage = "https://gist.githubusercontent.com/Tblue/62ff47bef7f894e92ed5"; }; } diff --git a/pkgs/tools/compression/ncompress/default.nix b/pkgs/tools/compression/ncompress/default.nix index b60a23e660ca4..0f79811f96692 100644 --- a/pkgs/tools/compression/ncompress/default.nix +++ b/pkgs/tools/compression/ncompress/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{lib, stdenv, fetchurl}: stdenv.mkDerivation rec { name = "ncompress-4.2.4.5"; @@ -14,8 +14,8 @@ stdenv.mkDerivation rec { meta = { homepage = "http://ncompress.sourceforge.net/"; - license = stdenv.lib.licenses.publicDomain; + license = lib.licenses.publicDomain; description = "A fast, simple LZW file compressor"; - platforms = stdenv.lib.platforms.unix; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/tools/compression/pbzip2/default.nix b/pkgs/tools/compression/pbzip2/default.nix index 599c096adefa2..6d27b84e8c4c7 100644 --- a/pkgs/tools/compression/pbzip2/default.nix +++ b/pkgs/tools/compression/pbzip2/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { installFlags = [ "PREFIX=$(out)" ]; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=reserved-user-defined-literal"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=reserved-user-defined-literal"; meta = with lib; { homepage = "http://compression.ca/pbzip2/"; diff --git a/pkgs/tools/compression/pigz/default.nix b/pkgs/tools/compression/pigz/default.nix index 9178e3ad58755..7517e599e733c 100644 --- a/pkgs/tools/compression/pigz/default.nix +++ b/pkgs/tools/compression/pigz/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [zlib] ++ stdenv.lib.optional stdenv.isLinux util-linux; + buildInputs = [zlib] ++ lib.optional stdenv.isLinux util-linux; makeFlags = [ "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" ]; diff --git a/pkgs/tools/compression/pixz/default.nix b/pkgs/tools/compression/pixz/default.nix index c7b4b46328d74..9cf1e441df873 100644 --- a/pkgs/tools/compression/pixz/default.nix +++ b/pkgs/tools/compression/pixz/default.nix @@ -1,5 +1,5 @@ { - stdenv, fetchFromGitHub, autoconf, automake, libtool, pkgconfig + lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkgconfig , asciidoc, libxslt, libxml2, docbook_xml_dtd_45, docbook_xsl , libarchive, lzma }: @@ -30,8 +30,8 @@ stdenv.mkDerivation rec { meta = { inherit version; description = ''A parallel compressor/decompressor for xz format''; - license = stdenv.lib.licenses.bsd2; - maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.unix; + license = lib.licenses.bsd2; + maintainers = [lib.maintainers.raskin]; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/tools/compression/pxz/default.nix b/pkgs/tools/compression/pxz/default.nix index e731d91f6d6ee..e337ccdd4ae3e 100644 --- a/pkgs/tools/compression/pxz/default.nix +++ b/pkgs/tools/compression/pxz/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, xz, lzma }: +{ lib, stdenv, fetchgit, xz, lzma }: let name = "pxz"; version = "4.999.9beta+git"; @@ -32,13 +32,13 @@ stdenv.mkDerivation { meta = { homepage = "https://jnovy.fedorapeople.org/pxz/"; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = with stdenv.lib.maintainers; [pashev]; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [pashev]; description = ''Parallel XZ is a compression utility that takes advantage of running LZMA compression of different parts of an input file on multiple cores and processors simultaneously. Its primary goal is to utilize all resources to speed up compression time with minimal possible influence on compression ratio''; - platforms = with stdenv.lib.platforms; linux; + platforms = with lib.platforms; linux; }; } diff --git a/pkgs/tools/compression/rzip/default.nix b/pkgs/tools/compression/rzip/default.nix index fe4ac14ad0210..60364afa9f30e 100644 --- a/pkgs/tools/compression/rzip/default.nix +++ b/pkgs/tools/compression/rzip/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, fetchpatch, bzip2}: +{lib, stdenv, fetchurl, fetchpatch, bzip2}: stdenv.mkDerivation { name = "rzip-2.1"; @@ -19,7 +19,7 @@ stdenv.mkDerivation { meta = { homepage = "https://rzip.samba.org/"; description = "Compression program"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.unix; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/tools/compression/xar/default.nix b/pkgs/tools/compression/xar/default.nix index b877f78b8c35d..5d7c2b092204f 100644 --- a/pkgs/tools/compression/xar/default.nix +++ b/pkgs/tools/compression/xar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libxml2, lzma, openssl, zlib, bzip2, fts, autoconf }: +{ lib, stdenv, fetchurl, libxml2, lzma, openssl, zlib, bzip2, fts, autoconf }: stdenv.mkDerivation rec { version = "1.6.1"; @@ -35,8 +35,8 @@ stdenv.mkDerivation rec { of content's rich meta-data. ''; - license = stdenv.lib.licenses.bsd3; - maintainers = with stdenv.lib.maintainers; [ copumpkin ]; - platforms = stdenv.lib.platforms.all; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ copumpkin ]; + platforms = lib.platforms.all; }; } diff --git a/pkgs/tools/compression/xdelta/default.nix b/pkgs/tools/compression/xdelta/default.nix index b599ee2920f1b..ee52f35c9790f 100644 --- a/pkgs/tools/compression/xdelta/default.nix +++ b/pkgs/tools/compression/xdelta/default.nix @@ -21,7 +21,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [] - ++ stdenv.lib.optionals lzmaSupport [ xz ]; + ++ lib.optionals lzmaSupport [ xz ]; postPatch = '' cd xdelta3 diff --git a/pkgs/tools/compression/xdelta/unstable.nix b/pkgs/tools/compression/xdelta/unstable.nix index 25cd3ed311ad5..03366e5b1ce3e 100644 --- a/pkgs/tools/compression/xdelta/unstable.nix +++ b/pkgs/tools/compression/xdelta/unstable.nix @@ -21,7 +21,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [] - ++ stdenv.lib.optionals lzmaSupport [ xz ]; + ++ lib.optionals lzmaSupport [ xz ]; postPatch = '' cd xdelta3 diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index fa4a012433399..cc021a1ef051e 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "man" "doc" ]; - configureFlags = stdenv.lib.optional enableStatic "--disable-shared"; + configureFlags = lib.optional enableStatic "--disable-shared"; doCheck = true; diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index eb4144443aec3..e1437e3843db6 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -17,22 +17,22 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; - buildInputs = stdenv.lib.optional stdenv.hostPlatform.isUnix bash; + ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = lib.optional stdenv.hostPlatform.isUnix bash; patches = [ ./playtests-darwin.patch ] # This I didn't upstream because if you use posix threads with MinGW it will # work fine, and I'm not sure how to write the condition. - ++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch; + ++ lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch; - postPatch = stdenv.lib.optionalString (!static) '' + postPatch = lib.optionalString (!static) '' substituteInPlace build/cmake/CMakeLists.txt \ --replace 'message(SEND_ERROR "You need to build static library to build tests")' "" substituteInPlace build/cmake/tests/CMakeLists.txt \ --replace 'libzstd_static' 'libzstd_shared' sed -i \ - "1aexport ${stdenv.lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/build_/lib" \ + "1aexport ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/build_/lib" \ tests/playTests.sh ''; @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { ''; outputs = [ "bin" "dev" ] - ++ stdenv.lib.optional stdenv.hostPlatform.isUnix "man" + ++ lib.optional stdenv.hostPlatform.isUnix "man" ++ [ "out" ]; meta = with lib; { diff --git a/pkgs/tools/compression/zsync/default.nix b/pkgs/tools/compression/zsync/default.nix index 7984e2bd58934..94921397e3037 100644 --- a/pkgs/tools/compression/zsync/default.nix +++ b/pkgs/tools/compression/zsync/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{lib, stdenv, fetchurl}: stdenv.mkDerivation rec { name = "zsync-0.6.2"; @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { meta = { homepage = "http://zsync.moria.org.uk/"; description = "File distribution system using the rsync algorithm"; - license = stdenv.lib.licenses.free; - maintainers = with stdenv.lib.maintainers; [viric]; - platforms = with stdenv.lib.platforms; all; + license = lib.licenses.free; + maintainers = with lib.maintainers; [viric]; + platforms = with lib.platforms; all; }; } |