Skip to content

Instantly share code, notes, and snippets.

@das-g das-g/in-nix-shell.nix Secret
Last active Nov 19, 2019

Embed
What would you like to do?
nixpkgs/nixos/tests/pipenv/in-nix-shell.nix
let
pkgs = import ../../..{};
pipenvEnv = pkgs.stdenv.mkDerivation {
name = "foo";
buildInputs = [ pkgs.pipenv ];
buildCommand = "touch $out";
};
in
import ../make-test-python.nix {
machine =
{ config, pkgs, ... }:
{
environment.etc."/anything".text = "${pipenvEnv.drvPath} ${pkgs.pipenv}";
};
testScript =
''
machine.start()
machine.wait_for_unit("default.target")
machine.succeed(
"nix-shell ${pipenvEnv.drvPath} --option substituters \"\" --run 'pipenv run pip --version'"
)
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.