···11-{buildPerlPackage, stdenv, fetchurl, DBDmysql}:
11+{buildPerlPackage, lib, stdenv, fetchurl, DBDmysql}:
2233buildPerlPackage {
44 pname = "maatkit";
···2727 done
2828 '' ;
29293030- meta = {
3030+ meta = with lib; {
3131 description = "Database toolkit";
3232 longDescription = ''
3333 You can use Maatkit to prove replication is working correctly, fix
···3737 In addition to MySQL, there is support for PostgreSQL, Memcached, and a
3838 growing variety of other databases and technologies.
3939 '';
4040- license = stdenv.lib.licenses.gpl2Plus;
4040+ license = licenses.gpl2Plus;
4141 homepage = "http://www.maatkit.org/";
4242 };
4343}
···11+{ stdenv, lib, openbabel, python, buildPythonPackage }:
22+33+buildPythonPackage rec {
44+ pname = "openbabel";
55+ version = "3.1.1";
66+77+ src = "${openbabel}/lib/python${python.sourceVersion.major}.${python.sourceVersion.minor}/site-packages";
88+99+ nativeBuildInputs = [ openbabel ];
1010+1111+ # these env variables are used by the bindings to find libraries
1212+ # they need to be included explicitly in your nix-shell for
1313+ # some functionality to work (inparticular, pybel).
1414+ # see https://openbabel.org/docs/dev/Installation/install.html
1515+ BABEL_LIBDIR = "${openbabel}/lib/openbabel/3.1.0";
1616+ LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${openbabel}/lib";
1717+1818+ doCheck = false;
1919+ pythonImportsCheck = [ "openbabel" ];
2020+2121+ meta = with lib; {
2222+ homepage = "http://openbabel.org/wiki/Main_Page";
2323+ description = "Python bindings for openbabel";
2424+ license = licenses.gpl2Plus;
2525+ maintainers = with maintainers; [ danielbarter ];
2626+ };
2727+}
···2233# Someday it'll make sense to split these out into their own packages, but today is not that day.
44appleDerivation {
55- srcs = stdenv.lib.attrValues IOKitSrcs;
55+ srcs = lib.attrValues IOKitSrcs;
66 sourceRoot = ".";
7788 phases = [ "unpackPhase" "installPhase" ];
···11-{ stdenv, fetchurl, fetchzip, pkgs }:
11+{ lib, stdenv, fetchurl, fetchzip, pkgs }:
2233let
44 # This attrset can in theory be computed automatically, but for that to work nicely we need
···152152 name = "${name}-${version}";
153153 enableParallelBuilding = true;
154154 meta = {
155155- platforms = stdenv.lib.platforms.darwin;
155155+ platforms = lib.platforms.darwin;
156156 };
157157 } // (if attrs ? srcs then {} else {
158158 src = fetchApple version sha256 name;
···160160161161 applePackage = namePath: version: sha256:
162162 let
163163- name = builtins.elemAt (stdenv.lib.splitString "/" namePath) 0;
163163+ name = builtins.elemAt (lib.splitString "/" namePath) 0;
164164 appleDerivation = appleDerivation_ name version sha256;
165165 callPackage = pkgs.newScope (packages // pkgs.darwin // { inherit appleDerivation name version; });
166166 in callPackage (./. + "/${namePath}");
···187187 # There should be an IOVideo here, but they haven't released it :(
188188 };
189189190190- IOKitSrcs = stdenv.lib.mapAttrs (name: value: if stdenv.lib.isFunction value then value name else value) IOKitSpecs;
190190+ IOKitSrcs = lib.mapAttrs (name: value: if lib.isFunction value then value name else value) IOKitSpecs;
191191192192 # Only used for bootstrapping. It’s convenient because it was the last version to come with a real makefile.
193193 adv_cmds-boot = applePackage "adv_cmds/boot.nix" "osx-10.5.8" "102ssayxbg9wb35mdmhswbnw0bg7js3pfd8fcbic83c5q3bqa6c6" {};
···11-{ stdenv, binutils-unwrapped, cctools, llvm }:
11+{ lib, stdenv, binutils-unwrapped, cctools, llvm }:
2233# Make sure both underlying packages claim to have prepended their binaries
44# with the same targetPrefix.
···3232 # - strip: the binutils one seems to break mach-o files
3333 # - lipo: gcc build assumes it exists
3434 # - nm: the gnu one doesn't understand many new load commands
3535- for i in ${stdenv.lib.concatStringsSep " " (builtins.map (e: targetPrefix + e) cmds)}; do
3535+ for i in ${lib.concatStringsSep " " (builtins.map (e: targetPrefix + e) cmds)}; do
3636 ln -sf "${cctools}/bin/$i" "$out/bin/$i"
3737 done
3838···5656 };
57575858 meta = {
5959- maintainers = with stdenv.lib.maintainers; [ matthewbauer ];
5959+ maintainers = with lib.maintainers; [ matthewbauer ];
6060 priority = 10;
6161 };
6262}
···11-{ stdenv, fetchFromGitHub, fetchurl, ninja, python3, curl, libxml2, objc4, ICU }:
11+{ lib, stdenv, fetchFromGitHub, fetchurl, ninja, python3, curl, libxml2, objc4, ICU }:
2233let
44 # 10.12 adds a new sysdir.h that our version of CF in the main derivation depends on, but
···7474 # Based on testing this issue seems to only occur with clang_7, so
7575 # please remove this when updating the default llvm versions to 8 or
7676 # later.
7777- buildPhase = stdenv.lib.optionalString true ''
7777+ buildPhase = lib.optionalString true ''
7878 for i in {1..512}; do
7979 if ninja -j $NIX_BUILD_CORES; then
8080 break
+3-3
pkgs/os-specific/darwin/trash/default.nix
···11-{ stdenv, fetchFromGitHub, perl, AppKit, Cocoa, ScriptingBridge }:
11+{ lib, stdenv, fetchFromGitHub, perl, AppKit, Cocoa, ScriptingBridge }:
2233stdenv.mkDerivation rec {
44 version = "0.9.2";
···2828 homepage = "https://github.com/ali-rantakari/trash";
2929 description = "Small command-line program for OS X that moves files or
3030 folders to the trash.";
3131- platforms = stdenv.lib.platforms.darwin;
3232- license = stdenv.lib.licenses.mit;
3131+ platforms = lib.platforms.darwin;
3232+ license = lib.licenses.mit;
3333 };
3434}
+2-2
pkgs/os-specific/darwin/usr-include/default.nix
···11-{stdenv, darwin}:
11+{lib, stdenv, darwin}:
2233/*
44 * This is needed to build GCC on Darwin.
···1919 ln -sf ${darwin.CF}/Library/Frameworks/CoreFoundation.framework/Headers/* CoreFoundation
2020 '';
21212222- meta.platforms = stdenv.lib.platforms.darwin;
2222+ meta.platforms = lib.platforms.darwin;
2323}
···991010assert (!libsOnly) -> kernel != null;
11111212-with stdenv.lib;
1212+with lib;
13131414# This derivation requires a maximum of gcc49, Linux kernel 4.1 and xorg.xserver 1.17
1515# and will not build or run using versions newer
···23232424 nativeBuildInputs = [ cmake pkgconfig flex bison ]
2525 # libelf is incompatible with elfutils-libelf
2626- ++ stdenv.lib.filter (x: x != libelf) kernel.moduleBuildDependencies;
2626+ ++ lib.filter (x: x != libelf) kernel.moduleBuildDependencies;
27272828 # patch the source, *then* substitute on @NIX_KERNEL_SRC@ in the result. we could
2929 # also in theory make this an environment variable around bpftrace, but this works
···11-{ stdenv, fetchgit, libX11 }:
11+{ lib, stdenv, fetchgit, libX11 }:
2233stdenv.mkDerivation {
44 name = "disk-indicator-2014-05-19";
···3434 Small program for Linux that will turn your Scroll, Caps or Num Lock LED
3535 or LED on your ThinkPad laptop into a hard disk activity indicator.
3636 '';
3737- license = stdenv.lib.licenses.gpl3;
3838- platforms = stdenv.lib.platforms.linux;
3737+ license = lib.licenses.gpl3;
3838+ platforms = lib.platforms.linux;
3939 };
4040}
···11{ stdenv, lib, fetchFromGitHub, kernel }:
2233# facetimehd is not supported for kernels older than 3.19";
44-assert stdenv.lib.versionAtLeast kernel.version "3.19";
44+assert lib.versionAtLeast kernel.version "3.19";
5566let
77 # Note: When updating this revision:
···1414 # e. see if the module loads back (apps using the camera won't
1515 # recover and will have to be restarted) and the camera
1616 # still works.
1717- srcParams = if (stdenv.lib.versionAtLeast kernel.version "4.8") then
1717+ srcParams = if (lib.versionAtLeast kernel.version "4.8") then
1818 { # Use mainline branch
1919 version = "unstable-2020-04-16";
2020 rev = "82626d4892eeb9eb704538bf0dc49a00725ff451";
···11-{ stdenv, fetchurl }:
11+{ lib, stdenv, fetchurl }:
2233let version = "20141203"; in
44stdenv.mkDerivation {
···11111212 postInstall = builtins.readFile ./postInstall.sh;
13131414- meta = with stdenv.lib;
1414+ meta = with lib;
1515 { description = "Hard Drive Active Protection System Daemon";
1616 homepage = "http://hdaps.sf.net/";
1717 license = licenses.gpl2;
+5-5
pkgs/os-specific/linux/hibernate/default.nix
···11-{ stdenv, fetchurl, gawk }:
11+{ lib, stdenv, fetchurl, gawk }:
2233let version = "2.0";
44in
···3535 description = "The `hibernate' script for swsusp and Tux-on-Ice";
3636 longDescription = ''
3737 This package provides the `hibernate' script, a command-line utility
3838- that saves the computer's state to disk and switches it off, turning
3939- it into "hibernation". It works both with Linux swsusp and Tux-on-Ice.
3838+ that saves the computer's state to disk and switches it off, turning
3939+ it into "hibernation". It works both with Linux swsusp and Tux-on-Ice.
4040 '';
41414242- license = stdenv.lib.licenses.gpl2Plus;
4242+ license = lib.licenses.gpl2Plus;
4343 homepage = "http://www.tuxonice.net/";
4444- platforms = stdenv.lib.platforms.linux;
4444+ platforms = lib.platforms.linux;
4545 };
4646 }
···11-{ stdenv, fetchurl, linuxHeaders }:
11+{ lib, stdenv, fetchurl, linuxHeaders }:
2233stdenv.mkDerivation {
44 name = "jujuutils-0.2";
···1313 meta = {
1414 homepage = "https://github.com/cladisch/linux-firewire-utils";
1515 description = "Utilities around FireWire devices connected to a Linux computer";
1616- license = stdenv.lib.licenses.gpl2;
1717- platforms = stdenv.lib.platforms.linux;
1616+ license = lib.licenses.gpl2;
1717+ platforms = lib.platforms.linux;
1818 };
1919}
+1-1
pkgs/os-specific/linux/kbd/default.nix
···45454646 # We get a warning in armv5tel-linux and the fuloong2f, so we
4747 # disable -Werror in it.
4848- ${stdenv.lib.optionalString (stdenv.isAarch32 || stdenv.hostPlatform.isMips) ''
4848+ ${lib.optionalString (stdenv.isAarch32 || stdenv.hostPlatform.isMips) ''
4949 sed -i s/-Werror// src/Makefile.am
5050 ''}
5151 '';
+4-4
pkgs/os-specific/linux/kernel/common-config.nix
···1010# hardware problems with a new one.
11111212# Configuration
1313-{ stdenv, version
1313+{ lib, stdenv, version
14141515, features ? { grsecurity = false; xen_dom0 = false; }
1616}:
17171818-with stdenv.lib;
1919-with stdenv.lib.kernel;
2020-with (stdenv.lib.kernel.whenHelpers version);
1818+with lib;
1919+with lib.kernel;
2020+with (lib.kernel.whenHelpers version);
21212222let
2323
+4-6
pkgs/os-specific/linux/kernel/generic.nix
···66, gmp ? null
77, libmpc ? null
88, mpfr ? null
99+, lib
910, stdenv
10111112, # The kernel source tarball.
···6667assert stdenv.isLinux;
67686869let
6969-7070- lib = stdenv.lib;
7171-7270 # Combine the `features' attribute sets of all the kernel patches.
7371 kernelFeatures = lib.fold (x: y: (x.features or {}) // y) ({
7472 iwlwifi = true;
···8179 } // features) kernelPatches;
82808381 commonStructuredConfig = import ./common-config.nix {
8484- inherit stdenv version ;
8282+ inherit lib stdenv version;
85838684 features = kernelFeatures; # Ensure we know of all extra patches, etc.
8785 };
···113111114112 depsBuildBuild = [ buildPackages.stdenv.cc ];
115113 nativeBuildInputs = [ perl gmp libmpc mpfr ]
116116- ++ lib.optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ];
114114+ ++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ];
117115118116 platformName = stdenv.hostPlatform.platform.name;
119117 # e.g. "defconfig"
···173171 }; # end of configfile derivation
174172175173 kernel = (callPackage ./manual-config.nix {}) {
176176- inherit version modDirVersion src kernelPatches randstructSeed stdenv extraMeta configfile;
174174+ inherit version modDirVersion src kernelPatches randstructSeed lib stdenv extraMeta configfile;
177175178176 config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };
179177 };
+4-4
pkgs/os-specific/linux/kernel/hardened/config.nix
···88#
99# See also <nixos/modules/profiles/hardened.nix>
10101111-{ stdenv, version }:
1111+{ lib, stdenv, version }:
12121313-with stdenv.lib;
1414-with stdenv.lib.kernel;
1515-with (stdenv.lib.kernel.whenHelpers version);
1313+with lib;
1414+with lib.kernel;
1515+with (lib.kernel.whenHelpers version);
16161717assert (versionAtLeast version "4.9");
1818
···2929 "KLIBCKERNELSRC=${linuxHeaders}"
3030 ] # TODO(@Ericson2314): We now can get the ABI from
3131 # `stdenv.hostPlatform.parsed.abi`, is this still a good idea?
3232- ++ stdenv.lib.optional (stdenv.hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y"
3333- ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
3232+ ++ lib.optional (stdenv.hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y"
3333+ ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
34343535 # Install static binaries as well.
3636 postInstall = ''
···66# Of course, use of the driver in /usr/lib is highly impure. But it
77# might actually work ;-)
8899-{stdenv, xorg, expat, libdrm}:
99+{lib, stdenv, xorg, expat, libdrm}:
10101111stdenv.mkDerivation {
1212 name = "xorg-sys-opengl-3";
···1515 [xorg.libXxf86vm xorg.libXext expat libdrm stdenv.cc.cc];
16161717 meta = {
1818- platforms = stdenv.lib.platforms.linux;
1818+ platforms = lib.platforms.linux;
1919 };
2020}
···11-{stdenv, fetchurl, pciutils, python}:
11+{lib, stdenv, fetchurl, pciutils, python}:
2233stdenv.mkDerivation rec {
44 version = "1.30";
···3030 x86info will identify all Intel/AMD/Centaur/Cyrix/VIA CPUs. It leverages
3131 the cpuid kernel module where possible. it supports parsing model specific
3232 registers (MSRs) via the msr kernel module. it will approximate processor
3333- frequency, and identify the cache sizes and layout.
3333+ frequency, and identify the cache sizes and layout.
3434 '';
3535 platforms = [ "i686-linux" "x86_64-linux" ];
3636- license = stdenv.lib.licenses.gpl2;
3636+ license = lib.licenses.gpl2;
3737 homepage = "http://codemonkey.org.uk/projects/x86info/";
3838- maintainers = with stdenv.lib.maintainers; [jcumming];
3838+ maintainers = with lib.maintainers; [jcumming];
3939 };
4040}
+3-3
pkgs/os-specific/linux/zfs/default.nix
···11-{ stdenv, fetchFromGitHub, fetchpatch
11+{ lib, stdenv, fetchFromGitHub, fetchpatch
22, autoreconfHook269, util-linux, nukeReferences, coreutils
33, perl, buildPackages
44, configFile ? "all"
···1616, enablePython ? true
1717}:
18181919-with stdenv.lib;
1919+with lib;
2020let
2121 buildKernel = any (n: n == configFile) [ "kernel" "all" ];
2222 buildUser = any (n: n == configFile) [ "user" "all" ];
···3232 versionAtLeast kernel.version incompatibleKernelVersion then
3333 throw ''
3434 Linux v${kernel.version} is not yet supported by zfsonlinux v${version}.
3535- ${stdenv.lib.optionalString (!isUnstable) "Try zfsUnstable or set the NixOS option boot.zfs.enableUnstable."}
3535+ ${lib.optionalString (!isUnstable) "Try zfsUnstable or set the NixOS option boot.zfs.enableUnstable."}
3636 ''
3737 else stdenv.mkDerivation {
3838 name = "zfs-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}";
···11-{ lib, stdenv, fetchurl, jre, makeWrapper, which }:
22-33-stdenv.mkDerivation rec {
44- name = "elasticmq-0.5";
55-66- src = fetchurl {
77- url = "https://github.com/downloads/adamw/elasticmq/${name}.tar.gz";
88- sha256 = "1zpv3vzairprh4x9fia82qqr14kf5hpxq1r90mn4ww7ighbv9pf1";
99- };
1010-1111- buildInputs = [ makeWrapper ];
1212-1313- installPhase =
1414- ''
1515- mkdir -p $out/bin
1616- cp -prd lib conf $out/
1717-1818- cp bin/run.sh $out/bin/elasticmq
1919- substituteInPlace $out/bin/elasticmq --replace '-DBASEDIR=$BASEDIR' '-DBASEDIR=''${ELASTICMQ_DATA_PREFIX:-.}'
2020-2121- wrapProgram $out/bin/elasticmq --prefix PATH : "${lib.makeBinPath [ which jre ]}"
2222- '';
2323-2424- meta = {
2525- homepage = "https://github.com/adamw/elasticmq";
2626- description = "Message queueing system with Java, Scala and Amazon SQS-compatible interfaces";
2727- longDescription =
2828- ''
2929- ElasticMQ is a message queueing system with Java, Scala and
3030- Amazon SQS-compatible interfaces. You should set the
3131- environment ELASTICMQ_DATA_PREFIX to a writable directory
3232- where ElasticMQ will store its data and log files. It also
3333- looks for its configuration file in
3434- $ELASTICMQ_DATA_PREFIX/conf/Default.scala. You can use the
3535- Default.scala included in the distribution as a template.
3636- '';
3737- license = lib.licenses.asl20;
3838- platforms = lib.platforms.unix;
3939- };
4040-}