use crane for the flake (#77)
improves the nix toolchain at various points
This commit is contained in:
commit
90ee58006e
5 changed files with 327 additions and 160 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
name = "flurry"
|
name = "flurry"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "AGPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1.83"
|
async-trait = "0.1.83"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
-C target-cpu=native
|
target-cpu = "native"
|
||||||
|
|
|
||||||
10
deny.toml
Normal file
10
deny.toml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[licenses]
|
||||||
|
allow = [
|
||||||
|
"MIT",
|
||||||
|
"Apache-2.0",
|
||||||
|
"BSD-2-Clause",
|
||||||
|
"BSD-3-Clause",
|
||||||
|
"Unicode-3.0",
|
||||||
|
"Apache-2.0 WITH LLVM-exception",
|
||||||
|
"AGPL-3.0",
|
||||||
|
]
|
||||||
237
flake.lock
generated
237
flake.lock
generated
|
|
@ -1,16 +1,80 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"advisory-db": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733749954,
|
||||||
|
"narHash": "sha256-2Ug80Uf/oUujxgh02Iy5vTG0V+Ab9+YUHuRLRY0ayiY=",
|
||||||
|
"owner": "rustsec",
|
||||||
|
"repo": "advisory-db",
|
||||||
|
"rev": "ec9ce28714bb38d77a2223e7266df705500a7f11",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rustsec",
|
||||||
|
"repo": "advisory-db",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"advisory-db_2": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733749954,
|
||||||
|
"narHash": "sha256-2Ug80Uf/oUujxgh02Iy5vTG0V+Ab9+YUHuRLRY0ayiY=",
|
||||||
|
"owner": "rustsec",
|
||||||
|
"repo": "advisory-db",
|
||||||
|
"rev": "ec9ce28714bb38d77a2223e7266df705500a7f11",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rustsec",
|
||||||
|
"repo": "advisory-db",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"crane": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734324364,
|
||||||
|
"narHash": "sha256-omYTR59TdH0AumP1cfh49fBnWZ52HjfdNfaLzCMZBx0=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "60d7623f1320470bf2fdb92fd2dca1e9a27b98ce",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"crane_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734324364,
|
||||||
|
"narHash": "sha256-omYTR59TdH0AumP1cfh49fBnWZ52HjfdNfaLzCMZBx0=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "60d7623f1320470bf2fdb92fd2dca1e9a27b98ce",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"fenix": {
|
"fenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": [
|
||||||
"rust-analyzer-src": "rust-analyzer-src"
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-analyzer-src": []
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734157906,
|
"lastModified": 1734331093,
|
||||||
"narHash": "sha256-4zYEtbxdhYkmmFC5vgv9pmIVHylEuKs+iJb1XsKDN7o=",
|
"narHash": "sha256-9UrKDtqfLdsmDW4kRG/jSUAWot0jfL4WzcKA4nCvJZM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "fenix",
|
"repo": "fenix",
|
||||||
"rev": "06de03ede52ce64db6eb65be878a39b5ec944f50",
|
"rev": "e39e49f3314f7dd09671094dc640b528ba2b1e4b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -21,15 +85,20 @@
|
||||||
},
|
},
|
||||||
"fenix_2": {
|
"fenix_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": [
|
||||||
"rust-analyzer-src": "rust-analyzer-src_2"
|
"tsunami",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-analyzer-src": [
|
||||||
|
"tsunami"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733812506,
|
"lastModified": 1734331093,
|
||||||
"narHash": "sha256-3fgFIijf23nKfJogpcEaUGky1W2BpOzpr0ljgx+cmOM=",
|
"narHash": "sha256-9UrKDtqfLdsmDW4kRG/jSUAWot0jfL4WzcKA4nCvJZM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "fenix",
|
"repo": "fenix",
|
||||||
"rev": "0d8227f07b35ab04fee007fff4f9bb18c6d66af1",
|
"rev": "e39e49f3314f7dd09671094dc640b528ba2b1e4b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -38,122 +107,128 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733940404,
|
"lastModified": 1731533236,
|
||||||
"narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=",
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
"owner": "nixos",
|
"owner": "numtide",
|
||||||
"repo": "nixpkgs",
|
"repo": "flake-utils",
|
||||||
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713",
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "numtide",
|
||||||
"ref": "nixos-unstable",
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734126203,
|
||||||
|
"narHash": "sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "71a6392e367b08525ee710a93af2e80083b5b3e2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733940404,
|
"lastModified": 1734126203,
|
||||||
"narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=",
|
"narHash": "sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713",
|
"rev": "71a6392e367b08525ee710a93af2e80083b5b3e2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixpkgs-unstable",
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733581040,
|
|
||||||
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_4": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733759999,
|
|
||||||
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"advisory-db": "advisory-db",
|
||||||
|
"crane": "crane",
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
"tsunami": "tsunami"
|
"tsunami": "tsunami"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src": {
|
"systems": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734121833,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-EZtwXmh9P9FnoXKfbjGxyWksjrjPB4HES2HVIV+STNg=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
"owner": "rust-lang",
|
"owner": "nix-systems",
|
||||||
"repo": "rust-analyzer",
|
"repo": "default",
|
||||||
"rev": "fc18d263aa95f7d6de8174bd4c6663dfe865e6d5",
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "rust-lang",
|
"owner": "nix-systems",
|
||||||
"ref": "nightly",
|
"repo": "default",
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src_2": {
|
"systems_2": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733756789,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-cK9hSImKm6FkMeIsdjzuRA1tjOKnXI1VHdmJbmpOYqI=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
"owner": "rust-lang",
|
"owner": "nix-systems",
|
||||||
"repo": "rust-analyzer",
|
"repo": "default",
|
||||||
"rev": "99a6ecd41e5e458b3f4c2142b29a80d77ecda248",
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "rust-lang",
|
"owner": "nix-systems",
|
||||||
"ref": "nightly",
|
"repo": "default",
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tsunami": {
|
"tsunami": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"advisory-db": "advisory-db_2",
|
||||||
|
"crane": "crane_2",
|
||||||
"fenix": "fenix_2",
|
"fenix": "fenix_2",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734016882,
|
"lastModified": 1734357001,
|
||||||
"narHash": "sha256-QqnrhOPgvykA+2a9iIzpOW8S3Ef8uA7aAFxcRqS8fB8=",
|
"narHash": "sha256-NN/Eu7ZDJUsii7AKNk6wtRcuHkv5i3jxB0PC3HFqy8E=",
|
||||||
"owner": "itepastra",
|
"owner": "itepastra",
|
||||||
"repo": "tsunami",
|
"repo": "tsunami",
|
||||||
"rev": "872017618ae615152dc97b6379f5e92b175a55e9",
|
"rev": "91e796c9886282f88bfab8df5f077a7df9800759",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
237
flake.nix
237
flake.nix
|
|
@ -1,99 +1,180 @@
|
||||||
{
|
{
|
||||||
|
description = "A pixelflut stress testing tool";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
crane.url = "github:ipetkov/crane";
|
||||||
|
|
||||||
fenix = {
|
fenix = {
|
||||||
url = "github:nix-community/fenix";
|
url = "github:nix-community/fenix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.rust-analyzer-src.follows = "";
|
||||||
};
|
};
|
||||||
tsunami = {
|
tsunami = {
|
||||||
url = "github:itepastra/tsunami";
|
url = "github:itepastra/tsunami";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
|
advisory-db = {
|
||||||
|
url = "github:rustsec/advisory-db";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
fenix,
|
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
crane,
|
||||||
|
fenix,
|
||||||
|
flake-utils,
|
||||||
tsunami,
|
tsunami,
|
||||||
|
advisory-db,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
flake-utils.lib.eachDefaultSystem (
|
||||||
allSystems = [
|
system:
|
||||||
"x86_64-linux" # 64-bit Intel/AMD Linux
|
let
|
||||||
"aarch64-linux" # 64-bit ARM Linux
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
"x86_64-darwin" # 64-bit Intel macOS
|
tsu = tsunami.packages.${system};
|
||||||
"aarch64-darwin" # 64-bit ARM macOS
|
|
||||||
];
|
inherit (pkgs) lib;
|
||||||
forAllSystems =
|
|
||||||
f:
|
craneLib = (crane.mkLib pkgs).overrideToolchain (p: fenix.packages.${system}.complete.toolchain);
|
||||||
nixpkgs.lib.genAttrs allSystems (
|
src = craneLib.cleanCargoSource ./.;
|
||||||
system:
|
|
||||||
f {
|
# Common arguments can be set here to avoid repeating them later
|
||||||
inherit system;
|
commonArgs = {
|
||||||
inherit tsunami;
|
inherit src;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
strictDeps = true;
|
||||||
fpkgs = import fenix { inherit system; };
|
|
||||||
|
buildInputs =
|
||||||
|
[
|
||||||
|
# Add additional build inputs here
|
||||||
|
]
|
||||||
|
++ lib.optionals pkgs.stdenv.isDarwin [
|
||||||
|
# Additional darwin specific inputs can be set here
|
||||||
|
pkgs.libiconv
|
||||||
|
];
|
||||||
|
|
||||||
|
# Additional environment variables can be set directly
|
||||||
|
# MY_CUSTOM_VAR = "some value";
|
||||||
|
};
|
||||||
|
|
||||||
|
craneLibLLvmTools = craneLib.overrideToolchain (
|
||||||
|
fenix.packages.${system}.complete.withComponents [
|
||||||
|
"cargo"
|
||||||
|
"llvm-tools"
|
||||||
|
"rustc"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
# Build *just* the cargo dependencies, so we can reuse
|
||||||
|
# all of that work (e.g. via cachix) when running in CI
|
||||||
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||||||
|
|
||||||
|
# Build the actual crate itself, reusing the dependency
|
||||||
|
# artifacts from above.
|
||||||
|
flurry = craneLib.buildPackage (
|
||||||
|
commonArgs
|
||||||
|
// {
|
||||||
|
inherit cargoArtifacts;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = forAllSystems (
|
checks = {
|
||||||
{ pkgs, fpkgs, ... }:
|
# Build the crate as part of `nix flake check` for convenience
|
||||||
let
|
inherit flurry;
|
||||||
toolchain = fpkgs.minimal.toolchain;
|
|
||||||
fs = pkgs.lib.fileset;
|
# Run clippy (and deny all warnings) on the crate source,
|
||||||
in
|
# again, reusing the dependency artifacts from above.
|
||||||
rec {
|
#
|
||||||
default = flurry;
|
# Note that this is done as a separate derivation so that
|
||||||
flurry =
|
# we can block the CI if there are issues here, but not
|
||||||
(pkgs.makeRustPlatform {
|
# prevent downstream consumers from building our crate by itself.
|
||||||
cargo = toolchain;
|
flurry-clippy = craneLib.cargoClippy (
|
||||||
rustc = toolchain;
|
commonArgs
|
||||||
}).buildRustPackage
|
// {
|
||||||
{
|
inherit cargoArtifacts;
|
||||||
pname = "flurry";
|
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
||||||
version = "0.1.0";
|
}
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
);
|
||||||
src = fs.toSource {
|
|
||||||
root = ./.;
|
flurry-doc = craneLib.cargoDoc (
|
||||||
fileset = fs.unions [
|
commonArgs
|
||||||
./Cargo.lock
|
// {
|
||||||
./Cargo.toml
|
inherit cargoArtifacts;
|
||||||
./src
|
}
|
||||||
./assets
|
);
|
||||||
];
|
|
||||||
};
|
# Check formatting
|
||||||
};
|
flurry-fmt = craneLib.cargoFmt {
|
||||||
}
|
inherit src;
|
||||||
);
|
|
||||||
devShells = forAllSystems (
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
fpkgs,
|
|
||||||
system,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
ffpkgs = fpkgs.complete;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
ffpkgs.cargo
|
|
||||||
ffpkgs.clippy
|
|
||||||
ffpkgs.rust-src
|
|
||||||
ffpkgs.rustc
|
|
||||||
ffpkgs.rustfmt
|
|
||||||
pkgs.gcc
|
|
||||||
pkgs.wgo
|
|
||||||
tsunami.packages.${system}.tsunami
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
|
||||||
);
|
flurry-toml-fmt = craneLib.taploFmt {
|
||||||
hydraJobs = {
|
src = pkgs.lib.sources.sourceFilesBySuffices src [ ".toml" ];
|
||||||
devShell.x86_64-linux = self.devShells.x86_64-linux.default;
|
# taplo arguments can be further customized below as needed
|
||||||
flurry.x86_64-linux = self.packages.x86_64-linux.flurry;
|
# taploExtraArgs = "--config ./taplo.toml";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
# Audit dependencies
|
||||||
|
flurry-audit = craneLib.cargoAudit {
|
||||||
|
inherit src advisory-db;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Audit licenses
|
||||||
|
flurry-deny = craneLib.cargoDeny {
|
||||||
|
inherit src;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Run tests with cargo-nextest
|
||||||
|
# Consider setting `doCheck = false` on `flurry` if you do not want
|
||||||
|
# the tests to run twice
|
||||||
|
flurry-nextest = craneLib.cargoNextest (
|
||||||
|
commonArgs
|
||||||
|
// {
|
||||||
|
inherit cargoArtifacts;
|
||||||
|
partitions = 1;
|
||||||
|
partitionType = "count";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
packages =
|
||||||
|
{
|
||||||
|
default = flurry;
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
|
||||||
|
flurry-llvm-coverage = craneLibLLvmTools.cargoLlvmCov (
|
||||||
|
commonArgs
|
||||||
|
// {
|
||||||
|
inherit cargoArtifacts;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
apps.default = flake-utils.lib.mkApp {
|
||||||
|
drv = flurry;
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = craneLib.devShell {
|
||||||
|
# Inherit inputs from checks.
|
||||||
|
checks = self.checks.${system};
|
||||||
|
|
||||||
|
# Additional dev-shell environment variables can be set directly
|
||||||
|
# MY_CUSTOM_DEVELOPMENT_VAR = "something else";
|
||||||
|
|
||||||
|
# Extra inputs can be added here; cargo and rustc are provided by default.
|
||||||
|
packages = [
|
||||||
|
pkgs.wgo
|
||||||
|
pkgs.cargo-flamegraph
|
||||||
|
tsu.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue