depot/third_party/nixpkgs/pkgs/games/iortcw/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

27 lines
614 B
Nix

{ buildEnv, callPackage, makeWrapper }:
let
sp = callPackage ./sp.nix {};
mp = sp.overrideAttrs (oldAttrs: {
sourceRoot = "${oldAttrs.src.name}/MP";
});
in buildEnv {
name = "iortcw";
paths = [ sp mp ];
pathsToLink = [ "/opt" ];
nativeBuildInputs = [ makeWrapper ];
# so we can launch sp from mp game and vice versa
postBuild = ''
for i in `find -L $out/opt/iortcw -maxdepth 1 -type f -executable`; do
makeWrapper $i $out/bin/`basename $i` --chdir "$out/opt/iortcw"
done
'';
meta = sp.meta // {
description = "Game engine for Return to Castle Wolfenstein";
};
}