summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/arduino-user-env/default.nix
blob: 7339c50a2414296bce1c0841e31151e7637b597f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, pkgs, ... }: let

#TODO: make sure env exists prior to running
env_nix = pkgs.writeText "env.nix" ''
  { pkgs ? import <nixpkgs> {} }:

  (pkgs.buildFHSUserEnv {
    name = "arduino-user-env";
    targetPkgs = pkgs: with pkgs; [
      coreutils
    ];
    multiPkgs = pkgs: with pkgs; [
      arduino
      alsaLib
      zlib
      xorg.libXxf86vm
      curl
      openal
      openssl_1_0_2
      xorg.libXext
      xorg.libX11
      xorg.libXrandr
      xorg.libXcursor
      xorg.libXinerama
      xorg.libXi
      mesa_glu
    ];
    runScript = "zsh";
  }).env
'';


in pkgs.writeDashBin "arduino-user-env" ''
  nix-shell ${env_nix}
''