Skip to content

Run on NixOS environment #3

@amano-takahisa

Description

@amano-takahisa

Thank you for sharing this nice tools, and make me fun to start Nostr world.
Not an issue, but I want to share how I could run this tool on my NixOS environment.

Version

7cc3f73

My System Environment

  • OS: NixOS (Linux 6.17.7)
  • GPU: NVIDIA GeForce GTX 1650 Max-Q (Compute Capability 7.5)
  • CUDA: 12.8 (via nixpkgs)

Changes Made

Makefile modifications (diff):

-CCAP      = 86
-CUDA      = /usr/local/cuda-11.8
+CCAP      = 75
+CUDA      ?= /usr/local/cuda-12.8
 CXX       = g++
-CXXCUDA   = /usr/bin/g++
+CXXCUDA   ?= g++

-LFLAGS    = /usr/lib/x86_64-linux-gnu/libgmp.so.10 -lpthread ...
+LFLAGS    = -lgmp -lpthread ...

New file: shell.nix

{ pkgs ? import <nixpkgs> {
    config = {
      allowUnfree = true;
      cudaSupport = true;
    };
  }
}:

pkgs.mkShell {
  buildInputs = with pkgs; [
    cudaPackages.cudatoolkit
    gmp
    gcc
    gnumake
  ];

  shellHook = ''
    export CUDA=${pkgs.cudaPackages.cudatoolkit}
    export LD_LIBRARY_PATH=${pkgs.cudaPackages.cudatoolkit}/lib:$LD_LIBRARY_PATH
  '';
}

Build and run

nix-shell
make
[nix-shell:~/rummage]$ ./rummage --npub-prefix alice

Sorry I should make PR for this but since I'm not familiar with C++, just I want to share how I did.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions