Some checks failed
Rust / build (push) Failing after 27s
Added nixify as an input and refactored flake outputs using nixify utilities. Updated dependencies and build configurations, including platform-specific enhancements and new package sources for streamlined builds.
67 lines
1.7 KiB
Nix
67 lines
1.7 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
|
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-25.05-darwin";
|
|
nixify.url = "github:rvolosatovs/nixify";
|
|
nixify.inputs.nixpkgs-nixos.follows = "nixpkgs";
|
|
nixify.inputs.nixpkgs-darwin.follows = "nixpkgs-darwin";
|
|
};
|
|
|
|
outputs =
|
|
{ nixify, ... }:
|
|
with nixify.lib;
|
|
rust.mkFlake {
|
|
src = ./.;
|
|
|
|
withDevShells =
|
|
{ devShells
|
|
, pkgs
|
|
, ...
|
|
}:
|
|
extendDerivations
|
|
{
|
|
env.LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${
|
|
with pkgs;
|
|
pkgs.lib.makeLibraryPath [
|
|
openssl
|
|
]
|
|
}";
|
|
buildInputs = with pkgs; [
|
|
openssl
|
|
];
|
|
}
|
|
devShells;
|
|
|
|
buildOverrides =
|
|
{ pkgs
|
|
, pkgsCross ? pkgs
|
|
, ...
|
|
}:
|
|
{ buildInputs ? [ ]
|
|
, nativeBuildInputs ? [ ]
|
|
, depsBuildBuild ? [ ]
|
|
, env ? { }
|
|
, ...
|
|
}:
|
|
with pkgs.lib;
|
|
{
|
|
nativeBuildInputs =
|
|
nativeBuildInputs
|
|
++ optional (pkgs.stdenv.hostPlatform.isLinux) [ pkgs.pkg-config ];
|
|
|
|
buildInputs =
|
|
buildInputs
|
|
++ optional pkgs.stdenv.hostPlatform.isDarwin pkgs.libiconv
|
|
++ optional (pkgs.stdenv.hostPlatform.isLinux) [
|
|
pkgs.openssl.dev
|
|
];
|
|
|
|
depsBuildBuild =
|
|
depsBuildBuild
|
|
++ optional pkgsCross.stdenv.hostPlatform.isDarwin pkgsCross.xcbuild.xcrun;
|
|
env = env // {
|
|
OPENSSL_NO_VENDOR = "1";
|
|
};
|
|
};
|
|
};
|
|
}
|