2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, nix, fetchFromGitHub, makeWrapper }:
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nixos-shell";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "1.0.0";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "nixos-shell";
|
|
|
|
rev = version;
|
2022-06-26 10:26:21 +00:00
|
|
|
sha256 = "sha256-whHBBcthLhEIy2VTaioRZOSZoZR7pk4Qr4DVxwU0r9Y=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/nixos-shell \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ nix ]}
|
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;
|
|
|
|
};
|
|
|
|
}
|