Skip to content

Instantly share code, notes, and snippets.

@coderofsalvation
Created December 15, 2023 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderofsalvation/3d961bdb207cccf82bf81ed614849104 to your computer and use it in GitHub Desktop.
Save coderofsalvation/3d961bdb207cccf82bf81ed614849104 to your computer and use it in GitHub Desktop.
chatgpt's take on using packages of different versions in nix.shell (which seems to be what niv+nix-flakes solve too)
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
# Packages from the default nixpkgs channel
pkgs.python
pkgs.vim
# Packages from another channel
(import (builtins.fetchTarball {
url = "https://example.com/another-channel/archive.tar.gz";
sha256 = "...";
})).somePackage
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment