Created
December 15, 2023 10:22
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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