diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..3b57bc5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1692799911, + "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1693771906, + "narHash": "sha256-32EnPCaVjOiEERZ+o/2Ir7JH9pkfwJZJ27SKHNvt4yk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da5adce0ffaff10f6d0fee72a02a5ed9d01b52fc", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3fdae00 --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "Flake for building scenic driver local."; + + inputs = { + nixpkgs = { url = "github:NixOS/nixpkgs/nixos-23.05"; }; + flake-utils = { url = "github:numtide/flake-utils"; }; + }; + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + inherit (pkgs.lib) optional optionals; + pkgs = import nixpkgs { inherit system; }; + + elixir = pkgs.beam.packages.erlang.elixir; + in + with pkgs; + { + devShell = pkgs.mkShell { + buildInputs = [ + elixir + elixir_ls + glibcLocales + glew glfw pkg-config + xorg.libX11 xorg.libXau xorg.libXdmcp + ] ++ optional stdenv.isLinux inotify-tools + ++ optional stdenv.isDarwin terminal-notifier + ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + CoreFoundation + CoreServices + ]); + }; + }); +}