nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 73 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 talloc, 6 pkg-config, 7 ncurses, 8 docutils, 9 swig, 10 python3, 11 coreutils, 12 enablePython ? true, 13}: 14 15stdenv.mkDerivation (finalAttrs: { 16 pname = "proot"; 17 version = "5.4.0"; 18 19 src = fetchFromGitHub { 20 repo = "proot"; 21 owner = "proot-me"; 22 rev = "v${finalAttrs.version}"; 23 sha256 = "sha256-Z9Y7ccWp5KEVuo9xfHcgo58XqYVdFo7ck1jH7cnT2KA="; 24 }; 25 26 postPatch = '' 27 substituteInPlace src/GNUmakefile \ 28 --replace /bin/echo ${coreutils}/bin/echo 29 # our cross machinery defines $CC and co just right 30 sed -i /CROSS_COMPILE/d src/GNUmakefile 31 ''; 32 33 buildInputs = [ 34 ncurses 35 talloc 36 ] 37 ++ lib.optional enablePython python3; 38 nativeBuildInputs = [ 39 pkg-config 40 docutils 41 ] 42 ++ lib.optional enablePython swig; 43 44 enableParallelBuilding = true; 45 46 makeFlags = [ "--directory=src" ]; 47 48 postBuild = '' 49 make --directory=doc proot/man.1 50 ''; 51 52 installFlags = [ "PREFIX=${placeholder "out"}" ]; 53 54 postInstall = '' 55 install -Dm644 doc/proot/man.1 $out/share/man/man1/proot.1 56 ''; 57 58 # proot provides tests with `make -C test` however they do not run in the sandbox 59 doCheck = false; 60 61 meta = { 62 homepage = "https://proot-me.github.io"; 63 description = "User-space implementation of chroot, mount --bind and binfmt_misc"; 64 platforms = lib.platforms.linux; 65 license = lib.licenses.gpl2Plus; 66 maintainers = with lib.maintainers; [ 67 ianwookim 68 makefu 69 veprbl 70 ]; 71 mainProgram = "proot"; 72 }; 73})