mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-12-27 13:03:47 +03:00
rename pkgs to pkgsHost
This will make organizing cross compilation easier.
This commit is contained in:
parent
9cef03127b
commit
cf4015b830
1 changed files with 10 additions and 10 deletions
20
flake.nix
20
flake.nix
|
@ -26,7 +26,7 @@
|
||||||
, ...
|
, ...
|
||||||
}: flake-utils.lib.eachDefaultSystem (system:
|
}: flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgsHost = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
# Nix-accessible `Cargo.toml`
|
# Nix-accessible `Cargo.toml`
|
||||||
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
|
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
|
||||||
|
@ -58,15 +58,15 @@
|
||||||
]);
|
]);
|
||||||
|
|
||||||
builder =
|
builder =
|
||||||
((crane.mkLib pkgs).overrideToolchain buildToolchain).buildPackage;
|
((crane.mkLib pkgsHost).overrideToolchain buildToolchain).buildPackage;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgs.rustPlatform.bindgenHook
|
pkgsHost.rustPlatform.bindgenHook
|
||||||
];
|
];
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
ROCKSDB_INCLUDE_DIR = "${pkgs.rocksdb}/include";
|
ROCKSDB_INCLUDE_DIR = "${pkgsHost.rocksdb}/include";
|
||||||
ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib";
|
ROCKSDB_LIB_DIR = "${pkgsHost.rocksdb}/lib";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -94,23 +94,23 @@
|
||||||
let
|
let
|
||||||
package = self.packages.${system}.default;
|
package = self.packages.${system}.default;
|
||||||
in
|
in
|
||||||
pkgs.dockerTools.buildImage {
|
pkgsHost.dockerTools.buildImage {
|
||||||
name = package.pname;
|
name = package.pname;
|
||||||
tag = "latest";
|
tag = "latest";
|
||||||
config = {
|
config = {
|
||||||
# Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT) are
|
# Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT) are
|
||||||
# handled as expected
|
# handled as expected
|
||||||
Entrypoint = [
|
Entrypoint = [
|
||||||
"${pkgs.lib.getExe' pkgs.tini "tini"}"
|
"${pkgsHost.lib.getExe' pkgsHost.tini "tini"}"
|
||||||
"--"
|
"--"
|
||||||
];
|
];
|
||||||
Cmd = [
|
Cmd = [
|
||||||
"${pkgs.lib.getExe package}"
|
"${pkgsHost.lib.getExe package}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgsHost.mkShell {
|
||||||
env = env // {
|
env = env // {
|
||||||
# Rust Analyzer needs to be able to find the path to default crate
|
# Rust Analyzer needs to be able to find the path to default crate
|
||||||
# sources, and it can read this environment variable to do so. The
|
# sources, and it can read this environment variable to do so. The
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
# Development tools
|
# Development tools
|
||||||
nativeBuildInputs = nativeBuildInputs ++ [
|
nativeBuildInputs = nativeBuildInputs ++ [
|
||||||
devToolchain
|
devToolchain
|
||||||
] ++ (with pkgs; [
|
] ++ (with pkgsHost; [
|
||||||
engage
|
engage
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue