2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, pkgconfig, buildGoPackage, fetchFromGitHub
|
2018-06-30 17:46:00 +01:00
|
|
|
, makeWrapper, coreutils, gnupg, gnutar, squashfsTools, debootstrap
|
|
|
|
}:
|
2018-05-09 20:02:47 +01:00
|
|
|
|
2018-06-30 17:46:00 +01:00
|
|
|
let binPath = stdenv.lib.makeBinPath [
|
|
|
|
coreutils gnupg gnutar squashfsTools debootstrap
|
|
|
|
];
|
|
|
|
in
|
2018-05-09 20:02:47 +01:00
|
|
|
buildGoPackage rec {
|
|
|
|
name = "distrobuilder-${version}";
|
2018-12-09 16:38:23 +00:00
|
|
|
version = "2018_10_04";
|
|
|
|
rev = "d2329be9569d45028a38836186d2353b8ddfe1ca";
|
2018-05-09 20:02:47 +01:00
|
|
|
|
|
|
|
goPackagePath = "github.com/lxc/distrobuilder";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit rev;
|
|
|
|
owner = "lxc";
|
|
|
|
repo = "distrobuilder";
|
2018-12-09 16:38:23 +00:00
|
|
|
sha256 = "1sn1wif86p089kr6zq83k81hjd1d73kamnawc2p0k0vd0w91d3v4";
|
2018-05-09 20:02:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
|
|
|
postInstall = ''
|
2018-06-30 17:46:00 +01:00
|
|
|
wrapProgram $bin/bin/distrobuilder --prefix PATH ":" ${binPath}
|
2018-05-09 20:02:47 +01:00
|
|
|
'';
|
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "System container image builder for LXC and LXD";
|
|
|
|
homepage = "https://github.com/lxc/distrobuilder";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ megheaiulian ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|