diff --git a/flake.lock b/flake.lock index 8a80a48..2fb54df 100644 --- a/flake.lock +++ b/flake.lock @@ -1,198 +1,24 @@ { "nodes": { - "crane": { - "inputs": { - "nixpkgs": [ - "holonix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1721058578, - "narHash": "sha256-fs/PVa3H5dS1//4BjecWi3nitXm5fRObx0JxXIAo+JA=", - "owner": "ipetkov", - "repo": "crane", - "rev": "17e5109bb1d9fb393d70fba80988f7d70d1ded1a", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "hc-launch": { - "flake": false, - "locked": { - "lastModified": 1720810416, - "narHash": "sha256-PgykEezr0yrUAPQcmVJdR8M4PiKDzLCL/RS67RFeu/A=", - "owner": "holochain", - "repo": "hc-launch", - "rev": "b788d346491f4749949ae1710d51508920b6ea07", - "type": "github" - }, - "original": { - "owner": "holochain", - "ref": "holochain-weekly", - "repo": "hc-launch", - "type": "github" - } - }, - "hc-scaffold": { - "flake": false, - "locked": { - "lastModified": 1723558677, - "narHash": "sha256-s5WjtXlu8d7U/zY2Kv4daaH0TlSiVc+D+UqR6B7+qj4=", - "owner": "holochain", - "repo": "scaffolding", - "rev": "80edba8c2f5512ba0babcc8d84b78c1d79f0d1d8", - "type": "github" - }, - "original": { - "owner": "holochain", - "ref": "holochain-weekly", - "repo": "scaffolding", - "type": "github" - } - }, - "holochain": { - "flake": false, - "locked": { - "lastModified": 1723718736, - "narHash": "sha256-f8Hi7HvANahU5lJjtWk+XpnCcIjfMiV0yFxGqzqEXqU=", - "owner": "holochain", - "repo": "holochain", - "rev": "a3384305850735b1b71fa0ab6f36f2318ec56d28", - "type": "github" - }, - "original": { - "owner": "holochain", - "ref": "holochain-0.4.0-dev.18", - "repo": "holochain", - "type": "github" - } - }, - "holonix": { - "inputs": { - "crane": "crane", - "flake-parts": "flake-parts", - "hc-launch": "hc-launch", - "hc-scaffold": "hc-scaffold", - "holochain": "holochain", - "lair-keystore": "lair-keystore", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1723737493, - "narHash": "sha256-zP22A91tT/i+chslSATQvjKrZTXelwTcDqeNTLLTcyc=", - "owner": "holochain", - "repo": "holonix", - "rev": "6438098657b9441e65db1543f0200f22453238de", - "type": "github" - }, - "original": { - "owner": "holochain", - "ref": "main", - "repo": "holonix", - "type": "github" - } - }, - "lair-keystore": { - "flake": false, - "locked": { - "lastModified": 1717684904, - "narHash": "sha256-vcXt67Tl1qwVUkx8CBevdQocqZXUEeoXjaYw86ljsYo=", - "owner": "holochain", - "repo": "lair", - "rev": "6a84ed490fc7074d107e38bbb4a8d707e9b8e066", - "type": "github" - }, - "original": { - "owner": "holochain", - "ref": "lair_keystore-v0.4.5", - "repo": "lair", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1717179513, - "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=", - "owner": "nixos", + "lastModified": 1720781449, + "narHash": "sha256-po3TZO9kcZwzvkyMJKb0WCzzDtiHWD34XeRaX1lWXp0=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0", + "rev": "8b5a3d5a1d951344d683b442c0739010b80039db", "type": "github" }, "original": { - "owner": "nixos", - "ref": "24.05", + "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1719876945, - "narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" - } - }, "root": { "inputs": { - "flake-parts": [ - "holonix", - "flake-parts" - ], - "holonix": "holonix", - "nixpkgs": [ - "holonix", - "nixpkgs" - ] - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "holonix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1721269159, - "narHash": "sha256-eHrGuKZKQb762qdCkrfoyyxXLKumYhiXJca1ig0RftE=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "c3e217122ac55680606d69bc693bdf262f14f602", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index c246c27..be3e188 100644 --- a/flake.nix +++ b/flake.nix @@ -1,37 +1,41 @@ { - description = "Flake for Holochain app development"; + description = "Holochain Development Env"; inputs = { - holonix.url = "github:holochain/holonix?ref=main"; - holonix.inputs.holochain.url = "github:holochain/holochain?ref=holochain-0.4.0-dev.18"; - - nixpkgs.follows = "holonix/nixpkgs"; - flake-parts.follows = "holonix/flake-parts"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; - outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } { - systems = builtins.attrNames inputs.holonix.devShells; - perSystem = { inputs', pkgs, ... }: { - formatter = pkgs.nixpkgs-fmt; + outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = import ./pkgs.nix { + pkgs = nixpkgs.legacyPackages.${system}; + inherit system; + }; + in + { + devShells.${system} = { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + holochain_0-4 + lair-keystore_0-4-5 + hc_0-4 - devShells.default = pkgs.mkShell { - inputsFrom = [ inputs'.holonix.devShells ]; + rustup + cargo + rustc - packages = (with inputs'.holonix.packages; [ - holochain - lair-keystore - hn-introspect - rust # For Rust development, with the WASM target included for zome builds - ]) ++ (with pkgs; [ - nodejs_20 # For UI development - binaryen # For WASM optimisation - # Add any other packages you need here - ]); + nodejs_22 + ]; - shellHook = '' - export PS1='\[\033[1;34m\][holonix:\w]\$\[\033[0m\] ' - ''; + shellHook = '' + export PS1="\[\e[1;32m\](flake-env)\[\e[0m\] \[\e[1;34m\]\u@\h:\w\[\e[0m\]$ " + export CARGO_HOME=$(pwd)/.cargo + export RUSTUP_HOME=$(pwd)/.rustup + rustup default stable + rustup target add wasm32-unknown-unknown + ''; + }; }; }; - }; } diff --git a/pkgs.nix b/pkgs.nix index 3881add..ddfb315 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -3,8 +3,8 @@ import (pkgs.fetchFromGitHub { owner = "spartan-holochain-counsel"; repo = "nix-overlay"; - rev = "9c0ed332596994faaacb35593a2d427f9ac38bf2"; - sha256 = "E8dKMuhnd51Rh1tLud/asf/4TTFuZaIs0fZbe/rsUuQ="; + rev = "5bae4a38735d74633c9c089b5c896cb9631a295b"; + sha256 = "E/FvMyUgEB5MYL+s46YSiHPOAJiurKZDMQy1oxak6bg="; }) { inherit pkgs; inherit system; diff --git a/zomes/deepkey/src/utils.rs b/zomes/deepkey/src/utils.rs index 0d67c54..7b73606 100644 --- a/zomes/deepkey/src/utils.rs +++ b/zomes/deepkey/src/utils.rs @@ -12,7 +12,6 @@ use hdi_extensions::{ guest_error, }; use hdi::prelude::*; -use hdk::prelude::debug; pub fn serialize(target: &T) -> ExternResult>