2021-04-28 02:59:32 +01:00
|
|
|
{ lib
|
|
|
|
, pkg-config
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, coreutils
|
|
|
|
, gnupg
|
|
|
|
, gnutar
|
|
|
|
, squashfsTools
|
|
|
|
, debootstrap
|
2018-06-30 17:46:00 +01:00
|
|
|
}:
|
2018-05-09 20:02:47 +01:00
|
|
|
|
2021-04-28 02:59:32 +01:00
|
|
|
let
|
|
|
|
bins = [
|
|
|
|
coreutils
|
|
|
|
gnupg
|
|
|
|
gnutar
|
|
|
|
squashfsTools
|
|
|
|
debootstrap
|
|
|
|
];
|
2018-06-30 17:46:00 +01:00
|
|
|
in
|
2021-04-28 02:59:32 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "distrobuilder";
|
2021-10-29 11:03:44 +01:00
|
|
|
version = "2.0";
|
2018-05-09 20:02:47 +01:00
|
|
|
|
2021-10-29 11:03:44 +01:00
|
|
|
vendorSha256 = "sha256-hcp+ufJFgFLBE4i2quIwhvrwDTes3saXNHHr9XXBc8E=";
|
2018-05-09 20:02:47 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lxc";
|
|
|
|
repo = "distrobuilder";
|
2021-04-28 02:59:32 +01:00
|
|
|
rev = "distrobuilder-${version}";
|
2021-10-29 11:03:44 +01:00
|
|
|
sha256 = "sha256-Px8mo2dwHNVjMWtzsa/4fLxlcbYkhIc7W8aR9DR85vc=";
|
2021-04-28 02:59:32 +01:00
|
|
|
fetchSubmodules = false;
|
2018-05-09 20:02:47 +01:00
|
|
|
};
|
|
|
|
|
2021-04-28 02:59:32 +01:00
|
|
|
buildInputs = bins;
|
|
|
|
|
|
|
|
# tests require a local keyserver (mkg20001/nixpkgs branch distrobuilder-with-tests) but gpg is currently broken in tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
] ++ bins;
|
2018-05-09 20:02:47 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-04-28 02:59:32 +01:00
|
|
|
wrapProgram $out/bin/distrobuilder --prefix PATH ":" ${lib.makeBinPath bins}
|
2018-05-09 20:02:47 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-05-09 20:02:47 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|