Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport 0.3: Update nixpkgs 24.11 #112

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/holonix-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 6 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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 [ ];
Comment on lines +90 to +93
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comment below.

Suggested change
# 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";
Expand All @@ -101,7 +105,7 @@
buildInputs = [
pkgs.go
pkgs.perl
];
] ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin apple_sdk);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Do we need to check isDarwin and the system? Also, if it's just one package then we can use the lib.optional function instead.

Suggested change
] ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin apple_sdk);
]
# 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.
++ (pkgs.lib.optional (if system == "x86_64-darwin") pkgs.apple-sdk_10_15);

This really is just a style thing though so I leave the decision up to you 🙂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 It's a little more precise, though it makes no difference to the aarch64 systems.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really no, but since this change is being backported, I'd rather not just fix this on 0.3. I'll put a PR to tidy this up on main and leave main-0.3 and main-0.4 as they are

# 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;
Expand Down Expand Up @@ -287,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})"

Expand Down Expand Up @@ -354,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";
};
};
};

Expand Down
41 changes: 0 additions & 41 deletions templates/holo/flake.nix

This file was deleted.

Loading