Build using nix.
This commit is contained in:
37
flake.nix
37
flake.nix
@@ -51,5 +51,42 @@
|
||||
};
|
||||
}
|
||||
);
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
in
|
||||
rec {
|
||||
app = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "webhook-bridge";
|
||||
version = "0.0.0";
|
||||
src = ./.;
|
||||
|
||||
# If you have a Cargo.lock file, use this:
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
pkgs.openssl
|
||||
];
|
||||
};
|
||||
docker_env = pkgs.buildEnv {
|
||||
name = "webhook-bridge";
|
||||
paths = with pkgs; [
|
||||
app
|
||||
bash
|
||||
uutils-coreutils-noprefix
|
||||
# toybox # Smaller than uutils-coreutils?
|
||||
];
|
||||
};
|
||||
default = app;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user