Darwin Docs
Docs» Custom Spack Packages

Custom Spack Packages

Spack can manage custom executables. The example below creates a simple hello-world package:

  • Create an executable
    mkdir -p /tmp/dummy-bin &&
    
    cat > /tmp/dummy-bin/hello-world << EOF
    #!/bin/bash
    echo "Hello from my custom binary managed by Spack!"
    EOF
    
    chmod +x /tmp/dummy-bin/hello-world
  • Pack the executable
    tar \
       -czf /tmp/dummy-software-1.0.tar.gz \
       -C /tmp/dummy-bin \
       hello-world
  • Create a local Spack repository
    mkdir -p /opt/spack/repos &&
    
    spack repo create \
       /opt/spack/repos/local_repo \
       local_repo &&
    
    spack repo add \
       /opt/spack/repos/local_repo/spack_repo/local_repo
  • Copy the archive hash
    sha256sum /tmp/dummy-software-1.0.tar.gz
  • Create a package file
    spack create \
       --name dummy-software \
       file:///tmp/dummy-software-1.0.tar.gz

Insert the hash into the generated version line, for example version('1.0.0', sha256='<HASH>').

  • Install the package
    spack install dummy-software &&
    
    module load Core/dummy-software &&
    
    hello-world
Previous Next

Site Tools

  • Media Manager
  • Sitemap

Page Tools

  • Show pagesource
  • Backlinks
  • Back to top

User Tools

  • Log In
administration_guides/custom_spack_packages.txt · Last modified: 2026/11/06 01:30 by v_sidorov
Darwin Docs

Table of Contents

Navigation

  • Home
  • Portal Guides
    • Basics
    • Advanced
    • Slurm
    • VNC remote desktop
    • Migration from Newton
  • Application Guides
    • AlphaFold 3
    • Boltz2
    • BoltzGen
    • ColabFold
    • ESMFold2
    • ISOLDE
    • Rosetta
  • Hardware
  • Known Issues
  • Support