releaseTools.debBuild: stop quoting debName and debMaintainer twice

The flags were built as --pkgname="'$debName'", so checkinstall got the
single quotes as part of the value. A debName of "nix" came out as a
package called "0-nix-". Pass the values through as they are, and check
both in the debBuild test.

Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
Philip Taron
2026-10-06 11:59:09 -07:00
parent b32f5b15fc
commit 1b1ff9e6e9
2 changed files with 6 additions and 2 deletions

View File

@@ -75,8 +75,8 @@ vmTools.runInLinuxImage (
${
if (src ? version) then "--pkgversion=$(echo ${src.version} | tr _ -)" else "--pkgversion=0.0.0"
} \
''${debMaintainer:+--maintainer="'$debMaintainer'"} \
''${debName:+--pkgname="'$debName'"} \
''${debMaintainer:+--maintainer="$debMaintainer"} \
''${debName:+--pkgname="$debName"} \
$checkInstallFlags \
-- \
$SHELL -c "''${installCommand:-make install}"

View File

@@ -93,7 +93,11 @@ in
diskImage = diskImages.debian13x86_64;
diskImageFormat = "qcow2";
meta.description = "GNU hello, built as a .deb";
debName = "gnu-hello";
debMaintainer = "Nixpkgs <nixpkgs@example.org>";
postInstall = ''
test "$(dpkg-deb --field $out/debs/*.deb Package)" = gnu-hello
test "$(dpkg-deb --field $out/debs/*.deb Maintainer)" = "Nixpkgs <nixpkgs@example.org>"
dpkg-deb --contents $out/debs/*.deb > contents
grep -q '\./usr/bin/hello$' contents
if grep '\./nix/' contents; then