From 1442593a87ddd665219228d1cba7b527d5cf9ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Sun, 4 Jun 2023 17:27:31 +0200 Subject: [PATCH] Remove leftovers in flake.nix after f20f5d8a4fcf2319a0142c1aaddf0dedbfa336a9 --- flake.lock | 34 ++++++++++++++++ flake.nix | 115 +++++++++++++++++++++-------------------------------- 2 files changed, 79 insertions(+), 70 deletions(-) diff --git a/flake.lock b/flake.lock index 1aa767ca..ca89b9c3 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1685653608, @@ -18,8 +36,24 @@ }, "root": { "inputs": { + "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } + }, + "systems": { + "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 6483bcd7..c6ffd804 100644 --- a/flake.nix +++ b/flake.nix @@ -1,82 +1,57 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, - }: let - in { - formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra; - buildEnv = { - pkgs, - relay, - }: - pkgs.buildEnv { - name = "snc-redis"; - paths = let - php = pkgs.php82; - in [ - php.packages.composer - pkgs.redis - pkgs.overmind - ( - php.withExtensions + flake-utils, + } @ inputs: + flake-utils.lib.eachDefaultSystem + ( + system: let + pkgs = import nixpkgs { + inherit system; + }; + in { + formatter = pkgs.alejandra; + packages.default = pkgs.buildEnv { + name = "snc-redis"; + paths = let + php = pkgs.php82; + in [ + php.packages.composer + pkgs.redis + pkgs.overmind ( - { - all, - enabled, - }: - enabled - ++ [ - all.xdebug - (all.redis.overrideAttrs (finalAttrs: previousAttrs: { - src = pkgs.fetchFromGitHub { - repo = "phpredis"; - owner = "phpredis"; - rev = "fea19b5229343212424c9921a977fce300d4e130"; - sha256 = "sha256-1TII8sLDsH9Ufjl0HHtHtBi29FNEG2qNrMkMhM6+iO0="; - }; - })) - # relay section https://relay.so/docs/1.x/installation#manual-installation - all.igbinary - all.msgpack - all.relay - ] + php.withExtensions + ( + { + all, + enabled, + }: + enabled + ++ [ + all.xdebug + (all.redis.overrideAttrs (finalAttrs: previousAttrs: { + src = pkgs.fetchFromGitHub { + repo = "phpredis"; + owner = "phpredis"; + rev = "fea19b5229343212424c9921a977fce300d4e130"; + sha256 = "sha256-1TII8sLDsH9Ufjl0HHtHtBi29FNEG2qNrMkMhM6+iO0="; + }; + })) + # relay section https://relay.so/docs/1.x/installation#manual-installation + all.igbinary + all.msgpack + all.relay + ] + ) ) - ) - ]; - }; - packages = { - aarch64-darwin.default = self.buildEnv rec { - pkgs = nixpkgs.legacyPackages.aarch64-darwin; - relay = { - platform = "darwin-arm64"; - sha256 = "0xhg1z4gnifiy6ra76qrc1m0wi8gg6f9kgn9dnw6x5343p3v8k71"; - }; - }; - aarch64-linux.default = self.buildEnv { - pkgs = nixpkgs.legacyPackages.aarch64-linux; - relay = { - platform = "debian-aarch64+libssl3"; - sha256 = "1yn2cldz0fy5p3dyfykyrnra969hb858wib205ykhac1plsq1p0j"; - }; - }; - x86_64-darwin.default = self.buildEnv { - pkgs = nixpkgs.legacyPackages.x86_64-darwin; - relay = { - platform = "darwin-x86-64"; - sha256 = "0jp3r1kbcnhiyah7nmvh0hmwdrcbj5i5bdz2l22z3vk3sg33izr7"; + ]; }; - }; - x86_64-linux.default = self.buildEnv { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - relay = { - platform = "debian-x86-64+libssl3"; - sha256 = "0l58qswv4acdwrg9cvb0zpm8im01yz1pqx02b39ya64qd1vwrjl2"; - }; - }; - }; - }; + } + ); }