Skip to content

Commit 95ed753

Browse files
chore: add nix flake package
1 parent 4fc1570 commit 95ed753

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

flake.nix

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,14 @@
4747
system,
4848
...
4949
}: let
50-
cargoBuildInputs =
51-
pkgs.lib.optionals pkgs.stdenv.isDarwin
52-
(with pkgs.darwin.apple_sdk; [
53-
frameworks.Security
54-
frameworks.CoreServices
55-
]);
50+
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
5651
in {
52+
# Rust package
53+
packages.default = pkgs.rustPlatform.buildRustPackage {
54+
inherit (cargoToml.package) name version;
55+
src = ./.;
56+
cargoLock.lockFile = ./Cargo.lock;
57+
};
5758
# Per-system attributes can be defined here. The self' and inputs'
5859
# module parameters provide easy access to attributes of the same
5960
# system.

0 commit comments

Comments
 (0)