nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 fetchFromGitHub,
4 flock,
5 gitUpdater,
6 bashInteractive,
7 lib,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "enroot";
12 version = "3.5.0";
13
14 src = fetchFromGitHub {
15 owner = "NVIDIA";
16 repo = "enroot";
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-Sw4kfsb0Gi21At2pU8lt5wIfCih7VZ7Zf9/62xBKKRU=";
19 fetchSubmodules = true;
20 };
21
22 postPatch = ''
23 substituteInPlace Makefile \
24 --replace-fail 'git submodule update' 'echo git submodule update'
25 '';
26
27 makeTarget = "install";
28 makeFlags = [
29 "DESTDIR=${placeholder "out"}"
30 "prefix=/"
31 ];
32
33 nativeBuildInputs = [
34 flock
35 ];
36
37 buildInputs = [
38 bashInteractive
39 ];
40
41 passthru.updateScript = gitUpdater { rev-prefix = "v"; };
42
43 meta = {
44 description = "Simple yet powerful tool to turn traditional container/OS images into unprivileged sandboxes";
45 license = lib.licenses.asl20;
46 homepage = "https://github.com/NVIDIA/enroot";
47 changelog = "https://github.com/NVIDIA/enroot/releases/tag/v${finalAttrs.version}";
48 platforms = lib.platforms.linux;
49 maintainers = [ lib.maintainers.lucasew ];
50 mainProgram = "enroot";
51 };
52})