From cc2a5451dc8ac8a3a9368e1a5b3a1488b15a8bc3 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Fri, 29 Jan 2021 21:04:10 +0000 Subject: [PATCH] ci: Refactor Nix shell files --- ci/mkshell.nix | 12 ++++++++++++ ci/shell-i686.nix | 13 ++++--------- ci/shell.nix | 13 ++++--------- 3 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 ci/mkshell.nix diff --git a/ci/mkshell.nix b/ci/mkshell.nix new file mode 100644 index 0000000..3886b55 --- /dev/null +++ b/ci/mkshell.nix @@ -0,0 +1,12 @@ +{ pkgs }: + +with pkgs; + +mkShell { + buildInputs = [ + bash file pkgconfig autoconf automake libtool gmp valgrind clang gcc + ]; + shellHook = '' + echo Running nix-shell with nixpkgs version: $(nix eval --raw nixpkgs.lib.version) + ''; +} diff --git a/ci/shell-i686.nix b/ci/shell-i686.nix index 6ab4f12..12528dd 100644 --- a/ci/shell-i686.nix +++ b/ci/shell-i686.nix @@ -1,9 +1,4 @@ -with (import {}).pkgsi686Linux; -mkShell { - buildInputs = [ - bash file pkgconfig autoconf automake libtool gmp valgrind clang gcc - ]; - shellHook = '' - echo Running nix-shell with nixpkgs version: $(nix eval --raw nixpkgs.lib.version) - ''; -} +let + pkgs = (import {}).pkgsi686Linux; +in +import ./mkshell.nix { inherit pkgs; } diff --git a/ci/shell.nix b/ci/shell.nix index 2ce8525..e83dc87 100644 --- a/ci/shell.nix +++ b/ci/shell.nix @@ -1,9 +1,4 @@ -with (import {}); -mkShell { - buildInputs = [ - bash file pkgconfig autoconf automake libtool gmp valgrind clang gcc - ]; - shellHook = '' - echo Running nix-shell with nixpkgs version: $(nix eval --raw nixpkgs.lib.version) - ''; -} +let + pkgs = (import {}); +in +import ./mkshell.nix { inherit pkgs; }