10 rustPlatform.buildRustPackage rec {
14 src = fetchFromGitLab {
18 hash = "sha256-DVvdCt/t7aA2IAs+cL6wT129PX8s3P5gHawcLAvAAGw=";
19 # only needed for vatch, which contains test data
20 fetchSubmodules = true;
24 lockFile = ./Cargo.lock;
26 "codespan-0.12.0" = "sha256-3F2006BR3hyhxcUTaQiOjzTEuRECKJKjIDyXonS/lrE=";
30 # rust + gitlab is a rare combo
31 passthru.updateScript = [
32 (writeScript "update-spade" ''
34 ${lib.getExe git} ls-remote --tags --sort -version:refname ${lib.escapeShellArg src.gitRepoUrl} \
35 | cut -f2 | grep ^refs/tags/v | cut -d/ -f3- | cut -c2- \
36 | sort --version-sort --reverse | head -n1
38 exec ${lib.getExe nix-update} --version "$VERSION" "$@"
43 description = "Better hardware description language";
44 homepage = "https://gitlab.com/spade-lang/spade";
45 changelog = "https://gitlab.com/spade-lang/spade/-/blob/${src.rev}/CHANGELOG.md";
46 # compiler is eupl12, spade-lang stdlib is both asl20 and mit
47 license = with licenses; [ eupl12 asl20 mit ];
48 maintainers = with maintainers; [ pbsds ];
49 mainProgram = "spade";
50 broken = stdenv.isDarwin; # ld: symbol(s) not found for architecture ${system}