depot/third_party/nixpkgs/pkgs/tools/virtualization/nixos-shell/default.nix
Default email 889482aab3 Project import generated by Copybara.
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
2022-06-26 12:26:21 +02:00

30 lines
728 B
Nix

{ lib, stdenv, nix, fetchFromGitHub, makeWrapper }:
stdenv.mkDerivation rec {
pname = "nixos-shell";
version = "1.0.0";
src = fetchFromGitHub {
owner = "Mic92";
repo = "nixos-shell";
rev = version;
sha256 = "sha256-whHBBcthLhEIy2VTaioRZOSZoZR7pk4Qr4DVxwU0r9Y=";
};
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/nixos-shell \
--prefix PATH : ${lib.makeBinPath [ nix ]}
'';
installFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {
description = "Spawns lightweight nixos vms in a shell";
inherit (src.meta) homepage;
license = licenses.mit;
maintainers = with maintainers; [ mic92 ];
platforms = platforms.unix;
};
}