Skip to content

Commit

Permalink
Merge pull request #1 from biobricks-ai/nix
Browse files Browse the repository at this point in the history
Add initial Nix flake setup
  • Loading branch information
jpmikhail authored Dec 2, 2024
2 parents 3a73b23 + 7ff21f6 commit c87f329
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM nixos/nix

# Enable flakes
RUN mkdir -p ~/.config/nix && \
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf

# Create and set working directory
WORKDIR /app

# Copy your flake files
COPY flake.nix flake.lock ./

# Build the development environment
RUN nix develop --command echo "Development environment ready"

# Default command to drop into the dev shell
ENTRYPOINT ["nix", "develop"]
CMD ["/bin/bash"]
109 changes: 109 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
description = "pubchem-annotations-kg";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
hdt-cpp = {
url = "github:insilica/nix-hdt";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
hdt-java = {
url = "github:insilica/nix-hdt-java";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils, hdt-cpp, hdt-java }:
flake-utils.lib.eachDefaultSystem (system:
with import nixpkgs { inherit system; }; {
devShells.default = mkShell {
buildInputs = [
hdt-cpp.packages.${system}.default
hdt-java.packages.${system}.default
apache-jena
apache-jena-fuseki
jq
];
env = {
JENA_HOME = "${apache-jena}";
};
};
});
}

0 comments on commit c87f329

Please sign in to comment.