From 94a0a9ba338cd393ed51d3dc14f68e6903d6c9b6 Mon Sep 17 00:00:00 2001 From: Matt Walker Date: Wed, 28 Aug 2024 18:07:09 -0400 Subject: [PATCH] Add initial flake.nix; flake.lock --- flake.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000000..b08466f985 --- /dev/null +++ b/flake.nix @@ -0,0 +1,37 @@ +{ + description = "proof-system prerequisites"; + + inputs = { + naersk.url = "github:nix-community/naersk/master"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, utils, naersk }: + utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + naersk-lib = pkgs.callPackage naersk { }; + in + { + defaultPackage = naersk-lib.buildPackage ./.; + devShell = with pkgs; mkShell { + buildInputs = [ + # rust inputs + rustup + rust-analyzer + libiconv # Needed for macOS for rustup + + # ocaml inputs + opam + + # go inputs + gopls + go + + ]; + RUST_SRC_PATH = rustPlatform.rustLibSrc; + }; + } + ); +} \ No newline at end of file