Skip to content

Commit

Permalink
Merge pull request NixOS#30 from NixOS/update_nixpkgs
Browse files Browse the repository at this point in the history
Update flake inputs & get CI green
  • Loading branch information
abathur authored Dec 20, 2024
2 parents 0e0b58d + 14a8e32 commit b8ed72a
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 112 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
needs: [lints, build-x86_64-linux]
strategy:
matrix:
determinate: [true, false]
determinate: [false]
permissions:
id-token: "write"
contents: "read"
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
needs: [lints, build-x86_64-linux]
strategy:
matrix:
determinate: [true, false]
determinate: [false]
permissions:
id-token: "write"
contents: "read"
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
needs: [lints, build-x86_64-darwin]
strategy:
matrix:
determinate: [true, false]
determinate: [false]
permissions:
id-token: "write"
contents: "read"
Expand Down Expand Up @@ -402,7 +402,7 @@ jobs:
# needs: [lints, build-aarch64-linux]
# strategy:
# matrix:
# determinate: [true, false]
# determinate: [false]
# permissions:
# id-token: "write"
# contents: "read"
Expand Down Expand Up @@ -520,7 +520,7 @@ jobs:
needs: [lints, build-aarch64-darwin]
strategy:
matrix:
determinate: [true, false]
determinate: [false]
permissions:
id-token: "write"
contents: "read"
Expand Down Expand Up @@ -572,14 +572,15 @@ jobs:
logger: pretty
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: |
nix run nixpkgs#hello
nix profile install nixpkgs#hello
hello
nix store gc
nix run nixpkgs#hello
# We don't enable flakes by default.
# - name: Test `nix` with `$GITHUB_PATH`
# if: success() || failure()
# run: |
# nix run nixpkgs#hello
# nix profile install nixpkgs#hello
# hello
# nix store gc
# nix run nixpkgs#hello
# NOTE(cole-h): GHA pushed a weird image that breaks this test for whatever reason, so ignore
# the failure for now
- name: Test bash
Expand Down
2 changes: 1 addition & 1 deletion assemble_installer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import requests
import subprocess
import shutil
import shutil
import sys

response = requests.get('https://hydra.nixos.org/jobset/experimental-nix-installer/experimental-installer/evals', headers={'Accept': 'application/json'})
Expand Down
94 changes: 14 additions & 80 deletions flake.lock

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

38 changes: 22 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
description = "Experimental Nix Installer";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/63c3a29ca82437c87573e4c6919b09a24ea61b0f";
# can track upstream versioning with
# git show $most_recently_merged_commit:flake.lock | jq '.nodes[.nodes.root.inputs.nixpkgs].locked.rev'
nixpkgs.url = "github:NixOS/nixpkgs/807e9154dcb16384b1b765ebe9cd2bba2ac287fd";

fenix = {
url = "github:nix-community/fenix/73124e1356bde9411b163d636b39fe4804b7ca45";
# can track upstream versioning with
# git show $most_recently_merged_commit:flake.lock | jq '.nodes[.nodes.root.inputs.fenix].locked.rev'
url = "github:nix-community/fenix/a9d2e5fa8d77af05240230c9569bbbddd28ccfaf";
inputs.nixpkgs.follows = "nixpkgs";
};

Expand All @@ -18,19 +22,19 @@
url = "github:NixOS/nix/2.24.9";
# Omitting `inputs.nixpkgs.follows = "nixpkgs";` on purpose
};
# We don't use this, so let's save download/update time
# determinate = {
# url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1.tar.gz";

determinate = {
url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1.tar.gz";

# We set the overrides below so the flake.lock has many fewer nodes.
#
# The `determinate` input is used to access the builds of `determinate-nixd`.
# Below, we access the `packages` outputs, which download static builds of `determinate-nixd` and makes them executable.
# The way we consume the determinate flake means the `nix` and `nixpkgs` inputs are not meaningfully used.
# This means `follows` won't cause surprisingly extensive rebuilds, just trivial `chmod +x` rebuilds.
inputs.nixpkgs.follows = "nixpkgs";
inputs.nix.follows = "nix";
};
# # We set the overrides below so the flake.lock has many fewer nodes.
# #
# # The `determinate` input is used to access the builds of `determinate-nixd`.
# # Below, we access the `packages` outputs, which download static builds of `determinate-nixd` and makes them executable.
# # The way we consume the determinate flake means the `nix` and `nixpkgs` inputs are not meaningfully used.
# # This means `follows` won't cause surprisingly extensive rebuilds, just trivial `chmod +x` rebuilds.
# inputs.nixpkgs.follows = "nixpkgs";
# inputs.nix.follows = "nix";
# };

flake-compat.url = "github:edolstra/flake-compat/v1.0.0";
};
Expand All @@ -41,12 +45,12 @@
, fenix
, naersk
, nix
, determinate
# , determinate
, ...
} @ inputs:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
systemsSupportedByDeterminateNixd = [ ]; # avoid refs to detsys nixd for now
systemsSupportedByDeterminateNixd = [ ]; # avoid refs to detsys nixd for now

forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: (forSystem system f));

Expand Down Expand Up @@ -95,6 +99,8 @@
nativeBuildInputs = with final; [ ];
buildInputs = with final; [ ] ++ lib.optionals (final.stdenv.isDarwin) (with final.darwin.apple_sdk.frameworks; [
SystemConfiguration
# temporary fix for naersk to nix flake update; see df13b0b upstream
final.darwin.libiconv
]);

copyBins = true;
Expand Down
2 changes: 1 addition & 1 deletion src/planner/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
action::{
base::{CreateDirectory, RemoveDirectory},
common::{
ConfigureNix, ConfigureDeterminateNixdInitService, ConfigureUpstreamInitService,
ConfigureDeterminateNixdInitService, ConfigureNix, ConfigureUpstreamInitService,
CreateUsersAndGroups, ProvisionDeterminateNixd, ProvisionNix,
},
linux::{
Expand Down
2 changes: 1 addition & 1 deletion src/planner/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
action::{
base::RemoveDirectory,
common::{
ConfigureNix, ConfigureDeterminateNixdInitService, ConfigureUpstreamInitService,
ConfigureDeterminateNixdInitService, ConfigureNix, ConfigureUpstreamInitService,
CreateUsersAndGroups, ProvisionDeterminateNixd, ProvisionNix,
},
macos::{
Expand Down

0 comments on commit b8ed72a

Please sign in to comment.