Skip to content

Instantly share code, notes, and snippets.

@das-g
Last active November 19, 2019 02:29
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 das-g/03dcdd22e95d8453f0f7c0841ca921fb to your computer and use it in GitHub Desktop.
Save das-g/03dcdd22e95d8453f0f7c0841ca921fb to your computer and use it in GitHub Desktop.
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