2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, nix, fetchFromGitHub, makeWrapper }:
|
2020-04-21 13:01:21 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nixos-shell";
|
2021-12-08 19:24:03 +00:00
|
|
|
version = "0.2.2";
|
2020-04-21 13:01:21 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "nixos-shell";
|
|
|
|
rev = version;
|
2021-12-08 19:24:03 +00:00
|
|
|
sha256 = "sha256-a3NJJv7MscAXhIdr07gEAQDYX0Qgb6ax5E8zSdCIgE8=";
|
2020-04-21 13:01:21 +01: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 13:01:21 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-21 13:01:21 +01:00
|
|
|
description = "Spawns lightweight nixos vms in a shell";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mic92 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|