diff --git a/ci/mkshell.nix b/ci/mkshell.nix new file mode 100644 index 0000000000000..3886b556d0997 --- /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 6ab4f121bd35a..12528dd9f005f 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 2ce852515b4d4..e83dc870f0442 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; }