From 05b8c3bd73252de3de2800e4069fa6125b02508b Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Wed, 18 Aug 2021 11:27:53 +0700 Subject: [PATCH] pin wine version slightly scuffed and rushed --- packages/wine-osu/default.nix | 26 +++++++++++++++++++++----- packages/wine-osu/sources.nix | 17 +++++++++++++++++ 2 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 packages/wine-osu/sources.nix diff --git a/packages/wine-osu/default.nix b/packages/wine-osu/default.nix index 016107b..d94c463 100644 --- a/packages/wine-osu/default.nix +++ b/packages/wine-osu/default.nix @@ -1,13 +1,16 @@ -{ getPaths +{ callPackage +, getPaths +, lib , winePackages , wineUnstable , wineStaging , ... }: +let + sources = callPackage ./sources.nix {}; +in # TODO: Use winePackages.callPackage -(wineStaging.overrideDerivation (old: { - patches = (old.patches or []) ++ getPaths ./patches; -})).override { +(wineStaging.override { wineRelease = "staging"; wineBuild = "wineWow"; @@ -47,4 +50,17 @@ faudioSupport = true; vkd3dSupport = true; mingwSupport = true; -} +}).overrideDerivation (old: { + inherit (sources) src; + name = "wine-osu-${sources.version}-staging"; + patches = (old.patches or []) ++ getPaths ./patches; + postPatch = wineUnstable.postPatch or "" + '' + patchShebangs tools + cp -r ${sources.staging}/patches . + chmod +w patches + cd patches + patchShebangs gitapply.sh + ./patchinstall.sh DESTDIR="$PWD/.." --all ${lib.concatMapStringsSep " " (ps: "-W ${ps}") []} + cd .. + ''; +}) diff --git a/packages/wine-osu/sources.nix b/packages/wine-osu/sources.nix new file mode 100644 index 0000000..25f5cf3 --- /dev/null +++ b/packages/wine-osu/sources.nix @@ -0,0 +1,17 @@ +{ fetchFromGitHub, lib }: +let + version = "6.14"; +in { + inherit version; + src = builtins.fetchurl { + url = "https://dl.winehq.org/wine/source/6.x/wine-${version}.tar.xz"; + sha256 = "sha256-ZLRxk5lDvAjjUQJ9tvvCRlwTllCjv/65Flf/DujCUgI="; + }; + + staging = fetchFromGitHub { + sha256 = "sha256-yzpRWNx/e3BDCh1dyf8VdjLgvu6yZ/CXre/cb1roaVs="; + owner = "wine-staging"; + repo = "wine-staging"; + rev = "v${version}"; + }; +}