Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions pkgs/by-name/di/distrobuilder/nixos-generator.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff --git c/distrobuilder/lxc.generator w/distrobuilder/lxc.generator
index 5f854d3..927f2df 100644
--- c/distrobuilder/lxc.generator
diff --git i/distrobuilder/lxc.generator w/distrobuilder/lxc.generator
index f7692af..f617b89 100644
--- i/distrobuilder/lxc.generator
+++ w/distrobuilder/lxc.generator
@@ -16,16 +16,6 @@ is_lxc_privileged_container() {
grep -qw 4294967295$ /proc/self/uid_map
Expand Down Expand Up @@ -166,3 +166,12 @@ index 5f854d3..927f2df 100644
# Allow masking units created by the lxc system-generator.
for d in /etc/systemd/system /usr/lib/systemd/system /lib/systemd/system; do
if ! [ -d "${d}" ]; then
@@ -247,7 +176,7 @@ if [ "${SYSTEMD}" -ge 258 ]; then
cat <<-EOF > /run/systemd/system/console-getty.service.d/override.conf
[Service]
ExecStart=
- ExecStart=-/sbin/agetty -o '-- \\\\u' --noreset --noclear --keep-baud 115200,57600,38400,9600 console
+ ExecStart=-/run/current-system/sw/bin/agetty -o '-- \\\\u' --noreset --noclear --keep-baud 115200,57600,38400,9600 console
StandardInput=null
StandardOutput=null
EOF
15 changes: 11 additions & 4 deletions pkgs/by-name/di/distrobuilder/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ let
in
buildGoModule (finalAttrs: {
pname = "distrobuilder";
version = "3.2";
version = "3.3.1";

vendorHash = "sha256-nlqapWxuSZlbt22F3Y9X1uXFxJHvEoUBZDl078x8ZnA=";
vendorHash = "sha256-7dYfY6u8URJDMADY6yTW2SjOeSiRwqIh7oxUup6BHMg=";

src = fetchFromGitHub {
owner = "lxc";
repo = "distrobuilder";
tag = "distrobuilder-${finalAttrs.version}";
sha256 = "sha256-aDCx2WGAKdTNf0uMzwxG0AUmbuuWBFPYzNyycKklYOY=";
tag = "v${finalAttrs.version}";
sha256 = "sha256-l9HtpeG4BSN9saDsNaF9uyOJbHGyLN0PwJ728IJfN/s=";
};

buildInputs = bins;
Expand All @@ -57,6 +57,12 @@ buildGoModule (finalAttrs: {
]
++ bins;

# upstream only supports make targets due to GOFLAGS, but none of the targets work for us
# this could be fragile, but the alternative is copying them here
preBuild = ''
export GOFLAGS="$(grep 'export GOFLAGS' Makefile | sed 's/export GOFLAGS=//') -trimpath"
'';

postInstall = ''
wrapProgram $out/bin/distrobuilder --prefix PATH ":" ${lib.makeBinPath bins}
'';
Expand All @@ -74,6 +80,7 @@ buildGoModule (finalAttrs: {
meta = {
description = "System container image builder for LXC and LXD";
homepage = "https://github.com/lxc/distrobuilder";
changelog = "https://github.com/lxc/distrobuilder/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
teams = [ lib.teams.lxc ];
platforms = lib.platforms.linux;
Expand Down
Loading