Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flake builder -- again #114

Merged
merged 6 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 29 additions & 27 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 18 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
nixpkgs,
rust-overlay,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
overlays = [(import rust-overlay)];
Expand All @@ -23,25 +22,31 @@
in rec {
# `nix build`
packages = {
ironhide = pkgs.rustPlatform.buildRustPackage {
pname = cargoToml.package.name;
version = cargoToml.package.version;
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = with pkgs;
[rusttoolchain]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin
(with pkgs.darwin.apple_sdk.frameworks; [Security SystemConfiguration]);
};
ironhide =
(pkgs.makeRustPlatform {
cargo = rusttoolchain;
rustc = rusttoolchain;
})
.buildRustPackage {
# ironhide = pkgs.rustPlatform.buildRustPackage {
pname = cargoToml.package.name;
inherit (cargoToml.package) version;
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = with pkgs;
[rusttoolchain]
++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [Security SystemConfiguration]);
};
default = packages.ironhide;
};

# nix develop
devShells.default = pkgs.mkShell {
buildInputs = with pkgs;
[rusttoolchain]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin
(with pkgs.darwin.apple_sdk.frameworks; [Security SystemConfiguration]);
++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [Security SystemConfiguration]);
};
});
}