From 2251a942fce820b77ee03bdfd659e03c5711f578 Mon Sep 17 00:00:00 2001 From: Gleb Peregud Date: Thu, 10 Dec 2015 21:39:13 +0100 Subject: [PATCH] Add support for Hex package name There are some packages on Hex which have custom hex-specific names, but inside there's a base project name. Remove most packages andadd ibrowse, meck, jiffy --- pkgs/development/erlang-modules/build-hex.nix | 7 +++-- pkgs/development/erlang-modules/default.nix | 28 ++----------------- .../erlang-modules/hex/ibrowse.nix | 14 ++++------ pkgs/development/erlang-modules/hex/jiffy.nix | 14 ++++------ pkgs/development/erlang-modules/hex/meck.nix | 13 ++++----- 5 files changed, 24 insertions(+), 52 deletions(-) diff --git a/pkgs/development/erlang-modules/build-hex.nix b/pkgs/development/erlang-modules/build-hex.nix index f7fc4d8836d1..d9191baeb81c 100644 --- a/pkgs/development/erlang-modules/build-hex.nix +++ b/pkgs/development/erlang-modules/build-hex.nix @@ -1,6 +1,7 @@ { stdenv, erlang, rebar3, openssl, libyaml, fetchurl }: { name, version, sha256 +, hexPkg ? name , buildInputs ? [], erlangDeps ? [] , postPatch ? "" , ... }@attrs: @@ -44,8 +45,8 @@ stdenv.mkDerivation (attrs // { buildPhase = '' runHook preBuild - DEBUG=1 HOME=. rebar3 update - DEBUG=1 HOME=. rebar3 compile + HOME=. rebar3 update + HOME=. rebar3 compile runHook postBuild ''; @@ -62,7 +63,7 @@ stdenv.mkDerivation (attrs // { ''; src = fetchurl { - url = "https://s3.amazonaws.com/s3.hex.pm/tarballs/${name}-${version}.tar"; + url = "https://s3.amazonaws.com/s3.hex.pm/tarballs/${hexPkg}-${version}.tar"; sha256 = sha256; }; diff --git a/pkgs/development/erlang-modules/default.nix b/pkgs/development/erlang-modules/default.nix index 0dfe2472c38c..87447220bb74 100644 --- a/pkgs/development/erlang-modules/default.nix +++ b/pkgs/development/erlang-modules/default.nix @@ -7,32 +7,10 @@ let buildErlang = callPackage ./build-erlang.nix {}; buildHex = callPackage ./build-hex.nix {}; - # dependencies for ejabberd - p1_utils = callPackage ./hex/p1_utils.nix {}; - cache_tab = callPackage ./hex/cache_tab.nix {}; - stringprep = callPackage ./hex/stringprep.nix {}; - p1_xml = callPackage ./hex/p1_xml.nix {}; - p1_tls = callPackage ./hex/p1_tls.nix {}; - p1_stun = callPackage ./hex/p1_stun.nix {}; - esip = callPackage ./hex/esip.nix {}; - p1_yaml = callPackage ./hex/p1_yaml.nix {}; - xmlrpc = callPackage ./hex/xmlrpc.nix {}; - jiffy = callPackage ./hex/jiffy.nix {}; - sync = callPackage ./hex/sync.nix {}; - erlang-katana = callPackage ./hex/erlang-katana.nix {}; - eper = callPackage ./hex/eper.nix {}; - goldrush = callPackage ./hex/goldrush.nix {}; - lager = callPackage ./hex/lager.nix {}; - getopt = callPackage ./hex/getopt.nix {}; - meck = callPackage ./hex/meck.nix {}; ibrowse = callPackage ./hex/ibrowse.nix {}; - aleppo = callPackage ./hex/aleppo.nix {}; - zipper = callPackage ./hex/zipper.nix {}; - erlang-github = callPackage ./hex/erlang-github.nix {}; - - elvis = callPackage ./hex/elvis.nix {}; - apns = callPackage ./hex/apns.nix {}; - appmon = callPackage ./hex/appmon.nix {}; + jiffy = callPackage ./hex/jiffy.nix {}; + lager = callPackage ./hex/lager.nix {}; + meck = callPackage ./hex/meck.nix {}; }; in self diff --git a/pkgs/development/erlang-modules/hex/ibrowse.nix b/pkgs/development/erlang-modules/hex/ibrowse.nix index d742a8904ceb..6ed189eb39d2 100644 --- a/pkgs/development/erlang-modules/hex/ibrowse.nix +++ b/pkgs/development/erlang-modules/hex/ibrowse.nix @@ -1,10 +1,8 @@ -{ buildErlang, fetchgit }: +{ buildHex }: -buildErlang { +buildHex { name = "ibrowse"; - version = "0.1"; - src = fetchgit { - url = "git://github.com/cmullaparthi/ibrowse.git"; - sha256 = "1qvz4bmh307avjsxmhhdf35dd5wzmii0cbf6jyvvlhhkq4y0nmnj"; - }; -} \ No newline at end of file + version = "4.2.2"; + sha256 = "1bn0645n95j5zypdsns1w4kgd3q9lz8fj898hg355j5w89scn05q"; +} + diff --git a/pkgs/development/erlang-modules/hex/jiffy.nix b/pkgs/development/erlang-modules/hex/jiffy.nix index 762086da23f7..b9f92c888a45 100644 --- a/pkgs/development/erlang-modules/hex/jiffy.nix +++ b/pkgs/development/erlang-modules/hex/jiffy.nix @@ -1,10 +1,8 @@ -{ buildErlang, fetchgit }: +{ buildHex }: -buildErlang { +buildHex { name = "jiffy"; - version = "0.1"; - src = fetchgit { - url = "git://github.com/davisp/jiffy.git"; - sha256 = "02qb8m4s2p51m5f882ifsaph9fwx0bih37q5q90ba8cvsak65isx"; - }; -} \ No newline at end of file + version = "0.14.5"; + hexPkg = "barrel_jiffy"; + sha256 = "0iqz8bp0f672c5rfy5dpw9agv2708wzldd00ngbsffglpinlr1wa"; +} diff --git a/pkgs/development/erlang-modules/hex/meck.nix b/pkgs/development/erlang-modules/hex/meck.nix index a361147aab4c..f0a4da5392c5 100644 --- a/pkgs/development/erlang-modules/hex/meck.nix +++ b/pkgs/development/erlang-modules/hex/meck.nix @@ -1,10 +1,7 @@ -{ buildErlang, fetchgit }: +{ buildHex }: -buildErlang { +buildHex { name = "meck"; - version = "0.1"; - src = fetchgit { - url = "git://github.com/eproxus/meck.git"; - sha256 = "077p3v81mspy69247bz4apln3gp567m4xpmzxmdjd6pyh6m5ahpk"; - }; -} \ No newline at end of file + version = "0.8.3"; + sha256 = "1dh2rhks1xly4f49x89vbhsk8fgwkx5zqp0n98mnng8rs1rkigak"; +}