diff --git a/npins/sources.json b/npins/sources.json index 7be2622..f929fc9 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -158,6 +158,18 @@ "revision": "2a498afc6287927f046cf165061e5624fc398bbb", "url": "https://github.com/Kron4ek/wine-tkg/archive/2a498afc6287927f046cf165061e5624fc398bbb.tar.gz", "hash": "0xvr7bxalakgnpm5kwbfgrq090cqmzi0ih9rmj0q9xwhf9h37024" + }, + "winetricks": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "winetricks", + "repo": "winetricks" + }, + "branch": "master", + "revision": "72b934e1e10c041ec6986f5f2fb4f143d8f6b941", + "url": "https://github.com/winetricks/winetricks/archive/72b934e1e10c041ec6986f5f2fb4f143d8f6b941.tar.gz", + "hash": "1z1ab8sikx0rmnbyhximfifd7zjwwa1h1dim4m0grg2kwz4q0jz3" } }, "version": 3 diff --git a/pkgs/default.nix b/pkgs/default.nix index b4eface..f344d18 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -117,6 +117,8 @@ wine-tkg = wineBuilder "wine-tkg" "full" {}; + winetricks-git = pkgs.callPackage ./winetricks-git {inherit pins;}; + wineprefix-preparer = pkgs.callPackage ./wineprefix-preparer {inherit (config.packages) dxvk-w32 vkd3d-proton-w32 dxvk-w64 vkd3d-proton-w64;}; }; }; diff --git a/pkgs/winetricks-git/default.nix b/pkgs/winetricks-git/default.nix new file mode 100644 index 0000000..7dc3a92 --- /dev/null +++ b/pkgs/winetricks-git/default.nix @@ -0,0 +1,64 @@ +{ + pins, + lib, + stdenv, + perl, + which, + coreutils, + zenity, + curl, + cabextract, + unzip, + p7zip, + gnused, + gnugrep, + bash, +}: let + inherit (pins) winetricks; +in + stdenv.mkDerivation rec { + pname = "winetricks"; + version = "git+${winetricks.revision}"; + + src = winetricks; + + buildInputs = [perl which]; + + # coreutils is for sha1sum + pathAdd = lib.makeBinPath [ + perl + which + coreutils + zenity + curl + cabextract + unzip + p7zip + gnused + gnugrep + bash + ]; + + makeFlags = ["PREFIX=$(out)" "VERSION=development"]; + + doCheck = false; # requires "bashate" + + postInstall = '' + sed -i \ + -e '2i PATH="${pathAdd}:$PATH"' \ + "$out/bin/winetricks" + ''; + + passthru = { + inherit (src) updateScript; + }; + + meta = { + description = "A script to install DLLs needed to work around problems in Wine"; + mainProgram = "winetricks"; + license = lib.licenses.lgpl21; + homepage = "https://github.com/Winetricks/winetricks"; + platforms = with lib.platforms; linux; + maintainers = with lib.maintainers; [fuzen]; + }; + }