2021-01-23 17:15:07 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2015-12-13 22:12:08 +00:00
|
|
|
|
2021-08-16 21:09:48 +01:00
|
|
|
{ pkg
|
|
|
|
, version
|
|
|
|
, sha256
|
|
|
|
, meta ? { }
|
2015-12-13 22:12:08 +00:00
|
|
|
}:
|
|
|
|
|
2021-01-23 17:15:07 +00:00
|
|
|
with lib;
|
2015-12-13 22:12:08 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation ({
|
2021-08-16 21:09:48 +01:00
|
|
|
pname = "hex-source-${pkg}";
|
|
|
|
inherit version;
|
2021-08-17 04:05:11 +01:00
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontFixup = true;
|
2015-12-13 22:12:08 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-06-15 15:14:59 +01:00
|
|
|
url = "https://repo.hex.pm/tarballs/${pkg}-${version}.tar";
|
2015-12-13 22:12:08 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
unpackCmd = ''
|
|
|
|
tar -xf $curSrc contents.tar.gz
|
|
|
|
mkdir contents
|
|
|
|
tar -C contents -xzf contents.tar.gz
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir "$out"
|
|
|
|
cp -Hrt "$out" .
|
|
|
|
success=1
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
inherit meta;
|
|
|
|
})
|