46 lines
1.0 KiB
Nix
Raw Permalink Normal View History

2024-09-15 18:17:30 +02:00
{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
2025-03-11 00:57:40 +01:00
nix-update-script,
2024-09-15 18:17:30 +02:00
}:
rustPlatform.buildRustPackage (finalAttrs: {
2024-09-15 18:17:30 +02:00
pname = "sus-compiler";
version = "0.2.1";
2024-09-15 18:17:30 +02:00
src = fetchFromGitHub {
owner = "pc2";
repo = "sus-compiler";
tag = "v${finalAttrs.version}";
hash = "sha256-dQef5TiOV33lnNl7XKl7TlCY0E2sEclehWOmy2uvISY=";
2024-09-15 18:17:30 +02:00
fetchSubmodules = true;
};
# no lockfile upstream
cargoLock.lockFile = ./Cargo.lock;
preBuild = ''
export HOME="$TMPDIR";
'';
2024-09-15 18:17:30 +02:00
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/sus_compiler";
2025-03-11 00:57:40 +01:00
updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };
2024-09-15 18:17:30 +02:00
meta = {
description = "New Hardware Design Language that keeps you in the driver's seat";
2024-09-15 18:17:30 +02:00
homepage = "https://github.com/pc2/sus-compiler";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ pbsds ];
mainProgram = "sus_compiler";
};
})