aboutsummaryrefslogtreecommitdiff
path: root/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
diff options
context:
space:
mode:
authorCharles Strahan <charles.c.strahan@gmail.com>2014-08-12 20:40:57 -0400
committerCharles Strahan <charles.c.strahan@gmail.com>2014-08-12 20:40:57 -0400
commit5ea8497933da0dbee5fa5a31c97843e2c6baac17 (patch)
tree6fd331d811fab9c904b1f724692a6c24d633fe1d /pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
parent48c5574f5a5caa50358ba8e4837fcadce9f1b375 (diff)
get xorg/x11 working on Darwin
Diffstat (limited to 'pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl')
-rwxr-xr-xpkgs/servers/x11/xorg/generate-expr-from-tarballs.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
index 04ee5f109611..9c6618d3b105 100755
--- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
+++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
@@ -230,6 +230,11 @@ args: with args;
let
+ mkDerivation = name: attrs:
+ let newAttrs = (overrides."\${name}" or (x: x)) attrs;
+ stdenv = newAttrs.stdenv or args.stdenv;
+ in stdenv.mkDerivation (removeAttrs newAttrs [ "stdenv" ]);
+
overrides = import ./overrides.nix {inherit args xorg;};
xorg = rec {
@@ -261,7 +266,7 @@ foreach my $pkg (sort (keys %pkgURLs)) {
$extraAttrs = "" unless defined $extraAttrs;
print OUT <<EOF
- $pkg = (stdenv.mkDerivation ((if overrides ? $pkg then overrides.$pkg else x: x) {
+ $pkg = (mkDerivation "$pkg" {
name = "$pkgNames{$pkg}";
builder = ./builder.sh;
src = fetchurl {
@@ -269,7 +274,7 @@ foreach my $pkg (sort (keys %pkgURLs)) {
sha256 = "$pkgHashes{$pkg}";
};
buildInputs = [pkgconfig $inputs];$extraAttrs
- })) // {inherit $inputs;};
+ }) // {inherit $inputs;};
EOF
}