aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Poelzleithner <github@poelzi.org>2021-02-03 20:20:35 +0100
committerGitHub <noreply@github.com>2021-02-03 11:20:35 -0800
commite5806b92c2d787e458f455c4a6ddad7ab1d70956 (patch)
tree7afbe0ad0b0ab657cfbaca0ace1a2e1c1bd4f882
parent5f05aa2b6e96e2f93af6b41c22d033121d794968 (diff)
downloadvcpkg-e5806b92c2d787e458f455c4a6ddad7ab1d70956.tar.gz
vcpkg-e5806b92c2d787e458f455c4a6ddad7ab1d70956.zip
[vcpkg] Add shell.nix for building on NixOS (#15906)
NixOS does not follow the FHS/LSB convention and building vcpkg therefore fails. In general, vcpkg is of very limited use for a Nix system. This shell.nix however, allows a developer to enter a environment suitable for building vcpkg and developing packages for use on other platforms. Running with argument withX11 will allow building most packages that require X11 libraries. $ nix-shell --arg withX11 true
-rw-r--r--shell.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 000000000..accea1a0d
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,46 @@
+{ pkgs ? import <nixpkgs> {}, withX11 ? false }:
+
+(pkgs.buildFHSUserEnv {
+ name = "vcpkg";
+ targetPkgs = pkgs: (with pkgs; [
+ autoconf
+ automake
+ cmake
+ gcc
+ gettext
+ glibc.dev
+ gperf
+ libtool
+ libxkbcommon.dev
+ m4
+ ninja
+ pkgconfig
+ zip
+ zstd.dev
+ ] ++ pkgs.lib.optionals withX11 [
+ freetds
+ libdrm.dev
+ libglvnd.dev
+ mesa_drivers
+ mesa_glu.dev
+ mesa.dev
+ xlibs.libxcb.dev
+ xlibs.xcbutilimage.dev
+ xlibs.xcbutilwm.dev
+ xlibs.xorgserver.dev
+ xorg.libpthreadstubs
+ xorg.libX11.dev
+ xorg.libxcb.dev
+ xorg.libXext.dev
+ xorg.libXi.dev
+ xorg.xcbproto
+ xorg.xcbutil.dev
+ xorg.xcbutilcursor.dev
+ xorg.xcbutilerrors
+ xorg.xcbutilkeysyms.dev
+ xorg.xcbutilrenderutil.dev
+ xorg.xcbutilwm.dev
+ xorg.xorgproto
+ ]);
+ runScript = "bash";
+}).env \ No newline at end of file