2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, bzip2
|
|
|
|
, stdenv
|
|
|
|
, Security
|
|
|
|
}:
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "pactorio";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "0.6.0";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "figsoda";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-3+irejeDltf7x+gyJxWBgvPgpQx5uU3DewU23Z4Nr/A=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
cargoHash = "sha256-sAFsG+EPSmvPDFR9R0fZ5f+y/PXVpTJlMzL61vwf4SY=";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = [ bzip2 ] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2022-10-06 18:32:54 +00:00
|
|
|
installManPage artifacts/pactorio.1
|
|
|
|
installShellCompletion artifacts/pactorio.{bash,fish} --zsh artifacts/_pactorio
|
2021-03-09 03:18:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
GEN_ARTIFACTS = "artifacts";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-09-18 10:52:07 +00:00
|
|
|
description = "Mod packager for factorio";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pactorio";
|
2021-03-09 03:18:52 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|