diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..cbfd4b2 --- /dev/null +++ b/flake.nix @@ -0,0 +1,68 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/release-22.11"; + flake-utils.url = "github:numtide/flake-utils/master"; + + rust-overlay = { + url = "github:oxalica/rust-overlay/master"; + + inputs = { + flake-utils.follows = "flake-utils"; + nixpkgs.follows = "nixpkgs"; + }; + }; + + naersk = { + url = "github:nmattia/naersk/master"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + description = "thulani discord bot"; + + outputs = { + self, + nixpkgs, + flake-utils, + ... + } @ inputs: let + mkBuildToolchain = pkgs: pkgs.rust-bin.nightly."2022-11-20".minimal; + + deps = pkgs: with pkgs; [ + openssl + pkgconfig + libopus + postgresql + ]; + + mkPkg = pkgs: null; + + + in (flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + + overlays = [ + (import inputs.rust-overlay) + ]; + }; + + pkg = mkPkg pkgs; + + local_elixir = pkgs.elixir_1_14; + + in { + devShells.default = pkgs.mkShell { + buildInputs = (with pkgs; [ + (elixir_ls.override { elixir = local_elixir; }) + local_elixir + ]) ++ (deps pkgs); + }; + }) // { + hydraJobs = { + inherit (self.packages) x86_64-linux; + }; + } + ); +} |
