nixpkgs/pkgs/by-name/ni/nixos-shell/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
768 B
Nix
Raw Normal View History

2023-04-17 13:44:03 +01:00
{ lib, stdenv, nix, jq, fetchFromGitHub, makeWrapper }:
2020-04-21 13:01:21 +01:00
stdenv.mkDerivation rec {
pname = "nixos-shell";
2024-08-14 14:27:58 +01:00
version = "2.0.0";
2020-04-21 13:01:21 +01:00
src = fetchFromGitHub {
owner = "Mic92";
repo = "nixos-shell";
rev = version;
2024-08-14 14:27:58 +01:00
sha256 = "sha256-plRKXQqww7easx0wgGKAkOJH1TW/PeeB20dq9XUN8J4=";
2020-04-21 13:01:21 +01:00
};
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/nixos-shell \
2023-04-17 13:44:03 +01:00
--prefix PATH : ${lib.makeBinPath [ nix jq ]}
2020-04-21 13:01:21 +01:00
'';
installFlags = [ "PREFIX=${placeholder "out"}" ];
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;
2023-11-23 21:09:35 +00:00
mainProgram = "nixos-shell";
2020-04-21 13:01:21 +01:00
};
}