forked from rarias/bscpkgs
Avoid loading .bashrc
This commit is contained in:
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
cat > $out <<EOF
|
||||
#!${bash}/bin/bash
|
||||
#!${bash}/bin/bash --norc
|
||||
# Requires /nix to use bash
|
||||
|
||||
${env}
|
||||
|
||||
23
garlic/stages/broom.nix
Normal file
23
garlic/stages/broom.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
stdenv
|
||||
}:
|
||||
|
||||
{
|
||||
program
|
||||
}:
|
||||
|
||||
# This stage provides a clean environment to run experiments
|
||||
stdenv.mkDerivation {
|
||||
name = "broom";
|
||||
preferLocalBuild = true;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
cat > $out <<EOF
|
||||
#!/bin/sh
|
||||
|
||||
# Removes all environment variables
|
||||
/usr/bin/env -i ${program}
|
||||
EOF
|
||||
chmod +x $out
|
||||
'';
|
||||
}
|
||||
@@ -15,7 +15,6 @@ stdenv.mkDerivation {
|
||||
installPhase = ''
|
||||
cat > $out <<EOF
|
||||
#!/bin/sh
|
||||
#set -e
|
||||
for n in {1..${toString loops}}; do
|
||||
${program}
|
||||
done
|
||||
|
||||
25
garlic/stages/envRecord.nix
Normal file
25
garlic/stages/envRecord.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
stdenv
|
||||
}:
|
||||
|
||||
{
|
||||
program
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "argv";
|
||||
preferLocalBuild = true;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
cat > $out <<EOF
|
||||
#!/bin/sh
|
||||
|
||||
echo ----- ENV BEGIN -------
|
||||
/usr/bin/env
|
||||
echo ----- ENV END -------
|
||||
|
||||
exec ${program} \''${argv[@]}
|
||||
EOF
|
||||
chmod +x $out
|
||||
'';
|
||||
}
|
||||
@@ -24,8 +24,7 @@ stdenv.mkDerivation {
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
cat > $out <<EOF
|
||||
#!${bash}/bin/bash
|
||||
# Requires /nix to use bash
|
||||
#!/bin/sh
|
||||
|
||||
export EXTRAE_HOME=${extrae}
|
||||
export LD_PRELOAD=${extrae}/lib/lib${traceLib}trace.so:$LD_PRELOAD
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
{
|
||||
program
|
||||
, nixsetup
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
@@ -18,7 +19,7 @@ stdenv.mkDerivation {
|
||||
# We need to enter the nix namespace first, in order to have /nix
|
||||
# available, so we use this hack:
|
||||
if [ ! -e /nix ]; then
|
||||
exec nix-setup \$0
|
||||
exec ${nixsetup} \$0
|
||||
fi
|
||||
|
||||
exec ${program}
|
||||
|
||||
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
cat > $out <<EOF
|
||||
#!${bash}/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
exec ${perf}/bin/perf ${perfArgs} ${program}
|
||||
EOF
|
||||
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/${name} <<EOF
|
||||
#!${bash}/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p ${outputDir}
|
||||
cat /proc/[0-9]*/stat | sort -n > ${outputDir}/statspy.\$(date +%s.%3N).begin
|
||||
|
||||
Reference in New Issue
Block a user