Compare commits
No commits in common. "gogs/stronghold-crusaders" and "master" have entirely different histories.
gogs/stron
...
master
3 changed files with 0 additions and 74 deletions
|
|
@ -6,7 +6,5 @@
|
|||
wildfly = pkgs.callPackage ./wildfly/default.nix {};
|
||||
postman_appimage = pkgs.callPackage ./postman-appimage/default.nix {};
|
||||
|
||||
gog = import ./gog/default.nix {};
|
||||
|
||||
services = import ./services/default.nix;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
{
|
||||
stronghold_crusader = pkgs.callPackage ./stronghold-crusader/default.nix {};
|
||||
}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
let
|
||||
|
||||
_basename = "stronghold-crusader";
|
||||
_version = "1.41_20410";
|
||||
|
||||
setup_exe = pkgs.requireFile rec {
|
||||
name = "setup_stronghold_crusader_extreme_hd_${_version}.exe";
|
||||
message = "Please download ${name} from https://gog.com/.";
|
||||
sha256 = "05crr9801biasbb57yj6vcr65kz6y7hwgcijjbhlxwpzk4fsgxfv";
|
||||
};
|
||||
|
||||
game_extracted = pkgs.stdenv.mkDerivation rec {
|
||||
name = "${_basename}-extracted-${_version}";
|
||||
version = _version;
|
||||
|
||||
src = setup_exe;
|
||||
|
||||
nativeBuildInputs = with pkgs; [ innoextract ];
|
||||
|
||||
unpackPhase = ''
|
||||
innoextract --gog --extract $src
|
||||
'';
|
||||
|
||||
buildPhase = ":";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/${_basename}
|
||||
cp -R . $out/share/${_basename}/
|
||||
'';
|
||||
};
|
||||
|
||||
game_wrapped = pkgs.stdenv.mkDerivation rec {
|
||||
name = "${_basename}-wrapped-${_version}";
|
||||
version = _version;
|
||||
buildInputs = with pkgs; [ game_extracted wine icoutils ];
|
||||
|
||||
unpackPhase = ''
|
||||
wrestool -x -t 14 "${game_extracted}/share/${_basename}/Stronghold Crusader.exe" > stronghold_crusader.ico
|
||||
wrestool -x -t 14 "${game_extracted}/share/${_basename}/Stronghold_Crusader_Extreme.exe" > stronghold_crusader_extreme.ico
|
||||
'';
|
||||
|
||||
buildPhase = ":";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share/icons/hicolor/{32x32,256x256}/apps
|
||||
|
||||
cp 'stronghold_crusader.ico' $out/share/icons/hicolor/256x256/apps/
|
||||
cp 'stronghold_crusader_extreme.ico' $out/share/icons/hicolor/32x32/apps/
|
||||
|
||||
cat << EOF > $out/bin/stronghold_crusader
|
||||
#!${pkgs.bash}/bin/bash
|
||||
${pkgs.wine}/bin/wine "${game_extracted}/share/${_basename}/Stronghold Crusader.exe"
|
||||
EOF
|
||||
chmod +x $out/bin/stronghold_crusader
|
||||
|
||||
cat << EOF > $out/bin/stronghold_crusader_extreme
|
||||
#!${pkgs.bash}/bin/bash
|
||||
${pkgs.wine}/bin/wine "${game_extracted}/share/${_basename}/Stronghold_Crusader_Extreme.exe"
|
||||
EOF
|
||||
chmod +x $out/bin/stronghold_crusader_extreme
|
||||
'';
|
||||
};
|
||||
|
||||
in game_wrapped
|
||||
Loading…
Add table
Add a link
Reference in a new issue