treewide: remove global with lib; statements in pkgs/development

Changed files
+391 -524
pkgs
development
beam-modules
compilers
intercal
scala
sdcc
interpreters
lolcode
perl
picolisp
python
ruby
java-modules
libraries
SDL
SDL2
apr-util
asio
aspell
boost
cyrus-sasl
faac
faad2
fftw
geis
glew
gloox
gtk
hunspell
indicator-application
kerberos
lame
libass
libcollectdclient
libidn2
libmcrypt
libqtav
libspf2
libtap
libunique
libutempter
libvirt
libvmi
libytnef
mesa
nuspell
opencascade
pcg-c
pcre
phonon
science
math
clmagma
openblas
sope
sqlite
srt
unittest-cpp
xvidcore
misc
msp430
ocaml-modules
python-modules
mohawk
tools
ammonite
butane
eclipse-mat
iaca
kind
misc
kibana
pkg-config
premake
qtcreator
sauce-connect
selenium
htmlunit-driver
selendroid
server
summon
web
nodejs
+1 -3
pkgs/development/beam-modules/build-erlang-mk.nix
···
, ...
}@attrs:
-
with lib;
-
let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "+debug_info";
···
};
});
in
-
fix pkg
···
, ...
}@attrs:
let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "+debug_info";
···
};
});
in
+
lib.fix pkg
+1 -3
pkgs/development/beam-modules/build-hex.nix
···
, hexPkg ? name
, ... }@attrs:
-
with lib;
-
let
pkg = self: builder (attrs // {
···
};
});
in
-
fix pkg
···
, hexPkg ? name
, ... }@attrs:
let
pkg = self: builder (attrs // {
···
};
});
in
+
lib.fix pkg
+1 -2
pkgs/development/beam-modules/build-mix.nix
···
, ...
}@attrs:
-
with lib;
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
···
};
});
in
-
fix pkg
···
, ...
}@attrs:
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
···
};
});
in
+
lib.fix pkg
+3 -5
pkgs/development/beam-modules/build-rebar3.nix
···
, ...
}@attrs:
-
with lib;
-
let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "debug-info";
···
buildInputs = [ drv ];
};
-
customPhases = filterAttrs
(_: v: v != null)
{ inherit setupHook configurePhase buildPhase installPhase; };
···
inherit version;
buildInputs = buildInputs ++ [ erlang rebar3 openssl libyaml ];
-
propagatedBuildInputs = unique beamDeps;
inherit src;
···
};
} // customPhases);
in
-
fix pkg
···
, ...
}@attrs:
let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "debug-info";
···
buildInputs = [ drv ];
};
+
customPhases = lib.filterAttrs
(_: v: v != null)
{ inherit setupHook configurePhase buildPhase installPhase; };
···
inherit version;
buildInputs = buildInputs ++ [ erlang rebar3 openssl libyaml ];
+
propagatedBuildInputs = lib.unique beamDeps;
inherit src;
···
};
} // customPhases);
in
+
lib.fix pkg
-2
pkgs/development/beam-modules/fetch-hex.nix
···
, meta ? { }
}:
-
with lib;
-
stdenv.mkDerivation ({
pname = "hex-source-${pkg}";
inherit version;
···
, meta ? { }
}:
stdenv.mkDerivation ({
pname = "hex-source-${pkg}";
inherit version;
-2
pkgs/development/beam-modules/fetch-rebar-deps.nix
···
, meta ? { }
}:
-
with lib;
-
stdenv.mkDerivation ({
pname = "rebar-deps-${name}";
inherit version;
···
, meta ? { }
}:
stdenv.mkDerivation ({
pname = "rebar-deps-${name}";
inherit version;
+2 -4
pkgs/development/beam-modules/rebar3-release.nix
···
, ...
}@attrs:
-
with lib;
-
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.pname}";
buildInputs = [ drv ];
};
-
customPhases = filterAttrs
(_: v: v != null)
{ inherit setupHook configurePhase buildPhase installPhase; };
···
} // (if attrs ? passthru then attrs.passthru else { }));
} // customPhases);
in
-
fix pkg
···
, ...
}@attrs:
let
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.pname}";
buildInputs = [ drv ];
};
+
customPhases = lib.filterAttrs
(_: v: v != null)
{ inherit setupHook configurePhase buildPhase installPhase; };
···
} // (if attrs ? passthru then attrs.passthru else { }));
} // customPhases);
in
+
lib.fix pkg
+1 -2
pkgs/development/compilers/intercal/default.nix
···
, bison, flex
, makeWrapper }:
-
with lib;
stdenv.mkDerivation rec {
pname = "intercal";
···
wrapProgram $out/bin/ick --suffix PATH ':' ${stdenv.cc}/bin
'';
-
meta = {
description = "The original esoteric programming language";
longDescription = ''
INTERCAL, an abbreviation for "Compiler Language With No
···
, bison, flex
, makeWrapper }:
stdenv.mkDerivation rec {
pname = "intercal";
···
wrapProgram $out/bin/ick --suffix PATH ':' ${stdenv.cc}/bin
'';
+
meta = with lib; {
description = "The original esoteric programming language";
longDescription = ''
INTERCAL, an abbreviation for "Compiler Language With No
+1 -3
pkgs/development/compilers/scala/2.x.nix
···
{ stdenv, lib, fetchurl, makeWrapper, jre, gnugrep, coreutils, writeScript
, common-updater-scripts, git, gnused, nix, nixfmt, majorVersion }:
-
with lib;
-
let
repo = "git@github.com:scala/scala.git";
···
'';
};
-
meta = {
description = "A general purpose programming language";
longDescription = ''
Scala is a general purpose programming language designed to express
···
{ stdenv, lib, fetchurl, makeWrapper, jre, gnugrep, coreutils, writeScript
, common-updater-scripts, git, gnused, nix, nixfmt, majorVersion }:
let
repo = "git@github.com:scala/scala.git";
···
'';
};
+
meta = with lib; {
description = "A general purpose programming language";
longDescription = ''
Scala is a general purpose programming language designed to express
+2 -4
pkgs/development/compilers/sdcc/default.nix
···
{ lib, stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, zlib, gputils ? null
, excludePorts ? [] }:
-
with lib;
-
let
# choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8
-
excludedPorts = excludePorts ++ (optionals (gputils == null) [ "pic14" "pic16" ]);
in
stdenv.mkDerivation rec {
···
fi
'';
-
meta = {
description = "Small Device C Compiler";
longDescription = ''
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
···
{ lib, stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, zlib, gputils ? null
, excludePorts ? [] }:
let
# choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8
+
excludedPorts = excludePorts ++ (lib.optionals (gputils == null) [ "pic14" "pic16" ]);
in
stdenv.mkDerivation rec {
···
fi
'';
+
meta = with lib; {
description = "Small Device C Compiler";
longDescription = ''
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
+1 -2
pkgs/development/interpreters/lolcode/default.nix
···
{ lib, stdenv, fetchFromGitHub, pkg-config, doxygen, cmake, readline }:
-
with lib;
stdenv.mkDerivation rec {
pname = "lolcode";
···
# Maybe it clashes with lci scientific logic software package...
postInstall = "mv $out/bin/lci $out/bin/lolcode-lci";
-
meta = {
homepage = "http://lolcode.org";
description = "An esoteric programming language";
longDescription = ''
···
{ lib, stdenv, fetchFromGitHub, pkg-config, doxygen, cmake, readline }:
stdenv.mkDerivation rec {
pname = "lolcode";
···
# Maybe it clashes with lci scientific logic software package...
postInstall = "mv $out/bin/lci $out/bin/lolcode-lci";
+
meta = with lib; {
homepage = "http://lolcode.org";
description = "An esoteric programming language";
longDescription = ''
+16 -18
pkgs/development/interpreters/perl/default.nix
···
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
-
with lib;
-
let
libc = if stdenv.cc.libc or null != null then stdenv.cc.libc else "/usr";
···
strictDeps = true;
# TODO: Add a "dev" output containing the header files.
outputs = [ "out" "man" "devdoc" ] ++
-
optional crossCompiling "mini";
setOutputFlags = false;
# On FreeBSD, if Perl is built with threads support, having
···
# Enable TLS/SSL verification in HTTP::Tiny by default
./http-tiny-verify-ssl-by-default.patch
]
-
++ optional stdenv.isSunOS ./ld-shared.patch
-
++ optionals stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ]
-
++ optional crossCompiling ./MakeMaker-cross.patch;
# This is not done for native builds because pwd may need to come from
# bootstrap tools when building bootstrap perl.
···
"-Dlocincpth=${libcInc}/include"
"-Dloclibpth=${libcLib}/lib"
]
-
++ optionals ((builtins.match ''5\.[0-9]*[13579]\..+'' version) != null) [ "-Dusedevel" "-Uversiononly" ]
-
++ optional stdenv.isSunOS "-Dcc=gcc"
-
++ optional enableThreading "-Dusethreads"
-
++ optional (!enableCrypt) "-A clear:d_crypt_r"
-
++ optional stdenv.hostPlatform.isStatic "--all-static"
-
++ optionals (!crossCompiling) [
"-Dprefix=${placeholder "out"}"
"-Dman1dir=${placeholder "out"}/share/man/man1"
"-Dman3dir=${placeholder "out"}/share/man/man3"
];
-
configureScript = optionalString (!crossCompiling) "${stdenv.shell} ./Configure";
dontAddStaticConfigureFlags = true;
···
OLD_ZLIB = False
GZIP_OS_CODE = AUTO_DETECT
EOF
-
'' + optionalString stdenv.isDarwin ''
substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" ""
-
'' + optionalString (!enableThreading) ''
# We need to do this because the bootstrap doesn't have a static libpthread
sed -i 's,\(libswanted.*\)pthread,\1,g' Configure
'';
···
}" /no-such-path \
--replace "${stdenv.cc}" /no-such-path \
--replace "$man" /no-such-path
-
'' + optionalString crossCompiling
''
mkdir -p $mini/lib/perl5/cross_perl/${version}
for dir in cnf/{stub,cpan}; do
···
"$mini/lib/perl5/cross_perl/${version}:$out/lib/perl5/${version}:$out/lib/perl5/${version}/$runtimeArch"
''; # */
-
meta = {
homepage = "https://www.perl.org/";
description = "The standard implementation of the Perl 5 programmming language";
license = licenses.artistic1;
···
platforms = platforms.all;
priority = 6; # in `buildEnv' (including the one inside `perl.withPackages') the library files will have priority over files in `perl`
};
-
} // optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) rec {
crossVersion = "c876045741f5159318085d2737b0090f35a842ca"; # June 5, 2022
perl-cross-src = fetchFromGitHub {
···
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
let
libc = if stdenv.cc.libc or null != null then stdenv.cc.libc else "/usr";
···
strictDeps = true;
# TODO: Add a "dev" output containing the header files.
outputs = [ "out" "man" "devdoc" ] ++
+
lib.optional crossCompiling "mini";
setOutputFlags = false;
# On FreeBSD, if Perl is built with threads support, having
···
# Enable TLS/SSL verification in HTTP::Tiny by default
./http-tiny-verify-ssl-by-default.patch
]
+
++ lib.optional stdenv.isSunOS ./ld-shared.patch
+
++ lib.optionals stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ]
+
++ lib.optional crossCompiling ./MakeMaker-cross.patch;
# This is not done for native builds because pwd may need to come from
# bootstrap tools when building bootstrap perl.
···
"-Dlocincpth=${libcInc}/include"
"-Dloclibpth=${libcLib}/lib"
]
+
++ lib.optionals ((builtins.match ''5\.[0-9]*[13579]\..+'' version) != null) [ "-Dusedevel" "-Uversiononly" ]
+
++ lib.optional stdenv.isSunOS "-Dcc=gcc"
+
++ lib.optional enableThreading "-Dusethreads"
+
++ lib.optional (!enableCrypt) "-A clear:d_crypt_r"
+
++ lib.optional stdenv.hostPlatform.isStatic "--all-static"
+
++ lib.optionals (!crossCompiling) [
"-Dprefix=${placeholder "out"}"
"-Dman1dir=${placeholder "out"}/share/man/man1"
"-Dman3dir=${placeholder "out"}/share/man/man3"
];
+
configureScript = lib.optionalString (!crossCompiling) "${stdenv.shell} ./Configure";
dontAddStaticConfigureFlags = true;
···
OLD_ZLIB = False
GZIP_OS_CODE = AUTO_DETECT
EOF
+
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" ""
+
'' + lib.optionalString (!enableThreading) ''
# We need to do this because the bootstrap doesn't have a static libpthread
sed -i 's,\(libswanted.*\)pthread,\1,g' Configure
'';
···
}" /no-such-path \
--replace "${stdenv.cc}" /no-such-path \
--replace "$man" /no-such-path
+
'' + lib.optionalString crossCompiling
''
mkdir -p $mini/lib/perl5/cross_perl/${version}
for dir in cnf/{stub,cpan}; do
···
"$mini/lib/perl5/cross_perl/${version}:$out/lib/perl5/${version}:$out/lib/perl5/${version}/$runtimeArch"
''; # */
+
meta = with lib; {
homepage = "https://www.perl.org/";
description = "The standard implementation of the Perl 5 programmming language";
license = licenses.artistic1;
···
platforms = platforms.all;
priority = 6; # in `buildEnv' (including the one inside `perl.withPackages') the library files will have priority over files in `perl`
};
+
} // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) rec {
crossVersion = "c876045741f5159318085d2737b0090f35a842ca"; # June 5, 2022
perl-cross-src = fetchFromGitHub {
+4 -5
pkgs/development/interpreters/picolisp/default.nix
···
{ lib, stdenv, fetchurl, jdk, w3m, openssl, makeWrapper }:
-
with lib;
stdenv.mkDerivation rec {
pname = "picoLisp";
···
sha256 = "0l51x98bn1hh6kv40sdgp0x09pzg5i8yxbcjvm9n5bxsd6bbk5w2";
};
nativeBuildInputs = [ makeWrapper ];
-
buildInputs = [openssl] ++ optional stdenv.is64bit jdk;
patchPhase = ''
sed -i "s/which java/command -v java/g" mkAsm
-
${optionalString stdenv.isAarch32 ''
sed -i s/-m32//g Makefile
cat >>Makefile <<EOF
ext.o: ext.c
···
EOF
''}
'';
-
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}'';
postBuild = ''
cd ../src; make gate
'';
···
ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp"
'';
-
meta = {
# darwin: build times out
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
description = "A simple Lisp with an integrated database";
···
{ lib, stdenv, fetchurl, jdk, w3m, openssl, makeWrapper }:
stdenv.mkDerivation rec {
pname = "picoLisp";
···
sha256 = "0l51x98bn1hh6kv40sdgp0x09pzg5i8yxbcjvm9n5bxsd6bbk5w2";
};
nativeBuildInputs = [ makeWrapper ];
+
buildInputs = [openssl] ++ lib.optional stdenv.is64bit jdk;
patchPhase = ''
sed -i "s/which java/command -v java/g" mkAsm
+
${lib.optionalString stdenv.isAarch32 ''
sed -i s/-m32//g Makefile
cat >>Makefile <<EOF
ext.o: ext.c
···
EOF
''}
'';
+
sourceRoot = ''picoLisp/src${lib.optionalString stdenv.is64bit "64"}'';
postBuild = ''
cd ../src; make gate
'';
···
ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp"
'';
+
meta = with lib; {
# darwin: build times out
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
description = "A simple Lisp with an integrated database";
+31 -33
pkgs/development/interpreters/python/cpython/2.7/default.nix
···
assert lib.assertMsg (reproducibleBuild -> (!rebuildBytecode))
"Deterministic builds are not achieved when (default unoptimized) bytecode is created.";
-
with lib;
-
let
buildPackages = pkgsBuildHost;
inherit (passthru) pythonForBuild;
···
# * https://github.com/python/cpython/commit/e6b247c8e524
../3.7/no-win64-workaround.patch
-
] ++ optionals (x11Support && stdenv.isDarwin) [
./use-correct-tcl-tk-on-darwin.patch
-
] ++ optionals stdenv.isLinux [
# Disable the use of ldconfig in ctypes.util.find_library (since
# ldconfig doesn't work on NixOS), and don't use
···
# Fix ctypes.util.find_library with gcc10.
./find_library-gcc10.patch
-
] ++ optionals stdenv.hostPlatform.isCygwin [
./2.5.2-ctypes-util-find_library.patch
./2.5.2-tkinter-x11.patch
./2.6.2-ssl-threads.patch
···
./2.7.3-dylib.patch
./2.7.3-getpath-exe-extension.patch
./2.7.3-no-libm.patch
-
] ++ optionals hasDistutilsCxxPatch [
# Patch from http://bugs.python.org/issue1222585 adapted to work with
# `patch -p1' and with a last hunk removed
···
# only works for GCC and Apple Clang. This makes distutils to call C++
# compiler when needed.
./python-2.7-distutils-C++.patch
-
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
./cross-compile.patch
];
···
for i in /usr /sw /opt /pkg; do
substituteInPlace ./setup.py --replace $i /no-such-path
done
-
'' + optionalString (stdenv ? cc && stdenv.cc.libc != null) ''
for i in Lib/plat-*/regen; do
substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/
done
-
'' + optionalString stdenv.isDarwin ''
substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"'
substituteInPlace Lib/multiprocessing/__init__.py \
--replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")'
'';
-
configureFlags = optionals enableOptimizations [
"--enable-optimizations"
-
] ++ optionals (!static) [
"--enable-shared"
] ++ [
"--with-threads"
"--with-system-ffi"
"--with-system-expat"
"--enable-unicode=ucs${toString ucsEncoding}"
-
] ++ optionals stdenv.hostPlatform.isCygwin [
"ac_cv_func_bind_textdomain_codeset=yes"
-
] ++ optionals stdenv.isDarwin [
"--disable-toolbox-glue"
-
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
-
"PYTHON_FOR_BUILD=${getBin buildPackages.python}/bin/python"
"ac_cv_buggy_getaddrinfo=no"
# Assume little-endian IEEE 754 floating point when cross compiling
"ac_cv_little_endian_double=yes"
···
]
# Never even try to use lchmod on linux,
# don't rely on detecting glibc-isms.
-
++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no"
-
++ optional static "LDFLAGS=-static";
strictDeps = true;
buildInputs =
-
optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
[ bzip2 openssl zlib libffi expat db gdbm ncurses sqlite readline ]
-
++ optionals x11Support [ tcl tk libX11 ]
-
++ optional (stdenv.isDarwin && configd != null) configd;
nativeBuildInputs =
[ autoreconfHook ]
-
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform)
[ buildPackages.stdenv.cc buildPackages.python ];
mkPaths = paths: {
-
C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths;
-
LIBRARY_PATH = makeLibraryPath paths;
};
# Python 2.7 needs this
···
LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
-
NIX_CFLAGS_COMPILE = optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2"
-
+ optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000";
DETERMINISTIC_BUILD = 1;
setupHook = python-setup-hook sitePackages;
-
postPatch = optionalString (x11Support && (tix != null)) ''
substituteInPlace "Lib/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
'';
···
# Determinism: Windows installers were not deterministic.
# We're also not interested in building Windows installers.
find "$out" -name 'wininst*.exe' | xargs -r rm -f
-
'' + optionalString stripBytecode ''
# Determinism: deterministic bytecode
# First we delete all old bytecode.
find $out -name "*.pyc" -delete
-
'' + optionalString rebuildBytecode ''
# We build 3 levels of optimized bytecode. Note the default level, without optimizations,
# is not reproducible yet. https://bugs.python.org/issue29708
# Not creating bytecode will result in a large performance loss however, so we do build it.
find $out -name "*.py" | ${pythonForBuildInterpreter} -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | ${pythonForBuildInterpreter} -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | ${pythonForBuildInterpreter} -OO -m compileall -q -f -x "lib2to3" -i -
-
'' + optionalString stdenv.hostPlatform.isCygwin ''
cp libpython2.7.dll.a $out/lib
'';
···
postFixup = ''
# Include a sitecustomize.py file. Note it causes an error when it's in postInstall with 2.7.
cp ${../../sitecustomize.py} $out/${sitePackages}/sitecustomize.py
-
'' + optionalString strip2to3 ''
rm -R $out/bin/2to3 $out/lib/python*/lib2to3
-
'' + optionalString stripConfig ''
rm -R $out/bin/python*-config $out/lib/python*/config*
-
'' + optionalString stripIdlelib ''
# Strip IDLE
rm -R $out/bin/idle* $out/lib/python*/idlelib
-
'' + optionalString stripTests ''
# Strip tests
rm -R $out/lib/python*/test $out/lib/python*/**/test{,s}
'';
···
assert lib.assertMsg (reproducibleBuild -> (!rebuildBytecode))
"Deterministic builds are not achieved when (default unoptimized) bytecode is created.";
let
buildPackages = pkgsBuildHost;
inherit (passthru) pythonForBuild;
···
# * https://github.com/python/cpython/commit/e6b247c8e524
../3.7/no-win64-workaround.patch
+
] ++ lib.optionals (x11Support && stdenv.isDarwin) [
./use-correct-tcl-tk-on-darwin.patch
+
] ++ lib.optionals stdenv.isLinux [
# Disable the use of ldconfig in ctypes.util.find_library (since
# ldconfig doesn't work on NixOS), and don't use
···
# Fix ctypes.util.find_library with gcc10.
./find_library-gcc10.patch
+
] ++ lib.optionals stdenv.hostPlatform.isCygwin [
./2.5.2-ctypes-util-find_library.patch
./2.5.2-tkinter-x11.patch
./2.6.2-ssl-threads.patch
···
./2.7.3-dylib.patch
./2.7.3-getpath-exe-extension.patch
./2.7.3-no-libm.patch
+
] ++ lib.optionals hasDistutilsCxxPatch [
# Patch from http://bugs.python.org/issue1222585 adapted to work with
# `patch -p1' and with a last hunk removed
···
# only works for GCC and Apple Clang. This makes distutils to call C++
# compiler when needed.
./python-2.7-distutils-C++.patch
+
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
./cross-compile.patch
];
···
for i in /usr /sw /opt /pkg; do
substituteInPlace ./setup.py --replace $i /no-such-path
done
+
'' + lib.optionalString (stdenv ? cc && stdenv.cc.libc != null) ''
for i in Lib/plat-*/regen; do
substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/
done
+
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"'
substituteInPlace Lib/multiprocessing/__init__.py \
--replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")'
'';
+
configureFlags = lib.optionals enableOptimizations [
"--enable-optimizations"
+
] ++ lib.optionals (!static) [
"--enable-shared"
] ++ [
"--with-threads"
"--with-system-ffi"
"--with-system-expat"
"--enable-unicode=ucs${toString ucsEncoding}"
+
] ++ lib.optionals stdenv.hostPlatform.isCygwin [
"ac_cv_func_bind_textdomain_codeset=yes"
+
] ++ lib.optionals stdenv.isDarwin [
"--disable-toolbox-glue"
+
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+
"PYTHON_FOR_BUILD=${lib.getBin buildPackages.python}/bin/python"
"ac_cv_buggy_getaddrinfo=no"
# Assume little-endian IEEE 754 floating point when cross compiling
"ac_cv_little_endian_double=yes"
···
]
# Never even try to use lchmod on linux,
# don't rely on detecting glibc-isms.
+
++ lib.optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no"
+
++ lib.optional static "LDFLAGS=-static";
strictDeps = true;
buildInputs =
+
lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
[ bzip2 openssl zlib libffi expat db gdbm ncurses sqlite readline ]
+
++ lib.optionals x11Support [ tcl tk libX11 ]
+
++ lib.optional (stdenv.isDarwin && configd != null) configd;
nativeBuildInputs =
[ autoreconfHook ]
+
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform)
[ buildPackages.stdenv.cc buildPackages.python ];
mkPaths = paths: {
+
C_INCLUDE_PATH = lib.makeSearchPathOutput "dev" "include" paths;
+
LIBRARY_PATH = lib.makeLibraryPath paths;
};
# Python 2.7 needs this
···
LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
+
NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2"
+
+ lib.optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000";
DETERMINISTIC_BUILD = 1;
setupHook = python-setup-hook sitePackages;
+
postPatch = lib.optionalString (x11Support && (tix != null)) ''
substituteInPlace "Lib/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
'';
···
# Determinism: Windows installers were not deterministic.
# We're also not interested in building Windows installers.
find "$out" -name 'wininst*.exe' | xargs -r rm -f
+
'' + lib.optionalString stripBytecode ''
# Determinism: deterministic bytecode
# First we delete all old bytecode.
find $out -name "*.pyc" -delete
+
'' + lib.optionalString rebuildBytecode ''
# We build 3 levels of optimized bytecode. Note the default level, without optimizations,
# is not reproducible yet. https://bugs.python.org/issue29708
# Not creating bytecode will result in a large performance loss however, so we do build it.
find $out -name "*.py" | ${pythonForBuildInterpreter} -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | ${pythonForBuildInterpreter} -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | ${pythonForBuildInterpreter} -OO -m compileall -q -f -x "lib2to3" -i -
+
'' + lib.optionalString stdenv.hostPlatform.isCygwin ''
cp libpython2.7.dll.a $out/lib
'';
···
postFixup = ''
# Include a sitecustomize.py file. Note it causes an error when it's in postInstall with 2.7.
cp ${../../sitecustomize.py} $out/${sitePackages}/sitecustomize.py
+
'' + lib.optionalString strip2to3 ''
rm -R $out/bin/2to3 $out/lib/python*/lib2to3
+
'' + lib.optionalString stripConfig ''
rm -R $out/bin/python*-config $out/lib/python*/config*
+
'' + lib.optionalString stripIdlelib ''
# Strip IDLE
rm -R $out/bin/idle* $out/lib/python*/idlelib
+
'' + lib.optionalString stripTests ''
# Strip tests
rm -R $out/lib/python*/test $out/lib/python*/**/test{,s}
'';
+3 -5
pkgs/development/interpreters/python/wrap-python.nix
···
, makePythonHook
, makeWrapper }:
-
with lib;
-
makePythonHook {
deps = makeWrapper;
substitutions.sitePackages = python.sitePackages;
···
mkStringSkipper = labelNum: quote: let
label = "q${toString labelNum}";
-
isSingle = elem quote [ "\"" "'\"'\"'" ];
endQuote = if isSingle then "[^\\\\]${quote}" else quote;
in ''
/^[a-z]?${quote}/ {
···
:r
/\\$|,$/{N;br}
/__future__|^ |^ *(#.*)?$/{n;br}
-
${concatImapStrings mkStringSkipper quoteVariants}
-
/^[^# ]/i ${replaceStrings ["\n"] [";"] preamble}
}
'';
} ./wrap.sh
···
, makePythonHook
, makeWrapper }:
makePythonHook {
deps = makeWrapper;
substitutions.sitePackages = python.sitePackages;
···
mkStringSkipper = labelNum: quote: let
label = "q${toString labelNum}";
+
isSingle = lib.elem quote [ "\"" "'\"'\"'" ];
endQuote = if isSingle then "[^\\\\]${quote}" else quote;
in ''
/^[a-z]?${quote}/ {
···
:r
/\\$|,$/{N;br}
/__future__|^ |^ *(#.*)?$/{n;br}
+
${lib.concatImapStrings mkStringSkipper quoteVariants}
+
/^[^# ]/i ${lib.replaceStrings ["\n"] [";"] preamble}
}
'';
} ./wrap.sh
+8 -8
pkgs/development/interpreters/ruby/ruby-version.nix
···
# Contains the ruby version heuristics
{ lib }:
-
with lib;
let
# The returned set should be immutable
rubyVersion = major: minor: tiny: tail:
···
# Contains the patch number "223" if tail is "p223" or null
patchLevel =
let
-
p = removePrefix "p" tail;
isPosInt = num:
-
0 == stringLength
-
(replaceStrings
["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"]
["" "" "" "" "" "" "" "" "" "" ]
num);
in
-
if hasPrefix "p" tail && isPosInt p then p
else null;
# Shortcuts
···
# Ruby separates lib and gem folders by ABI version which isn't very
# consistent.
libDir =
-
if versionAtLeast majMinTiny "2.1.0" then
"${majMin}.0"
-
else if versionAtLeast majMinTiny "2.0.0" then
"2.0.0"
-
else if versionAtLeast majMinTiny "1.9.1" then
"1.9.1"
else
throw "version ${majMinTiny} is not supported";
···
# Contains the ruby version heuristics
{ lib }:
+
let
# The returned set should be immutable
rubyVersion = major: minor: tiny: tail:
···
# Contains the patch number "223" if tail is "p223" or null
patchLevel =
let
+
p = lib.removePrefix "p" tail;
isPosInt = num:
+
0 == lib.stringLength
+
(lib.replaceStrings
["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"]
["" "" "" "" "" "" "" "" "" "" ]
num);
in
+
if lib.hasPrefix "p" tail && isPosInt p then p
else null;
# Shortcuts
···
# Ruby separates lib and gem folders by ABI version which isn't very
# consistent.
libDir =
+
if lib.versionAtLeast majMinTiny "2.1.0" then
"${majMin}.0"
+
else if lib.versionAtLeast majMinTiny "2.0.0" then
"2.0.0"
+
else if lib.versionAtLeast majMinTiny "1.9.1" then
"1.9.1"
else
throw "version ${majMinTiny} is not supported";
+1 -2
pkgs/development/java-modules/maven-minimal.nix
···
{ lib, pkgs }:
-
with lib;
with pkgs.javaPackages;
let
···
poms = import ./poms.nix { inherit fetchMaven; };
in {
# Maven needs all of these to function
-
mavenMinimal = flatten
collections.mavenLibs_2_0_6
++ collections.mavenLibs_2_0_9
++ collections.mavenLibs_2_2_1
···
{ lib, pkgs }:
with pkgs.javaPackages;
let
···
poms = import ./poms.nix { inherit fetchMaven; };
in {
# Maven needs all of these to function
+
mavenMinimal = lib.flatten
collections.mavenLibs_2_0_6
++ collections.mavenLibs_2_0_9
++ collections.mavenLibs_2_2_1
+13 -15
pkgs/development/libraries/SDL/default.nix
···
# NOTE: When editing this expression see if the same change applies to
# SDL2 expression too
-
with lib;
-
let
extraPropagatedBuildInputs = [ ]
-
++ optionals x11Support [ libXext libICE libXrandr ]
-
++ optionals (openglSupport && stdenv.isLinux) [ libGL libGLU ]
-
++ optionals (openglSupport && stdenv.isDarwin) [ OpenGL GLUT ]
-
++ optional alsaSupport alsa-lib
-
++ optional pulseaudioSupport libpulseaudio
-
++ optional stdenv.isDarwin Cocoa;
-
rpath = makeLibraryPath extraPropagatedBuildInputs;
in
stdenv.mkDerivation rec {
···
outputBin = "dev"; # sdl-config
nativeBuildInputs = [ pkg-config ]
-
++ optional stdenv.isLinux libcap;
propagatedBuildInputs = [ libiconv ] ++ extraPropagatedBuildInputs;
buildInputs = [ ]
-
++ optional (!stdenv.hostPlatform.isMinGW && alsaSupport) audiofile
-
++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
configureFlags = [
"--disable-oss"
···
# SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
#
# Please try revert the change that introduced this comment when updating SDL.
-
] ++ optional stdenv.isDarwin "--disable-x11-shared"
-
++ optional (!x11Support) "--without-x"
-
++ optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib";
patches = [
./find-headers.patch
···
# NOTE: When editing this expression see if the same change applies to
# SDL2 expression too
let
extraPropagatedBuildInputs = [ ]
+
++ lib.optionals x11Support [ libXext libICE libXrandr ]
+
++ lib.optionals (openglSupport && stdenv.isLinux) [ libGL libGLU ]
+
++ lib.optionals (openglSupport && stdenv.isDarwin) [ OpenGL GLUT ]
+
++ lib.optional alsaSupport alsa-lib
+
++ lib.optional pulseaudioSupport libpulseaudio
+
++ lib.optional stdenv.isDarwin Cocoa;
+
rpath = lib.makeLibraryPath extraPropagatedBuildInputs;
in
stdenv.mkDerivation rec {
···
outputBin = "dev"; # sdl-config
nativeBuildInputs = [ pkg-config ]
+
++ lib.optional stdenv.isLinux libcap;
propagatedBuildInputs = [ libiconv ] ++ extraPropagatedBuildInputs;
buildInputs = [ ]
+
++ lib.optional (!stdenv.hostPlatform.isMinGW && alsaSupport) audiofile
+
++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
configureFlags = [
"--disable-oss"
···
# SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
#
# Please try revert the change that introduced this comment when updating SDL.
+
] ++ lib.optional stdenv.isDarwin "--disable-x11-shared"
+
++ lib.optional (!x11Support) "--without-x"
+
++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib";
patches = [
./find-headers.patch
+21 -23
pkgs/development/libraries/SDL2/default.nix
···
# NOTE: When editing this expression see if the same change applies to
# SDL expression too
-
with lib;
-
stdenv.mkDerivation rec {
pname = "SDL2";
version = "2.24.2";
···
depsBuildBuild = [ pkg-config ];
-
nativeBuildInputs = [ pkg-config ] ++ optionals waylandSupport [ wayland wayland-scanner ];
propagatedBuildInputs = dlopenPropagatedBuildInputs;
dlopenPropagatedBuildInputs = [ ]
# Propagated for #include <GLES/gl.h> in SDL_opengles.h.
-
++ optional openglSupport libGL
# Propagated for #include <X11/Xlib.h> and <X11/Xatom.h> in SDL_syswm.h.
-
++ optionals x11Support [ libX11 xorgproto ];
-
dlopenBuildInputs = optionals alsaSupport [ alsa-lib audiofile ]
-
++ optional dbusSupport dbus
-
++ optional libdecorSupport libdecor
-
++ optional pipewireSupport pipewire
-
++ optional pulseaudioSupport libpulseaudio
-
++ optional udevSupport udev
-
++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
-
++ optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ]
-
++ optionals drmSupport [ libdrm mesa ];
buildInputs = [ libiconv ]
++ dlopenBuildInputs
-
++ optional ibusSupport ibus
-
++ optional fcitxSupport fcitx
-
++ optionals stdenv.isDarwin [ AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL ];
enableParallelBuilding = true;
configureFlags = [
"--disable-oss"
-
] ++ optional (!x11Support) "--without-x"
-
++ optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
-
++ optional stdenv.targetPlatform.isWindows "--disable-video-opengles"
-
++ optional stdenv.isDarwin "--disable-sdltest";
# We remove libtool .la files when static libs are requested,
# because they make the builds of downstream libs like `SDL_tff`
···
# list the symbols used in this way.
postFixup =
let
-
rpath = makeLibraryPath (dlopenPropagatedBuildInputs ++ dlopenBuildInputs);
in
-
optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so") ''
for lib in $out/lib/*.so* ; do
if ! [[ -L "$lib" ]]; then
patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib"
···
# NOTE: When editing this expression see if the same change applies to
# SDL expression too
stdenv.mkDerivation rec {
pname = "SDL2";
version = "2.24.2";
···
depsBuildBuild = [ pkg-config ];
+
nativeBuildInputs = [ pkg-config ] ++ lib.optionals waylandSupport [ wayland wayland-scanner ];
propagatedBuildInputs = dlopenPropagatedBuildInputs;
dlopenPropagatedBuildInputs = [ ]
# Propagated for #include <GLES/gl.h> in SDL_opengles.h.
+
++ lib.optional openglSupport libGL
# Propagated for #include <X11/Xlib.h> and <X11/Xatom.h> in SDL_syswm.h.
+
++ lib.optionals x11Support [ libX11 xorgproto ];
+
dlopenBuildInputs = lib.optionals alsaSupport [ alsa-lib audiofile ]
+
++ lib.optional dbusSupport dbus
+
++ lib.optional libdecorSupport libdecor
+
++ lib.optional pipewireSupport pipewire
+
++ lib.optional pulseaudioSupport libpulseaudio
+
++ lib.optional udevSupport udev
+
++ lib.optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
+
++ lib.optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ]
+
++ lib.optionals drmSupport [ libdrm mesa ];
buildInputs = [ libiconv ]
++ dlopenBuildInputs
+
++ lib.optional ibusSupport ibus
+
++ lib.optional fcitxSupport fcitx
+
++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL ];
enableParallelBuilding = true;
configureFlags = [
"--disable-oss"
+
] ++ lib.optional (!x11Support) "--without-x"
+
++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
+
++ lib.optional stdenv.targetPlatform.isWindows "--disable-video-opengles"
+
++ lib.optional stdenv.isDarwin "--disable-sdltest";
# We remove libtool .la files when static libs are requested,
# because they make the builds of downstream libs like `SDL_tff`
···
# list the symbols used in this way.
postFixup =
let
+
rpath = lib.makeLibraryPath (dlopenPropagatedBuildInputs ++ dlopenBuildInputs);
in
+
lib.optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so") ''
for lib in $out/lib/*.so* ; do
if ! [[ -L "$lib" ]]; then
patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib"
+11 -13
pkgs/development/libraries/apr-util/default.nix
···
assert bdbSupport -> db != null;
assert ldapSupport -> openldap != null;
-
with lib;
-
stdenv.mkDerivation rec {
pname = "apr-util";
version = "1.6.1";
···
};
patches = [ ./fix-libxcrypt-build.patch ]
-
++ optional stdenv.isFreeBSD ./include-static-dependencies.patch;
NIX_CFLAGS_LINK = [ "-lcrypt" ];
outputs = [ "out" "dev" ];
outputBin = "dev";
-
nativeBuildInputs = [ makeWrapper ] ++ optional stdenv.isFreeBSD autoreconfHook;
configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ]
-
++ optional (!stdenv.isCygwin) "--with-crypto"
-
++ optional sslSupport "--with-openssl=${openssl.dev}"
-
++ optional bdbSupport "--with-berkeley-db=${db.dev}"
-
++ optional ldapSupport "--with-ldap=ldap"
-
++ optionals stdenv.isCygwin
[ "--without-pgsql" "--without-sqlite2" "--without-sqlite3"
"--without-freetds" "--without-berkeley-db" "--without-crypto" ]
;
···
'';
propagatedBuildInputs = [ apr expat libiconv libxcrypt ]
-
++ optional sslSupport openssl
-
++ optional bdbSupport db
-
++ optional ldapSupport openldap
-
++ optional stdenv.isFreeBSD cyrus_sasl;
postInstall = ''
for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do
···
assert bdbSupport -> db != null;
assert ldapSupport -> openldap != null;
stdenv.mkDerivation rec {
pname = "apr-util";
version = "1.6.1";
···
};
patches = [ ./fix-libxcrypt-build.patch ]
+
++ lib.optional stdenv.isFreeBSD ./include-static-dependencies.patch;
NIX_CFLAGS_LINK = [ "-lcrypt" ];
outputs = [ "out" "dev" ];
outputBin = "dev";
+
nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.isFreeBSD autoreconfHook;
configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ]
+
++ lib.optional (!stdenv.isCygwin) "--with-crypto"
+
++ lib.optional sslSupport "--with-openssl=${openssl.dev}"
+
++ lib.optional bdbSupport "--with-berkeley-db=${db.dev}"
+
++ lib.optional ldapSupport "--with-ldap=ldap"
+
++ lib.optionals stdenv.isCygwin
[ "--without-pgsql" "--without-sqlite2" "--without-sqlite3"
"--without-freetds" "--without-berkeley-db" "--without-crypto" ]
;
···
'';
propagatedBuildInputs = [ apr expat libiconv libxcrypt ]
+
++ lib.optional sslSupport openssl
+
++ lib.optional bdbSupport db
+
++ lib.optional ldapSupport openldap
+
++ lib.optional stdenv.isFreeBSD cyrus_sasl;
postInstall = ''
for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do
+1 -3
pkgs/development/libraries/asio/generic.nix
···
, version, sha256, ...
}:
-
with lib;
-
stdenv.mkDerivation {
pname = "asio";
inherit version;
···
buildInputs = [ openssl ];
-
meta = {
homepage = "http://asio.sourceforge.net/";
description = "Cross-platform C++ library for network and low-level I/O programming";
license = licenses.boost;
···
, version, sha256, ...
}:
stdenv.mkDerivation {
pname = "asio";
inherit version;
···
buildInputs = [ openssl ];
+
meta = with lib; {
homepage = "http://asio.sourceforge.net/";
description = "Cross-platform C++ library for network and low-level I/O programming";
license = licenses.boost;
+3 -5
pkgs/development/libraries/aspell/dictionaries.nix
···
{lib, stdenv, fetchurl, aspell, which, writeScript}:
-
with lib;
-
/* HOWTO:
* Add some of these to your profile or systemPackages.
···
homepage = "http://ftp.gnu.org/gnu/aspell/dict/0index.html";
} // (args.meta or {});
-
} // lib.optionalAttrs (stdenv.isDarwin && elem language [ "is" "nb" ]) {
# tar: Cannot open: Illegal byte sequence
unpackPhase = ''
runHook preUnpack
···
runHook postUnpack
'';
-
postPatch = getAttr language {
is = ''
cp icelandic.alias íslenska.alias
sed -i 's/ .slenska\.alias/ íslenska.alias/g' Makefile.pre
···
preBuild = ''
# Aspell can't handle multiple data-dirs
# Copy everything we might possibly need
-
${concatMapStringsSep "\n" (p: ''
cp -a ${p}/lib/aspell/* .
'') ([ aspell ] ++ langInputs)}
export ASPELL_CONF="data-dir $(pwd)"
···
{lib, stdenv, fetchurl, aspell, which, writeScript}:
/* HOWTO:
* Add some of these to your profile or systemPackages.
···
homepage = "http://ftp.gnu.org/gnu/aspell/dict/0index.html";
} // (args.meta or {});
+
} // lib.optionalAttrs (stdenv.isDarwin && lib.elem language [ "is" "nb" ]) {
# tar: Cannot open: Illegal byte sequence
unpackPhase = ''
runHook preUnpack
···
runHook postUnpack
'';
+
postPatch = lib.getAttr language {
is = ''
cp icelandic.alias íslenska.alias
sed -i 's/ .slenska\.alias/ íslenska.alias/g' Makefile.pre
···
preBuild = ''
# Aspell can't handle multiple data-dirs
# Copy everything we might possibly need
+
${lib.concatMapStringsSep "\n" (p: ''
cp -a ${p}/lib/aspell/* .
'') ([ aspell ] ++ langInputs)}
export ASPELL_CONF="data-dir $(pwd)"
+41 -42
pkgs/development/libraries/boost/generic.nix
···
# Boost <1.69 can't be built on linux with clang >8, because pth was removed
assert with lib; (stdenv.isLinux && toolset == "clang" && versionAtLeast stdenv.cc.version "8.0.0") -> versionAtLeast version "1.69";
-
with lib;
let
-
variant = concatStringsSep ","
-
(optional enableRelease "release" ++
-
optional enableDebug "debug");
-
threading = concatStringsSep ","
-
(optional enableSingleThreaded "single" ++
-
optional enableMultiThreaded "multi");
-
link = concatStringsSep ","
-
(optional enableShared "shared" ++
-
optional enableStatic "static");
runtime-link = if enableShared then "shared" else "static";
···
# [0]: https://github.com/boostorg/build/commit/0ef40cb86728f1cd804830fef89a6d39153ff632
# [1]: https://github.com/boostorg/build/commit/316e26ca718afc65d6170029284521392524e4f8
jobs =
-
if versionOlder version "1.58" then
"$(($NIX_BUILD_CORES<=64 ? $NIX_BUILD_CORES : 64))"
-
else if versionOlder version "1.65" then
"$(($NIX_BUILD_CORES<=256 ? $NIX_BUILD_CORES : 256))"
else
"$NIX_BUILD_CORES";
needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.isDarwin && enableShared);
-
b2Args = concatStringsSep " " ([
"--includedir=$dev/include"
"--libdir=$out/lib"
"-j${jobs}"
···
"-sEXPAT_LIBPATH=${expat.out}/lib"
# TODO: make this unconditional
-
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform ||
# required on mips; see 61d9f201baeef4c4bb91ad8a8f5f89b747e0dfe4
-
(stdenv.hostPlatform.isMips && versionAtLeast version "1.79")) [
"address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}"
"architecture=${if stdenv.hostPlatform.isMips64
-
then if versionOlder version "1.78" then "mips1" else "mips"
else if stdenv.hostPlatform.parsed.cpu.name == "s390x" then "s390x"
else toString stdenv.hostPlatform.parsed.cpu.family}"
"binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}"
···
else if stdenv.hostPlatform.isMips32 then "o32"
else if stdenv.hostPlatform.isMips64n64 then "n64"
else "sysv"}"
-
] ++ optional (link != "static") "runtime-link=${runtime-link}"
-
++ optional (variant == "release") "debug-symbols=off"
-
++ optional (toolset != null) "toolset=${toolset}"
-
++ optional (!enablePython) "--without-python"
-
++ optional needUserConfig "--user-config=user-config.jam"
-
++ optional (stdenv.buildPlatform.isDarwin && stdenv.hostPlatform.isLinux) "pch=off"
-
++ optionals (stdenv.hostPlatform.libc == "msvcrt") [
"threadapi=win32"
] ++ extraB2Args
);
···
patchFlags = [];
patches = patches
-
++ optional stdenv.isDarwin ./darwin-no-system-python.patch
# Fix boost-context segmentation faults on ppc64 due to ABI violation
-
++ optional (versionAtLeast version "1.61" &&
-
versionOlder version "1.71") (fetchpatch {
url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch";
sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29";
stripLen = 1;
extraPrefix = "libs/context/";
})
# Fix compiler warning with GCC >= 8; TODO: patch may apply to older versions
-
++ optional (versionAtLeast version "1.65" && versionOlder version "1.67")
(fetchpatch {
url = "https://github.com/boostorg/mpl/commit/f48fd09d021db9a28bd7b8452c175897e1af4485.patch";
sha256 = "15d2a636hhsb1xdyp44x25dyqfcaws997vnp9kl1mhzvxjzz7hb0";
stripLen = 1;
})
-
++ optional (versionAtLeast version "1.65" && versionOlder version "1.70") (fetchpatch {
# support for Mips64n64 appeared in boost-context 1.70; this patch won't apply to pre-1.65 cleanly
url = "https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch";
sha256 = "sha256-qjQy1b4jDsIRrI+UYtcguhvChrMbGWO0UlEzEJHYzRI=";
stripLen = 1;
extraPrefix = "libs/context/";
})
-
++ optional (versionAtLeast version "1.70" && versionOlder version "1.73") ./cmake-paths.patch
-
++ optional (versionAtLeast version "1.73") ./cmake-paths-173.patch
-
++ optional (version == "1.77.0") (fetchpatch {
url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch";
relative = "include";
sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4=";
});
-
meta = {
homepage = "http://boost.org/";
description = "Collection of C++ libraries";
license = licenses.boost;
···
inherit boostBuildPatches;
};
-
preConfigure = optionalString useMpi ''
cat << EOF >> user-config.jam
using mpi : ${mpi}/bin/mpiCC ;
EOF
···
# On darwin we need to add the `$out/lib` to the libraries' rpath explicitly,
# otherwise the dynamic linker is unable to resolve the reference to @rpath
# when the boost libraries want to load each other at runtime.
-
+ optionalString (stdenv.isDarwin && enableShared) ''
cat << EOF >> user-config.jam
using clang-darwin : : ${stdenv.cc.targetPrefix}c++
: <linkflags>"-rpath $out/lib/"
···
# uniform way for clang and gcc (which works thanks to our cc-wrapper).
# We pass toolset later which will make b2 invoke everything in the right
# way -- the other toolset in user-config.jam will be ignored.
-
+ optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
cat << EOF >> user-config.jam
using gcc : cross : ${stdenv.cc.targetPrefix}c++
: <archiver>$AR
···
EOF
''
# b2 needs to be explicitly told how to find Python when cross-compiling
-
+ optionalString enablePython ''
cat << EOF >> user-config.jam
using python : : ${python.interpreter}
: ${python}/include/python${python.pythonVersion}
···
enableParallelBuilding = true;
nativeBuildInputs = [ which boost-build ]
-
++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ expat zlib bzip2 libiconv ]
-
++ optional enableIcu icu
-
++ optionals enablePython [ libxcrypt python ]
-
++ optional enableNumpy python.pkgs.numpy;
configureScript = "./bootstrap.sh";
configurePlatforms = [];
···
"--includedir=$(dev)/include"
"--libdir=$(out)/lib"
"--with-bjam=b2" # prevent bootstrapping b2 in configurePhase
-
] ++ optional (toolset != null) "--with-toolset=${toolset}"
++ [ (if enableIcu then "--with-icu=${icu.dev}" else "--without-icu") ];
buildPhase = ''
···
# Make boost header paths relative so that they are not runtime dependencies
cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \
-exec sed '1s/^\xef\xbb\xbf//;1i#line 1 "{}"' -i '{}' \;
-
'' + optionalString (stdenv.hostPlatform.libc == "msvcrt") ''
$RANLIB "$out/lib/"*.a
'';
···
# Boost <1.69 can't be built on linux with clang >8, because pth was removed
assert with lib; (stdenv.isLinux && toolset == "clang" && versionAtLeast stdenv.cc.version "8.0.0") -> versionAtLeast version "1.69";
let
+
variant = lib.concatStringsSep ","
+
(lib.optional enableRelease "release" ++
+
lib.optional enableDebug "debug");
+
threading = lib.concatStringsSep ","
+
(lib.optional enableSingleThreaded "single" ++
+
lib.optional enableMultiThreaded "multi");
+
link = lib.concatStringsSep ","
+
(lib.optional enableShared "shared" ++
+
lib.optional enableStatic "static");
runtime-link = if enableShared then "shared" else "static";
···
# [0]: https://github.com/boostorg/build/commit/0ef40cb86728f1cd804830fef89a6d39153ff632
# [1]: https://github.com/boostorg/build/commit/316e26ca718afc65d6170029284521392524e4f8
jobs =
+
if lib.versionOlder version "1.58" then
"$(($NIX_BUILD_CORES<=64 ? $NIX_BUILD_CORES : 64))"
+
else if lib.versionOlder version "1.65" then
"$(($NIX_BUILD_CORES<=256 ? $NIX_BUILD_CORES : 256))"
else
"$NIX_BUILD_CORES";
needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.isDarwin && enableShared);
+
b2Args = lib.concatStringsSep " " ([
"--includedir=$dev/include"
"--libdir=$out/lib"
"-j${jobs}"
···
"-sEXPAT_LIBPATH=${expat.out}/lib"
# TODO: make this unconditional
+
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform ||
# required on mips; see 61d9f201baeef4c4bb91ad8a8f5f89b747e0dfe4
+
(stdenv.hostPlatform.isMips && lib.versionAtLeast version "1.79")) [
"address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}"
"architecture=${if stdenv.hostPlatform.isMips64
+
then if lib.versionOlder version "1.78" then "mips1" else "mips"
else if stdenv.hostPlatform.parsed.cpu.name == "s390x" then "s390x"
else toString stdenv.hostPlatform.parsed.cpu.family}"
"binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}"
···
else if stdenv.hostPlatform.isMips32 then "o32"
else if stdenv.hostPlatform.isMips64n64 then "n64"
else "sysv"}"
+
] ++ lib.optional (link != "static") "runtime-link=${runtime-link}"
+
++ lib.optional (variant == "release") "debug-symbols=off"
+
++ lib.optional (toolset != null) "toolset=${toolset}"
+
++ lib.optional (!enablePython) "--without-python"
+
++ lib.optional needUserConfig "--user-config=user-config.jam"
+
++ lib.optional (stdenv.buildPlatform.isDarwin && stdenv.hostPlatform.isLinux) "pch=off"
+
++ lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [
"threadapi=win32"
] ++ extraB2Args
);
···
patchFlags = [];
patches = patches
+
++ lib.optional stdenv.isDarwin ./darwin-no-system-python.patch
# Fix boost-context segmentation faults on ppc64 due to ABI violation
+
++ lib.optional (lib.versionAtLeast version "1.61" &&
+
lib.versionOlder version "1.71") (fetchpatch {
url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch";
sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29";
stripLen = 1;
extraPrefix = "libs/context/";
})
# Fix compiler warning with GCC >= 8; TODO: patch may apply to older versions
+
++ lib.optional (lib.versionAtLeast version "1.65" && lib.versionOlder version "1.67")
(fetchpatch {
url = "https://github.com/boostorg/mpl/commit/f48fd09d021db9a28bd7b8452c175897e1af4485.patch";
sha256 = "15d2a636hhsb1xdyp44x25dyqfcaws997vnp9kl1mhzvxjzz7hb0";
stripLen = 1;
})
+
++ lib.optional (lib.versionAtLeast version "1.65" && lib.versionOlder version "1.70") (fetchpatch {
# support for Mips64n64 appeared in boost-context 1.70; this patch won't apply to pre-1.65 cleanly
url = "https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch";
sha256 = "sha256-qjQy1b4jDsIRrI+UYtcguhvChrMbGWO0UlEzEJHYzRI=";
stripLen = 1;
extraPrefix = "libs/context/";
})
+
++ lib.optional (lib.versionAtLeast version "1.70" && lib.versionOlder version "1.73") ./cmake-paths.patch
+
++ lib.optional (lib.versionAtLeast version "1.73") ./cmake-paths-173.patch
+
++ lib.optional (version == "1.77.0") (fetchpatch {
url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch";
relative = "include";
sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4=";
});
+
meta = with lib; {
homepage = "http://boost.org/";
description = "Collection of C++ libraries";
license = licenses.boost;
···
inherit boostBuildPatches;
};
+
preConfigure = lib.optionalString useMpi ''
cat << EOF >> user-config.jam
using mpi : ${mpi}/bin/mpiCC ;
EOF
···
# On darwin we need to add the `$out/lib` to the libraries' rpath explicitly,
# otherwise the dynamic linker is unable to resolve the reference to @rpath
# when the boost libraries want to load each other at runtime.
+
+ lib.optionalString (stdenv.isDarwin && enableShared) ''
cat << EOF >> user-config.jam
using clang-darwin : : ${stdenv.cc.targetPrefix}c++
: <linkflags>"-rpath $out/lib/"
···
# uniform way for clang and gcc (which works thanks to our cc-wrapper).
# We pass toolset later which will make b2 invoke everything in the right
# way -- the other toolset in user-config.jam will be ignored.
+
+ lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
cat << EOF >> user-config.jam
using gcc : cross : ${stdenv.cc.targetPrefix}c++
: <archiver>$AR
···
EOF
''
# b2 needs to be explicitly told how to find Python when cross-compiling
+
+ lib.optionalString enablePython ''
cat << EOF >> user-config.jam
using python : : ${python.interpreter}
: ${python}/include/python${python.pythonVersion}
···
enableParallelBuilding = true;
nativeBuildInputs = [ which boost-build ]
+
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ expat zlib bzip2 libiconv ]
+
++ lib.optional enableIcu icu
+
++ lib.optionals enablePython [ libxcrypt python ]
+
++ lib.optional enableNumpy python.pkgs.numpy;
configureScript = "./bootstrap.sh";
configurePlatforms = [];
···
"--includedir=$(dev)/include"
"--libdir=$(out)/lib"
"--with-bjam=b2" # prevent bootstrapping b2 in configurePhase
+
] ++ lib.optional (toolset != null) "--with-toolset=${toolset}"
++ [ (if enableIcu then "--with-icu=${icu.dev}" else "--without-icu") ];
buildPhase = ''
···
# Make boost header paths relative so that they are not runtime dependencies
cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \
-exec sed '1s/^\xef\xbb\xbf//;1i#line 1 "{}"' -i '{}' \;
+
'' + lib.optionalString (stdenv.hostPlatform.libc == "msvcrt") ''
$RANLIB "$out/lib/"*.a
'';
+1 -2
pkgs/development/libraries/cyrus-sasl/default.nix
···
, pam, libxcrypt, fixDarwinDylibNames, autoreconfHook, enableLdap ? false
, buildPackages, pruneLibtoolFiles, nixosTests }:
-
with lib;
stdenv.mkDerivation rec {
pname = "cyrus-sasl";
version = "2.1.28";
···
inherit (nixosTests) parsedmarc postfix;
};
-
meta = {
homepage = "https://www.cyrusimap.org/sasl";
description = "Library for adding authentication support to connection-based protocols";
platforms = platforms.unix;
···
, pam, libxcrypt, fixDarwinDylibNames, autoreconfHook, enableLdap ? false
, buildPackages, pruneLibtoolFiles, nixosTests }:
stdenv.mkDerivation rec {
pname = "cyrus-sasl";
version = "2.1.28";
···
inherit (nixosTests) parsedmarc postfix;
};
+
meta = with lib; {
homepage = "https://www.cyrusimap.org/sasl";
description = "Library for adding authentication support to connection-based protocols";
platforms = platforms.unix;
+4 -5
pkgs/development/libraries/faac/default.nix
···
assert mp4v2Support -> (mp4v2 != null);
-
with lib;
stdenv.mkDerivation rec {
pname = "faac";
version = "1.30";
···
};
configureFlags = [ ]
-
++ optional mp4v2Support "--with-external-mp4v2"
-
++ optional drmSupport "--enable-drm";
hardeningDisable = [ "format" ];
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ ]
-
++ optional mp4v2Support mp4v2;
enableParallelBuilding = true;
-
meta = {
description = "Open source MPEG-4 and MPEG-2 AAC encoder";
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ codyopel ];
···
assert mp4v2Support -> (mp4v2 != null);
stdenv.mkDerivation rec {
pname = "faac";
version = "1.30";
···
};
configureFlags = [ ]
+
++ lib.optional mp4v2Support "--with-external-mp4v2"
+
++ lib.optional drmSupport "--enable-drm";
hardeningDisable = [ "format" ];
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ ]
+
++ lib.optional mp4v2Support mp4v2;
enableParallelBuilding = true;
+
meta = with lib; {
description = "Open source MPEG-4 and MPEG-2 AAC encoder";
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ codyopel ];
+2 -3
pkgs/development/libraries/faad2/default.nix
···
, vlc
}:
-
with lib;
stdenv.mkDerivation rec {
pname = "faad2";
version = "2.10.1";
···
};
configureFlags = []
-
++ optional drmSupport "--with-drm";
nativeBuildInputs = [ autoreconfHook ];
···
ocaml-faad = ocamlPackages.faad;
};
-
meta = {
description = "An open source MPEG-4 and MPEG-2 AAC decoder";
homepage = "https://sourceforge.net/projects/faac/";
license = licenses.gpl2Plus;
···
, vlc
}:
stdenv.mkDerivation rec {
pname = "faad2";
version = "2.10.1";
···
};
configureFlags = []
+
++ lib.optional drmSupport "--with-drm";
nativeBuildInputs = [ autoreconfHook ];
···
ocaml-faad = ocamlPackages.faad;
};
+
meta = with lib; {
description = "An open source MPEG-4 and MPEG-2 AAC decoder";
homepage = "https://sourceforge.net/projects/faac/";
license = licenses.gpl2Plus;
+12 -14
pkgs/development/libraries/fftw/default.nix
···
, withDoc ? stdenv.cc.isGNU
}:
-
with lib;
-
-
assert elem precision [ "single" "double" "long-double" "quad-precision" ];
stdenv.mkDerivation rec {
pname = "fftw-${precision}";
···
};
outputs = [ "out" "dev" "man" ]
-
++ optional withDoc "info"; # it's dev-doc only
outputBin = "dev"; # fftw-wisdom
nativeBuildInputs = [ gfortran ];
-
buildInputs = optionals stdenv.cc.isClang [
# TODO: This may mismatch the LLVM version sin the stdenv, see #79818.
llvmPackages.openmp
-
] ++ optional enableMpi mpi;
configureFlags =
[ "--enable-shared"
"--enable-threads"
]
-
++ optional (precision != "double") "--enable-${precision}"
# all x86_64 have sse2
# however, not all float sizes fit
-
++ optional (stdenv.isx86_64 && (precision == "single" || precision == "double") ) "--enable-sse2"
-
++ optional enableAvx "--enable-avx"
-
++ optional enableAvx2 "--enable-avx2"
-
++ optional enableAvx512 "--enable-avx512"
-
++ optional enableFma "--enable-fma"
++ [ "--enable-openmp" ]
-
++ optional enableMpi "--enable-mpi"
# doc generation causes Fortran wrapper generation which hard-codes gcc
-
++ optional (!withDoc) "--disable-doc";
enableParallelBuilding = true;
···
, withDoc ? stdenv.cc.isGNU
}:
+
assert lib.elem precision [ "single" "double" "long-double" "quad-precision" ];
stdenv.mkDerivation rec {
pname = "fftw-${precision}";
···
};
outputs = [ "out" "dev" "man" ]
+
++ lib.optional withDoc "info"; # it's dev-doc only
outputBin = "dev"; # fftw-wisdom
nativeBuildInputs = [ gfortran ];
+
buildInputs = lib.optionals stdenv.cc.isClang [
# TODO: This may mismatch the LLVM version sin the stdenv, see #79818.
llvmPackages.openmp
+
] ++ lib.optional enableMpi mpi;
configureFlags =
[ "--enable-shared"
"--enable-threads"
]
+
++ lib.optional (precision != "double") "--enable-${precision}"
# all x86_64 have sse2
# however, not all float sizes fit
+
++ lib.optional (stdenv.isx86_64 && (precision == "single" || precision == "double") ) "--enable-sse2"
+
++ lib.optional enableAvx "--enable-avx"
+
++ lib.optional enableAvx2 "--enable-avx2"
+
++ lib.optional enableAvx512 "--enable-avx512"
+
++ lib.optional enableFma "--enable-fma"
++ [ "--enable-openmp" ]
+
++ lib.optional enableMpi "--enable-mpi"
# doc generation causes Fortran wrapper generation which hard-codes gcc
+
++ lib.optional (!withDoc) "--disable-doc";
enableParallelBuilding = true;
+1 -2
pkgs/development/libraries/geis/default.nix
···
, xorgserver
}:
-
with lib;
stdenv.mkDerivation rec {
pname = "geis";
···
gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH")
'';
-
meta = {
description = "A library for input gesture recognition";
homepage = "https://launchpad.net/geis";
license = licenses.gpl2;
···
, xorgserver
}:
stdenv.mkDerivation rec {
pname = "geis";
···
gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH")
'';
+
meta = with lib; {
description = "A library for input gesture recognition";
homepage = "https://launchpad.net/geis";
license = licenses.gpl2;
+1 -3
pkgs/development/libraries/glew/1.10.nix
···
, AGL, OpenGL
}:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "glew";
version = "1.10.0";
···
patchPhase = ''
sed -i 's|lib64|lib|' config/Makefile.linux
-
${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
''}
'';
···
, AGL, OpenGL
}:
stdenv.mkDerivation rec {
pname = "glew";
version = "1.10.0";
···
patchPhase = ''
sed -i 's|lib64|lib|' config/Makefile.linux
+
${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
''}
'';
+4 -5
pkgs/development/libraries/gloox/default.nix
···
, idnSupport ? true, libidn
}:
-
with lib;
stdenv.mkDerivation rec{
pname = "gloox";
···
};
buildInputs = [ ]
-
++ optional zlibSupport zlib
-
++ optional sslSupport openssl
-
++ optional idnSupport libidn;
-
meta = {
description = "A portable high-level Jabber/XMPP library for C++";
homepage = "http://camaya.net/gloox";
license = licenses.gpl3;
···
, idnSupport ? true, libidn
}:
stdenv.mkDerivation rec{
pname = "gloox";
···
};
buildInputs = [ ]
+
++ lib.optional zlibSupport zlib
+
++ lib.optional sslSupport openssl
+
++ lib.optional idnSupport libidn;
+
meta = with lib; {
description = "A portable high-level Jabber/XMPP library for C++";
homepage = "http://camaya.net/gloox";
license = licenses.gpl3;
+8 -10
pkgs/development/libraries/gtk/2.x.nix
···
, fetchpatch, buildPackages
}:
-
with lib;
-
let
gtkCleanImmodulesCache = substituteAll {
···
patches = [
./patches/2.0-immodules.cache.patch
./patches/gtk2-theme-paths.patch
-
] ++ optionals stdenv.isDarwin [
(fetchpatch {
url = "https://bug557780.bugzilla-attachments.gnome.org/attachment.cgi?id=306776";
sha256 = "0sp8f1r5c4j2nlnbqgv7s7nxa4cfwigvm033hvhb1ld652pjag4r";
···
propagatedBuildInputs = with xorg;
[ glib cairo pango gdk-pixbuf atk ]
-
++ optionals (stdenv.isLinux || stdenv.isDarwin) [
libXrandr libXrender libXcomposite libXi libXcursor
]
-
++ optionals stdenv.isDarwin [ libXdamage ]
-
++ optional xineramaSupport libXinerama
-
++ optionals cupsSupport [ cups ]
-
++ optionals stdenv.isDarwin [ AppKit Cocoa ];
preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
MACOSX_DEPLOYMENT_TARGET=10.16
···
configureFlags = [
"--with-gdktarget=${gdktarget}"
"--with-xinput=yes"
-
] ++ optionals stdenv.isDarwin [
"--disable-glibtest"
"--disable-introspection"
"--disable-visibility"
···
inherit gdktarget;
};
-
meta = {
description = "A multi-platform toolkit for creating graphical user interfaces";
homepage = "https://www.gtk.org/";
license = licenses.lgpl2Plus;
···
, fetchpatch, buildPackages
}:
let
gtkCleanImmodulesCache = substituteAll {
···
patches = [
./patches/2.0-immodules.cache.patch
./patches/gtk2-theme-paths.patch
+
] ++ lib.optionals stdenv.isDarwin [
(fetchpatch {
url = "https://bug557780.bugzilla-attachments.gnome.org/attachment.cgi?id=306776";
sha256 = "0sp8f1r5c4j2nlnbqgv7s7nxa4cfwigvm033hvhb1ld652pjag4r";
···
propagatedBuildInputs = with xorg;
[ glib cairo pango gdk-pixbuf atk ]
+
++ lib.optionals (stdenv.isLinux || stdenv.isDarwin) [
libXrandr libXrender libXcomposite libXi libXcursor
]
+
++ lib.optionals stdenv.isDarwin [ libXdamage ]
+
++ lib.optional xineramaSupport libXinerama
+
++ lib.optionals cupsSupport [ cups ]
+
++ lib.optionals stdenv.isDarwin [ AppKit Cocoa ];
preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
MACOSX_DEPLOYMENT_TARGET=10.16
···
configureFlags = [
"--with-gdktarget=${gdktarget}"
"--with-xinput=yes"
+
] ++ lib.optionals stdenv.isDarwin [
"--disable-glibtest"
"--disable-introspection"
"--disable-visibility"
···
inherit gdktarget;
};
+
meta = with lib; {
description = "A multi-platform toolkit for creating graphical user interfaces";
homepage = "https://www.gtk.org/";
license = licenses.lgpl2Plus;
+2 -3
pkgs/development/libraries/hunspell/wrapper.nix
···
{ stdenv, lib, hunspell, makeWrapper, dicts ? [] }:
-
with lib;
let
-
searchPath = makeSearchPath "share/hunspell" dicts;
in
stdenv.mkDerivation {
-
name = (appendToName "with-dicts" hunspell).name;
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
makeWrapper ${hunspell.bin}/bin/hunspell $out/bin/hunspell --prefix DICPATH : ${lib.escapeShellArg searchPath}
···
{ stdenv, lib, hunspell, makeWrapper, dicts ? [] }:
let
+
searchPath = lib.makeSearchPath "share/hunspell" dicts;
in
stdenv.mkDerivation {
+
name = (lib.appendToName "with-dicts" hunspell).name;
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
makeWrapper ${hunspell.bin}/bin/hunspell $out/bin/hunspell --prefix DICPATH : ${lib.escapeShellArg searchPath}
+1 -3
pkgs/development/libraries/indicator-application/gtk2.nix
···
, glib, dbus-glib, json-glib
, gtk2, libindicator-gtk2, libdbusmenu-gtk2, libappindicator-gtk2 }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "indicator-application-gtk2";
version = "12.10.0.1";
···
"localstatedir=\${TMPDIR}"
];
-
meta = {
description = "Indicator to take menus from applications and place them in the panel (GTK 2 library for Xfce/LXDE)";
homepage = "https://launchpad.net/indicators-gtk2";
license = licenses.gpl3;
···
, glib, dbus-glib, json-glib
, gtk2, libindicator-gtk2, libdbusmenu-gtk2, libappindicator-gtk2 }:
stdenv.mkDerivation rec {
pname = "indicator-application-gtk2";
version = "12.10.0.1";
···
"localstatedir=\${TMPDIR}"
];
+
meta = with lib; {
description = "Indicator to take menus from applications and place them in the panel (GTK 2 library for Xfce/LXDE)";
homepage = "https://launchpad.net/indicators-gtk2";
license = licenses.gpl3;
+4 -5
pkgs/development/libraries/kerberos/heimdal.nix
···
, CoreFoundation, Security, SystemConfiguration
}:
-
with lib;
stdenv.mkDerivation rec {
pname = "heimdal";
version = "7.8.0";
···
nativeBuildInputs = [ autoreconfHook pkg-config python3 perl bison flex texinfo ]
++ (with perlPackages; [ JSON ]);
-
buildInputs = optionals (stdenv.isLinux) [ libcap_ng ]
++ [ db sqlite openssl libedit openldap pam]
-
++ optionals (stdenv.isDarwin) [ CoreFoundation Security SystemConfiguration ];
## ugly, X should be made an option
configureFlags = [
···
"--with-berkeley-db"
"--with-berkeley-db-include=${db.dev}/include"
"--with-openldap=${openldap.dev}"
-
] ++ optionals (stdenv.isLinux) [
"--with-capng"
];
···
# hx_locl.h:67:25: fatal error: pkcs10_asn1.h: No such file or directory
#enableParallelBuilding = true;
-
meta = {
description = "An implementation of Kerberos 5 (and some more stuff)";
license = licenses.bsd3;
platforms = platforms.unix;
···
, CoreFoundation, Security, SystemConfiguration
}:
stdenv.mkDerivation rec {
pname = "heimdal";
version = "7.8.0";
···
nativeBuildInputs = [ autoreconfHook pkg-config python3 perl bison flex texinfo ]
++ (with perlPackages; [ JSON ]);
+
buildInputs = lib.optionals (stdenv.isLinux) [ libcap_ng ]
++ [ db sqlite openssl libedit openldap pam]
+
++ lib.optionals (stdenv.isDarwin) [ CoreFoundation Security SystemConfiguration ];
## ugly, X should be made an option
configureFlags = [
···
"--with-berkeley-db"
"--with-berkeley-db-include=${db.dev}/include"
"--with-openldap=${openldap.dev}"
+
] ++ lib.optionals (stdenv.isLinux) [
"--with-capng"
];
···
# hx_locl.h:67:25: fatal error: pkcs10_asn1.h: No such file or directory
#enableParallelBuilding = true;
+
meta = with lib; {
description = "An implementation of Kerberos 5 (and some more stuff)";
license = licenses.bsd3;
platforms = platforms.unix;
+10 -11
pkgs/development/libraries/lame/default.nix
···
, debugSupport ? false # Debugging (disables optimizations)
}:
-
with lib;
stdenv.mkDerivation rec {
pname = "lame";
version = "3.100";
···
outputMan = "out";
nativeBuildInputs = [ ]
-
++ optional nasmSupport nasm;
buildInputs = [ ]
#++ optional efenceSupport libefence
#++ optional mp3xSupport gtk1
-
++ optional sndfileFileIOSupport libsndfile;
configureFlags = [
-
(enableFeature nasmSupport "nasm")
-
(enableFeature cpmlSupport "cpml")
#(enableFeature efenceSupport "efence")
(if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame")
-
(enableFeature analyzerHooksSupport "analyzer-hooks")
-
(enableFeature decoderSupport "decoder")
-
(enableFeature frontendSupport "frontend")
-
(enableFeature frontendSupport "dynamic-frontends")
#(enableFeature mp3xSupport "mp3x")
-
(enableFeature mp3rtpSupport "mp3rtp")
(if debugSupport then "--enable-debug=alot" else "")
];
···
sed -i '/lame_init_old/d' include/libmp3lame.sym
'';
-
meta = {
description = "A high quality MPEG Audio Layer III (MP3) encoder";
homepage = "http://lame.sourceforge.net";
license = licenses.lgpl2;
···
, debugSupport ? false # Debugging (disables optimizations)
}:
stdenv.mkDerivation rec {
pname = "lame";
version = "3.100";
···
outputMan = "out";
nativeBuildInputs = [ ]
+
++ lib.optional nasmSupport nasm;
buildInputs = [ ]
#++ optional efenceSupport libefence
#++ optional mp3xSupport gtk1
+
++ lib.optional sndfileFileIOSupport libsndfile;
configureFlags = [
+
(lib.enableFeature nasmSupport "nasm")
+
(lib.enableFeature cpmlSupport "cpml")
#(enableFeature efenceSupport "efence")
(if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame")
+
(lib.enableFeature analyzerHooksSupport "analyzer-hooks")
+
(lib.enableFeature decoderSupport "decoder")
+
(lib.enableFeature frontendSupport "frontend")
+
(lib.enableFeature frontendSupport "dynamic-frontends")
#(enableFeature mp3xSupport "mp3x")
+
(lib.enableFeature mp3rtpSupport "mp3rtp")
(if debugSupport then "--enable-debug=alot" else "")
];
···
sed -i '/lame_init_old/d' include/libmp3lame.sym
'';
+
meta = with lib; {
description = "A high quality MPEG Audio Layer III (MP3) encoder";
homepage = "http://lame.sourceforge.net";
license = licenses.lgpl2;
+6 -7
pkgs/development/libraries/libass/default.nix
···
assert fontconfigSupport -> fontconfig != null;
-
with lib;
stdenv.mkDerivation rec {
pname = "libass";
version = "0.16.0";
···
};
configureFlags = [
-
(enableFeature fontconfigSupport "fontconfig")
-
(enableFeature rasterizerSupport "rasterizer")
-
(enableFeature largeTilesSupport "large-tiles")
];
nativeBuildInputs = [ pkg-config yasm ];
buildInputs = [ freetype fribidi harfbuzz ]
-
++ optional fontconfigSupport fontconfig
-
++ optional stdenv.isDarwin libiconv;
-
meta = {
description = "Portable ASS/SSA subtitle renderer";
homepage = "https://github.com/libass/libass";
license = licenses.isc;
···
assert fontconfigSupport -> fontconfig != null;
stdenv.mkDerivation rec {
pname = "libass";
version = "0.16.0";
···
};
configureFlags = [
+
(lib.enableFeature fontconfigSupport "fontconfig")
+
(lib.enableFeature rasterizerSupport "rasterizer")
+
(lib.enableFeature largeTilesSupport "large-tiles")
];
nativeBuildInputs = [ pkg-config yasm ];
buildInputs = [ freetype fribidi harfbuzz ]
+
++ lib.optional fontconfigSupport fontconfig
+
++ lib.optional stdenv.isDarwin libiconv;
+
meta = with lib; {
description = "Portable ASS/SSA subtitle renderer";
homepage = "https://github.com/libass/libass";
license = licenses.isc;
-1
pkgs/development/libraries/libcollectdclient/default.nix
···
{ lib, collectd }:
-
with lib;
collectd.overrideAttrs (oldAttrs: {
pname = "libcollectdclient";
···
{ lib, collectd }:
collectd.overrideAttrs (oldAttrs: {
pname = "libcollectdclient";
+3 -5
pkgs/development/libraries/libidn2/default.nix
···
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
-
with lib;
-
stdenv.mkDerivation rec {
pname = "libidn2";
version = "2.3.2";
···
# Beware: non-bootstrap libidn2 is overridden by ./hack.nix
outputs = [ "bin" "dev" "out" "info" "devdoc" ];
-
patches = optional stdenv.isDarwin ./fix-error-darwin.patch;
enableParallelBuilding = true;
# The above patch causes the documentation to be regenerated, so the
# documentation tools are required.
-
nativeBuildInputs = optionals stdenv.isDarwin [ help2man texinfo ];
-
buildInputs = [ libunistring ] ++ optional stdenv.isDarwin libiconv;
depsBuildBuild = [ buildPackages.stdenv.cc ];
meta = {
···
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
stdenv.mkDerivation rec {
pname = "libidn2";
version = "2.3.2";
···
# Beware: non-bootstrap libidn2 is overridden by ./hack.nix
outputs = [ "bin" "dev" "out" "info" "devdoc" ];
+
patches = lib.optional stdenv.isDarwin ./fix-error-darwin.patch;
enableParallelBuilding = true;
# The above patch causes the documentation to be regenerated, so the
# documentation tools are required.
+
nativeBuildInputs = lib.optionals stdenv.isDarwin [ help2man texinfo ];
+
buildInputs = [ libunistring ] ++ lib.optional stdenv.isDarwin libiconv;
depsBuildBuild = [ buildPackages.stdenv.cc ];
meta = {
+3 -5
pkgs/development/libraries/libmcrypt/default.nix
···
{ lib, stdenv, fetchurl, darwin, disablePosixThreads ? false }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "libmcrypt";
version = "2.5.8";
···
sha256 = "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4";
};
-
buildInputs = optional stdenv.isDarwin darwin.cctools;
-
configureFlags = optionals disablePosixThreads
[ "--disable-posix-threads" ];
meta = {
description = "Replacement for the old crypt() package and crypt(1) command, with extensions";
homepage = "http://mcrypt.sourceforge.net";
license = "GPL";
-
platforms = platforms.all;
};
}
···
{ lib, stdenv, fetchurl, darwin, disablePosixThreads ? false }:
stdenv.mkDerivation rec {
pname = "libmcrypt";
version = "2.5.8";
···
sha256 = "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4";
};
+
buildInputs = lib.optional stdenv.isDarwin darwin.cctools;
+
configureFlags = lib.optionals disablePosixThreads
[ "--disable-posix-threads" ];
meta = {
description = "Replacement for the old crypt() package and crypt(1) command, with extensions";
homepage = "http://mcrypt.sourceforge.net";
license = "GPL";
+
platforms = lib.platforms.all;
};
}
+1 -3
pkgs/development/libraries/libqtav/default.nix
···
, libva
}:
-
with lib;
-
mkDerivation rec {
pname = "libqtav";
version = "unstable-2020-09-10";
···
stripDebugList = [ "lib" "libexec" "bin" "qml" ];
-
meta = {
description = "A multimedia playback framework based on Qt + FFmpeg";
#license = licenses.lgpl21; # For the libraries / headers only.
license = licenses.gpl3; # With the examples (under bin) and most likely some of the optional dependencies used.
···
, libva
}:
mkDerivation rec {
pname = "libqtav";
version = "unstable-2020-09-10";
···
stripDebugList = [ "lib" "libexec" "bin" "qml" ];
+
meta = with lib; {
description = "A multimedia playback framework based on Qt + FFmpeg";
#license = licenses.lgpl21; # For the libraries / headers only.
license = licenses.gpl3; # With the examples (under bin) and most likely some of the optional dependencies used.
+1 -3
pkgs/development/libraries/libspf2/default.nix
···
{ lib, stdenv, fetchFromGitHub, autoreconfHook, fetchpatch }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "libspf2";
version = "2.2.12";
···
doCheck = true;
-
meta = {
description = "Implementation of the Sender Policy Framework for SMTP " +
"authorization (Helsinki Systems fork)";
homepage = "https://github.com/helsinki-systems/libspf2";
···
{ lib, stdenv, fetchFromGitHub, autoreconfHook, fetchpatch }:
stdenv.mkDerivation rec {
pname = "libspf2";
version = "2.2.12";
···
doCheck = true;
+
meta = with lib; {
description = "Implementation of the Sender Policy Framework for SMTP " +
"authorization (Helsinki Systems fork)";
homepage = "https://github.com/helsinki-systems/libspf2";
-1
pkgs/development/libraries/libtap/default.nix
···
{ lib, stdenv, fetchurl, pkg-config, cmake, perl }:
-
with lib;
stdenv.mkDerivation rec {
pname = "libtap";
···
{ lib, stdenv, fetchurl, pkg-config, cmake, perl }:
stdenv.mkDerivation rec {
pname = "libtap";
+2 -3
pkgs/development/libraries/libunique/3.x.nix
···
, gtk-doc, docbook_xml_dtd_45, docbook_xsl
, libxslt, libxml2 }:
-
with lib;
stdenv.mkDerivation rec {
majorVer = "3.0";
···
meta = {
homepage = "https://wiki.gnome.org/Attic/LibUnique";
description = "A library for writing single instance applications";
-
license = licenses.lgpl21;
-
maintainers = [ maintainers.AndersonTorres ];
platforms = lib.platforms.linux;
};
}
···
, gtk-doc, docbook_xml_dtd_45, docbook_xsl
, libxslt, libxml2 }:
stdenv.mkDerivation rec {
majorVer = "3.0";
···
meta = {
homepage = "https://wiki.gnome.org/Attic/LibUnique";
description = "A library for writing single instance applications";
+
license = lib.licenses.lgpl21;
+
maintainers = [ lib.maintainers.AndersonTorres ];
platforms = lib.platforms.linux;
};
}
+1 -3
pkgs/development/libraries/libutempter/default.nix
···
{ stdenv, fetchurl, lib, glib }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "libutempter";
version = "1.2.1";
···
"mandir=\${out}/share/man"
];
-
meta = {
homepage = "https://github.com/altlinux/libutempter";
description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files";
longDescription = ''
···
{ stdenv, fetchurl, lib, glib }:
stdenv.mkDerivation rec {
pname = "libutempter";
version = "1.2.1";
···
"mandir=\${out}/share/man"
];
+
meta = with lib; {
homepage = "https://github.com/altlinux/libutempter";
description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files";
longDescription = ''
+18 -20
pkgs/development/libraries/libvirt/default.nix
···
, zfs
}:
-
with lib;
-
let
inherit (stdenv) isDarwin isLinux isx86_64;
-
binPath = makeBinPath ([
dnsmasq
-
] ++ optionals isLinux [
bridge-utils
dmidecode
dnsmasq
···
numad
pmutils
systemd
-
] ++ optionals enableIscsi [
libiscsi
openiscsi
-
] ++ optionals enableZfs [
zfs
]);
in
···
substituteInPlace meson.build \
--replace "'dbus-daemon'," "'${lib.getBin dbus}/bin/dbus-daemon',"
-
'' + optionalString isLinux ''
sed -i 's,define PARTED "parted",define PARTED "${parted}/bin/parted",' \
src/storage/storage_backend_disk.c \
src/storage/storage_util.c
-
'' + optionalString isDarwin ''
sed -i '/qemucapabilitiestest/d' tests/meson.build
sed -i '/vircryptotest/d' tests/meson.build
sed -i '/domaincapstest/d' tests/meson.build
sed -i '/qemufirmwaretest/d' tests/meson.build
sed -i '/qemuvhostusertest/d' tests/meson.build
-
'' + optionalString (isDarwin && isx86_64) ''
sed -i '/qemucaps2xmltest/d' tests/meson.build
sed -i '/qemuhotplugtest/d' tests/meson.build
sed -i '/virnetdaemontest/d' tests/meson.build
···
perl
perlPackages.XMLXPath
]
-
++ optional (!isDarwin) rpcsvc-proto
# NOTE: needed for rpcgen
-
++ optional isDarwin darwin.developer_cmds;
buildInputs = [
bash
···
readline
xhtml1
yajl
-
] ++ optionals isLinux [
acl
attr
audit
···
parted
systemd
util-linux
-
] ++ optionals isDarwin [
AppKit
Carbon
gmp
libiconv
]
-
++ optionals enableCeph [ ceph ]
-
++ optionals enableGlusterfs [ glusterfs ]
-
++ optionals enableIscsi [ libiscsi openiscsi ]
-
++ optionals enableXen [ xen ]
-
++ optionals enableZfs [ zfs ];
preConfigure =
let
···
# Added in nixpkgs:
gettext() { "${gettext}/bin/gettext" "$@"; }
'
-
'' + optionalString isLinux ''
for f in $out/lib/systemd/system/*.service ; do
substituteInPlace $f --replace /bin/kill ${coreutils}/bin/kill
done
···
passthru.tests.libvirtd = nixosTests.libvirtd;
-
meta = {
description = "A toolkit to interact with the virtualization capabilities of recent versions of Linux and other OSes";
homepage = "https://libvirt.org/";
changelog = "https://gitlab.com/libvirt/libvirt/-/raw/v${version}/NEWS.rst";
···
, zfs
}:
let
inherit (stdenv) isDarwin isLinux isx86_64;
+
binPath = lib.makeBinPath ([
dnsmasq
+
] ++ lib.optionals isLinux [
bridge-utils
dmidecode
dnsmasq
···
numad
pmutils
systemd
+
] ++ lib.optionals enableIscsi [
libiscsi
openiscsi
+
] ++ lib.optionals enableZfs [
zfs
]);
in
···
substituteInPlace meson.build \
--replace "'dbus-daemon'," "'${lib.getBin dbus}/bin/dbus-daemon',"
+
'' + lib.optionalString isLinux ''
sed -i 's,define PARTED "parted",define PARTED "${parted}/bin/parted",' \
src/storage/storage_backend_disk.c \
src/storage/storage_util.c
+
'' + lib.optionalString isDarwin ''
sed -i '/qemucapabilitiestest/d' tests/meson.build
sed -i '/vircryptotest/d' tests/meson.build
sed -i '/domaincapstest/d' tests/meson.build
sed -i '/qemufirmwaretest/d' tests/meson.build
sed -i '/qemuvhostusertest/d' tests/meson.build
+
'' + lib.optionalString (isDarwin && isx86_64) ''
sed -i '/qemucaps2xmltest/d' tests/meson.build
sed -i '/qemuhotplugtest/d' tests/meson.build
sed -i '/virnetdaemontest/d' tests/meson.build
···
perl
perlPackages.XMLXPath
]
+
++ lib.optional (!isDarwin) rpcsvc-proto
# NOTE: needed for rpcgen
+
++ lib.optional isDarwin darwin.developer_cmds;
buildInputs = [
bash
···
readline
xhtml1
yajl
+
] ++ lib.optionals isLinux [
acl
attr
audit
···
parted
systemd
util-linux
+
] ++ lib.optionals isDarwin [
AppKit
Carbon
gmp
libiconv
]
+
++ lib.optionals enableCeph [ ceph ]
+
++ lib.optionals enableGlusterfs [ glusterfs ]
+
++ lib.optionals enableIscsi [ libiscsi openiscsi ]
+
++ lib.optionals enableXen [ xen ]
+
++ lib.optionals enableZfs [ zfs ];
preConfigure =
let
···
# Added in nixpkgs:
gettext() { "${gettext}/bin/gettext" "$@"; }
'
+
'' + lib.optionalString isLinux ''
for f in $out/lib/systemd/system/*.service ; do
substituteInPlace $f --replace /bin/kill ${coreutils}/bin/kill
done
···
passthru.tests.libvirtd = nixosTests.libvirtd;
+
meta = with lib; {
description = "A toolkit to interact with the virtualization capabilities of recent versions of Linux and other OSes";
homepage = "https://libvirt.org/";
changelog = "https://gitlab.com/libvirt/libvirt/-/raw/v${version}/NEWS.rst";
+4 -6
pkgs/development/libraries/libvmi/default.nix
···
libvirt,
xenSupport ? true }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "libvmi";
version = "0.12.0";
···
sha256 = "0wbi2nasb1gbci6cq23g6kq7i10rwi1y7r44rl03icr5prqjpdyv";
};
-
buildInputs = [ glib libvirt json_c ] ++ (optional xenSupport xen);
nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
-
configureFlags = optional (!xenSupport) "--disable-xen";
# libvmi uses dlopen() for the xen libraries, however autoPatchelfHook doesn't work here
-
postFixup = optionalString xenSupport ''
libvmi="$out/lib/libvmi.so.${libVersion}"
oldrpath=$(patchelf --print-rpath "$libvmi")
-
patchelf --set-rpath "$oldrpath:${makeLibraryPath [ xen ]}" "$libvmi"
'';
meta = with lib; {
···
libvirt,
xenSupport ? true }:
stdenv.mkDerivation rec {
pname = "libvmi";
version = "0.12.0";
···
sha256 = "0wbi2nasb1gbci6cq23g6kq7i10rwi1y7r44rl03icr5prqjpdyv";
};
+
buildInputs = [ glib libvirt json_c ] ++ (lib.optional xenSupport xen);
nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
+
configureFlags = lib.optional (!xenSupport) "--disable-xen";
# libvmi uses dlopen() for the xen libraries, however autoPatchelfHook doesn't work here
+
postFixup = lib.optionalString xenSupport ''
libvmi="$out/lib/libvmi.so.${libVersion}"
oldrpath=$(patchelf --print-rpath "$libvmi")
+
patchelf --set-rpath "$oldrpath:${lib.makeLibraryPath [ xen ]}" "$libvmi"
'';
meta = with lib; {
+1 -3
pkgs/development/libraries/libytnef/default.nix
···
{ stdenv, lib, fetchFromGitHub, autoreconfHook }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "libytnef";
version = "2.0";
···
nativeBuildInputs = [ autoreconfHook ];
-
meta = {
inherit (src.meta) homepage;
description = "Yeraze's TNEF Stream Reader - for winmail.dat files";
license = licenses.gpl2Plus;
···
{ stdenv, lib, fetchFromGitHub, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "libytnef";
version = "2.0";
···
nativeBuildInputs = [ autoreconfHook ];
+
meta = with lib; {
inherit (src.meta) homepage;
description = "Yeraze's TNEF Stream Reader - for winmail.dat files";
license = licenses.gpl2Plus;
+20 -22
pkgs/development/libraries/mesa/default.nix
···
- libOSMesa is in $osmesa (~4 MB)
*/
-
with lib;
-
let
# Release calendar: https://www.mesa3d.org/release-calendar.html
# Release frequency: https://www.mesa3d.org/releasing.html#schedule
version = "22.3.3";
-
branch = versions.major version;
withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm;
···
"-Ddisk-cache-key=${placeholder "drivers"}"
"-Ddri-search-path=${libglvnd.driverLink}/lib/dri"
-
"-Dplatforms=${concatStringsSep "," eglPlatforms}"
-
"-Dgallium-drivers=${concatStringsSep "," galliumDrivers}"
-
"-Dvulkan-drivers=${concatStringsSep "," vulkanDrivers}"
"-Ddri-drivers-path=${placeholder "drivers"}/lib/dri"
"-Dvdpau-libs-path=${placeholder "drivers"}/lib/vdpau"
"-Domx-libs-path=${placeholder "drivers"}/lib/bellagio"
"-Dva-libs-path=${placeholder "drivers"}/lib/dri"
"-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d"
-
"-Dgallium-nine=${boolToString enableGalliumNine}" # Direct3D in Wine
-
"-Dosmesa=${boolToString enableOSMesa}" # used by wine
"-Dmicrosoft-clc=disabled" # Only relevant on Windows (OpenCL 1.2 API on top of D3D12)
# To enable non-mesa gbm backends to be found (e.g. Nvidia)
"-Dgbm-backends-path=${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm"
-
] ++ optionals stdenv.isLinux [
"-Dglvnd=true"
-
] ++ optionals enableOpenCL [
"-Dgallium-opencl=icd" # Enable the gallium OpenCL frontend
"-Dgallium-rusticl=true" "-Drust_std=2021"
"-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib"
-
] ++ optional enablePatentEncumberedCodecs
"-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec"
-
++ optional (vulkanLayers != []) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}";
buildInputs = with xorg; [
expat llvmPackages.libllvm libglvnd xorgproto
libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr
libffi libvdpau libelf libXvMC
libpthreadstubs openssl /*or another sha1 provider*/
-
] ++ lib.optionals (elem "wayland" eglPlatforms) [ wayland wayland-protocols ]
++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal ]
++ lib.optionals stdenv.isDarwin [ libunwind ]
++ lib.optionals enableOpenCL [ libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator_14 ]
++ lib.optional withValgrind valgrind-light
# Mesa will not build zink when gallium-drivers=auto
-
++ lib.optional (elem "zink" galliumDrivers) vulkan-loader;
depsBuildBuild = [ pkg-config ];
···
intltool bison flex file
python3Packages.python python3Packages.Mako
jdupes glslang
-
] ++ lib.optionals (elem "wayland" eglPlatforms) [
wayland-scanner
];
propagatedBuildInputs = with xorg; [
libXdamage libXxf86vm
-
] ++ optional withLibdrm libdrm
-
++ optionals stdenv.isDarwin [ OpenGL Xplugin ];
doCheck = false;
postInstall = ''
# Some installs don't have any drivers so this directory is never created.
mkdir -p $drivers $osmesa
-
'' + optionalString stdenv.isLinux ''
mkdir -p $drivers/lib
if [ -n "$(shopt -s nullglob; echo "$out/lib/libxatracker"*)" -o -n "$(shopt -s nullglob; echo "$out/lib/libvulkan_"*)" ]; then
···
for js in $drivers/share/vulkan/icd.d/*.json; do
substituteInPlace "$js" --replace "$out" "$drivers"
done
-
'' + optionalString enableOpenCL ''
# Move OpenCL stuff
mkdir -p $opencl/lib
mv -t "$opencl/lib/" \
···
done
'';
-
postFixup = optionalString stdenv.isLinux ''
# set the default search path for DRI drivers; used e.g. by X server
substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace "$drivers" "${libglvnd.driverLink}"
[ -f "$dev/lib/pkgconfig/d3d.pc" ] && substituteInPlace "$dev/lib/pkgconfig/d3d.pc" --replace "$drivers" "${libglvnd.driverLink}"
···
done
'';
-
NIX_CFLAGS_COMPILE = optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [
"-UPIPE_SEARCH_DIR"
"-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\""
];
···
};
};
-
meta = {
description = "An open source 3D graphics library";
longDescription = ''
The Mesa project began as an open-source implementation of the OpenGL
···
- libOSMesa is in $osmesa (~4 MB)
*/
let
# Release calendar: https://www.mesa3d.org/release-calendar.html
# Release frequency: https://www.mesa3d.org/releasing.html#schedule
version = "22.3.3";
+
branch = lib.versions.major version;
withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm;
···
"-Ddisk-cache-key=${placeholder "drivers"}"
"-Ddri-search-path=${libglvnd.driverLink}/lib/dri"
+
"-Dplatforms=${lib.concatStringsSep "," eglPlatforms}"
+
"-Dgallium-drivers=${lib.concatStringsSep "," galliumDrivers}"
+
"-Dvulkan-drivers=${lib.concatStringsSep "," vulkanDrivers}"
"-Ddri-drivers-path=${placeholder "drivers"}/lib/dri"
"-Dvdpau-libs-path=${placeholder "drivers"}/lib/vdpau"
"-Domx-libs-path=${placeholder "drivers"}/lib/bellagio"
"-Dva-libs-path=${placeholder "drivers"}/lib/dri"
"-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d"
+
"-Dgallium-nine=${lib.boolToString enableGalliumNine}" # Direct3D in Wine
+
"-Dosmesa=${lib.boolToString enableOSMesa}" # used by wine
"-Dmicrosoft-clc=disabled" # Only relevant on Windows (OpenCL 1.2 API on top of D3D12)
# To enable non-mesa gbm backends to be found (e.g. Nvidia)
"-Dgbm-backends-path=${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm"
+
] ++ lib.optionals stdenv.isLinux [
"-Dglvnd=true"
+
] ++ lib.optionals enableOpenCL [
"-Dgallium-opencl=icd" # Enable the gallium OpenCL frontend
"-Dgallium-rusticl=true" "-Drust_std=2021"
"-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib"
+
] ++ lib.optional enablePatentEncumberedCodecs
"-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec"
+
++ lib.optional (vulkanLayers != []) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}";
buildInputs = with xorg; [
expat llvmPackages.libllvm libglvnd xorgproto
libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr
libffi libvdpau libelf libXvMC
libpthreadstubs openssl /*or another sha1 provider*/
+
] ++ lib.optionals (lib.elem "wayland" eglPlatforms) [ wayland wayland-protocols ]
++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal ]
++ lib.optionals stdenv.isDarwin [ libunwind ]
++ lib.optionals enableOpenCL [ libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator_14 ]
++ lib.optional withValgrind valgrind-light
# Mesa will not build zink when gallium-drivers=auto
+
++ lib.optional (lib.elem "zink" galliumDrivers) vulkan-loader;
depsBuildBuild = [ pkg-config ];
···
intltool bison flex file
python3Packages.python python3Packages.Mako
jdupes glslang
+
] ++ lib.optionals (lib.elem "wayland" eglPlatforms) [
wayland-scanner
];
propagatedBuildInputs = with xorg; [
libXdamage libXxf86vm
+
] ++ lib.optional withLibdrm libdrm
+
++ lib.optionals stdenv.isDarwin [ OpenGL Xplugin ];
doCheck = false;
postInstall = ''
# Some installs don't have any drivers so this directory is never created.
mkdir -p $drivers $osmesa
+
'' + lib.optionalString stdenv.isLinux ''
mkdir -p $drivers/lib
if [ -n "$(shopt -s nullglob; echo "$out/lib/libxatracker"*)" -o -n "$(shopt -s nullglob; echo "$out/lib/libvulkan_"*)" ]; then
···
for js in $drivers/share/vulkan/icd.d/*.json; do
substituteInPlace "$js" --replace "$out" "$drivers"
done
+
'' + lib.optionalString enableOpenCL ''
# Move OpenCL stuff
mkdir -p $opencl/lib
mv -t "$opencl/lib/" \
···
done
'';
+
postFixup = lib.optionalString stdenv.isLinux ''
# set the default search path for DRI drivers; used e.g. by X server
substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace "$drivers" "${libglvnd.driverLink}"
[ -f "$dev/lib/pkgconfig/d3d.pc" ] && substituteInPlace "$dev/lib/pkgconfig/d3d.pc" --replace "$drivers" "${libglvnd.driverLink}"
···
done
'';
+
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [
"-UPIPE_SEARCH_DIR"
"-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\""
];
···
};
};
+
meta = with lib; {
description = "An open source 3D graphics library";
longDescription = ''
The Mesa project began as an open-source implementation of the OpenGL
+3 -3
pkgs/development/libraries/nuspell/wrapper.nix
···
{ stdenv, lib, nuspell, makeWrapper, dicts ? [] }:
-
with lib;
let
-
searchPath = makeSearchPath "share/hunspell" dicts;
in
stdenv.mkDerivation {
-
name = (appendToName "with-dicts" nuspell).name;
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
makeWrapper ${nuspell}/bin/nuspell $out/bin/nuspell --prefix DICPATH : ${lib.escapeShellArg searchPath}
···
{ stdenv, lib, nuspell, makeWrapper, dicts ? [] }:
+
let
+
searchPath = lib.makeSearchPath "share/hunspell" dicts;
in
stdenv.mkDerivation {
+
name = (lib.appendToName "with-dicts" nuspell).name;
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
makeWrapper ${nuspell}/bin/nuspell $out/bin/nuspell --prefix DICPATH : ${lib.escapeShellArg searchPath}
+3 -4
pkgs/development/libraries/opencascade/default.nix
···
OpenCL, Cocoa
}:
-
with lib;
stdenv.mkDerivation rec {
pname = "opencascade-oce";
version = "0.18.3";
···
libGL libGLU libXmu freetype fontconfig expat freeimage vtk
gl2ps tbb
]
-
++ optionals stdenv.isDarwin [OpenCL Cocoa]
;
cmakeFlags = [
···
"-DOCE_WITH_GL2PS=ON"
"-DOCE_MULTITHREAD_LIBRARY=TBB"
]
-
++ optionals stdenv.isDarwin ["-DOCE_OSX_USE_COCOA=ON" "-DOCE_WITH_OPENCL=ON"];
patches = [
# Use fontconfig instead of hardcoded directory list
···
--replace FONTCONFIG_LIBRARIES FONTCONFIG_LINK_LIBRARIES
'';
-
meta = {
description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
homepage = "https://github.com/tpaviot/oce";
maintainers = [ maintainers.viric ];
···
OpenCL, Cocoa
}:
stdenv.mkDerivation rec {
pname = "opencascade-oce";
version = "0.18.3";
···
libGL libGLU libXmu freetype fontconfig expat freeimage vtk
gl2ps tbb
]
+
++ lib.optionals stdenv.isDarwin [OpenCL Cocoa]
;
cmakeFlags = [
···
"-DOCE_WITH_GL2PS=ON"
"-DOCE_MULTITHREAD_LIBRARY=TBB"
]
+
++ lib.optionals stdenv.isDarwin ["-DOCE_OSX_USE_COCOA=ON" "-DOCE_WITH_OPENCL=ON"];
patches = [
# Use fontconfig instead of hardcoded directory list
···
--replace FONTCONFIG_LIBRARIES FONTCONFIG_LINK_LIBRARIES
'';
+
meta = with lib; {
description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
homepage = "https://github.com/tpaviot/oce";
maintainers = [ maintainers.viric ];
+2 -4
pkgs/development/libraries/pcg-c/default.nix
···
{ lib, stdenv, fetchzip }:
-
with lib;
-
stdenv.mkDerivation rec {
version = "0.94";
pname = "pcg-c";
···
algorithms for random number generation. Unlike many general-purpose RNGs,
they are also hard to predict.
'';
-
platforms = platforms.unix;
-
maintainers = [ maintainers.linus ];
broken = stdenv.isi686; # https://github.com/imneme/pcg-c/issues/11
};
}
···
{ lib, stdenv, fetchzip }:
stdenv.mkDerivation rec {
version = "0.94";
pname = "pcg-c";
···
algorithms for random number generation. Unlike many general-purpose RNGs,
they are also hard to predict.
'';
+
platforms = lib.platforms.unix;
+
maintainers = [ lib.maintainers.linus ];
broken = stdenv.isi686; # https://github.com/imneme/pcg-c/issues/11
};
}
+6 -8
pkgs/development/libraries/pcre/default.nix
···
, variant ? null
}:
-
with lib;
-
-
assert elem variant [ null "cpp" "pcre16" "pcre32" ];
stdenv.mkDerivation rec {
pname = "pcre"
···
outputs = [ "bin" "dev" "out" "doc" "man" ];
# Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51
-
configureFlags = optional (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit=auto" ++ [
"--enable-unicode-properties"
"--disable-cpp"
]
-
++ optional (variant != null) "--enable-${variant}";
# https://bugs.exim.org/show_bug.cgi?id=2173
patches = [ ./stacksize-detection.patch ];
···
postFixup = ''
moveToOutput bin/pcre-config "$dev"
-
'' + optionalString (variant != null) ''
ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.{so.*.*.*,*dylib,*a}
'';
···
PCRE library is free, even for building proprietary software.
'';
-
platforms = platforms.all;
-
maintainers = with maintainers; [ ];
};
}
···
, variant ? null
}:
+
assert lib.elem variant [ null "cpp" "pcre16" "pcre32" ];
stdenv.mkDerivation rec {
pname = "pcre"
···
outputs = [ "bin" "dev" "out" "doc" "man" ];
# Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51
+
configureFlags = lib.optional (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit=auto" ++ [
"--enable-unicode-properties"
"--disable-cpp"
]
+
++ lib.optional (variant != null) "--enable-${variant}";
# https://bugs.exim.org/show_bug.cgi?id=2173
patches = [ ./stacksize-detection.patch ];
···
postFixup = ''
moveToOutput bin/pcre-config "$dev"
+
'' + lib.optionalString (variant != null) ''
ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.{so.*.*.*,*dylib,*a}
'';
···
PCRE library is free, even for building proprietary software.
'';
+
platforms = lib.platforms.all;
+
maintainers = with lib.maintainers; [ ];
};
}
-2
pkgs/development/libraries/phonon/backends/gstreamer.nix
···
, debug ? false
}:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "phonon-backend-gstreamer";
version = "4.10.0";
···
, debug ? false
}:
stdenv.mkDerivation rec {
pname = "phonon-backend-gstreamer";
version = "4.10.0";
-2
pkgs/development/libraries/phonon/default.nix
···
, debug ? false
}:
-
with lib;
-
let
soname = "phonon4qt5";
buildsystemdir = "share/cmake/${soname}";
···
, debug ? false
}:
let
soname = "phonon4qt5";
buildsystemdir = "share/cmake/${soname}";
-2
pkgs/development/libraries/science/math/clmagma/default.nix
···
{ lib, stdenv, fetchurl, gfortran, opencl-headers, clblas, ocl-icd, mkl, intel-ocl }:
-
with lib;
-
let
incfile = builtins.toFile "make.inc.custom" ''
CC = g++
···
{ lib, stdenv, fetchurl, gfortran, opencl-headers, clblas, ocl-icd, mkl, intel-ocl }:
let
incfile = builtins.toFile "make.inc.custom" ''
CC = g++
+2 -4
pkgs/development/libraries/science/math/openblas/default.nix
···
, python3
}:
-
with lib;
-
let blas64_ = blas64; in
let
···
blas64 =
if blas64_ != null
then blas64_
-
else hasPrefix "x86_64" stdenv.hostPlatform.system;
# Convert flag values to format OpenBLAS's build expects.
# `toString` is almost what we need other than bools,
# which we need to map {true -> 1, false -> 0}
···
mkMakeFlagValue = val:
if !builtins.isBool val then toString val
else if val then "1" else "0";
-
mkMakeFlagsFromConfig = mapAttrsToList (var: val: "${var}=${mkMakeFlagValue val}");
shlibExt = stdenv.hostPlatform.extensions.sharedLibrary;
···
, python3
}:
let blas64_ = blas64; in
let
···
blas64 =
if blas64_ != null
then blas64_
+
else lib.hasPrefix "x86_64" stdenv.hostPlatform.system;
# Convert flag values to format OpenBLAS's build expects.
# `toString` is almost what we need other than bools,
# which we need to map {true -> 1, false -> 0}
···
mkMakeFlagValue = val:
if !builtins.isBool val then toString val
else if val then "1" else "0";
+
mkMakeFlagsFromConfig = lib.mapAttrsToList (var: val: "${var}=${mkMakeFlagValue val}");
shlibExt = stdenv.hostPlatform.extensions.sharedLibrary;
+8 -9
pkgs/development/libraries/sope/default.nix
···
{ gnustep, lib, fetchFromGitHub , libxml2, openssl
, openldap, mariadb, libmysqlclient, postgresql }:
-
with lib;
gnustep.stdenv.mkDerivation rec {
pname = "sope";
···
hardeningDisable = [ "format" ];
nativeBuildInputs = [ gnustep.make ];
-
buildInputs = flatten ([ gnustep.base libxml2 openssl ]
-
++ optional (openldap != null) openldap
-
++ optionals (mariadb != null) [ libmysqlclient mariadb ]
-
++ optional (postgresql != null) postgresql);
postPatch = ''
# Exclude NIX_ variables
···
'';
configureFlags = [ "--prefix=" "--disable-debug" "--enable-xml" "--with-ssl=ssl" ]
-
++ optional (openldap != null) "--enable-openldap"
-
++ optional (mariadb != null) "--enable-mysql"
-
++ optional (postgresql != null) "--enable-postgresql";
# Yes, this is ugly.
preFixup = ''
···
rm -rf $out/nix/store
'';
-
meta = {
description = "An extensive set of frameworks which form a complete Web application server environment";
license = licenses.publicDomain;
homepage = "https://github.com/inverse-inc/sope";
···
{ gnustep, lib, fetchFromGitHub , libxml2, openssl
, openldap, mariadb, libmysqlclient, postgresql }:
gnustep.stdenv.mkDerivation rec {
pname = "sope";
···
hardeningDisable = [ "format" ];
nativeBuildInputs = [ gnustep.make ];
+
buildInputs = lib.flatten ([ gnustep.base libxml2 openssl ]
+
++ lib.optional (openldap != null) openldap
+
++ lib.optionals (mariadb != null) [ libmysqlclient mariadb ]
+
++ lib.optional (postgresql != null) postgresql);
postPatch = ''
# Exclude NIX_ variables
···
'';
configureFlags = [ "--prefix=" "--disable-debug" "--enable-xml" "--with-ssl=ssl" ]
+
++ lib.optional (openldap != null) "--enable-openldap"
+
++ lib.optional (mariadb != null) "--enable-mysql"
+
++ lib.optional (postgresql != null) "--enable-postgresql";
# Yes, this is ugly.
preFixup = ''
···
rm -rf $out/nix/store
'';
+
meta = with lib; {
description = "An extensive set of frameworks which form a complete Web application server environment";
license = licenses.publicDomain;
homepage = "https://github.com/inverse-inc/sope";
+3 -5
pkgs/development/libraries/sqlite/archive-version.nix
···
lib: version:
-
with lib;
-
let
-
fragments = splitVersion version;
-
major = head fragments;
-
minor = concatMapStrings (fixedWidthNumber 2) (tail fragments);
in
major + minor + "00"
···
lib: version:
let
+
fragments = lib.splitVersion version;
+
major = lib.head fragments;
+
minor = lib.concatMapStrings (lib.fixedWidthNumber 2) (lib.tail fragments);
in
major + minor + "00"
+4 -6
pkgs/development/libraries/sqlite/default.nix
···
, enableDeserialize ? false
}:
-
with lib;
-
let
archiveVersion = import ./archive-version.nix lib;
in
stdenv.mkDerivation rec {
-
pname = "sqlite${optionalString interactive "-interactive"}";
version = "3.40.1";
# nixpkgs-update: no auto update
···
outputs = [ "bin" "dev" "out" ];
separateDebugInfo = stdenv.isLinux;
-
buildInputs = [ zlib ] ++ optionals interactive [ readline ncurses ];
# required for aarch64 but applied for all arches for simplicity
preConfigure = ''
patchShebangs configure
'';
-
configureFlags = [ "--enable-threadsafe" ] ++ optional interactive "--enable-readline";
NIX_CFLAGS_COMPILE = toString ([
"-DSQLITE_ENABLE_COLUMN_METADATA"
···
inherit sqldiff sqlite-analyzer tracker;
};
-
meta = {
description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
downloadPage = "https://sqlite.org/download.html";
homepage = "https://www.sqlite.org/";
···
, enableDeserialize ? false
}:
let
archiveVersion = import ./archive-version.nix lib;
in
stdenv.mkDerivation rec {
+
pname = "sqlite${lib.optionalString interactive "-interactive"}";
version = "3.40.1";
# nixpkgs-update: no auto update
···
outputs = [ "bin" "dev" "out" ];
separateDebugInfo = stdenv.isLinux;
+
buildInputs = [ zlib ] ++ lib.optionals interactive [ readline ncurses ];
# required for aarch64 but applied for all arches for simplicity
preConfigure = ''
patchShebangs configure
'';
+
configureFlags = [ "--enable-threadsafe" ] ++ lib.optional interactive "--enable-readline";
NIX_CFLAGS_COMPILE = toString ([
"-DSQLITE_ENABLE_COLUMN_METADATA"
···
inherit sqldiff sqlite-analyzer tracker;
};
+
meta = with lib; {
description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
downloadPage = "https://sqlite.org/download.html";
homepage = "https://www.sqlite.org/";
+1 -2
pkgs/development/libraries/srt/default.nix
···
{ lib, stdenv, fetchFromGitHub, cmake, openssl
}:
-
with lib;
stdenv.mkDerivation rec {
pname = "srt";
version = "1.5.1";
···
"-UCMAKE_INSTALL_LIBDIR"
];
-
meta = {
description = "Secure, Reliable, Transport";
homepage = "https://github.com/Haivision/srt";
license = licenses.mpl20;
···
{ lib, stdenv, fetchFromGitHub, cmake, openssl
}:
stdenv.mkDerivation rec {
pname = "srt";
version = "1.5.1";
···
"-UCMAKE_INSTALL_LIBDIR"
];
+
meta = with lib; {
description = "Secure, Reliable, Transport";
homepage = "https://github.com/Haivision/srt";
license = licenses.mpl20;
+1 -3
pkgs/development/libraries/unittest-cpp/default.nix
···
{lib, stdenv, fetchFromGitHub, cmake}:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "unittest-cpp";
version = "2.0.0";
···
meta = {
homepage = "https://github.com/unittest-cpp/unittest-cpp";
description = "Lightweight unit testing framework for C++";
-
license = licenses.mit;
maintainers = [];
platforms = lib.platforms.unix;
};
···
{lib, stdenv, fetchFromGitHub, cmake}:
stdenv.mkDerivation rec {
pname = "unittest-cpp";
version = "2.0.0";
···
meta = {
homepage = "https://github.com/unittest-cpp/unittest-cpp";
description = "Lightweight unit testing framework for C++";
+
license = lib.licenses.mit;
maintainers = [];
platforms = lib.platforms.unix;
};
+6 -7
pkgs/development/libraries/xvidcore/default.nix
···
{ lib, stdenv, fetchurl, yasm, autoconf, automake, libtool }:
-
with lib;
stdenv.mkDerivation rec {
pname = "xvidcore";
version = "1.3.7";
···
preConfigure = ''
# Configure script is not in the root of the source directory
cd build/generic
-
'' + optionalString stdenv.isDarwin ''
# Undocumented darwin hack
substituteInPlace configure --replace "-no-cpp-precomp" ""
'';
···
configureFlags = [ ]
# Undocumented darwin hack (assembly is probably disabled due to an
# issue with nasm, however yasm is now used)
-
++ optional stdenv.isDarwin "--enable-macosx_module --disable-assembly";
nativeBuildInputs = [ ]
-
++ optional (!stdenv.isDarwin) yasm;
buildInputs = [ ]
# Undocumented darwin hack
-
++ optionals stdenv.isDarwin [ autoconf automake libtool ];
# Don't remove static libraries (e.g. 'libs/*.a') on darwin. They're needed to
# compile ffmpeg (and perhaps other things).
-
postInstall = optionalString (!stdenv.isDarwin) ''
rm $out/lib/*.a
'';
-
meta = {
description = "MPEG-4 video codec for PC";
homepage = "https://www.xvid.com/";
license = licenses.gpl2;
···
{ lib, stdenv, fetchurl, yasm, autoconf, automake, libtool }:
stdenv.mkDerivation rec {
pname = "xvidcore";
version = "1.3.7";
···
preConfigure = ''
# Configure script is not in the root of the source directory
cd build/generic
+
'' + lib.optionalString stdenv.isDarwin ''
# Undocumented darwin hack
substituteInPlace configure --replace "-no-cpp-precomp" ""
'';
···
configureFlags = [ ]
# Undocumented darwin hack (assembly is probably disabled due to an
# issue with nasm, however yasm is now used)
+
++ lib.optional stdenv.isDarwin "--enable-macosx_module --disable-assembly";
nativeBuildInputs = [ ]
+
++ lib.optional (!stdenv.isDarwin) yasm;
buildInputs = [ ]
# Undocumented darwin hack
+
++ lib.optionals stdenv.isDarwin [ autoconf automake libtool ];
# Don't remove static libraries (e.g. 'libs/*.a') on darwin. They're needed to
# compile ffmpeg (and perhaps other things).
+
postInstall = lib.optionalString (!stdenv.isDarwin) ''
rm $out/lib/*.a
'';
+
meta = with lib; {
description = "MPEG-4 video codec for PC";
homepage = "https://www.xvid.com/";
license = licenses.gpl2;
+2 -4
pkgs/development/misc/msp430/mspds/binary.nix
···
{ stdenv, lib, fetchurl, unzip, autoPatchelfHook }:
-
with lib;
-
let
-
archPostfix = optionalString (stdenv.is64bit && !stdenv.isDarwin) "_64";
in stdenv.mkDerivation rec {
pname = "msp-debug-stack-bin";
version = "3.15.1.1";
···
install -Dm0644 -t $out/include Inc/*.h
'';
-
meta = {
description = "Unfree binary release of the TI MSP430 FET debug driver";
homepage = "https://www.ti.com/tool/MSPDS";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
···
{ stdenv, lib, fetchurl, unzip, autoPatchelfHook }:
let
+
archPostfix = lib.optionalString (stdenv.is64bit && !stdenv.isDarwin) "_64";
in stdenv.mkDerivation rec {
pname = "msp-debug-stack-bin";
version = "3.15.1.1";
···
install -Dm0644 -t $out/include Inc/*.h
'';
+
meta = with lib; {
description = "Unfree binary release of the TI MSP430 FET debug driver";
homepage = "https://www.ti.com/tool/MSPDS";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+4 -5
pkgs/development/misc/msp430/mspds/default.nix
···
, libusb1 ? null
}:
-
with lib;
assert stdenv.isLinux -> libusb1 != null;
let
-
hidapiDriver = optionalString stdenv.isLinux "-libusb";
in stdenv.mkDerivation {
pname = "msp-debug-stack";
···
preBuild = ''
rm ThirdParty/src/pugixml.cpp
rm ThirdParty/include/pugi{config,xml}.hpp
-
'' + optionalString stdenv.isDarwin ''
makeFlagsArray+=(OUTNAME="-install_name ")
'';
···
nativeBuildInputs = [ unzip ];
buildInputs = [ boost hidapi pugixml ]
-
++ optional stdenv.isLinux libusb1;
-
meta = {
description = "TI MSP430 FET debug driver";
homepage = "https://www.ti.com/tool/MSPDS";
license = licenses.bsd3;
···
, libusb1 ? null
}:
assert stdenv.isLinux -> libusb1 != null;
let
+
hidapiDriver = lib.optionalString stdenv.isLinux "-libusb";
in stdenv.mkDerivation {
pname = "msp-debug-stack";
···
preBuild = ''
rm ThirdParty/src/pugixml.cpp
rm ThirdParty/include/pugi{config,xml}.hpp
+
'' + lib.optionalString stdenv.isDarwin ''
makeFlagsArray+=(OUTNAME="-install_name ")
'';
···
nativeBuildInputs = [ unzip ];
buildInputs = [ boost hidapi pugixml ]
+
++ lib.optional stdenv.isLinux libusb1;
+
meta = with lib; {
description = "TI MSP430 FET debug driver";
homepage = "https://www.ti.com/tool/MSPDS";
license = licenses.bsd3;
+6 -6
pkgs/development/ocaml-modules/elpi/default.nix
···
, version ? if lib.versionAtLeast ocaml.version "4.08" then "1.16.5"
else if lib.versionAtLeast ocaml.version "4.07" then "1.15.2" else "1.14.1"
}:
-
with lib;
let fetched = coqPackages.metaFetch ({
release."1.16.5".sha256 = "sha256-tKX5/cVPoBeHiUe+qn7c5FIRYCwY0AAukN7vSd/Nz9A=";
release."1.15.2".sha256 = "sha256-XgopNP83POFbMNyl2D+gY1rmqGg03o++Ngv3zJfCn2s=";
···
pname = "elpi";
inherit (fetched) version src;
-
patches = lib.optional (versionAtLeast version "1.16" || version == "dev")
./atd_2_10.patch;
minimalOCamlVersion = "4.04";
buildInputs = [ perl ncurses ]
-
++ optional (versionAtLeast version "1.15" || version == "dev") menhir
-
++ optional (versionAtLeast version "1.16" || version == "dev") atdgen;
propagatedBuildInputs = [ re stdlib-shims ]
-
++ (if versionAtLeast version "1.15" || version == "dev"
then [ menhirLib ]
else [ camlp5 ]
)
···
else [ ppxlib_0_15 ppx_deriving_0_15 ]
);
-
meta = {
description = "Embeddable λProlog Interpreter";
license = licenses.lgpl21Plus;
maintainers = [ maintainers.vbgl ];
···
, version ? if lib.versionAtLeast ocaml.version "4.08" then "1.16.5"
else if lib.versionAtLeast ocaml.version "4.07" then "1.15.2" else "1.14.1"
}:
+
let fetched = coqPackages.metaFetch ({
release."1.16.5".sha256 = "sha256-tKX5/cVPoBeHiUe+qn7c5FIRYCwY0AAukN7vSd/Nz9A=";
release."1.15.2".sha256 = "sha256-XgopNP83POFbMNyl2D+gY1rmqGg03o++Ngv3zJfCn2s=";
···
pname = "elpi";
inherit (fetched) version src;
+
patches = lib.optional (lib.versionAtLeast version "1.16" || version == "dev")
./atd_2_10.patch;
minimalOCamlVersion = "4.04";
buildInputs = [ perl ncurses ]
+
++ lib.optional (lib.versionAtLeast version "1.15" || version == "dev") menhir
+
++ lib.optional (lib.versionAtLeast version "1.16" || version == "dev") atdgen;
propagatedBuildInputs = [ re stdlib-shims ]
+
++ (if lib.versionAtLeast version "1.15" || version == "dev"
then [ menhirLib ]
else [ camlp5 ]
)
···
else [ ppxlib_0_15 ppx_deriving_0_15 ]
);
+
meta = with lib; {
description = "Embeddable λProlog Interpreter";
license = licenses.lgpl21Plus;
maintainers = [ maintainers.vbgl ];
+2 -4
pkgs/development/ocaml-modules/mtime/default.nix
···
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
-
with lib;
-
-
throwIfNot (versionAtLeast ocaml.version "4.08")
"mtime is not available for OCaml ${ocaml.version}"
stdenv.mkDerivation rec {
···
inherit (topkg) buildPhase installPhase;
-
meta = {
description = "Monotonic wall-clock time for OCaml";
homepage = "https://erratique.ch/software/mtime";
inherit (ocaml.meta) platforms;
···
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
+
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
"mtime is not available for OCaml ${ocaml.version}"
stdenv.mkDerivation rec {
···
inherit (topkg) buildPhase installPhase;
+
meta = with lib; {
description = "Monotonic wall-clock time for OCaml";
homepage = "https://erratique.ch/software/mtime";
inherit (ocaml.meta) platforms;
+4 -6
pkgs/development/ocaml-modules/vg/default.nix
···
htmlcBackend ? true # depends on js_of_ocaml
}:
-
with lib;
-
let
inherit (lib) optionals versionOlder;
···
strictDeps = true;
buildPhase = topkg.buildPhase
-
+ " --with-uutf ${boolToString pdfBackend}"
-
+ " --with-otfm ${boolToString pdfBackend}"
-
+ " --with-js_of_ocaml ${boolToString htmlcBackend}"
+ " --with-cairo2 false";
inherit (topkg) installPhase;
-
meta = {
description = "Declarative 2D vector graphics for OCaml";
longDescription = ''
Vg is an OCaml module for declarative 2D vector graphics. In Vg, images
···
htmlcBackend ? true # depends on js_of_ocaml
}:
let
inherit (lib) optionals versionOlder;
···
strictDeps = true;
buildPhase = topkg.buildPhase
+
+ " --with-uutf ${lib.boolToString pdfBackend}"
+
+ " --with-otfm ${lib.boolToString pdfBackend}"
+
+ " --with-js_of_ocaml ${lib.boolToString htmlcBackend}"
+ " --with-cairo2 false";
inherit (topkg) installPhase;
+
meta = with lib; {
description = "Declarative 2D vector graphics for OCaml";
longDescription = ''
Vg is an OCaml module for declarative 2D vector graphics. In Vg, images
+1 -2
pkgs/development/python-modules/mohawk/default.nix
···
{ lib, buildPythonPackage, fetchPypi, mock, nose, pytest, six }:
-
with lib;
buildPythonPackage rec {
pname = "mohawk";
version = "1.1.0";
···
meta = {
description = "Python library for Hawk HTTP authorization.";
homepage = "https://github.com/kumar303/mohawk";
-
license = licenses.mpl20;
maintainers = [ ];
};
}
···
{ lib, buildPythonPackage, fetchPypi, mock, nose, pytest, six }:
buildPythonPackage rec {
pname = "mohawk";
version = "1.1.0";
···
meta = {
description = "Python library for Hawk HTTP authorization.";
homepage = "https://github.com/kumar303/mohawk";
+
license = lib.licenses.mpl20;
maintainers = [ ];
};
}
+2 -4
pkgs/development/tools/ammonite/default.nix
···
{ lib, stdenv, fetchurl, jre, writeScript, common-updater-scripts, git, nixfmt
, nix, coreutils, gnused, disableRemoteLogging ? true }:
-
with lib;
-
let
repo = "git@github.com:lihaoyi/Ammonite.git";
···
installPhase = ''
install -Dm755 $src $out/bin/amm
sed -i '0,/java/{s|java|${jre}/bin/java|}' $out/bin/amm
-
'' + optionalString (disableRemoteLogging) ''
sed -i "0,/ammonite.Main/{s|ammonite.Main'|ammonite.Main' --no-remote-logging|}" $out/bin/amm
sed -i '1i #!/bin/sh' $out/bin/amm
'';
···
runHook postInstallCheck
'';
-
meta = {
description = "Improved Scala REPL";
longDescription = ''
The Ammonite-REPL is an improved Scala REPL, re-implemented from first principles.
···
{ lib, stdenv, fetchurl, jre, writeScript, common-updater-scripts, git, nixfmt
, nix, coreutils, gnused, disableRemoteLogging ? true }:
let
repo = "git@github.com:lihaoyi/Ammonite.git";
···
installPhase = ''
install -Dm755 $src $out/bin/amm
sed -i '0,/java/{s|java|${jre}/bin/java|}' $out/bin/amm
+
'' + lib.optionalString (disableRemoteLogging) ''
sed -i "0,/ammonite.Main/{s|ammonite.Main'|ammonite.Main' --no-remote-logging|}" $out/bin/amm
sed -i '1i #!/bin/sh' $out/bin/amm
'';
···
runHook postInstallCheck
'';
+
meta = with lib; {
description = "Improved Scala REPL";
longDescription = ''
The Ammonite-REPL is an improved Scala REPL, re-implemented from first principles.
+1 -3
pkgs/development/tools/butane/default.nix
···
{ lib, fetchFromGitHub, buildGoModule }:
-
with lib;
-
buildGoModule rec {
pname = "butane";
version = "0.17.0";
···
mv $out/bin/{internal,butane}
'';
-
meta = {
description = "Translates human-readable Butane configs into machine-readable Ignition configs";
license = licenses.asl20;
homepage = "https://github.com/coreos/butane";
···
{ lib, fetchFromGitHub, buildGoModule }:
buildGoModule rec {
pname = "butane";
version = "0.17.0";
···
mv $out/bin/{internal,butane}
'';
+
meta = with lib; {
description = "Translates human-readable Butane configs into machine-readable Ignition configs";
license = licenses.asl20;
homepage = "https://github.com/coreos/butane";
+4 -5
pkgs/development/tools/eclipse-mat/default.nix
···
, zlib
}:
-
with lib;
let
pVersion = "1.13.0.20220615";
-
pVersionTriple = splitVersion pVersion;
-
majorVersion = elemAt pVersionTriple 0;
-
minorVersion = elemAt pVersionTriple 1;
-
patchVersion = elemAt pVersionTriple 2;
baseVersion = "${majorVersion}.${minorVersion}.${patchVersion}";
jdk = jdk11;
in
···
, zlib
}:
let
pVersion = "1.13.0.20220615";
+
pVersionTriple = lib.splitVersion pVersion;
+
majorVersion = lib.elemAt pVersionTriple 0;
+
minorVersion = lib.elemAt pVersionTriple 1;
+
patchVersion = lib.elemAt pVersionTriple 2;
baseVersion = "${majorVersion}.${minorVersion}.${patchVersion}";
jdk = jdk11;
in
+3 -4
pkgs/development/tools/iaca/2.1.nix
···
{ lib, stdenv, makeWrapper, requireFile, gcc, unzip }:
-
with lib;
# v2.1: last version with NHM/WSM arch support
stdenv.mkDerivation rec {
···
cp bin/iaca $out/bin/
cp lib/* $out/lib
'';
-
preFixup = let libPath = makeLibraryPath [ stdenv.cc.cc.lib gcc ]; in ''
patchelf \
--set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 \
--set-rpath $out/lib:"${libPath}" \
$out/bin/iaca
'';
postFixup = "wrapProgram $out/bin/iaca --set LD_LIBRARY_PATH $out/lib";
-
meta = {
description = "Intel Architecture Code Analyzer";
homepage = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer/";
-
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ kazcw ];
···
{ lib, stdenv, makeWrapper, requireFile, gcc, unzip }:
# v2.1: last version with NHM/WSM arch support
stdenv.mkDerivation rec {
···
cp bin/iaca $out/bin/
cp lib/* $out/lib
'';
+
preFixup = let libPath = lib.makeLibraryPath [ stdenv.cc.cc.lib gcc ]; in ''
patchelf \
--set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 \
--set-rpath $out/lib:"${libPath}" \
$out/bin/iaca
'';
postFixup = "wrapProgram $out/bin/iaca --set LD_LIBRARY_PATH $out/lib";
+
meta = with lib; {
description = "Intel Architecture Code Analyzer";
homepage = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer/";
+
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ kazcw ];
+2 -3
pkgs/development/tools/iaca/3.0.nix
···
{ lib, stdenv, requireFile, unzip }:
-
with lib;
stdenv.mkDerivation rec {
pname = "iaca";
···
cp iaca $out/bin
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $out/bin/iaca
'';
-
meta = {
description = "Intel Architecture Code Analyzer";
homepage = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer/";
-
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ kazcw ];
···
{ lib, stdenv, requireFile, unzip }:
stdenv.mkDerivation rec {
pname = "iaca";
···
cp iaca $out/bin
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $out/bin/iaca
'';
+
meta = with lib; {
description = "Intel Architecture Code Analyzer";
homepage = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer/";
+
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ kazcw ];
+2 -4
pkgs/development/tools/kind/default.nix
···
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
-
with lib;
-
buildGoModule rec {
pname = "kind";
version = "0.17.0";
···
done
'';
-
meta = {
description = "Kubernetes IN Docker - local clusters for testing Kubernetes";
homepage = "https://github.com/kubernetes-sigs/kind";
maintainers = with maintainers; [ offline rawkode ];
-
license = lib.licenses.asl20;
platforms = platforms.unix;
};
}
···
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "kind";
version = "0.17.0";
···
done
'';
+
meta = with lib; {
description = "Kubernetes IN Docker - local clusters for testing Kubernetes";
homepage = "https://github.com/kubernetes-sigs/kind";
maintainers = with maintainers; [ offline rawkode ];
+
license = licenses.asl20;
platforms = platforms.unix;
};
}
+2 -3
pkgs/development/tools/misc/kibana/7.x.nix
···
, which
}:
-
with lib;
let
nodejs = nodejs-16_x;
inherit (builtins) elemAt;
-
info = splitString "-" stdenv.hostPlatform.system;
arch = elemAt info 0;
plat = elemAt info 1;
shas =
···
sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana
'';
-
meta = {
description = "Visualize logs and time-stamped data";
homepage = "http://www.elasticsearch.org/overview/kibana";
license = licenses.elastic;
···
, which
}:
let
nodejs = nodejs-16_x;
inherit (builtins) elemAt;
+
info = lib.splitString "-" stdenv.hostPlatform.system;
arch = elemAt info 0;
plat = elemAt info 1;
shas =
···
sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana
'';
+
meta = with lib; {
description = "Visualize logs and time-stamped data";
homepage = "http://www.elasticsearch.org/overview/kibana";
license = licenses.elastic;
+6 -8
pkgs/development/tools/misc/pkg-config/default.nix
···
{ lib, stdenv, fetchurl, libiconv, vanilla ? false }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "pkg-config";
version = "0.29.2";
···
# Process Requires.private properly, see
# http://bugs.freedesktop.org/show_bug.cgi?id=4738, migrated to
# https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/28
-
patches = optional (!vanilla) ./requires-private.patch
-
++ optional stdenv.isCygwin ./2.36.3-not-win32.patch;
# These three tests fail due to a (desired) behavior change from our ./requires-private.patch
postPatch = if vanilla then null else ''
rm -f check/check-requires-private check/check-gtk check/missing
'';
-
buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
configureFlags = [ "--with-internal-glib" ]
-
++ optionals (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ]
# Can't run these tests while cross-compiling
-
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform)
[ "glib_cv_stack_grows=no"
"glib_cv_uscore=no"
"ac_cv_func_posix_getpwuid_r=yes"
···
postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file
-
meta = {
description = "A tool that allows packages to find out information about other packages";
homepage = "http://pkg-config.freedesktop.org/wiki/";
platforms = platforms.all;
···
{ lib, stdenv, fetchurl, libiconv, vanilla ? false }:
stdenv.mkDerivation rec {
pname = "pkg-config";
version = "0.29.2";
···
# Process Requires.private properly, see
# http://bugs.freedesktop.org/show_bug.cgi?id=4738, migrated to
# https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/28
+
patches = lib.optional (!vanilla) ./requires-private.patch
+
++ lib.optional stdenv.isCygwin ./2.36.3-not-win32.patch;
# These three tests fail due to a (desired) behavior change from our ./requires-private.patch
postPatch = if vanilla then null else ''
rm -f check/check-requires-private check/check-gtk check/missing
'';
+
buildInputs = lib.optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
configureFlags = [ "--with-internal-glib" ]
+
++ lib.optionals (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ]
# Can't run these tests while cross-compiling
+
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform)
[ "glib_cv_stack_grows=no"
"glib_cv_uscore=no"
"ac_cv_func_posix_getpwuid_r=yes"
···
postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file
+
meta = with lib; {
description = "A tool that allows packages to find out information about other packages";
homepage = "http://pkg-config.freedesktop.org/wiki/";
platforms = platforms.all;
+3 -5
pkgs/development/tools/misc/premake/5.nix
···
{ lib, stdenv, fetchFromGitHub, libuuid, cacert, Foundation, readline }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "premake5";
version = "5.0.0-beta2";
···
sha256 = "sha256-2R5gq4jaQsp8Ny1oGuIYkef0kn2UG9jMf20vq0714oY=";
};
-
buildInputs = [ libuuid ] ++ optionals stdenv.isDarwin [ Foundation readline ];
patches = [ ./no-curl-ca.patch ];
patchPhase = ''
substituteInPlace contrib/curl/premake5.lua \
--replace "ca = nil" "ca = '${cacert}/etc/ssl/certs/ca-bundle.crt'"
-
'' + optionalString stdenv.isDarwin ''
substituteInPlace premake5.lua \
--replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.5
'';
···
homepage = "https://premake.github.io";
description = "A simple build configuration and project generation tool using lua";
license = lib.licenses.bsd3;
-
platforms = platforms.darwin ++ platforms.linux;
broken = stdenv.isDarwin && stdenv.isAarch64;
};
}
···
{ lib, stdenv, fetchFromGitHub, libuuid, cacert, Foundation, readline }:
stdenv.mkDerivation rec {
pname = "premake5";
version = "5.0.0-beta2";
···
sha256 = "sha256-2R5gq4jaQsp8Ny1oGuIYkef0kn2UG9jMf20vq0714oY=";
};
+
buildInputs = [ libuuid ] ++ lib.optionals stdenv.isDarwin [ Foundation readline ];
patches = [ ./no-curl-ca.patch ];
patchPhase = ''
substituteInPlace contrib/curl/premake5.lua \
--replace "ca = nil" "ca = '${cacert}/etc/ssl/certs/ca-bundle.crt'"
+
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace premake5.lua \
--replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.5
'';
···
homepage = "https://premake.github.io";
description = "A simple build configuration and project generation tool using lua";
license = lib.licenses.bsd3;
+
platforms = lib.platforms.darwin ++ lib.platforms.linux;
broken = stdenv.isDarwin && stdenv.isAarch64;
};
}
+7 -9
pkgs/development/tools/qtcreator/default.nix
···
, withDocumentation ? false, withClangPlugins ? true
}:
-
with lib;
-
let
# Fetch clang from qt vendor, this contains submodules like this:
# clang<-clang-tools-extra<-clazy.
···
};
buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative elfutils.dev ] ++
-
optionals withClangPlugins [ llvmPackages_8.libclang
clang_qt_vendor
llvmPackages_8.llvm ];
···
doCheck = true;
-
buildFlags = optional withDocumentation "docs";
-
installFlags = [ "INSTALL_ROOT=$(out)" ] ++ optional withDocumentation "install_docs";
qtWrapperArgs = [ "--set-default PERFPROFILER_PARSER_FILEPATH ${lib.getBin perf}/bin" ];
···
--replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
substituteInPlace src/libs/libs.pro \
--replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
-
'' + optionalString withClangPlugins ''
# Fix paths for llvm/clang includes directories.
substituteInPlace src/shared/clang/clang_defines.pri \
--replace '$$clean_path($${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include)' '${clang_qt_vendor}/lib/clang/8.0.0/include' \
···
--replace 'LLVM_CXXFLAGS ~= s,-gsplit-dwarf,' '${lib.concatStringsSep "\n" ["LLVM_CXXFLAGS ~= s,-gsplit-dwarf," " LLVM_CXXFLAGS += -fno-rtti"]}'
'';
-
preBuild = optionalString withDocumentation ''
-
ln -s ${getLib qtbase}/$qtDocPrefix $NIX_QT5_TMP/share
'';
postInstall = ''
···
'';
homepage = "https://wiki.qt.io/Category:Tools::QtCreator";
license = "LGPL";
-
maintainers = [ maintainers.akaWolf ];
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" ];
};
}
···
, withDocumentation ? false, withClangPlugins ? true
}:
let
# Fetch clang from qt vendor, this contains submodules like this:
# clang<-clang-tools-extra<-clazy.
···
};
buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative elfutils.dev ] ++
+
lib.optionals withClangPlugins [ llvmPackages_8.libclang
clang_qt_vendor
llvmPackages_8.llvm ];
···
doCheck = true;
+
buildFlags = lib.optional withDocumentation "docs";
+
installFlags = [ "INSTALL_ROOT=$(out)" ] ++ lib.optional withDocumentation "install_docs";
qtWrapperArgs = [ "--set-default PERFPROFILER_PARSER_FILEPATH ${lib.getBin perf}/bin" ];
···
--replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
substituteInPlace src/libs/libs.pro \
--replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
+
'' + lib.optionalString withClangPlugins ''
# Fix paths for llvm/clang includes directories.
substituteInPlace src/shared/clang/clang_defines.pri \
--replace '$$clean_path($${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include)' '${clang_qt_vendor}/lib/clang/8.0.0/include' \
···
--replace 'LLVM_CXXFLAGS ~= s,-gsplit-dwarf,' '${lib.concatStringsSep "\n" ["LLVM_CXXFLAGS ~= s,-gsplit-dwarf," " LLVM_CXXFLAGS += -fno-rtti"]}'
'';
+
preBuild = lib.optionalString withDocumentation ''
+
ln -s ${lib.getLib qtbase}/$qtDocPrefix $NIX_QT5_TMP/share
'';
postInstall = ''
···
'';
homepage = "https://wiki.qt.io/Category:Tools::QtCreator";
license = "LGPL";
+
maintainers = [ lib.maintainers.akaWolf ];
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" ];
};
}
+2 -4
pkgs/development/tools/sauce-connect/default.nix
···
{ stdenv, lib, fetchurl, zlib, unzip }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "sauce-connect";
version = "4.5.4";
···
patchPhase = lib.optionalString stdenv.isLinux ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-
--set-rpath "$out/lib:${makeLibraryPath [zlib]}" \
bin/sc
'';
···
dontStrip = true;
-
meta = {
description = "A secure tunneling app for executing tests securely when testing behind firewalls";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
···
{ stdenv, lib, fetchurl, zlib, unzip }:
stdenv.mkDerivation rec {
pname = "sauce-connect";
version = "4.5.4";
···
patchPhase = lib.optionalString stdenv.isLinux ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+
--set-rpath "$out/lib:${lib.makeLibraryPath [zlib]}" \
bin/sc
'';
···
dontStrip = true;
+
meta = with lib; {
description = "A secure tunneling app for executing tests securely when testing behind firewalls";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
+1 -3
pkgs/development/tools/selenium/htmlunit-driver/default.nix
···
{ lib, stdenv, fetchurl }:
-
with lib;
-
stdenv.mkDerivation rec {
pname = "htmlunit-driver-standalone";
version = "2.27";
···
installPhase = "install -D $src $out/share/lib/${pname}-${version}/${pname}-${version}.jar";
-
meta = {
homepage = "https://github.com/SeleniumHQ/htmlunit-driver";
description = "A WebDriver server for running Selenium tests on the HtmlUnit headless browser";
maintainers = with maintainers; [ coconnor offline ];
···
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "htmlunit-driver-standalone";
version = "2.27";
···
installPhase = "install -D $src $out/share/lib/${pname}-${version}/${pname}-${version}.jar";
+
meta = with lib; {
homepage = "https://github.com/SeleniumHQ/htmlunit-driver";
description = "A WebDriver server for running Selenium tests on the HtmlUnit headless browser";
maintainers = with maintainers; [ coconnor offline ];
+1 -2
pkgs/development/tools/selenium/selendroid/default.nix
···
{ lib, stdenv, fetchurl, makeWrapper, jdk, selenium-server-standalone }:
-
with lib;
let
pname = "selendroid-standalone";
pluginName = "selendroid-grid-plugin-${version}";
···
--add-flags "-capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher"
'';
-
meta = {
homepage = "http://selendroid.io/";
description = "Test automation for native or hybrid Android apps and the mobile web";
maintainers = with maintainers; [ offline ];
···
{ lib, stdenv, fetchurl, makeWrapper, jdk, selenium-server-standalone }:
let
pname = "selendroid-standalone";
pluginName = "selendroid-grid-plugin-${version}";
···
--add-flags "-capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher"
'';
+
meta = with lib; {
homepage = "http://selendroid.io/";
description = "Test automation for native or hybrid Android apps and the mobile web";
maintainers = with maintainers; [ offline ];
+2 -4
pkgs/development/tools/selenium/server/default.nix
···
{ lib, stdenv, fetchurl, makeWrapper, jre
, htmlunit-driver, chromedriver, chromeSupport ? true }:
-
with lib;
-
let
minorVersion = "3.141";
patchVersion = "59";
···
cp $src $out/share/lib/${pname}-${version}/${pname}-${version}.jar
makeWrapper ${jre}/bin/java $out/bin/selenium-server \
--add-flags "-cp $out/share/lib/${pname}-${version}/${pname}-${version}.jar:${htmlunit-driver}/share/lib/${htmlunit-driver.name}/${htmlunit-driver.name}.jar" \
-
${optionalString chromeSupport "--add-flags -Dwebdriver.chrome.driver=${chromedriver}/bin/chromedriver"} \
--add-flags "org.openqa.grid.selenium.GridLauncherV3"
'';
-
meta = {
homepage = "http://www.seleniumhq.org/";
description = "Selenium Server for remote WebDriver";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
···
{ lib, stdenv, fetchurl, makeWrapper, jre
, htmlunit-driver, chromedriver, chromeSupport ? true }:
let
minorVersion = "3.141";
patchVersion = "59";
···
cp $src $out/share/lib/${pname}-${version}/${pname}-${version}.jar
makeWrapper ${jre}/bin/java $out/bin/selenium-server \
--add-flags "-cp $out/share/lib/${pname}-${version}/${pname}-${version}.jar:${htmlunit-driver}/share/lib/${htmlunit-driver.name}/${htmlunit-driver.name}.jar" \
+
${lib.optionalString chromeSupport "--add-flags -Dwebdriver.chrome.driver=${chromedriver}/bin/chromedriver"} \
--add-flags "org.openqa.grid.selenium.GridLauncherV3"
'';
+
meta = with lib; {
homepage = "http://www.seleniumhq.org/";
description = "Selenium Server for remote WebDriver";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
+1 -3
pkgs/development/tools/summon/default.nix
···
{ buildGoModule, fetchFromGitHub, lib, patchResolver ? true }:
-
with lib;
-
buildGoModule rec {
pname = "summon";
version = "0.8.2";
···
# Patches provider resolver to support resolving unqualified names
# from $PATH, e.g. `summon -p gopass` instead of `summon -p $(which gopass)`
-
patches = optionals patchResolver [ ./resolve-paths.patch ];
postInstall = ''
mv $out/bin/cmd $out/bin/summon
···
{ buildGoModule, fetchFromGitHub, lib, patchResolver ? true }:
buildGoModule rec {
pname = "summon";
version = "0.8.2";
···
# Patches provider resolver to support resolving unqualified names
# from $PATH, e.g. `summon -p gopass` instead of `summon -p $(which gopass)`
+
patches = lib.optionals patchResolver [ ./resolve-paths.patch ];
postInstall = ''
mv $out/bin/cmd $out/bin/summon
+18 -20
pkgs/development/web/nodejs/nodejs.nix
···
, procps, icu
}:
-
with lib;
-
{ enableNpm ? true, version, sha256, patches ? [] } @args:
let
inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices;
-
majorVersion = versions.major version;
-
minorVersion = versions.minor version;
pname = if enableNpm then "nodejs" else "nodejs-slim";
-
useSharedHttpParser = !stdenv.isDarwin && versionOlder "${majorVersion}.${minorVersion}" "11.4";
-
sharedLibDeps = { inherit openssl zlib libuv; } // (optionalAttrs useSharedHttpParser { inherit http-parser; });
-
sharedConfigureFlags = concatMap (name: [
"--shared-${name}"
-
"--shared-${name}-libpath=${getLib sharedLibDeps.${name}}/lib"
/** Closure notes: we explicitly avoid specifying --shared-*-includes,
* as that would put the paths into bin/nodejs.
* Including pkg-config in build inputs would also have the same effect!
···
copyLibHeaders =
map
-
(name: "${getDev sharedLibDeps.${name}}/include/*")
(builtins.attrNames sharedLibDeps);
-
extraConfigFlags = optionals (!enableNpm) [ "--without-npm" ];
self = stdenv.mkDerivation {
inherit pname version;
···
CXX_host = "c++";
depsBuildBuild = [ buildPackages.stdenv.cc openssl libuv zlib ];
-
buildInputs = optionals stdenv.isDarwin [ CoreServices ApplicationServices ]
++ [ zlib libuv openssl http-parser icu ];
nativeBuildInputs = [ which pkg-config python ]
-
++ optionals stdenv.isDarwin [ xcbuild ];
outputs = [ "out" "libv8" ];
setOutputFlags = false;
···
configureFlags = let
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
inherit (stdenv.hostPlatform) gcc isAarch32;
-
in sharedConfigureFlags ++ optionals (versionOlder version "19") [
"--without-dtrace"
-
] ++ (optionals isCross [
"--cross-compiling"
"--without-intl"
"--without-snapshot"
···
else if platform.isS390 && platform.is64bit then "s390x"
else if platform.isRiscV && platform.is64bit then "riscv64"
else throw "unsupported cpu ${stdenv.hostPlatform.uname.processor}"}"
-
]) ++ (optionals (isCross && isAarch32 && hasAttr "fpu" gcc) [
"--with-arm-fpu=${gcc.fpu}"
-
]) ++ (optionals (isCross && isAarch32 && hasAttr "float-abi" gcc) [
"--with-arm-float-abi=${gcc.float-abi}"
]) ++ extraConfigFlags;
···
substituteInPlace $a \
--replace "/usr/bin/env" "${coreutils}/bin/env"
done
-
'' + optionalString stdenv.isDarwin ''
sed -i -e "s|tr1/type_traits|type_traits|g" \
-e "s|std::tr1|std|" src/util.h
'';
···
postInstall = ''
PATH=$out/bin:$PATH patchShebangs $out
-
${optionalString (enableNpm && stdenv.hostPlatform == stdenv.buildPlatform) ''
mkdir -p $out/share/bash-completion/completions/
HOME=$TMPDIR $out/bin/npm completion > $out/share/bash-completion/completions/npm
for dir in "$out/lib/node_modules/npm/man/"*; do
···
''}
# install the missing headers for node-gyp
-
cp -r ${concatStringsSep " " copyLibHeaders} $out/include/node
# assemble a static v8 library and put it in the 'libv8' output
mkdir -p $libv8/lib
···
inherit majorVersion;
};
-
meta = {
description = "Event-driven I/O framework for the V8 JavaScript engine";
homepage = "https://nodejs.org";
changelog = "https://github.com/nodejs/node/releases/tag/v${version}";
···
, procps, icu
}:
{ enableNpm ? true, version, sha256, patches ? [] } @args:
let
inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices;
+
majorVersion = lib.versions.major version;
+
minorVersion = lib.versions.minor version;
pname = if enableNpm then "nodejs" else "nodejs-slim";
+
useSharedHttpParser = !stdenv.isDarwin && lib.versionOlder "${majorVersion}.${minorVersion}" "11.4";
+
sharedLibDeps = { inherit openssl zlib libuv; } // (lib.optionalAttrs useSharedHttpParser { inherit http-parser; });
+
sharedConfigureFlags = lib.concatMap (name: [
"--shared-${name}"
+
"--shared-${name}-libpath=${lib.getLib sharedLibDeps.${name}}/lib"
/** Closure notes: we explicitly avoid specifying --shared-*-includes,
* as that would put the paths into bin/nodejs.
* Including pkg-config in build inputs would also have the same effect!
···
copyLibHeaders =
map
+
(name: "${lib.getDev sharedLibDeps.${name}}/include/*")
(builtins.attrNames sharedLibDeps);
+
extraConfigFlags = lib.optionals (!enableNpm) [ "--without-npm" ];
self = stdenv.mkDerivation {
inherit pname version;
···
CXX_host = "c++";
depsBuildBuild = [ buildPackages.stdenv.cc openssl libuv zlib ];
+
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ]
++ [ zlib libuv openssl http-parser icu ];
nativeBuildInputs = [ which pkg-config python ]
+
++ lib.optionals stdenv.isDarwin [ xcbuild ];
outputs = [ "out" "libv8" ];
setOutputFlags = false;
···
configureFlags = let
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
inherit (stdenv.hostPlatform) gcc isAarch32;
+
in sharedConfigureFlags ++ lib.optionals (lib.versionOlder version "19") [
"--without-dtrace"
+
] ++ (lib.optionals isCross [
"--cross-compiling"
"--without-intl"
"--without-snapshot"
···
else if platform.isS390 && platform.is64bit then "s390x"
else if platform.isRiscV && platform.is64bit then "riscv64"
else throw "unsupported cpu ${stdenv.hostPlatform.uname.processor}"}"
+
]) ++ (lib.optionals (isCross && isAarch32 && lib.hasAttr "fpu" gcc) [
"--with-arm-fpu=${gcc.fpu}"
+
]) ++ (lib.optionals (isCross && isAarch32 && lib.hasAttr "float-abi" gcc) [
"--with-arm-float-abi=${gcc.float-abi}"
]) ++ extraConfigFlags;
···
substituteInPlace $a \
--replace "/usr/bin/env" "${coreutils}/bin/env"
done
+
'' + lib.optionalString stdenv.isDarwin ''
sed -i -e "s|tr1/type_traits|type_traits|g" \
-e "s|std::tr1|std|" src/util.h
'';
···
postInstall = ''
PATH=$out/bin:$PATH patchShebangs $out
+
${lib.optionalString (enableNpm && stdenv.hostPlatform == stdenv.buildPlatform) ''
mkdir -p $out/share/bash-completion/completions/
HOME=$TMPDIR $out/bin/npm completion > $out/share/bash-completion/completions/npm
for dir in "$out/lib/node_modules/npm/man/"*; do
···
''}
# install the missing headers for node-gyp
+
cp -r ${lib.concatStringsSep " " copyLibHeaders} $out/include/node
# assemble a static v8 library and put it in the 'libv8' output
mkdir -p $libv8/lib
···
inherit majorVersion;
};
+
meta = with lib; {
description = "Event-driven I/O framework for the V8 JavaScript engine";
homepage = "https://nodejs.org";
changelog = "https://github.com/nodejs/node/releases/tag/v${version}";