From 54ba394d103c801305eafa5d25c3e560ec826f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Mon, 19 Jun 2023 22:05:47 +0200 Subject: [PATCH] Simplify README --- README.md | 2 +- flake.nix | 56 +++++++++++++++++++++++++++---------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 554f6880..e977f05b 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Because of this, we use [Nix](https://nixos.org/) for local development. After you [install Nix](https://github.com/DeterminateSystems/nix-installer), make sure you are in directory with SncRedisBundle. Within it, you can run ``` -NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_UNFREE=1 nix shell --extra-experimental-features nix-command --extra-experimental-features flakes --impure +nix shell ``` to install and enter the development environment. Once there, you can run diff --git a/flake.nix b/flake.nix index c6ffd804..00f7c0ea 100644 --- a/flake.nix +++ b/flake.nix @@ -14,42 +14,42 @@ system: let pkgs = import nixpkgs { inherit system; + config.allowUnfree = true; + config.allowInsecurePredicate = pkg: pkgs.lib.getName pkg == "openssl"; + }; + php = pkgs.php82.buildEnv { + extensions = ( + { + 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 + ] + ); }; in { formatter = pkgs.alejandra; packages.default = pkgs.buildEnv { name = "snc-redis"; - paths = let - php = pkgs.php82; - in [ + paths = [ + php php.packages.composer pkgs.redis pkgs.overmind - ( - 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 - ] - ) - ) ]; }; }