grin/flake.nix
2024-04-20 13:28:49 +08:00

46 lines
1 KiB
Nix

{
description = "THE MIMBLEWIMBLE BLOCKCHAIN.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";
};
outputs =
{ self, nixpkgs }:
let
forAllSystems = with nixpkgs; lib.genAttrs lib.systems.flakeExposed;
nixpkgsFor = forAllSystems (
system:
import nixpkgs {
inherit system;
overlays = [ self.overlay ];
}
);
in
{
overlay =
final: prev: with final; {
grin = pkgs.rustPlatform.buildRustPackage {
pname = "grin";
version = "5.3.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ pkgs.clang ];
buildInputs = [ pkgs.ncurses ];
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
# do not let test results block the build process
doCheck = false;
};
};
packages = forAllSystems (system: {
default = nixpkgsFor.${system}.grin;
});
};
}