xorg: change generator "name" to "pname" & "version"

This commit is contained in:
Felix Buehler 2021-06-09 15:56:10 +02:00
parent 5baab3cd74
commit 6c48964a0d
3 changed files with 451 additions and 224 deletions

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,7 @@ use File::Temp;
my %pkgURLs;
my %pkgHashes;
my %pkgNames;
my %pkgVersions;
my %pkgRequires;
my %pkgNativeRequires;
@ -73,8 +74,12 @@ while (<>) {
next;
}
# split by first occurence of hyphen followd by only numbers ends line or another hyphen follows
my ($name, $version) = split(/-(?=[.0-9]+(?:$|-))/, $pkgName, 2);
$pkgURLs{$pkg} = $tarball;
$pkgNames{$pkg} = $pkgName;
$pkgNames{$pkg} = $name;
$pkgVersions{$pkg} = $version;
my $cachePath = catdir($downloadCache, basename($tarball));
my $hash;
@ -302,7 +307,8 @@ foreach my $pkg (sort (keys %pkgURLs)) {
print OUT <<EOF
$pkg = callPackage ({ $argumentsStr }: stdenv.mkDerivation {
name = "$pkgNames{$pkg}";
pname = "$pkgNames{$pkg}";
version = "$pkgVersions{$pkg}";
builder = ./builder.sh;
src = fetchurl {
url = "$pkgURLs{$pkg}";

View File

@ -664,7 +664,7 @@ self: super:
( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others
cd "$dev"
for f in include/xorg/*.h; do
sed "1i#line 1 \"${attrs.name}/$f\"" -i "$f"
sed "1i#line 1 \"${attrs.pname}-${attrs.version}/$f\"" -i "$f"
done
)
'';