From 2119dbcca14d4996087b50631f18102f2e0339f1 Mon Sep 17 00:00:00 2001 From: Break Yang Date: Sat, 24 Jul 2021 18:31:50 -0700 Subject: [PATCH] Import alf-nix-devenv as the nix-based development environment. (#922) --- README.md | 8 ++++++ flake.lock | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 19 +++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/README.md b/README.md index 5226616dc..16aadca3f 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,14 @@ cd alf pip install -e . ``` +**For Nix Users**: There is a built-in Nix-based development environment defined in [flake.nix](./flake.nix). To activate it, run + +```bash +$ nix develop +``` + +in the root of your local repository. + ## Documentation You can read the [ALF documentation here](https://alf.readthedocs.io/). diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..3627cc67d --- /dev/null +++ b/flake.lock @@ -0,0 +1,80 @@ +{ + "nodes": { + "alf-devenv": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1626997680, + "narHash": "sha256-osKD7YhkFy2VfYOqcFQzrsT0MmATUdp7VGIfr/0B76s=", + "owner": "HorizonRobotics", + "repo": "alf-nix-devenv", + "rev": "97f7f1847345a3df094513f74e6e5eb53bfd46e8", + "type": "github" + }, + "original": { + "owner": "HorizonRobotics", + "repo": "alf-nix-devenv", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1622516815, + "narHash": "sha256-ZjBd81a6J3TwtlBr3rHsZspYUwT9OdhDk+a/SgSEf7I=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7e9b0dff974c89e070da1ad85713ff3c20b0ca97", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "21.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "alf-devenv": "alf-devenv", + "nixpkgs": "nixpkgs", + "utils": "utils_2" + } + }, + "utils": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..6eb3bf0a0 --- /dev/null +++ b/flake.nix @@ -0,0 +1,19 @@ +{ + description = "Agent Learning Framework Development Environment"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/21.05"; + + utils.url = "github:numtide/flake-utils"; + utils.inputs.nixpkgs.follows = "nixpkgs"; + + alf-devenv.url = "github:HorizonRobotics/alf-nix-devenv"; + alf-devenv.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { self, nixpkgs, ... }@inputs: inputs.utils.lib.eachSystem [ + "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" + ] (system: { + devShell = inputs.alf-devenv.devShell."${system}"; + }); +}