2021-04-28 03:59:32 +02:00
|
|
|
{ lib
|
|
|
|
, pkg-config
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, coreutils
|
|
|
|
, gnupg
|
|
|
|
, gnutar
|
|
|
|
, squashfsTools
|
|
|
|
, debootstrap
|
2018-06-30 18:46:00 +02:00
|
|
|
}:
|
2018-05-09 21:02:47 +02:00
|
|
|
|
2021-04-28 03:59:32 +02:00
|
|
|
let
|
|
|
|
bins = [
|
|
|
|
coreutils
|
|
|
|
gnupg
|
|
|
|
gnutar
|
|
|
|
squashfsTools
|
|
|
|
debootstrap
|
|
|
|
];
|
2018-06-30 18:46:00 +02:00
|
|
|
in
|
2021-04-28 03:59:32 +02:00
|
|
|
buildGoModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "distrobuilder";
|
2021-08-10 15:08:09 +02:00
|
|
|
version = "1.3";
|
2018-05-09 21:02:47 +02:00
|
|
|
|
2021-08-10 15:08:09 +02:00
|
|
|
vendorSha256 = "sha256-FKnpoLA4enZ1vGSJQFLbp/OjoEgdxagL73ucxUgIoKY=";
|
2018-05-09 21:02:47 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lxc";
|
|
|
|
repo = "distrobuilder";
|
2021-04-28 03:59:32 +02:00
|
|
|
rev = "distrobuilder-${version}";
|
2021-08-10 15:08:09 +02:00
|
|
|
sha256 = "sha256-cvxbJbg9yTcAPWQccH+1nQivwRh8CIN3Cga2HKY8VlQ=";
|
2021-04-28 03:59:32 +02:00
|
|
|
fetchSubmodules = false;
|
2018-05-09 21:02:47 +02:00
|
|
|
};
|
|
|
|
|
2021-04-28 03:59:32 +02: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 21:02:47 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-04-28 03:59:32 +02:00
|
|
|
wrapProgram $out/bin/distrobuilder --prefix PATH ":" ${lib.makeBinPath bins}
|
2018-05-09 21:02:47 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-05-09 21:02:47 +02: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;
|
|
|
|
};
|
|
|
|
}
|