Skip to content
Snippets Groups Projects
Select Git revision
  • develop default protected
  • production protected
  • nixpkgs-upgrade-2025-06-16
  • nixpkgs-upgrade-2024-12-23
  • 190-our-regular-updates-fill-up-the-servers-boot-partitions
  • nixpkgs-upgrade-2024-10-14
  • hro-cloud protected
  • 162.flexible-grafana-module
  • nixpkgs-upgrade-2024-05-13
  • nixpkgs-upgrade-2024-04-22
  • nixpkgs-upgrade-2024-03-25
  • nixpkgs-upgrade-2024-03-18
  • nixpkgs-upgrade-2024-03-11
  • nixpkgs-upgrade-2024-03-04
  • 163.jp-to-ben-for-prod
  • nixpkgs-upgrade-2024-02-26
  • 164.grafana-alert-rules
  • 157.authorize-new-hro-key
  • nixpkgs-upgrade-2024-02-19
  • nixpkgs-upgrade-2024-02-12
20 results

shell.nix

Blame
  • shell.nix 1.00 KiB
    let
      pinned-pkgs = import ./nixpkgs.nix { };
    in
    { pkgs ? pinned-pkgs, lib ? pkgs.lib, python ? pkgs.python3 }:
    let
      tools = pkgs.callPackage ./tools {};
    in
    pkgs.mkShell {
      # When a path (such as `pkgs.path`) is interpolated into a string then nix
      # first adds that path to the store, and then interpolates the store path
      # into the string.  We use `builtins.toString` to convert the path to a
      # string without copying it to the store before interpolating. Either the
      # path is already in the store (e.g. when `pkgs` is `pinned-pkgs`) so we
      # avoid making a second copy with a longer name, or the user passed in local
      # path (e.g. a checkout of nixpkgs) and we point at it directly, rather than
      # a snapshot of it.
      # See https://github.com/NixOS/nix/issues/200 and https://github.com/NixOS/nix/issues/1728
      shellHook = ''
        export NIX_PATH="nixpkgs=${builtins.toString pkgs.path}";
      '';
      # Run the shellHook from tools
      inputsFrom = [tools];
      buildInputs = [
        tools
        pkgs.morph
        pkgs.jp
      ];
    }