blob: 2d05eee496f197fc21ac337f2af1143ef90b31d5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{
lib,
stdenv,
darwin,
rustPlatform,
fetchFromGitHub,
pkg-config,
cargo,
rustc,
clippy,
makeWrapper,
}:
let
pname = "rustlings";
version = "6.3.0";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "rust-lang";
repo = "rustlings";
rev = "v${version}";
hash = "sha256-te7DYgbEtWWSSvO28ajkJucRb3c9L8La1wfGW0WSxW0=";
};
cargoHash = "sha256-Vq4Os4CKkEz4HggIZhlbIo9Cu+BVJPdybL1CNvz5wEQ=";
# Disabled test that does not work well in an isolated environment
checkFlags = [
"--skip=run_compilation_success"
"--skip=run_test_success"
];
nativeBuildInputs = [
pkg-config
makeWrapper
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks; [ CoreServices ]
);
postFixup = ''
wrapProgram $out/bin/rustlings --suffix PATH : ${
lib.makeBinPath [
cargo
rustc
clippy
]
}
'';
meta = {
description = "Explore the Rust programming language and learn more about it while doing exercises";
homepage = "https://rustlings.cool/";
changelog = "https://github.com/rust-lang/rustlings/releases";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
mainProgram = "rustlings";
};
}
|