Fix parsing of new apt package list for oneapi 2023

New apt list does not have Package: as the first entry for all packages
This commit is contained in:
Aleix Boné 2025-05-15 15:48:37 +02:00
parent 39157ea318
commit 83ae2f489d
Signed by: abonerib
SSH Key Fingerprint: SHA256:Jmq7aNH8XDdGy7E9dqfqrc/LRaVqhnFgDgdxlFw/pl8

View File

@ -47,7 +47,8 @@ let
installPhase = ''
awk -F': ' '\
BEGIN { print "[ {" } \
NR>1 && /^Package: / { print "} {"; } \
NF==0 { empty=1; } \
NF && empty { print "} {"; empty=0; } \
/: / { printf "%s = \"%s\";\n", $1, $2 } \
END { print "} ]" }' $srcs > $out
'';