2019-01-02 12:10:28 +03:00
|
|
|
{ stdenv, lib
|
|
|
|
, coreutils, docker_compose, jq
|
|
|
|
}:
|
2019-01-02 11:54:46 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "arion";
|
|
|
|
src = ./src;
|
|
|
|
unpackPhase = "";
|
|
|
|
buildPhase = "";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/arion
|
|
|
|
cp -a nix $out/share/arion/
|
|
|
|
cp -a arion-image $out/share/arion/
|
2019-01-27 01:47:35 +03:00
|
|
|
tar -czf $out/share/arion/arion-image/tarball.tar.gz -C arion-image/tarball .
|
2019-01-02 11:54:46 +03:00
|
|
|
substitute arion $out/bin/arion \
|
2019-01-02 12:10:28 +03:00
|
|
|
--subst-var-by path ${lib.makeBinPath [jq coreutils docker_compose]} \
|
2019-01-02 11:54:46 +03:00
|
|
|
--subst-var-by nix_dir $out/share/arion/nix \
|
|
|
|
;
|
|
|
|
chmod a+x $out/bin/arion
|
|
|
|
'';
|
|
|
|
}
|