diff --git a/flake.lock b/flake.lock index 416a764..e98c43d 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -36,34 +36,53 @@ }, "flake-utils-plus": { "inputs": { - "flake-utils": "flake-utils" + "flake-utils": "flake-utils_2" }, "locked": { - "lastModified": 1696331477, - "narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=", + "lastModified": 1715533576, + "narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=", "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", - "rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3", + "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", "type": "github" }, "original": { "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", + "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1710283656, - "narHash": "sha256-nI+AOy4uK6jLGBi9nsbHjL1EdSIzoo8oa+9oeVhbyFc=", + "lastModified": 1717281328, + "narHash": "sha256-evZPzpf59oNcDUXxh2GHcxHkTEG4fjae2ytWP85jXRo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "51063ed4f2343a59fdeebb279bb81d87d453942b", + "rev": "b3b2b28c1daa04fe2ae47c21bb76fd226eac4ca1", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } @@ -74,11 +93,11 @@ "snowfall-lib": "snowfall-lib" }, "locked": { - "lastModified": 1716280284, - "narHash": "sha256-rofvtPgaYEW01OnKsD3DJv2B2j9QovRTWbw8h5lGjkE=", + "lastModified": 1717758565, + "narHash": "sha256-yscuZ3ixjwTkqS6ew5cB3Uvy9e807szRlMoPSyQuRJM=", "owner": "matter-labs", "repo": "nixsgx", - "rev": "7151f63b1549b65633503f505df1e2a0b5ee844f", + "rev": "49a1ae79d92ccb6ed7cabfe5c5042b1399e3cd3e", "type": "github" }, "original": { @@ -89,15 +108,12 @@ }, "root": { "inputs": { + "flake-utils": "flake-utils", "nixpkgs": [ "nixsgx-flake", "nixpkgs" ], - "nixsgx-flake": "nixsgx-flake", - "snowfall-lib": [ - "nixsgx-flake", - "snowfall-lib" - ] + "nixsgx-flake": "nixsgx-flake" } }, "snowfall-lib": { @@ -110,11 +126,11 @@ ] }, "locked": { - "lastModified": 1696432959, - "narHash": "sha256-oJQZv2MYyJaVyVJY5IeevzqpGvMGKu5pZcCCJvb+xjc=", + "lastModified": 1716675292, + "narHash": "sha256-7TFvVE4HR/b65/0AAhewYHEJzUXxIEJn82ow5bCkrDo=", "owner": "snowfallorg", "repo": "lib", - "rev": "92803a029b5314d4436a8d9311d8707b71d9f0b6", + "rev": "5d6e9f235735393c28e1145bec919610b172a20f", "type": "github" }, "original": { @@ -137,6 +153,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 2ce6bff..71389c1 100644 --- a/flake.nix +++ b/flake.nix @@ -4,31 +4,38 @@ inputs = { nixsgx-flake.url = "github:matter-labs/nixsgx"; nixpkgs.follows = "nixsgx-flake/nixpkgs"; - snowfall-lib.follows = "nixsgx-flake/snowfall-lib"; + flake-utils.url = "github:numtide/flake-utils?tag=v1.0.0"; }; - outputs = inputs: - inputs.snowfall-lib.mkFlake { - inherit inputs; - src = ./.; - - package-namespace = "vat"; + outputs = { self, nixpkgs, flake-utils, nixsgx-flake }: + flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: + let + pkgs = import nixpkgs { + inherit system; overlays = [ + nixsgx-flake.overlays.default + overlays + ]; + config.allowUnfree = true; + }; + vault-auth-tee = pkgs.callPackage ./packages/vault-auth-tee.nix { }; + container-vault-auth-tee = pkgs.callPackage ./packages/container-vault-auth-tee.nix { }; + overlays = final: prev: { vat = { inherit vault-auth-tee; }; }; + in + { + formatter = pkgs.nixpkgs-fmt; - overlays = with inputs; [ - nixsgx-flake.overlays.default - ]; + inherit overlays; - alias = { packages = { - default = "vault-auth-tee"; + inherit vault-auth-tee; + inherit container-vault-auth-tee; + default = vault-auth-tee; }; - shells = { - default = "vault-auth-tee"; - }; - }; - outputs-builder = channels: { - formatter = channels.nixpkgs.nixpkgs-fmt; - }; - }; + devShells = { + default = pkgs.mkShell { + inputsFrom = [ vault-auth-tee ]; + }; + }; + }); } diff --git a/packages/container-vault-auth-tee/default.nix b/packages/container-vault-auth-tee.nix similarity index 100% rename from packages/container-vault-auth-tee/default.nix rename to packages/container-vault-auth-tee.nix diff --git a/packages/vault-auth-tee/default.nix b/packages/vault-auth-tee.nix similarity index 76% rename from packages/vault-auth-tee/default.nix rename to packages/vault-auth-tee.nix index e4d94a2..16a5df5 100644 --- a/packages/vault-auth-tee/default.nix +++ b/packages/vault-auth-tee.nix @@ -14,13 +14,13 @@ pkgs.buildGoModule { name = "vault-auth-tee"; src = with lib.fileset; toSource { - root = ./../..; + root = ./..; fileset = unions [ - ../../go.mod - ../../go.sum - ../../cmd - ../../test-fixtures - (fileFilter (file: file.hasExt "go") ./../..) + ../go.mod + ../go.sum + ../cmd + ../test-fixtures + (fileFilter (file: file.hasExt "go") ./..) ]; }; diff --git a/shells/vault-auth-tee/default.nix b/shells/vault-auth-tee/default.nix deleted file mode 100644 index fa75975..0000000 --- a/shells/vault-auth-tee/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ lib -, pkgs -, ... -}: -pkgs.mkShell { - inputsFrom = [ pkgs.vat.vault-auth-tee ]; -}