Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5c63ee6216a7
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 77dad17ab6c8
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Nov 4, 2018

  1. chrootenv: strip the binary

    pbogdan committed Nov 4, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    eadwu Edmund Wu
    Copy the full SHA
    ccb76ee View commit details
  2. chrootenv: use meson

    lukateras committed Nov 4, 2018
    Copy the full SHA
    cea0e92 View commit details

Commits on Nov 5, 2018

  1. Merge pull request #49725 from pbogdan/chrootenv-strip

    chrootenv: strip the binary
    lukateras authored Nov 5, 2018
    Copy the full SHA
    77dad17 View commit details
11 changes: 4 additions & 7 deletions pkgs/build-support/build-fhs-userenv/chrootenv/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{ stdenv, pkgconfig, glib }:
{ stdenv, meson, ninja, pkgconfig, glib }:

stdenv.mkDerivation {
name = "chrootenv";
src = ./.;

nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ meson ninja pkgconfig ];
buildInputs = [ glib ];

buildCommand = ''
cc ${./chrootenv.c} $(pkg-config --cflags --libs glib-2.0) -o $out
'';

meta = with stdenv.lib; {
description = "Setup mount/user namespace for FHS emulation";
license = licenses.free;
license = licenses.mit;
maintainers = with maintainers; [ yegortimoshenko ];
platforms = platforms.linux;
};
5 changes: 5 additions & 0 deletions pkgs/build-support/build-fhs-userenv/chrootenv/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
project('chrootenv', 'c')

glib = dependency('glib-2.0')

executable('chrootenv', 'chrootenv.c', dependencies: [glib], install: true)
4 changes: 2 additions & 2 deletions pkgs/build-support/build-fhs-userenv/default.nix
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ in runCommand name {
passthru = passthru // {
env = runCommand "${name}-shell-env" {
shellHook = ''
exec ${chrootenv} ${init runScript} "$(pwd)"
exec ${chrootenv}/bin/chrootenv ${init runScript} "$(pwd)"
'';
} ''
echo >&2 ""
@@ -41,7 +41,7 @@ in runCommand name {
mkdir -p $out/bin
cat <<EOF >$out/bin/${name}
#! ${stdenv.shell}
exec ${chrootenv} ${init runScript} "\$(pwd)" "\$@"
exec ${chrootenv}/bin/chrootenv ${init runScript} "\$(pwd)" "\$@"
EOF
chmod +x $out/bin/${name}
${extraInstallCommands}