depot/third_party/nixpkgs/pkgs/tools/virtualization/distrobuilder/default.nix
Default email e18f6fb5f9 Project import generated by Copybara.
GitOrigin-RevId: 9df2cb074d72ea80ac9fd225b29060c8cf13dd39
2021-08-11 16:56:57 +02:00

57 lines
1.2 KiB
Nix

{ lib
, pkg-config
, buildGoModule
, fetchFromGitHub
, makeWrapper
, coreutils
, gnupg
, gnutar
, squashfsTools
, debootstrap
}:
let
bins = [
coreutils
gnupg
gnutar
squashfsTools
debootstrap
];
in
buildGoModule rec {
pname = "distrobuilder";
version = "1.3";
vendorSha256 = "sha256-FKnpoLA4enZ1vGSJQFLbp/OjoEgdxagL73ucxUgIoKY=";
src = fetchFromGitHub {
owner = "lxc";
repo = "distrobuilder";
rev = "distrobuilder-${version}";
sha256 = "sha256-cvxbJbg9yTcAPWQccH+1nQivwRh8CIN3Cga2HKY8VlQ=";
fetchSubmodules = false;
};
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;
postInstall = ''
wrapProgram $out/bin/distrobuilder --prefix PATH ":" ${lib.makeBinPath bins}
'';
meta = with 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;
};
}