Last active
June 17, 2019 17:55
-
-
Save sergei-mironov/f9f1c72e9ff755ffe2182e26e99cb002 to your computer and use it in GitHub Desktop.
ergo.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file defines Nix environment for building Ergo and Akylos GPU miner. To | |
# enter the environmant: | |
# 1. Install [Nix](https://nixos.org/nix) | |
# package manager (or use NixOS Linux distro which is base on it). | |
# 2. Save this file to current directory and run `nix-shell`. Nix will | |
# download all the dependencies and open the shell where commands like | |
# `sbt` or `nvcc` just work. | |
# | |
# Note on syntax: The first line `{ pkgs ? import <nixpkgs> {} } :` refera to | |
# an instance of [nixpkgs](https://github.com/NixOS/nixpkgs) repository. | |
# Nix-shell reads `NIX_PATH` environment variable to get the value of `<nixpkgs>` key. | |
# The variable is typically set to something like: | |
# ``` | |
# $ echo $NIX_PATH | |
# nixpkgs=/path/to/nixpkgs:nixos=/path/to/nixpkgs/nixos:nixos-config=/etc/nixos/configuration.nix | |
# ``` | |
# | |
# Other options for importing nixpkgs are: | |
# | |
# 1. To initialize `<nixpkgs>` explicitly with a local path. | |
# `nix-shell -I nixpkgs=./nixpkgs` | |
# | |
# 2. To initialize `<nixpkgs>` explicitly with an URL pointing to specific revision of nixpkgs. | |
# `nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/8916ac01a31d70fbea56abaa5081d70360d36500.tar.gz` | |
# The above link points to known-to-work snapshot used by the author. | |
{ pkgs ? import <nixpkgs> {} } : | |
rec { | |
mypython = pkgs.python3.withPackages (ps : with ps; [ | |
# Empty for now | |
]); | |
myenv = pkgs.stdenv.mkDerivation { | |
name = "myenv"; | |
buildInputs = (with pkgs; [ | |
mypython | |
cmake | |
gnumake | |
openssh | |
openjdk11 | |
sbt | |
cudatoolkit | |
cudnn | |
bash | |
curl | |
]); | |
}; | |
}.myenv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment