-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdefault.nix
More file actions
37 lines (30 loc) · 800 Bytes
/
Copy pathdefault.nix
File metadata and controls
37 lines (30 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ pkgs ? import <nixpkgs> {}, ... }:
with pkgs; stdenv.mkDerivation rec {
name = "nix-cage";
buildInputs = [ python36 bubblewrap nix ];
nativeBuildInputs = [ makeWrapper ];
src = ./.;
buildPhase = ''
patchShebangs .
'';
installPhase = ''
source $stdenv/setup
set -e
mkdir -p $out/bin
cp $src/${name} $out/bin
chmod +x $out/bin/${name}
wrapProgram $out/bin/${name} --prefix PATH : ${stdenv.lib.makeBinPath [
bubblewrap
nix
]}
'';
meta = {
homepage = https://github.com/corpix/nix-cage;
description = "Sandboxed environments with nix-shell";
longDescription = ''
Sandboxed environments with bwrap and nix-shell
'';
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
};
}