pkgs/development: stdenv.lib -> lib
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
, buildFlags ? []
|
||||
, ... }@attrs:
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
|
||||
let
|
||||
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "+debug_info";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{ stdenv, buildRebar3, fetchHex }:
|
||||
{ lib, stdenv, buildRebar3, fetchHex }:
|
||||
|
||||
{ name, version, sha256
|
||||
, builder ? buildRebar3
|
||||
, hexPkg ? name
|
||||
, ... }@attrs:
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
|
||||
let
|
||||
pkg = self: builder (attrs // {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
, enableDebugInfo ? false
|
||||
, ... }@attrs:
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
, enableDebugInfo ? false
|
||||
, ... }@attrs:
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
|
||||
let
|
||||
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "debug-info";
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{ stdenv, pkgs, erlang }:
|
||||
{ lib, stdenv, pkgs, erlang }:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) makeExtensible;
|
||||
inherit (lib) makeExtensible;
|
||||
|
||||
lib = pkgs.callPackage ./lib.nix {};
|
||||
lib' = pkgs.callPackage ./lib.nix {};
|
||||
|
||||
# FIXME: add support for overrideScope
|
||||
callPackageWithScope = scope: drv: args: stdenv.lib.callPackageWith scope drv args;
|
||||
callPackageWithScope = scope: drv: args: lib'.callPackageWith scope drv args;
|
||||
mkScope = scope: pkgs // scope;
|
||||
|
||||
packages = self:
|
||||
@@ -38,27 +38,27 @@ let
|
||||
# BEAM-based languages.
|
||||
elixir = elixir_1_11;
|
||||
|
||||
elixir_1_11 = lib.callElixir ../interpreters/elixir/1.11.nix {
|
||||
elixir_1_11 = lib'.callElixir ../interpreters/elixir/1.11.nix {
|
||||
inherit erlang;
|
||||
debugInfo = true;
|
||||
};
|
||||
|
||||
elixir_1_10 = lib.callElixir ../interpreters/elixir/1.10.nix {
|
||||
elixir_1_10 = lib'.callElixir ../interpreters/elixir/1.10.nix {
|
||||
inherit erlang;
|
||||
debugInfo = true;
|
||||
};
|
||||
|
||||
elixir_1_9 = lib.callElixir ../interpreters/elixir/1.9.nix {
|
||||
elixir_1_9 = lib'.callElixir ../interpreters/elixir/1.9.nix {
|
||||
inherit erlang;
|
||||
debugInfo = true;
|
||||
};
|
||||
|
||||
elixir_1_8 = lib.callElixir ../interpreters/elixir/1.8.nix {
|
||||
elixir_1_8 = lib'.callElixir ../interpreters/elixir/1.8.nix {
|
||||
inherit erlang;
|
||||
debugInfo = true;
|
||||
};
|
||||
|
||||
elixir_1_7 = lib.callElixir ../interpreters/elixir/1.7.nix {
|
||||
elixir_1_7 = lib'.callElixir ../interpreters/elixir/1.7.nix {
|
||||
inherit erlang;
|
||||
debugInfo = true;
|
||||
};
|
||||
@@ -67,8 +67,8 @@ let
|
||||
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html
|
||||
|
||||
lfe = lfe_1_3;
|
||||
lfe_1_2 = lib.callLFE ../interpreters/lfe/1.2.nix { inherit erlang buildRebar3 buildHex; };
|
||||
lfe_1_3 = lib.callLFE ../interpreters/lfe/1.3.nix { inherit erlang buildRebar3 buildHex; };
|
||||
lfe_1_2 = lib'.callLFE ../interpreters/lfe/1.2.nix { inherit erlang buildRebar3 buildHex; };
|
||||
lfe_1_3 = lib'.callLFE ../interpreters/lfe/1.3.nix { inherit erlang buildRebar3 buildHex; };
|
||||
|
||||
# Non hex packages. Examples how to build Rebar/Mix packages with and
|
||||
# without helper functions buildRebar3 and buildMix.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
{ pkg, version, sha256
|
||||
, meta ? {}
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "hex-source-${pkg}-${version}";
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{ stdenv, rebar3 }:
|
||||
{ lib, stdenv, rebar3 }:
|
||||
|
||||
{ name, version, sha256, src
|
||||
, meta ? {}
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "rebar-deps-${name}-${version}";
|
||||
@@ -28,6 +28,6 @@ stdenv.mkDerivation ({
|
||||
outputHashMode = "recursive";
|
||||
outputHash = sha256;
|
||||
|
||||
impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars;
|
||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
||||
inherit meta;
|
||||
})
|
||||
|
||||
@@ -45,13 +45,13 @@ let
|
||||
|
||||
meta = {
|
||||
description = "Package manager for the Erlang VM https://hex.pm";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
license = lib.licenses.mit;
|
||||
homepage = "https://github.com/hexpm/hex";
|
||||
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
|
||||
maintainers = with lib.maintainers; [ ericbmerritt ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
env = shell self;
|
||||
};
|
||||
};
|
||||
in stdenv.lib.fix pkg
|
||||
in lib.fix pkg
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, stdenv }:
|
||||
{ pkgs, lib, stdenv }:
|
||||
|
||||
rec {
|
||||
|
||||
@@ -7,7 +7,7 @@ rec {
|
||||
callPackageWith = autoArgs: fn: args:
|
||||
let
|
||||
f = if pkgs.lib.isFunction fn then fn else import fn;
|
||||
auto = builtins.intersectAttrs (stdenv.lib.functionArgs f) autoArgs;
|
||||
auto = builtins.intersectAttrs (lib.functionArgs f) autoArgs;
|
||||
in f (auto // args);
|
||||
|
||||
callPackage = callPackageWith pkgs;
|
||||
|
||||
@@ -7,7 +7,7 @@ buildHex {
|
||||
|
||||
meta = {
|
||||
description = "a rebar3 port compiler for native code";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
license = lib.licenses.mit;
|
||||
homepage = "https://github.com/blt/port_compiler";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ let
|
||||
|
||||
meta = {
|
||||
description = "Erlang PostgreSQL Driver";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
license = lib.licenses.mit;
|
||||
homepage = "https://github.com/semiocast/pgsql";
|
||||
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
|
||||
maintainers = with lib.maintainers; [ ericbmerritt ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
@@ -31,4 +31,4 @@ let
|
||||
};
|
||||
|
||||
};
|
||||
in stdenv.lib.fix pkg
|
||||
in lib.fix pkg
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
, enableDebugInfo ? false
|
||||
, ... }@attrs:
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
|
||||
let
|
||||
shell = drv: stdenv.mkDerivation {
|
||||
|
||||
@@ -27,9 +27,9 @@ let
|
||||
|
||||
meta = {
|
||||
description = "WebDriver implementation in Erlang";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
license = lib.licenses.mit;
|
||||
homepage = "https://github.com/Quviq/webdrv";
|
||||
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
|
||||
maintainers = with lib.maintainers; [ ericbmerritt ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
@@ -37,4 +37,4 @@ let
|
||||
};
|
||||
|
||||
};
|
||||
in stdenv.lib.fix pkg
|
||||
in lib.fix pkg
|
||||
|
||||
Reference in New Issue
Block a user