beam-modules: deprecate phases
This commit is contained in:
parent
ebdc6e2aa9
commit
50dd4a6cb2
|
@ -1,21 +1,22 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
{ pkg, version, sha256
|
||||
, meta ? {}
|
||||
{ pkg
|
||||
, version
|
||||
, sha256
|
||||
, meta ? { }
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "hex-source-${pkg}-${version}";
|
||||
pname = "hex-source-${pkg}";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://repo.hex.pm/tarballs/${pkg}-${version}.tar";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
unpackCmd = ''
|
||||
tar -xf $curSrc contents.tar.gz
|
||||
mkdir contents
|
||||
|
|
|
@ -1,27 +1,33 @@
|
|||
{ lib, stdenv, rebar3 }:
|
||||
|
||||
{ name, version, sha256, src
|
||||
, meta ? {}
|
||||
{ name
|
||||
, version
|
||||
, sha256
|
||||
, src
|
||||
, meta ? { }
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "rebar-deps-${name}-${version}";
|
||||
pname = "rebar-deps-${name}";
|
||||
inherit version;
|
||||
|
||||
phases = [ "downloadPhase" "installPhase" ];
|
||||
dontUnpack = true;
|
||||
|
||||
downloadPhase = ''
|
||||
prePhases = ''
|
||||
cp ${src} .
|
||||
HOME='.' DEBUG=1 ${rebar3}/bin/rebar3 get-deps
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out/_checkouts"
|
||||
for i in ./_build/default/lib/* ; do
|
||||
echo "$i"
|
||||
cp -R "$i" "$out/_checkouts"
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
|
|
Loading…
Reference in a new issue