Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
68 lines
1.4 KiB
Nix
68 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
gitMinimal,
|
|
python3,
|
|
makeWrapper,
|
|
writeScriptBin,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "pylyzer";
|
|
version = "0.0.82";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mtshiba";
|
|
repo = "pylyzer";
|
|
tag = "v${version}";
|
|
hash = "sha256-cSMHd3j3xslSR/v4KZ5LUwxPPR/b+okwrT54gUyLXXw=";
|
|
};
|
|
|
|
cargoHash = "sha256-JrDj88JjQon2rtywa/PqnS1pTxTLigPHNnqQS/tO9RA=";
|
|
|
|
nativeBuildInputs = [
|
|
gitMinimal
|
|
python3
|
|
makeWrapper
|
|
writableTmpDirAsHomeHook
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ (writeScriptBin "diskutil" "") ];
|
|
|
|
buildInputs = [
|
|
python3
|
|
];
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/lib
|
|
cp -r $HOME/.erg/ $out/lib/erg
|
|
'';
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/pylyzer --set ERG_PATH $out/lib/erg
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
versionCheckProgramArg = "--version";
|
|
doInstallCheck = true;
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Fast static code analyzer & language server for Python";
|
|
homepage = "https://github.com/mtshiba/pylyzer";
|
|
changelog = "https://github.com/mtshiba/pylyzer/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ natsukium ];
|
|
mainProgram = "pylyzer";
|
|
};
|
|
}
|