depot/third_party/nixpkgs/pkgs/tools/virtualization/nixos-shell/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

30 lines
735 B
Nix

{ lib, stdenv, nix, jq, 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 jq ]}
'';
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;
};
}