From 403c1c598a7a94f9ce85fc8df69b11c0d940c102 Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Mon, 23 Dec 2024 16:33:58 +0000 Subject: [PATCH 1/3] Upgrade nixpkgs to 24.11 --- flake.lock | 40 ++++++++++++++++++++-------------------- flake.nix | 8 ++++++-- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index cd86427..5aaa6ab 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1727974419, - "narHash": "sha256-WD0//20h+2/yPGkO88d2nYbb23WMWYvnRyDQ9Dx4UHg=", + "lastModified": 1734808813, + "narHash": "sha256-3aH/0Y6ajIlfy7j52FGZ+s4icVX0oHhqBzRdlOeztqg=", "owner": "ipetkov", "repo": "crane", - "rev": "37e4f9f0976cb9281cd3f0c70081e5e0ecaee93f", + "rev": "72e2d02dbac80c8c86bf6bf3e785536acf8ee926", "type": "github" }, "original": { @@ -20,11 +20,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -53,11 +53,11 @@ "hc-scaffold": { "flake": false, "locked": { - "lastModified": 1733422567, - "narHash": "sha256-X7MUZ6wXPcsF6cFC4AK27UiUWpVzhdlrnL+1znfzVfM=", + "lastModified": 1732649902, + "narHash": "sha256-mRu+axcvRc2iLTCVa+C2aMJrCeuySlT96sZdORYAkBs=", "owner": "holochain", "repo": "scaffolding", - "rev": "4d97985a8a93db93c25326a4d75aac0a3ea40a06", + "rev": "07b559f262cd47e9939b87d7af953b3efd4d10c3", "type": "github" }, "original": { @@ -103,30 +103,30 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717179513, - "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=", + "lastModified": 1734875076, + "narHash": "sha256-Pzyb+YNG5u3zP79zoi8HXYMs15Q5dfjDgwCdUI5B0nY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0", + "rev": "1807c2b91223227ad5599d7067a61665c52d1295", "type": "github" }, "original": { "owner": "nixos", - "ref": "24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-lib": { "locked": { - "lastModified": 1727825735, - "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "lastModified": 1733096140, + "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" } }, "root": { @@ -148,11 +148,11 @@ ] }, "locked": { - "lastModified": 1728268235, - "narHash": "sha256-lJMFnMO4maJuNO6PQ5fZesrTmglze3UFTTBuKGwR1Nw=", + "lastModified": 1734834660, + "narHash": "sha256-bm8V+Cu8rWJA+vKQnc94mXTpSDgvedyoDKxTVi/uJfw=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "25685cc2c7054efc31351c172ae77b21814f2d42", + "rev": "b070e6030118680977bc2388868c4b3963872134", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a8969d0..cb90477 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ # specify all input dependencies needed to create the outputs of the flake inputs = { - nixpkgs.url = "github:nixos/nixpkgs?ref=24.05"; + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11"; # utility to iterate over multiple target platforms flake-parts.url = "github:hercules-ci/flake-parts"; @@ -87,6 +87,10 @@ # Crane doesn't know which version to select from a workspace, so we tell it where to look crateInfo = craneLib.crateNameFromCargoToml { cargoToml = inputs.holochain + "/crates/holochain/Cargo.toml"; }; + + # On intel macs, the default SDK is still 10.12 and Holochain won't build against that because we're + # using a newer Go version. So override with the newest SDK available for x86_64-darwin. + apple_sdk = if system == "x86_64-darwin" then [ pkgs.apple-sdk_10_15 ] else [ ]; in craneLib.buildPackage { pname = "holochain"; @@ -101,7 +105,7 @@ buildInputs = [ pkgs.go pkgs.perl - ]; + ] ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin apple_sdk); # Build Holochain, CLI and local services (bootstrap + signal server) binaries. # Pass extra arguments like feature flags to build command. cargoExtraArgs = "--bin holochain --bin hc --bin hc-sandbox --bin hc-run-local-services " + cargoExtraArgs; From c047998f3a6ebb7aeb0882f98bdfd1223284f620 Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Mon, 23 Dec 2024 16:34:28 +0000 Subject: [PATCH 2/3] Remove unusable holo dev server --- flake.nix | 10 ---------- templates/holo/flake.nix | 41 ---------------------------------------- 2 files changed, 51 deletions(-) delete mode 100644 templates/holo/flake.nix diff --git a/flake.nix b/flake.nix index cb90477..6ffe726 100644 --- a/flake.nix +++ b/flake.nix @@ -291,12 +291,6 @@ echo "Lair keystore : not installed" fi - if command -v "holo-dev-server" > /dev/null; then - echo "Holo dev server : $(holo-dev-server --version)" - else - echo "Holo dev server : not installed" - fi - if command -v "holochain" > /dev/null; then echo "Holochain : $(holochain --version) (${builtins.substring 0 7 inputs.holochain.rev})" @@ -358,10 +352,6 @@ path = ./templates/custom; description = "Holonix template for custom Holochain build"; }; - holo = { - path = ./templates/holo; - description = "Holonix template for Holo-enabled app development"; - }; }; }; diff --git a/templates/holo/flake.nix b/templates/holo/flake.nix deleted file mode 100644 index 4f5d204..0000000 --- a/templates/holo/flake.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - description = "Flake for Holo-enabled Holochain app development"; - - inputs = { - holonix.url = "github:holochain/holonix?ref=main-0.3"; - - nixpkgs.follows = "holonix/nixpkgs"; - flake-parts.follows = "holonix/flake-parts"; - - hds-releases.url = "github:holo-host/hds-releases?ref=2024-07-16-220445"; - }; - - outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } { - systems = builtins.attrNames inputs.holonix.devShells; - perSystem = { inputs', pkgs, ... }: { - formatter = pkgs.nixpkgs-fmt; - - devShells.default = pkgs.mkShell { - inputsFrom = [ inputs'.holonix.devShells ]; - - packages = (with inputs'.holonix.packages; [ - holochain - lair-keystore - hc-launch - hc-scaffold - hn-introspect - rust # For Rust development, with the WASM target included for zome builds - inputs'.hds-releases.packages.holo-dev-server-bin - ]) ++ (with pkgs; [ - nodejs_20 # For UI development - binaryen # For WASM optimisation - # Add any other packages you need here - ]); - - shellHook = '' - export PS1='\[\033[1;34m\][holonix:\w]\$\[\033[0m\] ' - ''; - }; - }; - }; -} From 3525c28360490d6b6c439a27a10b4117b19b5e06 Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Thu, 2 Jan 2025 14:39:06 +0000 Subject: [PATCH 3/3] Update scaffolding and require `--refresh` --- .github/workflows/holonix-update.yaml | 4 ++-- flake.lock | 32 +++++++++++++-------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/holonix-update.yaml b/.github/workflows/holonix-update.yaml index c0a348b..cd3e3df 100644 --- a/.github/workflows/holonix-update.yaml +++ b/.github/workflows/holonix-update.yaml @@ -68,11 +68,11 @@ jobs: - name: Run the Scaffolding bump script if: ${{ inputs.update-scaffolding }} run: | - nix flake update hc-scaffold + nix flake update hc-scaffold --refresh - name: Run the Launcher bump script if: ${{ inputs.update-launcher }} run: | - nix flake update hc-launch + nix flake update hc-launch --refresh - name: Create pull request id: cpr uses: peter-evans/create-pull-request@v6 diff --git a/flake.lock b/flake.lock index 5aaa6ab..0d74874 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1735774679, + "narHash": "sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq+raipRI=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "f2f7418ce0ab4a5309a4596161d154cfc877af66", "type": "github" }, "original": { @@ -53,11 +53,11 @@ "hc-scaffold": { "flake": false, "locked": { - "lastModified": 1732649902, - "narHash": "sha256-mRu+axcvRc2iLTCVa+C2aMJrCeuySlT96sZdORYAkBs=", + "lastModified": 1733422567, + "narHash": "sha256-X7MUZ6wXPcsF6cFC4AK27UiUWpVzhdlrnL+1znfzVfM=", "owner": "holochain", "repo": "scaffolding", - "rev": "07b559f262cd47e9939b87d7af953b3efd4d10c3", + "rev": "4d97985a8a93db93c25326a4d75aac0a3ea40a06", "type": "github" }, "original": { @@ -103,11 +103,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734875076, - "narHash": "sha256-Pzyb+YNG5u3zP79zoi8HXYMs15Q5dfjDgwCdUI5B0nY=", + "lastModified": 1735669367, + "narHash": "sha256-tfYRbFhMOnYaM4ippqqid3BaLOXoFNdImrfBfCp4zn0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1807c2b91223227ad5599d7067a61665c52d1295", + "rev": "edf04b75c13c2ac0e54df5ec5c543e300f76f1c9", "type": "github" }, "original": { @@ -119,14 +119,14 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1733096140, - "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", + "lastModified": 1735774519, + "narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" } }, "root": { @@ -148,11 +148,11 @@ ] }, "locked": { - "lastModified": 1734834660, - "narHash": "sha256-bm8V+Cu8rWJA+vKQnc94mXTpSDgvedyoDKxTVi/uJfw=", + "lastModified": 1735784864, + "narHash": "sha256-tIl5p3ueaPw7T5T1UXkLc8ISMk6Y8CI/D/rd0msf73I=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b070e6030118680977bc2388868c4b3963872134", + "rev": "04d5f1836721461b256ec452883362c5edc5288e", "type": "github" }, "original": {