Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c5a866b6ab | |||
| 89b1f59ae9 | |||
| 86a5f59de1 | |||
| 64a1e1d1cb | |||
| 2fd3724578 | |||
| 45a18a6995 | |||
| d3ddf0223c |
@@ -7,9 +7,8 @@ EXPECTED_VERSION="${1}"
|
||||
|
||||
INSTALLED_NIX_VERSION_OUTPUT=$(nix --version)
|
||||
INSTALLED_NIX_VERSION=$(echo "${INSTALLED_NIX_VERSION_OUTPUT}" | awk '{print $NF}')
|
||||
EXPECTED_OUTPUT="nix (Nix) ${EXPECTED_VERSION}"
|
||||
|
||||
if [ "${INSTALLED_NIX_VERSION_OUTPUT}" != "${EXPECTED_OUTPUT}" ]; then
|
||||
if [ "${INSTALLED_NIX_VERSION}" != "${EXPECTED_VERSION}" ]; then
|
||||
echo "Nix version ${INSTALLED_NIX_VERSION} didn't match expected version ${EXPECTED_VERSION}"
|
||||
exit 1
|
||||
else
|
||||
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
run: echo $PATH
|
||||
|
||||
- name: Render the devshell
|
||||
if: success() || failure()
|
||||
if: (success() || failure()) && matrix.runner != 'macos-13-large' && matrix.runner != 'macos-14-large'
|
||||
run: |
|
||||
nix develop --command date
|
||||
|
||||
@@ -150,14 +150,10 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
inputs:
|
||||
# https://github.com/DeterminateSystems/nix-installer/blob/v0.18.0
|
||||
# https://github.com/DeterminateSystems/nix-installer/blob/v3.11.3
|
||||
- key: url
|
||||
value: https://github.com/DeterminateSystems/nix-installer/releases/download/v0.18.0/nix-installer-x86_64-linux
|
||||
nix-version: "2.21.2"
|
||||
# https://github.com/DeterminateSystems/nix-installer/tree/7011c077ec491da410fbc39f68676b0908b9ce7e
|
||||
- key: revision
|
||||
value: 7011c077ec491da410fbc39f68676b0908b9ce7e
|
||||
nix-version: "2.19.2"
|
||||
value: https://github.com/DeterminateSystems/nix-installer/releases/download/v3.11.3/nix-installer-x86_64-linux
|
||||
nix-version: "2.31.2" # 3.11.3 is based on 2.31.2
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -96,7 +96,7 @@ Differing from the upstream [Nix](https://github.com/NixOS/nix) installer script
|
||||
| Parameter | Description | Type | Default |
|
||||
| :---------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------- | :------------------------------------------------------------- |
|
||||
| `backtrace` | The setting for [`RUST_BACKTRACE`][backtrace] | string | |
|
||||
| `determinate` | Whether to install [Determinate Nix](https://determinate.systems/enterprise) and log in to FlakeHub for private Flakes and binary caches. | Boolean | `false` |
|
||||
| `determinate` | Whether to install [Determinate Nix](https://determinate.systems/enterprise) and log in to FlakeHub for private Flakes and binary caches. | Boolean | `true` |
|
||||
| `extra-args` | Extra arguments to pass to the planner (prefer using structured `with:` arguments unless using a custom [planner]!) | string | |
|
||||
| `extra-conf` | Extra configuration lines for `/etc/nix/nix.conf` (includes `access-tokens` with `secrets.GITHUB_TOKEN` automatically if `github-token` is set) | string | |
|
||||
| `flakehub` | Deprecated. Implies `determinate`. | Boolean | `false` |
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ inputs:
|
||||
determinate:
|
||||
description: |
|
||||
Whether to install [Determinate Nix](https://determinate.systems/enterprise) and log in to FlakeHub for private Flakes and binary caches.
|
||||
default: false
|
||||
default: true
|
||||
extra-args:
|
||||
description: Extra args to pass to the planner (prefer using structured `with:` arguments unless using a custom planner!)
|
||||
required: false
|
||||
|
||||
+6478
-5006
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
||||
|
||||
outputs = { self, flake-schemas, nixpkgs }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "aarch64-linux" "x86_64-darwin" ];
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "aarch64-linux" ];
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
|
||||
+4
-4
@@ -30,16 +30,16 @@
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^6.0.1",
|
||||
"detsys-ts": "github:DeterminateSystems/detsys-ts",
|
||||
"got": "^14.4.8",
|
||||
"got": "^14.6.2",
|
||||
"string-argv": "^0.3.2",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||
"@types/node": "^20.19.12",
|
||||
"@types/node": "^20.19.24",
|
||||
"@types/uuid": "^9.0.8",
|
||||
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"@vercel/ncc": "^0.38.4",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-import-resolver-typescript": "^3.10.1",
|
||||
"eslint-plugin-github": "^4.10.2",
|
||||
@@ -47,6 +47,6 @@
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"prettier": "^3.6.2",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.2"
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+507
-429
File diff suppressed because it is too large
Load Diff
@@ -48,6 +48,7 @@ const FACT_SENT_SIGTERM = "sent_sigterm";
|
||||
|
||||
// Flags
|
||||
const FLAG_DETERMINATE = "--determinate";
|
||||
const FLAG_PREFER_UPSTREAM_NIX = "--prefer-upstream-nix";
|
||||
|
||||
// Pre/post state keys
|
||||
const STATE_DAEMONDIR = "DNI_DAEMONDIR";
|
||||
@@ -89,6 +90,20 @@ class NixInstallerAction extends DetSysAction {
|
||||
runnerOs: string | undefined;
|
||||
|
||||
constructor() {
|
||||
if (platform.getArchOs() === "X64-macOS") {
|
||||
// Holy guacamole this is ugly
|
||||
actionsCore.error(
|
||||
"Determinate Nix Installer no longer supports macOS on Intel. Please migrate to Apple Silicon, and use Nix's built-in Rosetta support to build for Intel. See: https://github.com/DeterminateSystems/nix-src/issues/224",
|
||||
);
|
||||
const sourceTag = inputs.getStringOrUndefined("source-tag");
|
||||
if (sourceTag === undefined) {
|
||||
actionsCore.notice(
|
||||
"Pinning the installer tag to v3.12.2 (the last version to support Intel Macs) as a temporary fallback.",
|
||||
);
|
||||
process.env["INPUT_SOURCE-TAG"] = "v3.12.2";
|
||||
}
|
||||
}
|
||||
|
||||
super({
|
||||
name: "nix-installer",
|
||||
fetchStyle: "nix-style",
|
||||
@@ -432,6 +447,8 @@ class NixInstallerAction extends DetSysAction {
|
||||
if (this.extraArgs && !this.extraArgs.includes(FLAG_DETERMINATE)) {
|
||||
args.push(FLAG_DETERMINATE);
|
||||
}
|
||||
} else {
|
||||
args.push(FLAG_PREFER_UPSTREAM_NIX);
|
||||
}
|
||||
|
||||
return args;
|
||||
|
||||
Reference in New Issue
Block a user