From 1b1ff9e6e9d97dc6d5d7abfb48eabff26a7541be Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Tue, 6 Oct 2026 11:59:09 -0700 Subject: [PATCH] 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) --- pkgs/build-support/release/debian-build.nix | 4 ++-- pkgs/build-support/vm/test.nix | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/release/debian-build.nix b/pkgs/build-support/release/debian-build.nix index 2359587665b8..9520886b43d8 100644 --- a/pkgs/build-support/release/debian-build.nix +++ b/pkgs/build-support/release/debian-build.nix @@ -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}" diff --git a/pkgs/build-support/vm/test.nix b/pkgs/build-support/vm/test.nix index add645ccab8e..7fe35429b3ed 100644 --- a/pkgs/build-support/vm/test.nix +++ b/pkgs/build-support/vm/test.nix @@ -93,7 +93,11 @@ in diskImage = diskImages.debian13x86_64; diskImageFormat = "qcow2"; meta.description = "GNU hello, built as a .deb"; + debName = "gnu-hello"; + debMaintainer = "Nixpkgs "; postInstall = '' + test "$(dpkg-deb --field $out/debs/*.deb Package)" = gnu-hello + test "$(dpkg-deb --field $out/debs/*.deb Maintainer)" = "Nixpkgs " dpkg-deb --contents $out/debs/*.deb > contents grep -q '\./usr/bin/hello$' contents if grep '\./nix/' contents; then