3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/virtualization/distrobuilder/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, pkg-config
, buildGoModule
, fetchFromGitHub
, makeWrapper
, coreutils
, gnupg
, gnutar
, squashfsTools
, debootstrap
}:
let
bins = [
coreutils
gnupg
gnutar
squashfsTools
debootstrap
];
in
buildGoModule rec {
pname = "distrobuilder";
2021-10-29 11:03:44 +01:00
version = "2.0";
2021-10-29 11:03:44 +01:00
vendorSha256 = "sha256-hcp+ufJFgFLBE4i2quIwhvrwDTes3saXNHHr9XXBc8E=";
src = fetchFromGitHub {
owner = "lxc";
repo = "distrobuilder";
rev = "distrobuilder-${version}";
2021-10-29 11:03:44 +01:00
sha256 = "sha256-Px8mo2dwHNVjMWtzsa/4fLxlcbYkhIc7W8aR9DR85vc=";
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;
};
}