1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00
nixpkgs/pkgs/games/iortcw/default.nix
2020-11-01 11:45:57 +01:00

28 lines
599 B
Nix

{ buildEnv, callPackage, makeWrapper }:
let
sp = callPackage ./sp.nix {};
mp = sp.overrideAttrs (oldAttrs: rec {
sourceRoot = "source/MP";
});
in buildEnv {
name = "iortcw";
paths = [ sp mp ];
pathsToLink = [ "/opt" ];
buildInputs = [ 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` --run "cd $out/opt/iortcw"
done
'';
meta = sp.meta // {
description = "Game engine for Return to Castle Wolfenstein";
};
}