mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 09:36:20 +09:00
treewide: pkgs/**.nix: remove trailing whitespaces
Manually remove trailing white spaces in `pkgs/**.nix` with the help of an editor Auto-generated nix expressions containing trailing whitespaces: * pkgs/development/haskell-modules/hackage-packages.nix * See issue https://github.com/NixOS/cabal2nix/issues/208 * pkgs/**/eggs.nix * I don't know how they are generated, but they seems to be Python-related.
This commit is contained in:
parent
441e405c77
commit
fecc5d7bff
4 changed files with 38 additions and 40 deletions
|
@ -1,8 +1,7 @@
|
||||||
a :
|
a :
|
||||||
a.stdenv.mkDerivation {
|
a.stdenv.mkDerivation {
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir -p "$out/attributes"
|
mkdir -p "$out/attributes"
|
||||||
|
|
||||||
'' + (a.lib.concatStrings (map
|
'' + (a.lib.concatStrings (map
|
||||||
(n: ''
|
(n: ''
|
||||||
ln -s "${a.writeTextFile {name=n; text=builtins.getAttr n a.theAttrSet;}}" $out/attributes/${n};
|
ln -s "${a.writeTextFile {name=n; text=builtins.getAttr n a.theAttrSet;}}" $out/attributes/${n};
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
runCommand "frog-test" {} ''
|
runCommand "frog-test" {} ''
|
||||||
${languageMachines.frog}/bin/frog >$out <<EOF
|
${languageMachines.frog}/bin/frog >$out <<EOF
|
||||||
Dit is een test
|
Dit is een test
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
echo "Frog output:"
|
echo "Frog output:"
|
||||||
cat $out
|
cat $out
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.3.0";
|
version = "1.3.0";
|
||||||
incfile = builtins.toFile "make.inc.custom" ''
|
incfile = builtins.toFile "make.inc.custom" ''
|
||||||
CC = g++
|
CC = g++
|
||||||
FORT = gfortran
|
FORT = gfortran
|
||||||
|
|
||||||
ARCH = ar
|
ARCH = ar
|
||||||
ARCHFLAGS = cr
|
ARCHFLAGS = cr
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
|
@ -16,22 +16,22 @@ let
|
||||||
FOPTS = -fPIC -O3 -DADD_ -Wall -x f95-cpp-input
|
FOPTS = -fPIC -O3 -DADD_ -Wall -x f95-cpp-input
|
||||||
F77OPTS = -fPIC -O3 -DADD_ -Wall
|
F77OPTS = -fPIC -O3 -DADD_ -Wall
|
||||||
LDOPTS = -fPIC
|
LDOPTS = -fPIC
|
||||||
|
|
||||||
-include make.check-mkl
|
-include make.check-mkl
|
||||||
-include make.check-clblas
|
-include make.check-clblas
|
||||||
|
|
||||||
# Gnu mkl is not available I guess?
|
# Gnu mkl is not available I guess?
|
||||||
#LIB = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lm -fopenmp
|
#LIB = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lm -fopenmp
|
||||||
LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lm -fopenmp
|
LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lm -fopenmp
|
||||||
LIB += -lclBLAS -lOpenCL
|
LIB += -lclBLAS -lOpenCL
|
||||||
|
|
||||||
LIBDIR = -L$(MKLROOT)/lib/intel64 \
|
LIBDIR = -L$(MKLROOT)/lib/intel64 \
|
||||||
-L$(MKLROOT)/../compiler/lib/intel64 \
|
-L$(MKLROOT)/../compiler/lib/intel64 \
|
||||||
-L$(clBLAS)/lib64
|
-L$(clBLAS)/lib64
|
||||||
|
|
||||||
INC = -I$(clBLAS)/include
|
INC = -I$(clBLAS)/include
|
||||||
#-I$(AMDAPP)/include
|
#-I$(AMDAPP)/include
|
||||||
'';
|
'';
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
name = "clmagma-${version}";
|
name = "clmagma-${version}";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
@ -40,11 +40,11 @@ in stdenv.mkDerivation {
|
||||||
name = "clmagma-${version}.tar.gz";
|
name = "clmagma-${version}.tar.gz";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
gfortran
|
gfortran
|
||||||
clblas
|
clblas
|
||||||
opencl-headers
|
opencl-headers
|
||||||
ocl-icd
|
ocl-icd
|
||||||
mkl
|
mkl
|
||||||
intel-ocl
|
intel-ocl
|
||||||
];
|
];
|
||||||
|
@ -54,13 +54,13 @@ in stdenv.mkDerivation {
|
||||||
MKLROOT = "${mkl}";
|
MKLROOT = "${mkl}";
|
||||||
clBLAS = "${clblas}";
|
clBLAS = "${clblas}";
|
||||||
|
|
||||||
# Otherwise build looks for it in /run/opengl-driver/etc/OpenCL/vendors,
|
# Otherwise build looks for it in /run/opengl-driver/etc/OpenCL/vendors,
|
||||||
# which is not available.
|
# which is not available.
|
||||||
OPENCL_VENDOR_PATH="${intel-ocl}/etc/OpenCL/vendors";
|
OPENCL_VENDOR_PATH="${intel-ocl}/etc/OpenCL/vendors";
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
# By default it tries to use GPU, and thus fails for CPUs
|
# By default it tries to use GPU, and thus fails for CPUs
|
||||||
sed -i "s/CL_DEVICE_TYPE_GPU/CL_DEVICE_TYPE_DEFAULT/" interface_opencl/clmagma_runtime.cpp
|
sed -i "s/CL_DEVICE_TYPE_GPU/CL_DEVICE_TYPE_DEFAULT/" interface_opencl/clmagma_runtime.cpp
|
||||||
sed -i "s%/usr/local/clmagma%/$out%" Makefile.internal
|
sed -i "s%/usr/local/clmagma%/$out%" Makefile.internal
|
||||||
cp ${incfile} make.inc
|
cp ${incfile} make.inc
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -28,8 +28,8 @@ rec {
|
||||||
libjson-c.a \
|
libjson-c.a \
|
||||||
-o ./test1.js
|
-o ./test1.js
|
||||||
|
|
||||||
echo "Using node to execute the test which basically outputs an error on stderr which we grep for"
|
echo "Using node to execute the test which basically outputs an error on stderr which we grep for"
|
||||||
${pkgs.nodejs}/bin/node ./test1.js
|
${pkgs.nodejs}/bin/node ./test1.js
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
@ -41,17 +41,17 @@ rec {
|
||||||
echo "================= /testing json_c using node ================="
|
echo "================= /testing json_c using node ================="
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
libxml2 = (pkgs.libxml2.override {
|
libxml2 = (pkgs.libxml2.override {
|
||||||
stdenv = emscriptenStdenv;
|
stdenv = emscriptenStdenv;
|
||||||
pythonSupport = false;
|
pythonSupport = false;
|
||||||
}).overrideDerivation
|
}).overrideDerivation
|
||||||
(old: {
|
(old: {
|
||||||
propagatedBuildInputs = [ zlib ];
|
propagatedBuildInputs = [ zlib ];
|
||||||
buildInputs = old.buildInputs ++ [ pkg-config ];
|
buildInputs = old.buildInputs ++ [ pkg-config ];
|
||||||
|
|
||||||
# just override it with nothing so it does not fail
|
# just override it with nothing so it does not fail
|
||||||
autoreconfPhase = "echo autoreconfPhase not used...";
|
autoreconfPhase = "echo autoreconfPhase not used...";
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
HOME=$TMPDIR
|
HOME=$TMPDIR
|
||||||
emconfigure ./configure --prefix=$out --without-python
|
emconfigure ./configure --prefix=$out --without-python
|
||||||
|
@ -63,10 +63,10 @@ rec {
|
||||||
set -x
|
set -x
|
||||||
emcc -O2 -s EMULATE_FUNCTION_POINTER_CASTS=1 xmllint.o \
|
emcc -O2 -s EMULATE_FUNCTION_POINTER_CASTS=1 xmllint.o \
|
||||||
./.libs/libxml2.a `pkg-config zlib --cflags` `pkg-config zlib --libs` -o ./xmllint.test.js \
|
./.libs/libxml2.a `pkg-config zlib --cflags` `pkg-config zlib --libs` -o ./xmllint.test.js \
|
||||||
--embed-file ./test/xmlid/id_err1.xml
|
--embed-file ./test/xmlid/id_err1.xml
|
||||||
|
|
||||||
echo "Using node to execute the test which basically outputs an error on stderr which we grep for"
|
echo "Using node to execute the test which basically outputs an error on stderr which we grep for"
|
||||||
${pkgs.nodejs}/bin/node ./xmllint.test.js --noout test/xmlid/id_err1.xml 2>&1 | grep 0bar
|
${pkgs.nodejs}/bin/node ./xmllint.test.js --noout test/xmlid/id_err1.xml 2>&1 | grep 0bar
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
@ -77,8 +77,8 @@ rec {
|
||||||
fi
|
fi
|
||||||
echo "================= /testing libxml2 using node ================="
|
echo "================= /testing libxml2 using node ================="
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
xmlmirror = pkgs.buildEmscriptenPackage rec {
|
xmlmirror = pkgs.buildEmscriptenPackage rec {
|
||||||
pname = "xmlmirror";
|
pname = "xmlmirror";
|
||||||
version = "unstable-2016-06-05";
|
version = "unstable-2016-06-05";
|
||||||
|
@ -91,7 +91,7 @@ rec {
|
||||||
rev = "4fd7e86f7c9526b8f4c1733e5c8b45175860a8fd";
|
rev = "4fd7e86f7c9526b8f4c1733e5c8b45175860a8fd";
|
||||||
sha256 = "1jasdqnbdnb83wbcnyrp32f36w3xwhwp0wq8lwwmhqagxrij1r4b";
|
sha256 = "1jasdqnbdnb83wbcnyrp32f36w3xwhwp0wq8lwwmhqagxrij1r4b";
|
||||||
};
|
};
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
rm -f fastXmlLint.js*
|
rm -f fastXmlLint.js*
|
||||||
# a fix for ERROR:root:For asm.js, TOTAL_MEMORY must be a multiple of 16MB, was 234217728
|
# a fix for ERROR:root:For asm.js, TOTAL_MEMORY must be a multiple of 16MB, was 234217728
|
||||||
|
@ -103,18 +103,18 @@ rec {
|
||||||
# https://gitlab.com/odfplugfest/xmlmirror/issues/11
|
# https://gitlab.com/odfplugfest/xmlmirror/issues/11
|
||||||
sed -e "s/-o fastXmlLint.js/-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -o fastXmlLint.js/g" -i Makefile.emEnv
|
sed -e "s/-o fastXmlLint.js/-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -o fastXmlLint.js/g" -i Makefile.emEnv
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
HOME=$TMPDIR
|
HOME=$TMPDIR
|
||||||
make -f Makefile.emEnv
|
make -f Makefile.emEnv
|
||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "doc" ];
|
outputs = [ "out" "doc" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/share
|
mkdir -p $out/share
|
||||||
mkdir -p $doc/share/${pname}
|
mkdir -p $doc/share/${pname}
|
||||||
|
|
||||||
cp Demo* $out/share
|
cp Demo* $out/share
|
||||||
cp -R codemirror-5.12 $out/share
|
cp -R codemirror-5.12 $out/share
|
||||||
cp fastXmlLint.js* $out/share
|
cp fastXmlLint.js* $out/share
|
||||||
|
@ -127,14 +127,13 @@ rec {
|
||||||
cp README.md $doc/share/${pname}
|
cp README.md $doc/share/${pname}
|
||||||
'';
|
'';
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
zlib = (pkgs.zlib.override {
|
zlib = (pkgs.zlib.override {
|
||||||
stdenv = pkgs.emscriptenStdenv;
|
stdenv = pkgs.emscriptenStdenv;
|
||||||
}).overrideDerivation
|
}).overrideDerivation
|
||||||
(old: {
|
(old: {
|
||||||
buildInputs = old.buildInputs ++ [ pkg-config ];
|
buildInputs = old.buildInputs ++ [ pkg-config ];
|
||||||
# we need to reset this setting!
|
# we need to reset this setting!
|
||||||
NIX_CFLAGS_COMPILE="";
|
NIX_CFLAGS_COMPILE="";
|
||||||
|
@ -165,7 +164,7 @@ rec {
|
||||||
-L. libz.so.${old.version} -I . -o example.js
|
-L. libz.so.${old.version} -I . -o example.js
|
||||||
|
|
||||||
echo "Using node to execute the test"
|
echo "Using node to execute the test"
|
||||||
${pkgs.nodejs}/bin/node ./example.js
|
${pkgs.nodejs}/bin/node ./example.js
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
@ -183,6 +182,6 @@ rec {
|
||||||
--replace 'AR="libtool"' 'AR="ar"' \
|
--replace 'AR="libtool"' 'AR="ar"' \
|
||||||
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
|
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue