diff options
author | figsoda <figsoda@pm.me> | 2023-06-10 11:33:49 -0400 |
---|---|---|
committer | figsoda <figsoda@pm.me> | 2023-06-10 11:41:59 -0400 |
commit | d838c0cc9af3d5289946da0da7cfe9e2c7a69b6d (patch) | |
tree | 92f54c6fd4b8f3edb88ac1a7cfc6ee4bd339da6e /pkgs/development/interpreters/starlark-rust | |
parent | 7a6f8bd99d624ff1932a44a391cfa76c90bdcd84 (diff) |
starlark-rust: init at 0.9.0
https://github.com/facebookexperimental/starlark-rust
Diffstat (limited to 'pkgs/development/interpreters/starlark-rust')
-rw-r--r-- | pkgs/development/interpreters/starlark-rust/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/starlark-rust/default.nix b/pkgs/development/interpreters/starlark-rust/default.nix new file mode 100644 index 0000000000000..c83f6195bc64f --- /dev/null +++ b/pkgs/development/interpreters/starlark-rust/default.nix @@ -0,0 +1,38 @@ +{ lib +, rustPlatform +, fetchCrate +, fetchpatch +, stdenv +}: + +rustPlatform.buildRustPackage rec { + pname = "starlark"; + version = "0.9.0"; + + src = fetchCrate { + inherit pname version; + hash = "sha256-h8TBWWw94Ka9C0W0i0aHACq6jO0QOLnLW+wTRzorHcc="; + }; + + cargoHash = "sha256-OLzotKyiG0JmtjH0ckRImHMPPxfQZ+8IHZtXlo1f8+Y="; + + patches = [ + # fix test broken due to using `fetchCrate` + # https://github.com/facebookexperimental/starlark-rust/pull/78 + (fetchpatch { + name = "fix-test-rust-loc-when-tested-from-the-crate.patch"; + url = "https://github.com/facebookexperimental/starlark-rust/commit/0e4f90c77868e506268fcb6c9d37368e5b2b8cf5.patch"; + hash = "sha256-c8irAyS2IQ5C6s+0t4+hbW8aFptkwvCu9JHLyZqZsW4="; + stripLen = 1; + }) + ]; + + meta = with lib; { + description = "A Rust implementation of the Starlark language"; + homepage = "https://github.com/facebookexperimental/starlark-rust"; + changelog = "https://github.com/facebookexperimental/starlark-rust/blob/v${version}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + broken = stdenv.isAarch64 || stdenv.isDarwin; + }; +} |