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}"; + }; +}