Created
September 15, 2024 15:39
-
-
Save ericr3r/3ee4cdbda0973e0651627fa2c6ca7938 to your computer and use it in GitHub Desktop.
Flake for supporting Scenic dev sheell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Flake for building nerves system | |
# Use `nix develop .` for regular Nerves builds | |
# Use `nix develop .#fhs` for Nerves System builds | |
{ | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = import nixpkgs { | |
inherit system; | |
}; | |
erlangVersion = "erlang_27"; | |
elixirVersion = "elixir_1_17"; | |
erlang = pkgs.beam.interpreters.${erlangVersion}; | |
elixir = pkgs.beam.packages.${erlangVersion}.${elixirVersion}; | |
commonPkgs = [ | |
elixir | |
erlang | |
pkgs.git | |
pkgs.pkg-config | |
]; | |
supportPkgs = with pkgs; [ | |
atk | |
brotli | |
bzip2 | |
cairo | |
coreutils | |
dbus | |
expat | |
fontconfig | |
freetype | |
fribidi | |
gcc | |
gdk-pixbuf | |
glfw-wayland | |
glib | |
glib | |
graphite2 | |
gtk3 | |
harfbuzz | |
lerc | |
libGL | |
libdatrie | |
libdeflate | |
libepoxy | |
libffi | |
libjpeg | |
libmnl | |
libpng | |
libselinux | |
libsepol | |
libthai | |
libtiff | |
libtool | |
libwebp | |
libxkbcommon | |
pango | |
pcre2 | |
pixman | |
util-linux | |
wayland | |
xorg.libX11 | |
xorg.libXau | |
xorg.libXcomposite | |
xorg.libXcursor | |
xorg.libXdamage | |
xorg.libXdmcp | |
xorg.libXext | |
xorg.libXfixes | |
xorg.libXft | |
xorg.libXi | |
xorg.libXinerama | |
xorg.libXrandr | |
xorg.libXrender | |
xorg.libXtst | |
xorg.libxcb | |
xorg.xorgproto | |
zlib | |
zstd | |
]; | |
# Scenic User Environment | |
scenic = pkgs.buildFHSUserEnv { | |
name = "fhs-shell"; | |
linkLibs = true; | |
extraOutputsToInstall = [ "dev" ]; | |
targetPkgs = pkgs: commonPkgs ++ supportPkgs; | |
runScript = pkgs.writeScript "init.sh" '' | |
export FHS=scenic | |
export SCENIC_LOCAL_TARGET=cairo-gtk | |
export PKG_CONFIG_PATH=${pkgs.xorg.xorgproto}/share/pkgconfig:/usr/lib/pkgconfig | |
exec zsh | |
''; | |
}; | |
in | |
{ | |
devShells.default = scenic.env; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment