2023-04-29 16:46:19 +00:00
|
|
|
{ lib, stdenv, nix, jq, fetchFromGitHub, makeWrapper }:
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nixos-shell";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.1.0";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "nixos-shell";
|
|
|
|
rev = version;
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-5hHkokfSY3Z4VqjNm/j564l9Bgynw5H5McX0hTruGoI=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/nixos-shell \
|
2023-04-29 16:46:19 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ nix jq ]}
|
2020-05-29 06:06:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
description = "Spawns lightweight nixos vms in a shell";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mic92 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|