From 42a250cafaa162f0651853046639975502dafebc Mon Sep 17 00:00:00 2001 From: Felix Scheinost Date: Sat, 4 Dec 2021 15:49:07 +0100 Subject: [PATCH] Add package for aarch64-darwin flake.lock previously included a "indirect" reference to nixpkgs. I am not sure what this means but I added `inputs.nixpkgs` and updated nixpkgs because this old version of nixpkgs didn't have any support for aarch64-darwin at all. Now on a aarch64-darwin I can type `nix build` and get a working version of agenix. --- flake.lock | 17 ++++++++++------- flake.nix | 7 +++++++ test/integration.nix | 6 +++--- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index aea50c0..164e128 100644 --- a/flake.lock +++ b/flake.lock @@ -2,15 +2,18 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1618628710, - "narHash": "sha256-9xIoU+BrCpjs5nfWcd/GlU7XCVdnNKJPffoNTxgGfhs=", - "path": "/nix/store/z1rf17q0fxj935cmplzys4gg6nxj1as0-source", - "rev": "7919518f0235106d050c77837df5e338fb94de5d", - "type": "path" + "lastModified": 1638587357, + "narHash": "sha256-2ySMW3QARG8BsRPmwe7clTbdCuaObromOKewykP+UJc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e34c5379866833f41e2a36f309912fa675d687c7", + "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "nixos", + "ref": "nixos-21.11", + "repo": "nixpkgs", + "type": "github" } }, "root": { diff --git a/flake.nix b/flake.nix index 02221f1..9e7acc7 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,10 @@ { description = "Secret management with age"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11"; + }; + outputs = { self, nixpkgs }: let agenix = system: nixpkgs.legacyPackages.${system}.callPackage ./pkgs/agenix.nix {}; @@ -19,6 +23,9 @@ packages."x86_64-darwin".agenix = agenix "x86_64-darwin"; defaultPackage."x86_64-darwin" = self.packages."x86_64-darwin".agenix; + packages."aarch64-darwin".agenix = agenix "aarch64-darwin"; + defaultPackage."aarch64-darwin" = self.packages."aarch64-darwin".agenix; + packages."x86_64-linux".agenix = agenix "x86_64-linux"; defaultPackage."x86_64-linux" = self.packages."x86_64-linux".agenix; checks."x86_64-linux".integration = import ./test/integration.nix { diff --git a/test/integration.nix b/test/integration.nix index 8bb234a..7cb840c 100644 --- a/test/integration.nix +++ b/test/integration.nix @@ -42,9 +42,9 @@ import "${nixpkgs}/nixos/tests/make-test-python.nix" ({ pkgs, ...}: { system1.wait_until_succeeds("pgrep -f 'agetty.*tty1'") system1.sleep(2) system1.send_key("alt-f2") - system1.wait_until_succeeds(f"[ $(fgconsole) = 2 ]") - system1.wait_for_unit(f"getty@tty2.service") - system1.wait_until_succeeds(f"pgrep -f 'agetty.*tty2'") + system1.wait_until_succeeds("[ $(fgconsole) = 2 ]") + system1.wait_for_unit("getty@tty2.service") + system1.wait_until_succeeds("pgrep -f 'agetty.*tty2'") system1.wait_until_tty_matches(2, "login: ") system1.send_chars("${user}\n") system1.wait_until_tty_matches(2, "login: ${user}")