mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
xorg: change generator "name" to "pname" & "version"
This commit is contained in:
parent
5baab3cd74
commit
6c48964a0d
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,7 @@ use File::Temp;
|
|||||||
my %pkgURLs;
|
my %pkgURLs;
|
||||||
my %pkgHashes;
|
my %pkgHashes;
|
||||||
my %pkgNames;
|
my %pkgNames;
|
||||||
|
my %pkgVersions;
|
||||||
my %pkgRequires;
|
my %pkgRequires;
|
||||||
my %pkgNativeRequires;
|
my %pkgNativeRequires;
|
||||||
|
|
||||||
@ -73,8 +74,12 @@ while (<>) {
|
|||||||
next;
|
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;
|
$pkgURLs{$pkg} = $tarball;
|
||||||
$pkgNames{$pkg} = $pkgName;
|
$pkgNames{$pkg} = $name;
|
||||||
|
$pkgVersions{$pkg} = $version;
|
||||||
|
|
||||||
my $cachePath = catdir($downloadCache, basename($tarball));
|
my $cachePath = catdir($downloadCache, basename($tarball));
|
||||||
my $hash;
|
my $hash;
|
||||||
@ -302,7 +307,8 @@ foreach my $pkg (sort (keys %pkgURLs)) {
|
|||||||
|
|
||||||
print OUT <<EOF
|
print OUT <<EOF
|
||||||
$pkg = callPackage ({ $argumentsStr }: stdenv.mkDerivation {
|
$pkg = callPackage ({ $argumentsStr }: stdenv.mkDerivation {
|
||||||
name = "$pkgNames{$pkg}";
|
pname = "$pkgNames{$pkg}";
|
||||||
|
version = "$pkgVersions{$pkg}";
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "$pkgURLs{$pkg}";
|
url = "$pkgURLs{$pkg}";
|
||||||
|
@ -664,7 +664,7 @@ self: super:
|
|||||||
( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others
|
( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others
|
||||||
cd "$dev"
|
cd "$dev"
|
||||||
for f in include/xorg/*.h; do
|
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
|
done
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user