Skip to content

Commit

Permalink
Merge pull request #48 from pmarreck/master
Browse files Browse the repository at this point in the history
add a default.nix build file for easy builds of this on nix/nixOS
  • Loading branch information
10gic authored Nov 13, 2022
2 parents 303df78 + a4823d1 commit 7bcee06
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
with import <nixpkgs> {};
# fastStdenv.mkDerivation { # for faster running times (8-12%) BUT... nondeterministic builds :(
stdenv.mkDerivation {
name = "vanitygen++";
src = ./.;

enableParallelBuilding = true;

nativeBuildInputs = [ pkg-config ];

buildInputs = [ gcc pcre openssl opencl-clhpp ocl-icd curl curlpp ];

buildPhase = ''
make all
'';

# for a generic copy of all compiled executables:
# cp $(find * -maxdepth 1 -executable -type f) $out/bin/
installPhase = ''
mkdir -p $out/bin
cp keyconv oclvanitygen++ oclvanityminer vanitygen++ $out/bin/
'';
}
# to run this on nix/nixos, just run `nix-build` in the directory containing this file
# and then run any executable in the result/bin directory
# e.g. `./result/bin/vanitygen++ -h`

0 comments on commit 7bcee06

Please sign in to comment.