Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Mic92
Created July 24, 2020 14:51
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 Mic92/cdace44afe33176054fa1edccf1e1a92 to your computer and use it in GitHub Desktop.
Save Mic92/cdace44afe33176054fa1edccf1e1a92 to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
let
shell = stdenv.mkDerivation {
name = "env";
dontUnpack = true;
installPhase = "touch $out";
buildInputs = [
tree
];
};
in pkgs.writeShellScript "foo" ''
${pkgs.nix}/bin/nix-shell ${shell.drvPath}
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment