Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 rustPlatform,
5 fetchFromGitHub,
6 gitMinimal,
7}:
8let
9 target = stdenv.hostPlatform.rust.cargoShortTarget;
10in
11rustPlatform.buildRustPackage (finalAttrs: {
12 pname = "bender";
13 version = "0.28.2";
14
15 src = fetchFromGitHub {
16 owner = "pulp-platform";
17 repo = "bender";
18 tag = "v${finalAttrs.version}";
19 hash = "sha256-OJWYhs5QmfUC1I5OkEJAeLTpklEQyQ6024wmhv1sSnA=";
20 };
21
22 cargoHash = "sha256-nZ2gchifWSmDlVJIsPcvrnUxzhyXYoA1kE9f2pZDJzs=";
23
24 nativeCheckInputs = [ gitMinimal ];
25 postCheck = ''
26 patchShebangs --build tests
27 BENDER="target/${target}/$cargoBuildType/bender" tests/run_all.sh
28 '';
29
30 meta = {
31 description = "Dependency management tool for hardware projects";
32 homepage = "https://github.com/pulp-platform/bender";
33 changelog = "https://github.com/pulp-platform/bender/releases/tag/${finalAttrs.src.rev}";
34 license = with lib.licenses; [
35 asl20
36 mit
37 ];
38 maintainers = with lib.maintainers; [ Liamolucko ];
39 mainProgram = "bender";
40 platforms = lib.platforms.all;
41 };
42})