From 81e4cfcba618b793b3b2e1d1536b2a1aea6ffed0 Mon Sep 17 00:00:00 2001 From: Alejandro Cabeza Romero Date: Tue, 3 Feb 2026 15:07:19 +0100 Subject: [PATCH] Add devshell to flake. --- flake.nix | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index ae1c61dc..e3358b74 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,7 @@ outputs = { + self, nixpkgs, rust-overlay, crane, @@ -57,24 +58,37 @@ }; logosExecutionZoneWalletFfi = craneLib.buildPackage ( - commonArgs // { + commonArgs + // { pname = "logos-execution-zone-wallet-ffi"; version = "0.1.0"; cargoExtraArgs = "-p wallet-ffi"; postInstall = '' mkdir -p $out/include cp wallet-ffi/wallet_ffi.h $out/include/ - '' + pkgs.lib.optionalString pkgs.stdenv.isDarwin '' + '' + + pkgs.lib.optionalString pkgs.stdenv.isDarwin '' install_name_tool -id @rpath/libwallet_ffi.dylib $out/lib/libwallet_ffi.dylib ''; } ); - in { logos-execution-zone-wallet-ffi = logosExecutionZoneWalletFfi; default = logosExecutionZoneWalletFfi; } ); + devShells = forAll ( + system: + let + pkgs = mkPkgs system; + walletFfi = self.packages.${system}.logos-execution-zone-wallet-ffi; + in + { + default = pkgs.mkShell { + inputsFrom = [ walletFfi ]; + }; + } + ); }; }