nixpkgs/pkgs/development/tools/pactorio/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1023 B
Nix
Raw Normal View History

2021-11-11 02:17:23 +03:00
{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
, pkg-config
, bzip2
, stdenv
, Security
}:
2021-02-25 23:30:58 +03:00
rustPlatform.buildRustPackage rec {
pname = "pactorio";
2022-10-02 02:05:36 +03:00
version = "0.6.0";
2021-02-25 23:30:58 +03:00
src = fetchFromGitHub {
owner = "figsoda";
repo = pname;
rev = "v${version}";
2022-10-02 02:05:36 +03:00
sha256 = "sha256-3+irejeDltf7x+gyJxWBgvPgpQx5uU3DewU23Z4Nr/A=";
2021-02-25 23:30:58 +03:00
};
2022-10-02 02:05:36 +03:00
cargoSha256 = "sha256-sAFsG+EPSmvPDFR9R0fZ5f+y/PXVpTJlMzL61vwf4SY=";
2021-02-25 23:30:58 +03:00
2021-11-11 02:17:23 +03:00
nativeBuildInputs = [ installShellFiles pkg-config ];
2021-02-25 23:30:58 +03:00
2021-11-11 02:17:23 +03:00
buildInputs = [ bzip2 ] ++ lib.optional stdenv.isDarwin Security;
postInstall = ''
2022-10-02 02:05:36 +03:00
installManPage artifacts/pactorio.1
installShellCompletion artifacts/pactorio.{bash,fish} --zsh artifacts/_pactorio
2021-02-25 23:30:58 +03:00
'';
2022-10-02 02:05:36 +03:00
GEN_ARTIFACTS = "artifacts";
2021-02-25 23:30:58 +03:00
meta = with lib; {
2021-09-03 17:28:47 +03:00
description = "Mod packager for factorio";
2021-02-25 23:30:58 +03:00
homepage = "https://github.com/figsoda/pactorio";
changelog = "https://github.com/figsoda/pactorio/blob/v${version}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [ figsoda ];
};
}