nixpkgs/pkgs/tools/virtualization/nixos-shell/default.nix

31 lines
728 B
Nix
Raw Normal View History

{ lib, stdenv, nix, fetchFromGitHub, makeWrapper }:
2020-04-21 12:01:21 +00:00
stdenv.mkDerivation rec {
pname = "nixos-shell";
2021-03-17 15:52:30 +00:00
version = "0.2.1";
2020-04-21 12:01:21 +00:00
src = fetchFromGitHub {
owner = "Mic92";
repo = "nixos-shell";
rev = version;
2021-03-17 15:52:30 +00:00
sha256 = "sha256-HoY2diusDHXwR0BjYwKR3svLz5LrviE03yxyjWG9oPQ=";
2020-04-21 12:01:21 +00:00
};
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/nixos-shell \
2021-01-15 09:19:50 +00:00
--prefix PATH : ${lib.makeBinPath [ nix ]}
2020-04-21 12:01:21 +00:00
'';
installFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {
2020-04-21 12:01:21 +00:00
description = "Spawns lightweight nixos vms in a shell";
inherit (src.meta) homepage;
license = licenses.mit;
maintainers = with maintainers; [ mic92 ];
platforms = platforms.unix;
};
}