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:
Shamrock Lee 2021-10-04 01:08:14 +08:00
parent 441e405c77
commit fecc5d7bff
4 changed files with 38 additions and 40 deletions

View File

@ -1,8 +1,7 @@
a :
a :
a.stdenv.mkDerivation {
buildCommand = ''
mkdir -p "$out/attributes"
'' + (a.lib.concatStrings (map
(n: ''
ln -s "${a.writeTextFile {name=n; text=builtins.getAttr n a.theAttrSet;}}" $out/attributes/${n};

View File

@ -5,7 +5,7 @@
runCommand "frog-test" {} ''
${languageMachines.frog}/bin/frog >$out <<EOF
Dit is een test
EOF
echo "Frog output:"
cat $out

View File

@ -2,12 +2,12 @@
with lib;
let
let
version = "1.3.0";
incfile = builtins.toFile "make.inc.custom" ''
CC = g++
FORT = gfortran
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
@ -16,22 +16,22 @@ let
FOPTS = -fPIC -O3 -DADD_ -Wall -x f95-cpp-input
F77OPTS = -fPIC -O3 -DADD_ -Wall
LDOPTS = -fPIC
-include make.check-mkl
-include make.check-clblas
# Gnu mkl is not available I guess?
#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 += -lclBLAS -lOpenCL
LIBDIR = -L$(MKLROOT)/lib/intel64 \
-L$(MKLROOT)/../compiler/lib/intel64 \
-L$(clBLAS)/lib64
INC = -I$(clBLAS)/include
INC = -I$(clBLAS)/include
#-I$(AMDAPP)/include
'';
'';
in stdenv.mkDerivation {
name = "clmagma-${version}";
src = fetchurl {
@ -40,11 +40,11 @@ in stdenv.mkDerivation {
name = "clmagma-${version}.tar.gz";
};
buildInputs = [
gfortran
clblas
opencl-headers
ocl-icd
buildInputs = [
gfortran
clblas
opencl-headers
ocl-icd
mkl
intel-ocl
];
@ -54,13 +54,13 @@ in stdenv.mkDerivation {
MKLROOT = "${mkl}";
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.
OPENCL_VENDOR_PATH="${intel-ocl}/etc/OpenCL/vendors";
preBuild = ''
preBuild = ''
# 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
cp ${incfile} make.inc
'';

View File

@ -28,8 +28,8 @@ rec {
libjson-c.a \
-o ./test1.js
echo "Using node to execute the test which basically outputs an error on stderr which we grep for"
${pkgs.nodejs}/bin/node ./test1.js
echo "Using node to execute the test which basically outputs an error on stderr which we grep for"
${pkgs.nodejs}/bin/node ./test1.js
set +x
if [ $? -ne 0 ]; then
@ -41,17 +41,17 @@ rec {
echo "================= /testing json_c using node ================="
'';
});
libxml2 = (pkgs.libxml2.override {
stdenv = emscriptenStdenv;
pythonSupport = false;
}).overrideDerivation
(old: {
(old: {
propagatedBuildInputs = [ zlib ];
buildInputs = old.buildInputs ++ [ pkg-config ];
# just override it with nothing so it does not fail
autoreconfPhase = "echo autoreconfPhase not used...";
autoreconfPhase = "echo autoreconfPhase not used...";
configurePhase = ''
HOME=$TMPDIR
emconfigure ./configure --prefix=$out --without-python
@ -63,10 +63,10 @@ rec {
set -x
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 \
--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"
${pkgs.nodejs}/bin/node ./xmllint.test.js --noout test/xmlid/id_err1.xml 2>&1 | grep 0bar
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
set +x
if [ $? -ne 0 ]; then
@ -77,8 +77,8 @@ rec {
fi
echo "================= /testing libxml2 using node ================="
'';
});
});
xmlmirror = pkgs.buildEmscriptenPackage rec {
pname = "xmlmirror";
version = "unstable-2016-06-05";
@ -91,7 +91,7 @@ rec {
rev = "4fd7e86f7c9526b8f4c1733e5c8b45175860a8fd";
sha256 = "1jasdqnbdnb83wbcnyrp32f36w3xwhwp0wq8lwwmhqagxrij1r4b";
};
configurePhase = ''
rm -f fastXmlLint.js*
# 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
sed -e "s/-o fastXmlLint.js/-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -o fastXmlLint.js/g" -i Makefile.emEnv
'';
buildPhase = ''
HOME=$TMPDIR
make -f Makefile.emEnv
'';
outputs = [ "out" "doc" ];
installPhase = ''
mkdir -p $out/share
mkdir -p $doc/share/${pname}
cp Demo* $out/share
cp -R codemirror-5.12 $out/share
cp fastXmlLint.js* $out/share
@ -127,14 +127,13 @@ rec {
cp README.md $doc/share/${pname}
'';
checkPhase = ''
'';
};
};
zlib = (pkgs.zlib.override {
stdenv = pkgs.emscriptenStdenv;
}).overrideDerivation
(old: {
(old: {
buildInputs = old.buildInputs ++ [ pkg-config ];
# we need to reset this setting!
NIX_CFLAGS_COMPILE="";
@ -165,7 +164,7 @@ rec {
-L. libz.so.${old.version} -I . -o example.js
echo "Using node to execute the test"
${pkgs.nodejs}/bin/node ./example.js
${pkgs.nodejs}/bin/node ./example.js
set +x
if [ $? -ne 0 ]; then
@ -183,6 +182,6 @@ rec {
--replace 'AR="libtool"' 'AR="ar"' \
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
'';
});
});
}