From c806641fbeb05c46cc7768ff05581ce8ef4d87fd Mon Sep 17 00:00:00 2001 From: Gleb Peregud Date: Sun, 10 Sep 2017 23:35:06 +0200 Subject: [PATCH] pc: 1.2.0 -> 1.6.0 Also import rebar3 port compiler independently of hex-packages.nix. --- pkgs/development/beam-modules/default.nix | 19 ++++++++++++++----- pkgs/development/beam-modules/pc/default.nix | 13 +++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/beam-modules/pc/default.nix diff --git a/pkgs/development/beam-modules/default.nix b/pkgs/development/beam-modules/default.nix index 3a165fd2f6a4..5ff46014cb99 100644 --- a/pkgs/development/beam-modules/default.nix +++ b/pkgs/development/beam-modules/default.nix @@ -20,6 +20,8 @@ let inherit callPackage erlang; beamPackages = self; + hexRegistrySnapshot = callPackage ./hex-registry-snapshot.nix { }; + rebar = callPackage ../tools/build-managers/rebar { }; rebar3-open = callPackage ../tools/build-managers/rebar3 { hermeticRebar3 = false; @@ -28,7 +30,10 @@ let hermeticRebar3 = true; }; - hexRegistrySnapshot = callPackage ./hex-registry-snapshot.nix { }; + # rebar3 port compiler plugin is required by buildRebar3 + pc_1_6_0 = callPackage ./pc {}; + pc = pc_1_6_0; + fetchHex = callPackage ./fetch-hex.nix { }; buildRebar3 = callPackage ./build-rebar3.nix {}; @@ -57,12 +62,16 @@ let lfe = lfe_1_2; lfe_1_2 = lib.callLFE ../interpreters/lfe/1.2.nix { inherit erlang buildRebar3 buildHex; }; - # Non hex packages + # Non hex packages. Examples how to build Rebar/Mix packages with and + # without helper functions buildRebar3 and buildMix. hex = callPackage ./hex {}; webdriver = callPackage ./webdriver {}; - - hex2nix = callPackage ../tools/erlang/hex2nix {}; - cuter = callPackage ../tools/erlang/cuter {}; relxExe = callPackage ../tools/erlang/relx-exe {}; + + # The tool used to upgrade hex-packages.nix. + hex2nix = callPackage ../tools/erlang/hex2nix {}; + + # An example of Erlang/C++ package. + cuter = callPackage ../tools/erlang/cuter {}; }; in makeExtensible packages diff --git a/pkgs/development/beam-modules/pc/default.nix b/pkgs/development/beam-modules/pc/default.nix new file mode 100644 index 000000000000..d30b0fbdbd28 --- /dev/null +++ b/pkgs/development/beam-modules/pc/default.nix @@ -0,0 +1,13 @@ +{ stdenv, buildHex }: + +buildHex { + name = "pc"; + version = "1.6.0"; + sha256 = "0xq411ig5ny3iilkkkqa4vm3w3dgjc9cfzkqwk8pm13dw9mcm8h0"; + + meta = { + description = ''a rebar3 port compiler for native code''; + license = stdenv.lib.licenses.mit; + homepage = "https://github.com/blt/port_compiler"; + }; +}