python312Packages.recurring-ical-events: 3.3.3 -> 3.3.4 (#361883)
[NixPkgs.git] / pkgs / development / tools / pactorio / default.nix
blob06b55790ddf6fca134d6d97b763c0da0227fc248
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , installShellFiles
5 , pkg-config
6 , bzip2
7 , stdenv
8 , Security
9 }:
11 rustPlatform.buildRustPackage rec {
12   pname = "pactorio";
13   version = "0.6.0";
15   src = fetchFromGitHub {
16     owner = "figsoda";
17     repo = pname;
18     rev = "v${version}";
19     sha256 = "sha256-3+irejeDltf7x+gyJxWBgvPgpQx5uU3DewU23Z4Nr/A=";
20   };
22   cargoHash = "sha256-sAFsG+EPSmvPDFR9R0fZ5f+y/PXVpTJlMzL61vwf4SY=";
24   nativeBuildInputs = [ installShellFiles pkg-config ];
26   buildInputs = [ bzip2 ] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
28   postInstall = ''
29     installManPage artifacts/pactorio.1
30     installShellCompletion artifacts/pactorio.{bash,fish} --zsh artifacts/_pactorio
31   '';
33   GEN_ARTIFACTS = "artifacts";
35   meta = with lib; {
36     description = "Mod packager for factorio";
37     mainProgram = "pactorio";
38     homepage = "https://github.com/figsoda/pactorio";
39     changelog = "https://github.com/figsoda/pactorio/blob/v${version}/CHANGELOG.md";
40     license = licenses.mpl20;
41     maintainers = with maintainers; [ figsoda ];
42   };