Skip to content

Instantly share code, notes, and snippets.

@jackyliu16
Last active January 7, 2025 10:25
Show Gist options
  • Save jackyliu16/25822449e3fae603c9b46030df84e730 to your computer and use it in GitHub Desktop.
Save jackyliu16/25822449e3fae603c9b46030df84e730 to your computer and use it in GitHub Desktop.
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }: utils.lib.eachSystem [ "x86_64-linux" ] (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [ ];
config.allowUnfree = true;
};
in {
devShells.default = pkgs.mkShellNoCC rec {
name = "Simple Shell for InfiniTensor";
packages = with pkgs; [
# Development Tools
nh # search nix ppackages
zellij # replace tmux
ripgrep # replace grep
];
buildInputs = with pkgs; [
gnumake
cmake
gcc14
libbfd
libdwarf # https://github.com/t3mpt0n/dotfiles/blob/b8ffe5f06c2eb6afb9ddfa38438e4e724c79a07a/packages/gaming/attract.nix#L30
];
LIBDW_LIBRARY = "${pkgs.lib.getLib pkgs.elfutils}/lib"; # https://github.com/NixOS/nixpkgs/commit/72170904646a3867963728c503cdb2857964d0fa#diff-71cf0d63355f78e3ae66dff9521cb419b983e123c1c1d090fffa499c6a716068R178
LIBDW_INCLUDE_DIR = "${pkgs.lib.getDev pkgs.elfutils}/include";
LIBDWARF_INCLUDE_DIR = "${pkgs.lib.getDev pkgs.libdwarf}/include/libdwarf-0/";
CMAKE_PREFIX_PATH = "${LIBDW_LIBRARY}:${LIBDW_INCLUDE_DIR}:${LIBDWARF_INCLUDE_DIR}:$CMAKE_PREFIX_PATH";
};
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment