tana: 1.0.17 -> 1.0.18 (#363483)
[NixPkgs.git] / pkgs / development / tools / pactorio / default.nix
blobdc0b2e1dfbcb662e805bb7826b3a94a0d291abe3
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   installShellFiles,
6   pkg-config,
7   bzip2,
8   stdenv,
9   Security,
12 rustPlatform.buildRustPackage rec {
13   pname = "pactorio";
14   version = "0.6.0";
16   src = fetchFromGitHub {
17     owner = "figsoda";
18     repo = pname;
19     rev = "v${version}";
20     sha256 = "sha256-3+irejeDltf7x+gyJxWBgvPgpQx5uU3DewU23Z4Nr/A=";
21   };
23   cargoHash = "sha256-sAFsG+EPSmvPDFR9R0fZ5f+y/PXVpTJlMzL61vwf4SY=";
25   nativeBuildInputs = [
26     installShellFiles
27     pkg-config
28   ];
30   buildInputs = [ bzip2 ] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
32   postInstall = ''
33     installManPage artifacts/pactorio.1
34     installShellCompletion artifacts/pactorio.{bash,fish} --zsh artifacts/_pactorio
35   '';
37   GEN_ARTIFACTS = "artifacts";
39   meta = with lib; {
40     description = "Mod packager for factorio";
41     mainProgram = "pactorio";
42     homepage = "https://github.com/figsoda/pactorio";
43     changelog = "https://github.com/figsoda/pactorio/blob/v${version}/CHANGELOG.md";
44     license = licenses.mpl20;
45     maintainers = with maintainers; [ figsoda ];
46   };