Something went wrong. Try again.
Rust CLI for tangled
Something went wrong. Try again.
tangled-cli flake.nix
1.9 kB · 80 lines
Nix
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081{ description = "Development environment for Tangled CLI";
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; rust-overlay.url = "github:oxalica/rust-overlay"; };
outputs = { nixpkgs, flake-utils, rust-overlay, ... }: flake-utils.lib.eachDefaultSystem ( system: let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; inherit (pkgs) lib stdenv; rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; rustPlatform = pkgs.makeRustPlatform { cargo = rustToolchain; rustc = rustToolchain; }; in { devShells.default = pkgs.mkShell { packages = with pkgs; [ git rustToolchain ];
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [ openssl ] ++ lib.optionals stdenv.isLinux [ dbus ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
env = { RUST_BACKTRACE = "1"; }; };
packages.default = rustPlatform.buildRustPackage { pname = "tangled-cli"; version = "0.1.0"; src = ./.;
cargoLock.lockFile = ./Cargo.lock; cargoBuildFlags = [ "-p" "tangled-cli" ];
nativeBuildInputs = [ pkgs.pkg-config ]; nativeCheckInputs = [ pkgs.git ]; buildInputs = [ pkgs.openssl ] ++ lib.optionals stdenv.isLinux [ pkgs.dbus ] ++ lib.optionals stdenv.isDarwin [ pkgs.libiconv ]; };
formatter = pkgs.nixfmt; } );}