From df58a632ca20f44ab1c70d31b8be92f9de42f0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Wed, 2 Sep 2020 22:15:08 +0200 Subject: [PATCH] left4gore: Init at 2.3 --- pkgs/games/left4gore/default.nix | 48 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 pkgs/games/left4gore/default.nix diff --git a/pkgs/games/left4gore/default.nix b/pkgs/games/left4gore/default.nix new file mode 100644 index 000000000000..597f7da2b3d2 --- /dev/null +++ b/pkgs/games/left4gore/default.nix @@ -0,0 +1,48 @@ +{ stdenvNoCC, lib, fetchurl, buildFHSUserEnv }: + +let + version = "2.3"; + + # Unwrapped package, for putting into the FHS env + left4gore-unwrapped = stdenvNoCC.mkDerivation { + pname = "left4gore-unwrapped"; + inherit version; + + src = fetchurl { + url = "http://www.left4gore.com/dist/left4gore-${version}-linux.tar.gz"; + sha256 = "1n57nh32ybn6kirn8djh0nsjx6m84c0jfi1x8r4w2qr0qky3z7p0"; + }; + + installPhase = '' + mkdir -p $out/bin + cp left4gore $out/bin + ''; + }; + + # FHS env, as patchelf will not work + env = buildFHSUserEnv { + name = "left4gore-env-${version}"; + targetPkgs = _: [ left4gore-unwrapped ]; + runScript = "left4gore"; + }; + +in stdenvNoCC.mkDerivation { + pname = "left4gore"; + inherit version; + + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + ln -s ${env}/bin/* $out/bin/left4gore + ''; + + meta = with lib; { + homepage = "http://www.left4gore.com"; + description = "Memory patcher which adds the gore back into Left 4 Dead 2"; + license = licenses.unfree; # Probably the best choice + maintainers = with maintainers; [ das_j ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 296e1d8d4585..6f53a1cadb38 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24740,6 +24740,8 @@ in legendary-gl = python38Packages.callPackage ../games/legendary-gl { }; + left4gore-bin = callPackage ../games/left4gore { }; + lgogdownloader = callPackage ../games/lgogdownloader { }; liberal-crime-squad = callPackage ../games/liberal-crime-squad { };