factorio-demo: init at 0.14.23 (#25265)
This commit is contained in:
parent
99c28df9e5
commit
92f53af64d
@ -6,12 +6,11 @@
|
|||||||
, username ? "" , password ? ""
|
, username ? "" , password ? ""
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert releaseType == "alpha" || releaseType == "headless";
|
assert releaseType == "alpha" || releaseType == "headless" || releaseType == "demo";
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
let
|
let
|
||||||
version = "0.15.1";
|
version = if releaseType != "demo" then "0.15.1" else "0.14.23";
|
||||||
isHeadless = releaseType == "headless";
|
|
||||||
|
|
||||||
arch = if stdenv.system == "x86_64-linux" then {
|
arch = if stdenv.system == "x86_64-linux" then {
|
||||||
inUrl = "linux64";
|
inUrl = "linux64";
|
||||||
@ -24,15 +23,18 @@ let
|
|||||||
authenticatedFetch = callPackage ./fetch.nix { inherit username password; };
|
authenticatedFetch = callPackage ./fetch.nix { inherit username password; };
|
||||||
|
|
||||||
fetch = rec {
|
fetch = rec {
|
||||||
|
extension = if releaseType != "demo" then "tar.xz" else "tar.gz";
|
||||||
url = "https://www.factorio.com/get-download/${version}/${releaseType}/${arch.inUrl}";
|
url = "https://www.factorio.com/get-download/${version}/${releaseType}/${arch.inUrl}";
|
||||||
name = "factorio_${releaseType}_${arch.inTar}-${version}.tar.xz";
|
name = "factorio_${releaseType}_${arch.inTar}-${version}.${extension}";
|
||||||
x64 = {
|
x64 = {
|
||||||
headless = fetchurl { inherit name url; sha256 = "1z84a9yzlld6fv53viwvswp52hlc9fkxzhb2pil7sidzkws3g49l"; };
|
headless = fetchurl { inherit name url; sha256 = "1z84a9yzlld6fv53viwvswp52hlc9fkxzhb2pil7sidzkws3g49l"; };
|
||||||
alpha = authenticatedFetch { inherit name url; sha256 = "11bxasghrhqb2yg1842v1608x3mjdjv3015jgifpv1xmcqak44jp"; };
|
alpha = authenticatedFetch { inherit name url; sha256 = "11bxasghrhqb2yg1842v1608x3mjdjv3015jgifpv1xmcqak44jp"; };
|
||||||
|
demo = fetchurl { inherit name url; sha256 = "10a2lwmspqviwgymn3zhjgpiynsa6dplgnikdirma5sl2hhcfb6s"; };
|
||||||
};
|
};
|
||||||
i386 = {
|
i386 = {
|
||||||
headless = abort "Factorio 32-bit headless binaries are not available for download.";
|
headless = abort "Factorio 32-bit headless binaries are not available for download.";
|
||||||
alpha = abort "Factorio 32-bit client is not available for this version.";
|
alpha = abort "Factorio 32-bit client is not available for this version.";
|
||||||
|
demo = abort "Factorio 32-bit demo binaries are not available for download.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -95,8 +97,10 @@ let
|
|||||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
releases = rec {
|
||||||
headless = base;
|
headless = base;
|
||||||
alpha = base // {
|
demo = base // {
|
||||||
|
|
||||||
buildInputs = [ makeWrapper ];
|
buildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
@ -142,8 +146,13 @@ let
|
|||||||
${updateConfigSh}
|
${updateConfigSh}
|
||||||
EOF
|
EOF
|
||||||
) $out/share/factorio/update-config.sh
|
) $out/share/factorio/update-config.sh
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
alpha = demo // {
|
||||||
|
|
||||||
|
installPhase = demo.installPhase + ''
|
||||||
cp -a doc-html $out/share/factorio
|
cp -a doc-html $out/share/factorio
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in stdenv.mkDerivation (if isHeadless then headless else alpha)
|
};
|
||||||
|
in stdenv.mkDerivation (releases.${releaseType})
|
||||||
|
@ -16644,6 +16644,8 @@ with pkgs;
|
|||||||
|
|
||||||
factorio-headless = callPackage ../games/factorio { releaseType = "headless"; };
|
factorio-headless = callPackage ../games/factorio { releaseType = "headless"; };
|
||||||
|
|
||||||
|
factorio-demo = callPackage ../games/factorio { releaseType = "demo"; };
|
||||||
|
|
||||||
factorio-mods = callPackage ../games/factorio/mods.nix { };
|
factorio-mods = callPackage ../games/factorio/mods.nix { };
|
||||||
|
|
||||||
factorio-utils = callPackage ../games/factorio/utils.nix { };
|
factorio-utils = callPackage ../games/factorio/utils.nix { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user