grin/flake.nix

47 lines
1 KiB
Nix
Raw Normal View History

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