diff options
Diffstat (limited to 'nixpkgs/pkgs/games/factorio/default.nix')
-rw-r--r-- | nixpkgs/pkgs/games/factorio/default.nix | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/games/factorio/default.nix b/nixpkgs/pkgs/games/factorio/default.nix index 19ed6ccab37..0226acf1604 100644 --- a/nixpkgs/pkgs/games/factorio/default.nix +++ b/nixpkgs/pkgs/games/factorio/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeWrapper +{ stdenv, fetchurl, makeWrapper, makeDesktopItem , alsaLib, libpulseaudio, libX11, libXcursor, libXinerama, libXrandr, libXi, libGL , libSM, libICE, libXext, factorio-utils , releaseType @@ -45,6 +45,16 @@ let Note the ultimate "_" is replaced with "-" in the --name arg! ''; + desktopItem = makeDesktopItem { + name = "factorio"; + desktopName = "Factorio"; + comment = "A game in which you build and maintain factories."; + exec = "factorio"; + icon = "factorio"; + type = "Application"; + categories = "Game"; + }; + branch = if experimental then "experimental" else "stable"; # NB `experimental` directs us to take the latest build, regardless of its branch; @@ -52,15 +62,15 @@ let binDists = { x86_64-linux = let bdist = bdistForArch { inUrl = "linux64"; inTar = "x64"; }; in { alpha = { - stable = bdist { sha256 = "1fg2wnia6anzya4m53jf2xqwwspvwskz3awdb3j0v3fzijps94wc"; version = "0.17.79"; withAuth = true; }; - experimental = bdist { sha256 = "1ypq9qxry2b9a74p2i20f1yl20yf37xr4kvflbg1cn5nb8vvznxq"; version = "0.18.26"; withAuth = true; }; + stable = bdist { sha256 = "0zixscff0svpb0yg8nzczp2z4filqqxi1k0z0nrpzn2hhzhf1464"; version = "1.0.0"; withAuth = true; }; + experimental = bdist { sha256 = "0zixscff0svpb0yg8nzczp2z4filqqxi1k0z0nrpzn2hhzhf1464"; version = "1.0.0"; withAuth = true; }; }; headless = { - stable = bdist { sha256 = "1pr39nm23fj83jy272798gbl9003rgi4vgsi33f2iw3dk3x15kls"; version = "0.17.79"; }; - experimental = bdist { sha256 = "1srlzncwp1gcdy6ih8cc1ml5ggvg6xkw5jc2q95qjb9gpjv29mnl"; version = "0.18.26"; }; + stable = bdist { sha256 = "0r0lplns8nxna2viv8qyx9mp4cckdvx6k20w2g2fwnj3jjmf3nc1"; version = "1.0.0"; }; + experimental = bdist { sha256 = "0r0lplns8nxna2viv8qyx9mp4cckdvx6k20w2g2fwnj3jjmf3nc1"; version = "1.0.0"; }; }; demo = { - stable = bdist { sha256 = "07qknasaqvzl9vy1fglm7xmdi7ynhmslrb0a209fhbfs0s7qqlgi"; version = "0.17.79"; }; + stable = bdist { sha256 = "0h9cqbp143w47zcl4qg4skns4cngq0k40s5jwbk0wi5asjz8whqn"; version = "1.0.0"; }; }; }; i686-linux = let bdist = bdistForArch { inUrl = "linux32"; inTar = "i386"; }; in { @@ -166,7 +176,7 @@ let ''; homepage = "https://www.factorio.com/"; license = stdenv.lib.licenses.unfree; - maintainers = with stdenv.lib.maintainers; [ Baughn elitak erictapen ]; + maintainers = with stdenv.lib.maintainers; [ Baughn elitak erictapen priegger ]; platforms = [ "i686-linux" "x86_64-linux" ]; }; }; @@ -224,6 +234,11 @@ let ${updateConfigSh} EOF ) $out/share/factorio/update-config.sh + + mkdir -p $out/share/icons/hicolor/{64x64,128x128}/apps + cp -a data/core/graphics/factorio-icon.png $out/share/icons/hicolor/64x64/apps/factorio.png + cp -a data/core/graphics/factorio-icon@2x.png $out/share/icons/hicolor/128x128/apps/factorio.png + ln -s ${desktopItem}/share/applications $out/share/ ''; }; alpha = demo // { |