2018-05-09 21:02:47 +02:00
|
|
|
{ stdenv, lib, pkgconfig, buildGoPackage, fetchFromGitHub
|
2018-06-30 18:46:00 +02:00
|
|
|
, makeWrapper, coreutils, gnupg, gnutar, squashfsTools, debootstrap
|
|
|
|
}:
|
2018-05-09 21:02:47 +02:00
|
|
|
|
2018-06-30 18:46:00 +02:00
|
|
|
let binPath = stdenv.lib.makeBinPath [
|
|
|
|
coreutils gnupg gnutar squashfsTools debootstrap
|
|
|
|
];
|
|
|
|
in
|
2018-05-09 21:02:47 +02:00
|
|
|
buildGoPackage rec {
|
|
|
|
name = "distrobuilder-${version}";
|
2018-06-30 18:46:00 +02:00
|
|
|
version = "2018_06_29";
|
|
|
|
rev = "e5acd73f81ad37151f3a2088fde650cea9b6a7e6";
|
2018-05-09 21:02:47 +02:00
|
|
|
|
|
|
|
goPackagePath = "github.com/lxc/distrobuilder";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit rev;
|
|
|
|
owner = "lxc";
|
|
|
|
repo = "distrobuilder";
|
2018-06-30 18:46:00 +02:00
|
|
|
sha256 = "19rc11s0paqga72jr8bziixihfv7dlkszmfk6xkg0349hzdg0gac";
|
2018-05-09 21:02:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
|
|
|
postInstall = ''
|
2018-06-30 18:46:00 +02:00
|
|
|
wrapProgram $bin/bin/distrobuilder --prefix PATH ":" ${binPath}
|
2018-05-09 21:02:47 +02: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;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|