mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
58 lines
1.2 KiB
Nix
58 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 = "2.0";
|
|
|
|
vendorSha256 = "sha256-hcp+ufJFgFLBE4i2quIwhvrwDTes3saXNHHr9XXBc8E=";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lxc";
|
|
repo = "distrobuilder";
|
|
rev = "distrobuilder-${version}";
|
|
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;
|
|
};
|
|
}
|