From 4c662ff56a4ba7a0e5c0f434733fa1e3fd5f1f19 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Fri, 23 Jun 2023 11:34:21 +0200 Subject: [PATCH] packaging-nix: Add criterion to devShells to allow building unit-tests Signed-off-by: Philipp Jungkamp --- packaging/nix/flake.lock | 6 +++--- packaging/nix/flake.nix | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packaging/nix/flake.lock b/packaging/nix/flake.lock index c9bc3fc81..3892ff349 100644 --- a/packaging/nix/flake.lock +++ b/packaging/nix/flake.lock @@ -90,11 +90,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1686656800, - "narHash": "sha256-duScdQZNeZcde0JwmQ9W4XfqlO/Z24MDhlTq2MokuSM=", + "lastModified": 1687482344, + "narHash": "sha256-ZKsH8Cpb97Zbozaz26XkLv7Swa5uk3G1Vmy34MVt1ro=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2b273c2351fe1ab490158cf8acc8aafad02592ce", + "rev": "3612945be80f916cde80537433ec0a4a0e6b3d3b", "type": "github" }, "original": { diff --git a/packaging/nix/flake.nix b/packaging/nix/flake.nix index d8e6dd8d1..a4eb07670 100644 --- a/packaging/nix/flake.nix +++ b/packaging/nix/flake.nix @@ -122,19 +122,20 @@ pkgs = pkgsFor system; shellHook = ''[ -z "$PS1" ] || exec "$SHELL"''; hardeningDisable = ["all"]; + packages = with pkgs; [criterion]; in rec { default = full; minimal = pkgs.mkShell { - inherit shellHook hardeningDisable; + inherit shellHook hardeningDisable packages; name = "minimal"; - inputsFrom = [pkgs.villas-minimal]; + inputsFrom = with pkgs; [villas-minimal]; }; full = pkgs.mkShell { - inherit shellHook hardeningDisable; + inherit shellHook hardeningDisable packages; name = "full"; - inputsFrom = [pkgs.villas]; + inputsFrom = with pkgs; [villas]; }; } );