fix: define %{_bindir} for rpmbuild, because Nix would otherwise overwrite it

This commit is contained in:
Ilka Schulz
2026-06-05 18:49:28 +02:00
parent 49a1cdcc6b
commit de5c13a0f1
+5
View File
@@ -61,10 +61,15 @@ runCommand "rosenpass-${version}.rpm" { } ''
mkdir -p /build/tmp mkdir -p /build/tmp
ls -R rpmbuild ls -R rpmbuild
# rpmbuild requires these defines, because Nix would otherwise overwrite them, especially %{_bindir}
${rpm}/bin/rpmbuild \ ${rpm}/bin/rpmbuild \
-bb \ -bb \
--dbpath=$HOME \ --dbpath=$HOME \
--define "_tmppath /build/tmp" \ --define "_tmppath /build/tmp" \
--define "_prefix /usr" \
--define "_exec_prefix %{_prefix}" \
--define "_bindir %{_exec_prefix}/bin" \
--define "_sysconfdir /etc" \
rpmbuild/SPECS/rosenpass.spec rpmbuild/SPECS/rosenpass.spec
cp rpmbuild/RPMS/${arch}/rosenpass*.rpm $out cp rpmbuild/RPMS/${arch}/rosenpass*.rpm $out