dxvk: use function form of mkDerivation
This allows `overrideAttrs` to work correctly with `dxvkPatches`.
This commit is contained in:
parent
a97a4f491f
commit
2a7827fac3
|
@ -6,29 +6,31 @@
|
||||||
, pkgsCross
|
, pkgsCross
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
stdenvNoCC.mkDerivation (finalAttrs:
|
||||||
inherit (hostPlatform.uname) system;
|
let
|
||||||
|
inherit (hostPlatform.uname) system;
|
||||||
# DXVK needs to be a separate derivation because it’s actually a set of DLLs for Windows that
|
# DXVK needs to be a separate derivation because it’s actually a set of DLLs for Windows that
|
||||||
# needs to be built with a cross-compiler.
|
# needs to be built with a cross-compiler.
|
||||||
dxvk32 = pkgsCross.mingw32.callPackage ./dxvk.nix { inherit (self) src version dxvkPatches; };
|
dxvk32 = pkgsCross.mingw32.callPackage ./dxvk.nix {
|
||||||
dxvk64 = pkgsCross.mingwW64.callPackage ./dxvk.nix { inherit (self) src version dxvkPatches; };
|
inherit (finalAttrs) src version dxvkPatches;
|
||||||
|
};
|
||||||
# Split out by platform to make maintenance easy in case supported versions on Darwin and other
|
dxvk64 = pkgsCross.mingwW64.callPackage ./dxvk.nix {
|
||||||
# platforms diverge (due to the need for Darwin-specific patches that would fail to apply).
|
inherit (finalAttrs) src version dxvkPatches;
|
||||||
# Should that happen, set `darwin` to the last working `rev` and `hash`.
|
|
||||||
srcs = rec {
|
|
||||||
darwin = { inherit (default) rev hash version; };
|
|
||||||
default = {
|
|
||||||
rev = "v${self.version}";
|
|
||||||
hash = "sha256-+6PkrkamSvhCaGj2tq+RXri/yQ7vs0cAqgdRAFtU8UA=";
|
|
||||||
version = "1.10.1";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
# Use the self pattern to support overriding `src` and `version` via `overrideAttrs`. A recursive
|
# Split out by platform to make maintenance easy in case supported versions on Darwin and other
|
||||||
# attrset wouldn’t work.
|
# platforms diverge (due to the need for Darwin-specific patches that would fail to apply).
|
||||||
self = stdenvNoCC.mkDerivation {
|
# Should that happen, set `darwin` to the last working `rev` and `hash`.
|
||||||
|
srcs = rec {
|
||||||
|
darwin = { inherit (default) rev hash version; };
|
||||||
|
default = {
|
||||||
|
rev = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-+6PkrkamSvhCaGj2tq+RXri/yQ7vs0cAqgdRAFtU8UA=";
|
||||||
|
version = "1.10.1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
name = "dxvk";
|
name = "dxvk";
|
||||||
inherit (srcs."${system}" or srcs.default) version;
|
inherit (srcs."${system}" or srcs.default) version;
|
||||||
|
|
||||||
|
@ -83,6 +85,4 @@ let
|
||||||
license = lib.licenses.zlib;
|
license = lib.licenses.zlib;
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
};
|
})
|
||||||
in
|
|
||||||
self
|
|
||||||
|
|
Loading…
Reference in a new issue