mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 22:50:49 +00:00
Merge pull request #126372 from Stunkymonkey/xorg_pname_version
This commit is contained in:
commit
0c53e3116d
File diff suppressed because it is too large
Load diff
|
@ -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}";
|
||||
|
|
|
@ -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
|
||||
)
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue