Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 2319abe
  • /
  • flake.nix
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:d053b7aa3676e734983102f678398fedb03d334e
directory badge Iframe embedding
swh:1:dir:2319abe392610f4b38abd05bd27dc7ac624ccc1d

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
flake.nix
{
  description = "INGP dev env";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
          inherit system;
          config = {
            allowUnfree = true;
            cudaSupport = true;
            config.cudaVersion = "12";
          };
        };
      in
      {
        devShell = pkgs.mkShell {
          buildInputs = with pkgs; [
            gcc13
            gdb
            cmake
            pkg-config
            binutils
            zlib

            xorg.libX11.dev
            xorg.libXi.dev
            xorg.libXrandr.dev
            xorg.libXinerama.dev
            xorg.libXcursor.dev
            xorg.libXext.dev
            xorg.libXfixes.dev
            xorg.libXrender.dev
            libGL
            glew

            vulkan-loader
            vulkan-headers
            vulkan-validation-layers
            vulkan-extension-layer
            vulkan-tools

            python3
            stdenv.cc.cc.lib

            cudatoolkit
            cudaPackages.cuda_cudart
            cudaPackages.cuda_nvrtc
            cudaPackages.cuda_nvtx
          ];

          shellHook = ''
            # Set GCC 13 as the default compiler
            export CC="${pkgs.gcc13}/bin/gcc"
            export CXX="${pkgs.gcc13}/bin/g++"
            export PATH="${pkgs.gcc13}/bin:$PATH"

            export CUDA_PATH="${pkgs.cudatoolkit}"
            export CLANGD_CUDA_INCLUDE="${pkgs.cudatoolkit}"

            export LD_LIBRARY_PATH="/run/opengl-driver/lib:${pkgs.zlib}/lib:${pkgs.stdenv.cc.cc.lib}/lib:''${LD_LIBRARY_PATH:-}"
            export VULKAN_SDK="${pkgs.vulkan-loader}"

            export VK_LAYER_PATH="${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d:${pkgs.vulkan-extension-layer}/share/vulkan/explicit_layer.d"
            export VK_ICD_FILENAMES="/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json"
          '';
        };
      }
    );
}

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API