pkgs/tools: stdenv.lib -> lib

This commit is contained in:
Ben Siraphob
2021-01-15 17:12:36 +07:00
parent 94f3683935
commit 8c5d37129f
916 changed files with 2510 additions and 2510 deletions
+2 -2
View File
@@ -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" ];
+1 -1
View File
@@ -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 \
+4 -4
View File
@@ -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 ];
};
}
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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;
};
}
+3 -3
View File
@@ -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;
};
}
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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 ];
};
}
+4 -4
View File
@@ -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;
};
}
+3 -3
View File
@@ -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;
};
}
+3 -3
View File
@@ -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
''
+4 -4
View File
@@ -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;
};
}
+4 -4
View File
@@ -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";
};
}
+3 -3
View File
@@ -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;
};
}
+1 -1
View File
@@ -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/";
+1 -1
View File
@@ -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" ];
+4 -4
View File
@@ -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;
};
}
+4 -4
View File
@@ -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;
};
}
+3 -3
View File
@@ -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;
};
}
+4 -4
View File
@@ -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;
};
}
+1 -1
View File
@@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
buildInputs = []
++ stdenv.lib.optionals lzmaSupport [ xz ];
++ lib.optionals lzmaSupport [ xz ];
postPatch = ''
cd xdelta3
+1 -1
View File
@@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
buildInputs = []
++ stdenv.lib.optionals lzmaSupport [ xz ];
++ lib.optionals lzmaSupport [ xz ];
postPatch = ''
cd xdelta3
+1 -1
View File
@@ -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;
+6 -6
View File
@@ -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; {
+4 -4
View File
@@ -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;
};
}