mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
treewide: remove some unused shell scripts / hooks (#356254)
This commit is contained in:
commit
10c03061fc
@ -1,5 +0,0 @@
|
||||
addRepDLLoadPath () {
|
||||
addToSearchPath REP_DL_LOAD_PATH $1/lib/rep
|
||||
}
|
||||
|
||||
addEnvHooks "$hostOffset" addRepDLLoadPath
|
@ -1,4 +0,0 @@
|
||||
# set -e
|
||||
|
||||
source ./utils.sh
|
||||
addEnvHooks "$hostOffset" addToLuaPath
|
@ -1,17 +0,0 @@
|
||||
# Setup hook for writing octave packages that are run-time dependencies for
|
||||
# another package to a nix-support file.
|
||||
# `echo`s the full path name to the package derivation that is required.
|
||||
echo "Sourcing octave-write-required-octave-packages-hook.sh"
|
||||
|
||||
octaveWriteRequiredOctavePackagesPhase() {
|
||||
echo "Executing octaveWriteRequiredOctavePackagesPhase"
|
||||
|
||||
mkdir -p $out/nix-support
|
||||
echo ${requiredOctavePackages} > $out/nix-support/required-octave-packages
|
||||
}
|
||||
|
||||
# Yes its a bit long...
|
||||
if [ -z "${dontWriteRequiredOctavePackagesPhase-}" ]; then
|
||||
echo "Using octaveWriteRequiredOctavePackagesPhase"
|
||||
appendToVar preDistPhases octaveWriteRequiredOctavePackagesPhase
|
||||
fi
|
@ -1,5 +0,0 @@
|
||||
addXdgData() {
|
||||
addToSearchPath XDG_DATA_DIRS "$1/share"
|
||||
}
|
||||
|
||||
addEnvHooks "$targetOffset" addXdgData
|
@ -1,24 +0,0 @@
|
||||
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
||||
source $stdenv/setup
|
||||
|
||||
tar zxvf $src
|
||||
cd antlr-*
|
||||
cd lib
|
||||
|
||||
mkdir -p $out/lib/antlr
|
||||
mkdir -p $out/bin
|
||||
|
||||
cp *.jar $out/lib/antlr
|
||||
|
||||
classpath=""
|
||||
for jar in $out/lib/antlr/*.jar; do
|
||||
classpath="$classpath:$jar"
|
||||
done
|
||||
|
||||
cat > $out/bin/antlr <<EOF
|
||||
#! $SHELL
|
||||
|
||||
$jre/bin/java -cp $classpath -Xms200M -Xmx400M org.antlr.Tool \$*
|
||||
EOF
|
||||
|
||||
chmod u+x $out/bin/antlr
|
@ -1,36 +0,0 @@
|
||||
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
||||
source $stdenv/setup
|
||||
|
||||
arch=$(uname -m)
|
||||
echo "$arch" | egrep -q '^i[3456]86$' && arch=i386
|
||||
echo "Installing for $arch"
|
||||
|
||||
unpackPhase
|
||||
patchPhase
|
||||
|
||||
set -v
|
||||
|
||||
cd cdroot/Linux
|
||||
mkdir -p $out/opt
|
||||
cp -r $arch/at_root/* $out
|
||||
cp -r $arch/at_opt/* $out/opt
|
||||
#cp -r noarch/at_root/* $out
|
||||
cp -r noarch/at_opt/* $out/opt
|
||||
|
||||
cd $out
|
||||
test -d usr/lib64 && ln -s usr/lib64 lib ||
|
||||
ln -s usr/lib lib
|
||||
mkdir -p share/cups
|
||||
cd share/cups
|
||||
ln -s ../../opt/share/* .
|
||||
ln -s ppd model
|
||||
|
||||
cd $out/lib/cups/filter
|
||||
for i in $(ls); do
|
||||
echo "Patching $i..."
|
||||
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i ||
|
||||
echo "Couldn't set interpreter!"
|
||||
patchelf --set-rpath $cups/lib:$gcc/lib:$glibc/lib $i # This might not be necessary.
|
||||
done
|
||||
|
||||
ln -s $ghostscript/bin/gs $out/lib/cups/filter
|
@ -1,5 +0,0 @@
|
||||
# Darwin’s dynamic libiconv reexports libcharset, so reproduce that in static builds.
|
||||
if [ -z "${dontAddExtraLibs-}" ]; then
|
||||
getHostRole
|
||||
export NIX_LDFLAGS${role_post}+=" -lcharset"
|
||||
fi
|
@ -1,43 +0,0 @@
|
||||
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
||||
set -x
|
||||
|
||||
export NIX_DEBUG=1
|
||||
|
||||
source $stdenv/setup
|
||||
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
|
||||
cat > hello.c <<EOF
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char * * argv)
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
#gcc -I/nix/store/foo -I /nix/store/foo -I/usr/lib -I /usr/lib hello.c -o $out/bin/hello
|
||||
gcc -I`pwd` -L /nix/store/abcd/lib -isystem /usr/lib hello.c -o $out/bin/hello
|
||||
|
||||
$out/bin/hello
|
||||
|
||||
cat > hello2.cc <<EOF
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char * * argv)
|
||||
{
|
||||
std::cout << "Hello World!\n";
|
||||
std::cout << VALUE << std::endl;
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
g++ hello2.cc -o $out/bin/hello2 -DVALUE="1 + 2 * 3"
|
||||
|
||||
$out/bin/hello2
|
||||
|
||||
ld -v
|
Loading…
Reference in New Issue
Block a user