nixpkgs/pkgs/tools/virtualization/nixos-shell/default.nix

31 lines
726 B
Nix
Raw Normal View History

{ lib, stdenv, nix, fetchFromGitHub, makeWrapper }:
2020-04-21 14:01:21 +02:00
stdenv.mkDerivation rec {
pname = "nixos-shell";
2020-12-06 11:10:31 +01:00
version = "0.2";
2020-04-21 14:01:21 +02:00
src = fetchFromGitHub {
owner = "Mic92";
repo = "nixos-shell";
rev = version;
2020-12-06 11:10:31 +01:00
sha256 = "sha256-C0K20X0P4SYQV+xtQAUcEiX32kr3IF1RoYdkJ4R3aRM=";
2020-04-21 14:01:21 +02:00
};
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/nixos-shell \
2021-01-15 10:19:50 +01:00
--prefix PATH : ${lib.makeBinPath [ nix ]}
2020-04-21 14:01:21 +02:00
'';
installFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {
2020-04-21 14:01:21 +02:00
description = "Spawns lightweight nixos vms in a shell";
inherit (src.meta) homepage;
license = licenses.mit;
maintainers = with maintainers; [ mic92 ];
platforms = platforms.unix;
};
}