Merge remote-tracking branch 'upstream/master' into HEAD

This commit is contained in:
Frederik Rietdijk 2017-09-06 14:01:25 +02:00
commit 38dc9a870f
41 changed files with 1681 additions and 1056 deletions

View File

@ -9,7 +9,12 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ pkgconfig ncurses boehmgc ]; buildInputs = [ pkgconfig ncurses boehmgc ];
nativeBuildInputs = [ help2man perl ]; nativeBuildInputs = [ perl ]
# `help2man' wants to run Zile, which won't work when the
# newly-produced binary can't be run at build-time.
++ stdenv.lib.optional
(stdenv.hostPlatform == stdenv.buildPlatform)
help2man;
# Tests can't be run because most of them rely on the ability to # Tests can't be run because most of them rely on the ability to
# fiddle with the terminal. # fiddle with the terminal.

View File

@ -19,11 +19,11 @@ let
in in
pythonPackages.buildPythonApplication rec { pythonPackages.buildPythonApplication rec {
name = "ocropus-${version}"; name = "ocropus-${version}";
version = "20150316"; version = "20170811";
src = fetchFromGitHub { src = fetchFromGitHub {
sha256 = "0m5bm2ah3p29c13vp7hz7rm058qnlm840zd8xv20byijhlz0447g"; sha256 = "0qx0d8yj0w66qglkrmfavp5dh1sky72njfaqii7bnrpv5n4j3q39";
rev = "5ba07bb959d605ec15424dd2b8f3d7245820084e"; rev = "ae84a8edaf0b76135f749ba66fc30c272d0726d0";
repo = "ocropy"; repo = "ocropy";
owner = "tmbdev"; owner = "tmbdev";
}; };
@ -37,7 +37,8 @@ pythonPackages.buildPythonApplication rec {
${concatStrings (map (x: "cp -R ${x.src} models/`basename ${x.name}`;") ${concatStrings (map (x: "cp -R ${x.src} models/`basename ${x.name}`;")
models)} models)}
substituteInPlace ocrolib/{common,default}.py --replace /usr/local $out substituteInPlace ocrolib/common.py --replace /usr/local $out
substituteInPlace ocrolib/default.py --replace /usr/local $out
''; '';
doCheck = false; # fails doCheck = false; # fails

View File

@ -1,15 +1,17 @@
{ stdenv, lib, fetchurl { stdenv, lib, fetchFromGitHub
, qt4, qmake4Hook, openssl , qt4, qmake4Hook, openssl
, xproto, libX11, libXScrnSaver, scrnsaverproto , xproto, libX11, libXScrnSaver, scrnsaverproto
, xz, zlib , xz, zlib
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "vacuum-im-${version}"; name = "vacuum-im-${version}";
version = "1.2.4"; version = "1.3.0.20160104";
src = fetchurl { src = fetchFromGitHub {
url = "https://googledrive.com/host/0B7A5K_290X8-d1hjQmJaSGZmTTA/vacuum-${version}.tar.gz"; owner = "Vacuum-IM";
sha256 = "10qxpfbbaagqcalhk0nagvi5irbbz5hk31w19lba8hxf6pfylrhf"; repo = "vacuum-im";
rev = "1.3.0.20160104-Alpha";
sha256 = "1jcw9c7s75y4c3m4skfc3cc0i519z39b23n997vj5mwcjplxyc76";
}; };
buildInputs = [ buildInputs = [

View File

@ -102,8 +102,7 @@ stdenv.mkDerivation rec {
rm -rf ffmpeg rm -rf ffmpeg
''; '';
depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ buildPackages.stdenv.cc pkgconfig yasm ];
nativeBuildInputs = [ pkgconfig yasm ];
buildInputs = with stdenv.lib; buildInputs = with stdenv.lib;
[ freetype ffmpeg ] [ freetype ffmpeg ]
++ optional aalibSupport aalib ++ optional aalibSupport aalib

View File

@ -1,5 +1,6 @@
{stdenv, fetchurl, pkgconfig, alsaLib, spice_protocol, glib, {stdenv, fetchurl, pkgconfig, alsaLib, spice_protocol, glib,
libpciaccess, libxcb, libXrandr, libXinerama, libXfixes, dbus}: libpciaccess, libxcb, libXrandr, libXinerama, libXfixes, dbus,
systemd}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "spice-vdagent-0.17.0"; name = "spice-vdagent-0.17.0";
src = fetchurl { src = fetchurl {
@ -11,7 +12,7 @@ stdenv.mkDerivation rec {
''; '';
buildInputs = [ pkgconfig alsaLib spice_protocol glib buildInputs = [ pkgconfig alsaLib spice_protocol glib
libpciaccess libxcb libXrandr libXinerama libXfixes libpciaccess libxcb libXrandr libXinerama libXfixes
dbus ] ; dbus systemd ] ;
meta = { meta = {
description = "Enhanced SPICE integration for linux QEMU guest"; description = "Enhanced SPICE integration for linux QEMU guest";
longDescription = '' longDescription = ''

View File

@ -0,0 +1,2 @@
export NIX_CXXSTDLIB_COMPILE+="-isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/$(@gcc@/bin/gcc -dumpmachine)"
export NIX_CXXSTDLIB_LINK=" -stdlib=libstdc++"

View File

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
sha256 = "1x8m4rp2v7ydnrz6z9g8x7z3x3d3pxhv2pixy7i7hkbqbdsp7kal"; sha256 = "1x8m4rp2v7ydnrz6z9g8x7z3x3d3pxhv2pixy7i7hkbqbdsp7kal";
}; };
buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 (stdenv.lib.getBin hscolour) ]; buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour ];
patches = [ ./relocation.patch ]; patches = [ ./relocation.patch ];

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
./relocation.patch ./relocation.patch
]; ];
buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 (stdenv.lib.getBin hscolour) ]; buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
(fetchFilteredPatch { url = https://git.haskell.org/ghc.git/patch/2f8cd14fe909a377b3e084a4f2ded83a0e6d44dd; sha256 = "06zvlgcf50ab58bw6yw3krn45dsmhg4cmlz4nqff8k4z1f1bj01v"; }) (fetchFilteredPatch { url = https://git.haskell.org/ghc.git/patch/2f8cd14fe909a377b3e084a4f2ded83a0e6d44dd; sha256 = "06zvlgcf50ab58bw6yw3krn45dsmhg4cmlz4nqff8k4z1f1bj01v"; })
] ++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch; ] ++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch;
buildInputs = [ ghc perl (stdenv.lib.getBin hscolour) sphinx]; buildInputs = [ ghc perl hscolour sphinx];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch ++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch
++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch; ++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch;
buildInputs = [ ghc perl (stdenv.lib.getBin hscolour) sphinx ]; buildInputs = [ ghc perl hscolour sphinx ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -11,7 +11,7 @@ let
inherit (bootPkgs) ghc; inherit (bootPkgs) ghc;
version = "8.2.1"; version = "8.2.1";
preReleaseName = "ghc-8.2.1"; preReleaseName = "ghc-8.2.1";
commonBuildInputs = [ (stdenv.lib.getBin alex) autoconf automake ghc (stdenv.lib.getBin happy) (stdenv.lib.getBin hscolour) perl python3 sphinx ]; commonBuildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ];
commonPreConfigure = '' commonPreConfigure = ''
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) '' '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''

View File

@ -11,7 +11,7 @@
let let
inherit (bootPkgs) ghc; inherit (bootPkgs) ghc;
commonBuildInputs = [ ghc perl autoconf automake (stdenv.lib.getBin happy) (stdenv.lib.getBin alex) python3 ]; commonBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
rev = "14457cf6a50f708eecece8f286f08687791d51f7"; rev = "14457cf6a50f708eecece8f286f08687791d51f7";

View File

@ -118,7 +118,7 @@ in mkDerivation (rec {
lens optparse-applicative parallel safe shelly split lens optparse-applicative parallel safe shelly split
stringsearch syb system-fileio system-filepath tar terminfo text-binary stringsearch syb system-fileio system-filepath tar terminfo text-binary
unordered-containers vector wl-pprint-text yaml unordered-containers vector wl-pprint-text yaml
(stdenv.lib.getBin alex) (stdenv.lib.getBin happy) git gnumake autoconf automake libtool patch gmp alex happy git gnumake autoconf automake libtool patch gmp
base16-bytestring cryptohash executable-path haddock-api base16-bytestring cryptohash executable-path haddock-api
transformers-compat QuickCheck haddock hspec xhtml transformers-compat QuickCheck haddock hspec xhtml
regex-posix libiconv regex-posix libiconv

View File

@ -0,0 +1,181 @@
{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
, perl, which, pkgconfig, patch, fetchpatch
, pcre, cacert, llvm
, Security, Foundation, bash
, makeWrapper, git, subversion, mercurial, bazaar }:
let
inherit (stdenv.lib) optional optionals optionalString;
clangHack = writeScriptBin "clang" ''
#!${stdenv.shell}
exec ${stdenv.cc}/bin/clang "$@" 2> >(sed '/ld: warning:.*ignoring unexpected dylib file/ d' 1>&2)
'';
goBootstrap = runCommand "go-bootstrap" {} ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
find $out -name "*.c" -delete
cp -rf $out/bin/* $out/share/go/bin/
'';
in
stdenv.mkDerivation rec {
name = "go-${version}";
version = "1.9";
src = fetchFromGitHub {
owner = "golang";
repo = "go";
rev = "go${version}";
sha256 = "06k66x387r93m7d3bd5yzwdm8f8xc43cdjfamqldfc1v8ngak0y9";
};
# perl is used for testing go vet
nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ];
buildInputs = [ pcre ]
++ optionals stdenv.isLinux [ stdenv.glibc.out stdenv.glibc.static ];
propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ];
hardeningDisable = [ "all" ];
prePatch = ''
patchShebangs ./ # replace /bin/bash
# This source produces shell script at run time,
# and thus it is not corrected by patchShebangs.
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
--replace '#!/usr/bin/env bash' '#!${stdenv.shell}'
# Disabling the 'os/http/net' tests (they want files not available in
# chroot builds)
rm src/net/{listen,parse}_test.go
rm src/syscall/exec_linux_test.go
# !!! substituteInPlace does not seems to be effective.
# The os test wants to read files in an existing path. Just don't let it be /usr/bin.
sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
# Disable the unix socket test
sed -i '/TestShutdownUnix/areturn' src/net/net_test.go
# Disable the hostname test
sed -i '/TestHostname/areturn' src/os/os_test.go
# ParseInLocation fails the test
sed -i '/TestParseInSydney/areturn' src/time/format_test.go
# Remove the api check as it never worked
sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
# Remove the coverage test as we have removed this utility
sed -i '/TestCoverageWithCgo/areturn' src/cmd/go/go_test.go
# Remove the timezone naming test
sed -i '/TestLoadFixed/areturn' src/time/time_test.go
# Remove disable setgid test
sed -i '/TestRespectSetgidDir/areturn' src/cmd/go/internal/work/build_test.go
# Remove cert tests that conflict with NixOS's cert resolution
sed -i '/TestEnvVars/areturn' src/crypto/x509/root_unix_test.go
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
# Disable cgo lookup tests not works, they depend on resolver
rm src/net/cgo_unix_test.go
'' + optionalString stdenv.isLinux ''
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
'' + optionalString stdenv.isArm ''
sed -i '/TestCurrent/areturn' src/os/user/user_test.go
echo '#!/usr/bin/env bash' > misc/cgo/testplugin/test.bash
'' + optionalString stdenv.isDarwin ''
substituteInPlace src/race.bash --replace \
"sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
sed -i '/TestRead0/areturn' src/os/os_test.go
sed -i '/TestNohup/areturn' src/os/signal/signal_test.go
sed -i '/TestCurrent/areturn' src/os/user/user_test.go
sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
sed -i '/TestBuildDashIInstallsDependencies/areturn' src/cmd/go/go_test.go
sed -i '/TestDisasmExtld/areturn' src/cmd/objdump/objdump_test.go
sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
sed -i 's/unrecognized/unknown/' src/cmd/go/build.go
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
sed -i '1 a\exit 0' misc/cgo/errors/test.bash
'';
patches =
[ ./remove-tools-1.9.patch
./ssl-cert-file-1.9.patch
./creds-test.patch
./remove-test-pie-1.9.patch
];
postPatch = optionalString stdenv.isDarwin ''
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
'';
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.isArm then "arm"
else throw "Unsupported system";
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
# The go build actually checks for CC=*/clang and does something different, so we don't
# just want the generic `cc` here.
CC = if stdenv.isDarwin then "clang" else "cc";
configurePhase = ''
mkdir -p $out/share/go/bin
export GOROOT=$out/share/go
export GOBIN=$GOROOT/bin
export PATH=$GOBIN:$PATH
'';
postConfigure = optionalString stdenv.isDarwin ''
export PATH=${clangHack}/bin:$PATH
'';
installPhase = ''
cp -r . $GOROOT
( cd $GOROOT/src && ./all.bash )
# (https://github.com/golang/go/wiki/GoGetTools)
wrapProgram $out/share/go/bin/go --prefix PATH ":" "${stdenv.lib.makeBinPath [ git subversion mercurial bazaar ]}"
'';
preFixup = ''
rm -r $out/share/go/pkg/bootstrap
ln -s $out/share/go/bin $out/bin
'';
setupHook = ./setup-hook.sh;
disallowedReferences = [ go_bootstrap ];
meta = with stdenv.lib; {
branch = "1.8";
homepage = http://golang.org/;
description = "The Go Programming language";
license = licenses.bsd3;
maintainers = with maintainers; [ cstrahan wkennington ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@ -0,0 +1,26 @@
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 73432d31ea..3310f5298d 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -510,21 +510,6 @@ func (t *tester) registerTests() {
})
}
- // Test internal linking of PIE binaries where it is supported.
- if t.goos == "linux" && t.goarch == "amd64" && !isAlpineLinux() {
- // Issue 18243: We don't have a way to set the default
- // dynamic linker used in internal linking mode. So
- // this test is skipped on Alpine.
- t.tests = append(t.tests, distTest{
- name: "pie_internal",
- heading: "internal linking of -buildmode=pie",
- fn: func(dt *distTest) error {
- t.addCmd(dt, "src", "go", "test", "reflect", "-short", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60), t.tags(), t.runFlag(""))
- return nil
- },
- })
- }
-
// sync tests
t.tests = append(t.tests, distTest{
name: "sync_cpu",

View File

@ -0,0 +1,35 @@
diff --git a/src/go/build/build.go b/src/go/build/build.go
index d8163d0172..dd80a70473 100644
--- a/src/go/build/build.go
+++ b/src/go/build/build.go
@@ -1592,7 +1592,7 @@ func init() {
}
// ToolDir is the directory containing build tools.
-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
+var ToolDir = runtime.GOTOOLDIR()
// IsLocalImport reports whether the import path is
// a local import path, like ".", "..", "./foo", or "../foo".
diff --git a/src/runtime/extern.go b/src/runtime/extern.go
index 6e6c674d96..e9f62f96dc 100644
--- a/src/runtime/extern.go
+++ b/src/runtime/extern.go
@@ -223,6 +223,17 @@ func GOROOT() string {
return sys.DefaultGoroot
}
+// GOTOOLDIR returns the root of the Go tree.
+// It uses the GOTOOLDIR environment variable, if set,
+// or else the root used during the Go build.
+func GOTOOLDIR() string {
+ s := gogetenv("GOTOOLDIR")
+ if s != "" {
+ return s
+ }
+ return GOROOT() + "/pkg/tool/" + GOOS + "_" + GOARCH
+}
+
// Version returns the Go tree's version string.
// It is either the commit hash and date at the time of the build or,
// when possible, a release tag like "go1.3".

View File

@ -0,0 +1,80 @@
diff --git a/src/crypto/x509/root_cgo_darwin.go b/src/crypto/x509/root_cgo_darwin.go
index 8e80533590..31c0c666ec 100644
--- a/src/crypto/x509/root_cgo_darwin.go
+++ b/src/crypto/x509/root_cgo_darwin.go
@@ -201,11 +201,20 @@ int FetchPEMRoots(CFDataRef *pemRoots, CFDataRef *untrustedPemRoots) {
import "C"
import (
"errors"
+ "io/ioutil"
+ "os"
"unsafe"
)
func loadSystemRoots() (*CertPool, error) {
roots := NewCertPool()
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
+ data, err := ioutil.ReadFile(file)
+ if err == nil {
+ roots.AppendCertsFromPEM(data)
+ return roots, nil
+ }
+ }
var data C.CFDataRef = nil
var untrustedData C.CFDataRef = nil
diff --git a/src/crypto/x509/root_darwin.go b/src/crypto/x509/root_darwin.go
index bc35a1cf21..21e52bec51 100644
--- a/src/crypto/x509/root_darwin.go
+++ b/src/crypto/x509/root_darwin.go
@@ -81,18 +81,26 @@ func execSecurityRoots() (*CertPool, error) {
)
}
- cmd := exec.Command("/usr/bin/security", args...)
- data, err := cmd.Output()
- if err != nil {
- return nil, err
- }
-
var (
mu sync.Mutex
roots = NewCertPool()
numVerified int // number of execs of 'security verify-cert', for debug stats
)
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
+ data, err := ioutil.ReadFile(file)
+ if err == nil {
+ roots.AppendCertsFromPEM(data)
+ return roots, nil
+ }
+ }
+
+ cmd := exec.Command("/usr/bin/security", args...)
+ data, err := cmd.Output()
+ if err != nil {
+ return nil, err
+ }
+
blockCh := make(chan *pem.Block)
var wg sync.WaitGroup
diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go
index 65b5a5fdbc..c9c7ac6a74 100644
--- a/src/crypto/x509/root_unix.go
+++ b/src/crypto/x509/root_unix.go
@@ -37,6 +37,13 @@ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate
func loadSystemRoots() (*CertPool, error) {
roots := NewCertPool()
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
+ data, err := ioutil.ReadFile(file)
+ if err == nil {
+ roots.AppendCertsFromPEM(data)
+ return roots, nil
+ }
+ }
files := certFiles
if f := os.Getenv(certFileEnv); f != "" {

View File

@ -20,9 +20,9 @@ stdenv.mkDerivation rec {
sed -ie 's|ld |${binutils}/bin/ld |g' src/scripts/ldkernel.in sed -ie 's|ld |${binutils}/bin/ld |g' src/scripts/ldkernel.in
''; '';
configureFlags = stdenv.lib.optional (!enableIntegerSimple) [ "--enable-gmp" ]; configureFlags = stdenv.lib.optional (!enableIntegerSimple) [ "--enable-gmp" ];
propagatedNativeBuildInputs = [ (stdenv.lib.getBin alex) (stdenv.lib.getBin happy) ]; propagatedNativeBuildInputs = [ alex happy ];
buildInputs = buildInputs =
let haskellPkgs = [ (stdenv.lib.getBin alex) (stdenv.lib.getBin happy) (stdenv.lib.getBin bootPkgs.hscolour) bootPkgs.cabal-install bootPkgs.haddock bootPkgs.hpc let haskellPkgs = [ alex happy bootPkgs.hscolour bootPkgs.cabal-install bootPkgs.haddock bootPkgs.hpc
]; in [ bootPkgs.ghc ]; in [ bootPkgs.ghc
automake perl git binutils automake perl git binutils
autoconf xen zlib ncurses.dev autoconf xen zlib ncurses.dev

View File

@ -1,4 +1,8 @@
{ lowPrio, newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }: { lowPrio, newScope, stdenv, targetPlatform, cmake, libstdcxxHook
, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun
, darwin
}:
let let
callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; }); callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; });
@ -46,7 +50,12 @@ let
extraPackages = [ self.libcxx self.libcxxabi ]; extraPackages = [ self.libcxx self.libcxxabi ];
}; };
stdenv = overrideCC stdenv self.clang; stdenv = stdenv.override (drv: {
allowedRequisites = null;
cc = self.clang;
# Use the gcc libstdc++ when targeting linux.
extraBuildInputs = if stdenv.cc.isGNU then [ libstdcxxHook ] else drv.extraBuildInputs;
});
libcxxStdenv = overrideCC stdenv self.libcxxClang; libcxxStdenv = overrideCC stdenv self.libcxxClang;
@ -58,4 +67,5 @@ let
libcxxabi = callPackage ./libc++abi.nix {}; libcxxabi = callPackage ./libc++abi.nix {};
}; };
in self in self

View File

@ -862,7 +862,6 @@ self: super: {
# Don't install internal mkReadme tool. # Don't install internal mkReadme tool.
hastache = overrideCabal super.hastache (drv: { hastache = overrideCabal super.hastache (drv: {
doCheck = false; doCheck = false;
enableSeparateBinOutput = false;
postInstall = "rm $out/bin/mkReadme && rmdir $out/bin"; postInstall = "rm $out/bin/mkReadme && rmdir $out/bin";
}); });
@ -900,8 +899,4 @@ self: super: {
sha256 = "1vss7b99zrhw3r29krl1b60r4qk0m2mpwmrz8q8zdxrh33hb8pd7"; sha256 = "1vss7b99zrhw3r29krl1b60r4qk0m2mpwmrz8q8zdxrh33hb8pd7";
}); });
# Has extra data files which are referred to from the binary output,
# creating a store reference cycle. Putting data in separate output
# solves the problem.
happy = overrideCabal super.happy (drv: { enableSeparateDataOutput = true; });
} }

View File

@ -37,7 +37,7 @@ core-packages:
- ghcjs-base-0 - ghcjs-base-0
default-package-overrides: default-package-overrides:
# LTS Haskell 9.2 # LTS Haskell 9.3
- abstract-deque ==0.3 - abstract-deque ==0.3
- abstract-deque-tests ==0.3 - abstract-deque-tests ==0.3
- abstract-par ==0.3.3 - abstract-par ==0.3.3
@ -57,7 +57,7 @@ default-package-overrides:
- aeson-diff ==1.1.0.3 - aeson-diff ==1.1.0.3
- aeson-extra ==0.4.0.0 - aeson-extra ==0.4.0.0
- aeson-generic-compat ==0.0.1.0 - aeson-generic-compat ==0.0.1.0
- aeson-injector ==1.0.8.0 - aeson-injector ==1.0.10.0
- aeson-lens ==0.5.0.0 - aeson-lens ==0.5.0.0
- aeson-pretty ==0.8.5 - aeson-pretty ==0.8.5
- aeson-qq ==0.8.2 - aeson-qq ==0.8.2
@ -66,7 +66,7 @@ default-package-overrides:
- airship ==0.6.0 - airship ==0.6.0
- alarmclock ==0.4.0.3 - alarmclock ==0.4.0.3
- alerta ==0.1.0.4 - alerta ==0.1.0.4
- alex ==3.2.1 - alex ==3.2.2
- algebraic-graphs ==0.0.5 - algebraic-graphs ==0.0.5
- alsa-core ==0.5.0.1 - alsa-core ==0.5.0.1
- alsa-mixer ==0.2.0.3 - alsa-mixer ==0.2.0.3
@ -201,7 +201,7 @@ default-package-overrides:
- attoparsec-binary ==0.2 - attoparsec-binary ==0.2
- attoparsec-expr ==0.1.1.2 - attoparsec-expr ==0.1.1.2
- attoparsec-iso8601 ==1.0.0.0 - attoparsec-iso8601 ==1.0.0.0
- attoparsec-time ==0.1.3.2 - attoparsec-time ==0.1.4
- audacity ==0.0.1.2 - audacity ==0.0.1.2
- authenticate ==1.3.3.2 - authenticate ==1.3.3.2
- authenticate-oauth ==1.6 - authenticate-oauth ==1.6
@ -352,7 +352,7 @@ default-package-overrides:
- cgi ==3001.3.0.2 - cgi ==3001.3.0.2
- ChannelT ==0.0.0.4 - ChannelT ==0.0.0.4
- charset ==0.3.7.1 - charset ==0.3.7.1
- charsetdetect-ae ==1.1.0.2 - charsetdetect-ae ==1.1.0.3
- Chart ==1.8.2 - Chart ==1.8.2
- Chart-cairo ==1.8.2 - Chart-cairo ==1.8.2
- Chart-diagrams ==1.8.2 - Chart-diagrams ==1.8.2
@ -504,7 +504,7 @@ default-package-overrides:
- data-diverse-lens ==0.1.1.0 - data-diverse-lens ==0.1.1.0
- data-dword ==0.3.1.1 - data-dword ==0.3.1.1
- data-endian ==0.1.1 - data-endian ==0.1.1
- data-fix ==0.0.4 - data-fix ==0.0.6
- data-has ==0.2.1.0 - data-has ==0.2.1.0
- data-hash ==0.2.0.1 - data-hash ==0.2.0.1
- data-inttrie ==0.1.2 - data-inttrie ==0.1.2
@ -561,10 +561,10 @@ default-package-overrides:
- disposable ==0.2.0.4 - disposable ==0.2.0.4
- distance ==0.1.0.0 - distance ==0.1.0.0
- distributed-closure ==0.3.4.0 - distributed-closure ==0.3.4.0
- distributed-static ==0.3.7 - distributed-static ==0.3.8
- distribution ==1.1.1.0 - distribution ==1.1.1.0
- distributive ==0.5.3 - distributive ==0.5.3
- diversity ==0.8.0.2 - diversity ==0.8.1.0
- djinn-ghc ==0.0.2.3 - djinn-ghc ==0.0.2.3
- djinn-lib ==0.0.1.2 - djinn-lib ==0.0.1.2
- dlist ==0.8.0.3 - dlist ==0.8.0.3
@ -673,6 +673,7 @@ default-package-overrides:
- extensible-exceptions ==0.1.1.4 - extensible-exceptions ==0.1.1.4
- extra ==1.5.3 - extra ==1.5.3
- extract-dependencies ==0.2.0.1 - extract-dependencies ==0.2.0.1
- extractable-singleton ==0.0.1
- fail ==4.9.0.0 - fail ==4.9.0.0
- farmhash ==0.1.0.5 - farmhash ==0.1.0.5
- fast-builder ==0.0.0.6 - fast-builder ==0.0.0.6
@ -711,7 +712,7 @@ default-package-overrides:
- flexible-defaults ==0.0.1.2 - flexible-defaults ==0.0.1.2
- floatshow ==0.2.4 - floatshow ==0.2.4
- flock ==0.3.1.8 - flock ==0.3.1.8
- flow ==1.0.8 - flow ==1.0.9
- fmlist ==0.9 - fmlist ==0.9
- fmt ==0.3.0.0 - fmt ==0.3.0.0
- fn ==0.3.0.1 - fn ==0.3.0.1
@ -760,7 +761,7 @@ default-package-overrides:
- getopt-generics ==0.13.0.1 - getopt-generics ==0.13.0.1
- ghc-events ==0.6.0 - ghc-events ==0.6.0
- ghc-exactprint ==0.5.5.0 - ghc-exactprint ==0.5.5.0
- ghc-heap-view ==0.5.9 - ghc-heap-view ==0.5.10
- ghc-paths ==0.1.0.9 - ghc-paths ==0.1.0.9
- ghc-prof ==1.4.0.2 - ghc-prof ==1.4.0.2
- ghc-syb-utils ==0.2.3.2 - ghc-syb-utils ==0.2.3.2
@ -789,7 +790,7 @@ default-package-overrides:
- giphy-api ==0.5.2.0 - giphy-api ==0.5.2.0
- git ==0.2.0 - git ==0.2.0
- github ==0.16.0 - github ==0.16.0
- github-release ==1.0.5 - github-release ==1.0.6
- github-types ==0.2.1 - github-types ==0.2.1
- github-webhook-handler ==0.0.8 - github-webhook-handler ==0.0.8
- github-webhook-handler-snap ==0.0.7 - github-webhook-handler-snap ==0.0.7
@ -931,7 +932,7 @@ default-package-overrides:
- groundhog-sqlite ==0.8 - groundhog-sqlite ==0.8
- groundhog-th ==0.8.0.1 - groundhog-th ==0.8.0.1
- group-by-date ==0.1.0.1 - group-by-date ==0.1.0.1
- grouped-list ==0.2.1.2 - grouped-list ==0.2.1.3
- groupoids ==4.0 - groupoids ==4.0
- groups ==0.4.0.0 - groups ==0.4.0.0
- gtk ==0.14.6 - gtk ==0.14.6
@ -961,7 +962,7 @@ default-package-overrides:
- happstack-jmacro ==7.0.12 - happstack-jmacro ==7.0.12
- happstack-server ==7.4.6.4 - happstack-server ==7.4.6.4
- happstack-server-tls ==7.1.6.4 - happstack-server-tls ==7.1.6.4
- happy ==1.19.5 - happy >1.19.6
- harp ==0.4.2 - harp ==0.4.2
- hasbolt ==0.1.2.1 - hasbolt ==0.1.2.1
- hashable ==1.2.6.1 - hashable ==1.2.6.1
@ -1081,7 +1082,7 @@ default-package-overrides:
- hruby ==0.3.4.4 - hruby ==0.3.4.4
- hs-bibutils ==5.5 - hs-bibutils ==5.5
- hs-GeoIP ==0.3 - hs-GeoIP ==0.3
- hsass ==0.4.1 - hsass ==0.4.2
- hsb2hs ==0.3.1 - hsb2hs ==0.3.1
- hscolour ==1.24.1 - hscolour ==1.24.1
- hscurses ==1.4.2.0 - hscurses ==1.4.2.0
@ -1254,14 +1255,14 @@ default-package-overrides:
- jmacro-rpc-snap ==0.3 - jmacro-rpc-snap ==0.3
- jni ==0.3.1 - jni ==0.3.1
- jose ==0.6.0.3 - jose ==0.6.0.3
- jose-jwt ==0.7.6 - jose-jwt ==0.7.7
- js-flot ==0.8.3 - js-flot ==0.8.3
- js-jquery ==3.2.1 - js-jquery ==3.2.1
- json ==0.9.1 - json ==0.9.1
- json-builder ==0.3 - json-builder ==0.3
- json-rpc-generic ==0.2.1.2 - json-rpc-generic ==0.2.1.2
- json-schema ==0.7.4.1 - json-schema ==0.7.4.1
- json-stream ==0.4.1.3 - json-stream ==0.4.1.4
- JuicyPixels ==3.2.8.3 - JuicyPixels ==3.2.8.3
- JuicyPixels-extra ==0.2.1 - JuicyPixels-extra ==0.2.1
- JuicyPixels-scale-dct ==0.1.1.2 - JuicyPixels-scale-dct ==0.1.1.2
@ -1281,7 +1282,7 @@ default-package-overrides:
- koofr-client ==1.0.0.3 - koofr-client ==1.0.0.3
- kraken ==0.0.3 - kraken ==0.0.3
- l10n ==0.1.0.1 - l10n ==0.1.0.1
- labels ==0.3.2 - labels ==0.3.3
- lackey ==0.4.3 - lackey ==0.4.3
- lame ==0.1.1 - lame ==0.1.1
- language-c ==0.6.1 - language-c ==0.6.1
@ -1434,6 +1435,7 @@ default-package-overrides:
- model ==0.3 - model ==0.3
- modify-fasta ==0.8.2.3 - modify-fasta ==0.8.2.3
- monad-control ==1.0.2.2 - monad-control ==1.0.2.2
- monad-control-aligned ==0.0.1
- monad-coroutine ==0.9.0.3 - monad-coroutine ==0.9.0.3
- monad-extras ==0.6.0 - monad-extras ==0.6.0
- monad-http ==0.1.0.0 - monad-http ==0.1.0.0
@ -1488,7 +1490,7 @@ default-package-overrides:
- mysql ==0.1.4 - mysql ==0.1.4
- mysql-haskell ==0.8.0.0 - mysql-haskell ==0.8.0.0
- mysql-haskell-openssl ==0.8.0.0 - mysql-haskell-openssl ==0.8.0.0
- mysql-simple ==0.4.0.1 - mysql-simple ==0.4.1.0
- nagios-check ==0.3.2 - nagios-check ==0.3.2
- names-th ==0.2.0.3 - names-th ==0.2.0.3
- nano-erl ==0.1.0.1 - nano-erl ==0.1.0.1
@ -1534,7 +1536,7 @@ default-package-overrides:
- non-negative ==0.1.1.2 - non-negative ==0.1.1.2
- nonce ==1.0.4 - nonce ==1.0.4
- nondeterminism ==1.4 - nondeterminism ==1.4
- NoTrace ==0.3.0.1 - NoTrace ==0.3.0.2
- nsis ==0.3.1 - nsis ==0.3.1
- numbers ==3000.2.0.1 - numbers ==3000.2.0.1
- numeric-extras ==0.1 - numeric-extras ==0.1
@ -1825,10 +1827,10 @@ default-package-overrides:
- regex-tdfa-text ==1.0.0.3 - regex-tdfa-text ==1.0.0.3
- regex-with-pcre ==1.0.1.3 - regex-with-pcre ==1.0.1.3
- reinterpret-cast ==0.1.0 - reinterpret-cast ==0.1.0
- relational-query ==0.9.4.1 - relational-query ==0.9.5.0
- relational-query-HDBC ==0.6.4.0 - relational-query-HDBC ==0.6.4.1
- relational-record ==0.1.8.0 - relational-record ==0.1.8.0
- relational-schemas ==0.1.4.0 - relational-schemas ==0.1.4.1
- renderable ==0.2.0.1 - renderable ==0.2.0.1
- RepLib ==0.5.4 - RepLib ==0.5.4
- repline ==0.1.6.0 - repline ==0.1.6.0
@ -1878,7 +1880,7 @@ default-package-overrides:
- scalpel-core ==0.5.1 - scalpel-core ==0.5.1
- scanner ==0.2 - scanner ==0.2
- schematic ==0.1.6.0 - schematic ==0.1.6.0
- scientific ==0.3.5.1 - scientific ==0.3.5.2
- scotty ==0.11.0 - scotty ==0.11.0
- scrape-changes ==0.1.0.5 - scrape-changes ==0.1.0.5
- scrypt ==0.5.0 - scrypt ==0.5.0
@ -1910,14 +1912,14 @@ default-package-overrides:
- servant-cassava ==0.9 - servant-cassava ==0.9
- servant-checked-exceptions ==0.4.0.0 - servant-checked-exceptions ==0.4.0.0
- servant-client ==0.11 - servant-client ==0.11
- servant-docs ==0.10.0.1 - servant-docs ==0.11
- servant-elm ==0.4.0.1 - servant-elm ==0.4.0.1
- servant-foreign ==0.10.1 - servant-foreign ==0.10.1
- servant-js ==0.9.3 - servant-js ==0.9.3
- servant-JuicyPixels ==0.3.0.3 - servant-JuicyPixels ==0.3.0.3
- servant-lucid ==0.7.1 - servant-lucid ==0.7.1
- servant-mock ==0.8.2 - servant-mock ==0.8.2
- servant-purescript ==0.8.0.0 - servant-purescript ==0.8.0.1
- servant-ruby ==0.2.1.0 - servant-ruby ==0.2.1.0
- servant-server ==0.11 - servant-server ==0.11
- servant-static-th ==0.1.0.5 - servant-static-th ==0.1.0.5
@ -2039,7 +2041,7 @@ default-package-overrides:
- storable-tuple ==0.0.3.2 - storable-tuple ==0.0.3.2
- storablevector ==0.2.12.1 - storablevector ==0.2.12.1
- storablevector-carray ==0.0 - storablevector-carray ==0.0
- store ==0.4.3.1 - store ==0.4.3.2
- store-core ==0.4.1 - store-core ==0.4.1
- Strafunski-StrategyLib ==5.0.0.10 - Strafunski-StrategyLib ==5.0.0.10
- stratosphere ==0.6.0 - stratosphere ==0.6.0
@ -2179,7 +2181,7 @@ default-package-overrides:
- thread-local-storage ==0.1.1 - thread-local-storage ==0.1.1
- threads ==0.5.1.5 - threads ==0.5.1.5
- threepenny-editors ==0.4.1 - threepenny-editors ==0.4.1
- threepenny-gui ==0.8.0.1 - threepenny-gui ==0.8.1.0
- threepenny-gui-flexbox ==0.4.2 - threepenny-gui-flexbox ==0.4.2
- through-text ==0.1.0.0 - through-text ==0.1.0.0
- throwable-exceptions ==0.1.0.8 - throwable-exceptions ==0.1.0.8
@ -2289,7 +2291,7 @@ default-package-overrides:
- uri-bytestring ==0.2.3.3 - uri-bytestring ==0.2.3.3
- uri-bytestring-aeson ==0.1.0.2 - uri-bytestring-aeson ==0.1.0.2
- uri-encode ==1.5.0.5 - uri-encode ==1.5.0.5
- uri-templater ==0.2.1.0 - uri-templater ==0.2.2.0
- url ==2.1.3 - url ==2.1.3
- urlpath ==5.0.0.1 - urlpath ==5.0.0.1
- users ==0.5.0.0 - users ==0.5.0.0
@ -2343,7 +2345,7 @@ default-package-overrides:
- wai-middleware-caching-lru ==0.1.0.0 - wai-middleware-caching-lru ==0.1.0.0
- wai-middleware-caching-redis ==0.2.0.0 - wai-middleware-caching-redis ==0.2.0.0
- wai-middleware-consul ==0.1.0.2 - wai-middleware-consul ==0.1.0.2
- wai-middleware-content-type ==0.5.0.1 - wai-middleware-content-type ==0.5.1
- wai-middleware-crowd ==0.1.4.2 - wai-middleware-crowd ==0.1.4.2
- wai-middleware-metrics ==0.2.4 - wai-middleware-metrics ==0.2.4
- wai-middleware-rollbar ==0.4.0 - wai-middleware-rollbar ==0.4.0
@ -2452,15 +2454,15 @@ default-package-overrides:
- yackage ==0.8.1 - yackage ==0.8.1
- yahoo-finance-api ==0.2.0.2 - yahoo-finance-api ==0.2.0.2
- yaml ==0.8.23.3 - yaml ==0.8.23.3
- Yampa ==0.10.6.1 - Yampa ==0.10.6.2
- YampaSynth ==0.2 - YampaSynth ==0.2
- yes-precure5-command ==5.5.3 - yes-precure5-command ==5.5.3
- yesod ==1.4.5 - yesod ==1.4.5
- yesod-auth ==1.4.17.3 - yesod-auth ==1.4.18
- yesod-auth-account ==1.4.3 - yesod-auth-account ==1.4.3
- yesod-auth-basic ==0.1.0.2 - yesod-auth-basic ==0.1.0.2
- yesod-auth-fb ==1.8.1 - yesod-auth-fb ==1.8.1
- yesod-auth-hashdb ==1.6.1 - yesod-auth-hashdb ==1.6.2
- yesod-bin ==1.5.2.5 - yesod-bin ==1.5.2.5
- yesod-core ==1.4.36 - yesod-core ==1.4.36
- yesod-default ==1.2.0 - yesod-default ==1.2.0

View File

@ -211,10 +211,7 @@ self: super: builtins.intersectAttrs super {
# wxc supports wxGTX >= 3.0, but our current default version points to 2.8. # wxc supports wxGTX >= 3.0, but our current default version points to 2.8.
# http://hydra.cryp.to/build/1331287/log/raw # http://hydra.cryp.to/build/1331287/log/raw
wxc = (overrideCabal super.wxc (drv: { wxc = (addBuildDepend super.wxc self.split).override { wxGTK = pkgs.wxGTK30; };
buildDepends = (drv.buildDepends or []) ++ [self.split];
postInstall = "cp -v dist/build/libwxc.so.0.92.3.0 $lib/lib/libwxc.so";
})).override { wxGTK = pkgs.wxGTK30; };
wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK30; }; wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK30; };
# Test suite wants to connect to $DISPLAY. # Test suite wants to connect to $DISPLAY.
@ -492,46 +489,4 @@ self: super: builtins.intersectAttrs super {
# Without this override, the builds lacks pkg-config. # Without this override, the builds lacks pkg-config.
opencv-extra = addPkgconfigDepend super.opencv-extra (pkgs.opencv3.override { enableContrib = true; }); opencv-extra = addPkgconfigDepend super.opencv-extra (pkgs.opencv3.override { enableContrib = true; });
# Alex has some weird files in /usr/share that create a cyclic ref with
# its bin dir.
alex = hasNoBinOutput super.alex;
# Disable separate bin outputs for these specific packages that break with it.
H = hasNoBinOutput super.H;
cryptol = hasNoBinOutput super.cryptol;
sproxy = hasNoBinOutput super.sproxy;
sproxy2 = hasNoBinOutput super.sproxy2;
sproxy-web = hasNoBinOutput super.sproxy-web;
juandelacosa = hasNoBinOutput super.juandelacosa;
mywatch = hasNoBinOutput super.mywatch;
sugarhaskell = hasNoBinOutput super.sugarhaskell;
zerobin = hasNoBinOutput super.zerobin;
git-annex = overrideCabal super.git-annex (drv: {
enableSeparateBinOutput = false;
enableSeparateEtcOutput = false;
});
# Override a number of packages with specific references to $out in their
# derivations
stack = overrideCabal super.stack (drv: {
postInstall = ''
exe=$bin/bin/stack
mkdir -p $bin/share/bash-completion/completions
$exe --bash-completion-script $exe >$bin/share/bash-completion/completions/stack
'';
});
Agda = overrideCabal super.Agda (drv: {
postInstall = ''
files=("$out/share/"*"-ghc-"*"/Agda-"*"/lib/prim/Agda/"{Primitive.agda,Builtin"/"*.agda})
for f in "''${files[@]}" ; do
$bin/bin/agda $f
done
for f in "''${files[@]}" ; do
$bin/bin/agda -c --no-main $f
done
$bin/bin/agda-mode compile
'';
});
} }

View File

@ -56,10 +56,6 @@ let isCross = (ghc.cross or null) != null; in
, hardeningDisable ? lib.optional (ghc.isHaLVM or false) "all" , hardeningDisable ? lib.optional (ghc.isHaLVM or false) "all"
, enableSeparateDataOutput ? false , enableSeparateDataOutput ? false
, enableSeparateDocOutput ? doHaddock , enableSeparateDocOutput ? doHaddock
, enableSeparateBinOutput ? isExecutable
, outputsToInstall ? []
, enableSeparateLibOutput ? true
, enableSeparateEtcOutput ? (stdenv.lib.versionOlder "7.7" ghc.version)
} @ args: } @ args:
assert editedCabalFile != null -> revision != null; assert editedCabalFile != null -> revision != null;
@ -83,6 +79,9 @@ let
then "package-db" then "package-db"
else "package-conf"; else "package-conf";
# the target dir for haddock documentation
docdir = docoutput: docoutput + "/share/doc";
newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal"; newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
newCabalFile = fetchurl { newCabalFile = fetchurl {
url = newCabalFileUrl; url = newCabalFileUrl;
@ -96,13 +95,6 @@ let
''; '';
hasActiveLibrary = isLibrary && (enableStaticLibraries || enableSharedLibraries || enableLibraryProfiling); hasActiveLibrary = isLibrary && (enableStaticLibraries || enableSharedLibraries || enableLibraryProfiling);
hasLibOutput = enableSeparateLibOutput && hasActiveLibrary;
libDir = if hasLibOutput then "$lib/lib/${ghc.name}" else "$out/lib/${ghc.name}";
binDir = if enableSeparateBinOutput then "$bin/bin" else "$out/bin";
libexecDir = if enableSeparateBinOutput then "$libexec/bin" else "$out/libexec";
etcDir = if enableSeparateEtcOutput then "$etc/etc" else "$out/etc";
docDir = if enableSeparateDocOutput then "$doc/share/doc" else "$out/share/doc";
dataDir = if enableSeparateDataOutput then "$data/share/${ghc.name}" else "$out/share/${ghc.name}";
# We cannot enable -j<n> parallelism for libraries because GHC is far more # We cannot enable -j<n> parallelism for libraries because GHC is far more
# likely to generate a non-determistic library ID in that case. Further # likely to generate a non-determistic library ID in that case. Further
@ -121,20 +113,12 @@ let
stdenv.lib.optionalString isCross (" " + stdenv.lib.concatStringsSep " " crossCabalFlags); stdenv.lib.optionalString isCross (" " + stdenv.lib.concatStringsSep " " crossCabalFlags);
defaultConfigureFlags = [ defaultConfigureFlags = [
"--verbose" "--prefix=$out" "--verbose" "--prefix=$out" "--libdir=\\$prefix/lib/\\$compiler" "--libsubdir=\\$pkgid"
# Binary directory has to be $bin/bin instead of just $bin: this (optionalString enableSeparateDataOutput "--datadir=$data/share/${ghc.name}")
# is so that the package is added to the PATH when it's used as a (optionalString enableSeparateDocOutput "--docdir=${docdir "$doc"}")
# build input. Sadly mkDerivation won't add inputs that don't have
# bin subdirectory.
"--bindir=${binDir}"
"--libdir=${libDir}" "--libsubdir=\\$pkgid"
"--libexecdir=${libexecDir}"
(optionalString (enableSeparateEtcOutput) "--sysconfdir=${etcDir}") # Old versions of cabal don't support this flag.
"--datadir=${dataDir}"
"--docdir=${docDir}"
"--with-gcc=$CC" # Clang won't work without that extra information. "--with-gcc=$CC" # Clang won't work without that extra information.
"--package-db=$packageConfDir" "--package-db=$packageConfDir"
(optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=${libDir}/${pname}-${version}") (optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.name}/${pname}-${version}")
(optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names") (optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names")
(optionalString enableParallelBuilding "--ghc-option=-j$NIX_BUILD_CORES") (optionalString enableParallelBuilding "--ghc-option=-j$NIX_BUILD_CORES")
(optionalString useCpphs "--with-cpphs=${cpphs}/bin/cpphs --ghc-options=-cpp --ghc-options=-pgmP${cpphs}/bin/cpphs --ghc-options=-optP--cpp") (optionalString useCpphs "--with-cpphs=${cpphs}/bin/cpphs --ghc-options=-cpp --ghc-options=-pgmP${cpphs}/bin/cpphs --ghc-options=-optP--cpp")
@ -168,8 +152,7 @@ let
allPkgconfigDepends = pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++ allPkgconfigDepends = pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++
optionals doCheck testPkgconfigDepends ++ optionals withBenchmarkDepends benchmarkPkgconfigDepends; optionals doCheck testPkgconfigDepends ++ optionals withBenchmarkDepends benchmarkPkgconfigDepends;
nativeBuildInputs = map stdenv.lib.getBin nativeBuildInputs = buildTools ++ libraryToolDepends ++ executableToolDepends ++ [ removeReferencesTo ];
(buildTools ++ libraryToolDepends ++ executableToolDepends ++ [ removeReferencesTo ]);
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends; propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends;
otherBuildInputs = setupHaskellDepends ++ extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++ otherBuildInputs = setupHaskellDepends ++ extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
optionals (allPkgconfigDepends != []) ([pkgconfig] ++ allPkgconfigDepends) ++ optionals (allPkgconfigDepends != []) ([pkgconfig] ++ allPkgconfigDepends) ++
@ -198,15 +181,7 @@ assert allPkgconfigDepends != [] -> pkgconfig != null;
stdenv.mkDerivation ({ stdenv.mkDerivation ({
name = "${pname}-${version}"; name = "${pname}-${version}";
outputs = if (args ? outputs) then args.outputs else outputs = if (args ? outputs) then args.outputs else ([ "out" ] ++ (optional enableSeparateDataOutput "data") ++ (optional enableSeparateDocOutput "doc"));
( (optional enableSeparateBinOutput "bin")
++ (optional enableSeparateBinOutput "libexec")
++ [ "out" ]
++ (optional enableSeparateDataOutput "data")
++ (optional enableSeparateDocOutput "doc")
++ (optional enableSeparateEtcOutput "etc")
++ (optional hasLibOutput "lib")
);
setOutputFlags = false; setOutputFlags = false;
pos = builtins.unsafeGetAttrPos "pname" args; pos = builtins.unsafeGetAttrPos "pname" args;
@ -230,7 +205,7 @@ stdenv.mkDerivation ({
postPatch = optionalString jailbreak '' postPatch = optionalString jailbreak ''
echo "Run jailbreak-cabal to lift version restrictions on build inputs." echo "Run jailbreak-cabal to lift version restrictions on build inputs."
${stdenv.lib.getBin jailbreak-cabal}/bin/jailbreak-cabal ${pname}.cabal ${jailbreak-cabal}/bin/jailbreak-cabal ${pname}.cabal
'' + postPatch; '' + postPatch;
setupCompilerEnvironmentPhase = '' setupCompilerEnvironmentPhase = ''
@ -238,7 +213,7 @@ stdenv.mkDerivation ({
echo "Build with ${ghc}." echo "Build with ${ghc}."
export PATH="${ghc}/bin:$PATH" export PATH="${ghc}/bin:$PATH"
${optionalString (hasActiveLibrary && hyperlinkSource) "export PATH=${stdenv.lib.getBin hscolour}/bin:$PATH"} ${optionalString (hasActiveLibrary && hyperlinkSource) "export PATH=${hscolour}/bin:$PATH"}
packageConfDir="$TMPDIR/package.conf.d" packageConfDir="$TMPDIR/package.conf.d"
mkdir -p $packageConfDir mkdir -p $packageConfDir
@ -265,7 +240,7 @@ stdenv.mkDerivation ({
# #
# Create a local directory with symlinks of the *.dylib (macOS shared # Create a local directory with symlinks of the *.dylib (macOS shared
# libraries) from all the dependencies. # libraries) from all the dependencies.
local dynamicLinksDir="${libDir}/links" local dynamicLinksDir="$out/lib/links"
mkdir -p $dynamicLinksDir mkdir -p $dynamicLinksDir
for d in $(grep dynamic-library-dirs "$packageConfDir/"*|awk '{print $2}'); do for d in $(grep dynamic-library-dirs "$packageConfDir/"*|awk '{print $2}'); do
ln -s "$d/"*.dylib $dynamicLinksDir ln -s "$d/"*.dylib $dynamicLinksDir
@ -337,7 +312,7 @@ stdenv.mkDerivation ({
${if !hasActiveLibrary then "${setupCommand} install" else '' ${if !hasActiveLibrary then "${setupCommand} install" else ''
${setupCommand} copy ${setupCommand} copy
local packageConfDir="${libDir}/package.conf.d" local packageConfDir="$out/lib/${ghc.name}/package.conf.d"
local packageConfFile="$packageConfDir/${pname}-${version}.conf" local packageConfFile="$packageConfDir/${pname}-${version}.conf"
mkdir -p "$packageConfDir" mkdir -p "$packageConfDir"
${setupCommand} register --gen-pkg-config=$packageConfFile ${setupCommand} register --gen-pkg-config=$packageConfFile
@ -345,7 +320,7 @@ stdenv.mkDerivation ({
mv $packageConfFile $packageConfDir/$pkgId.conf mv $packageConfFile $packageConfDir/$pkgId.conf
''} ''}
${optionalString isGhcjs '' ${optionalString isGhcjs ''
for exeDir in "${binDir}/"*.jsexe; do for exeDir in "$out/bin/"*.jsexe; do
exe="''${exeDir%.jsexe}" exe="''${exeDir%.jsexe}"
printWords '#!${nodejs}/bin/node' > "$exe" printWords '#!${nodejs}/bin/node' > "$exe"
cat "$exeDir/all.js" >> "$exe" cat "$exeDir/all.js" >> "$exe"
@ -354,68 +329,18 @@ stdenv.mkDerivation ({
''} ''}
${optionalString doCoverage "mkdir -p $out/share && cp -r dist/hpc $out/share"} ${optionalString doCoverage "mkdir -p $out/share && cp -r dist/hpc $out/share"}
${optionalString (enableSharedExecutables && isExecutable && !isGhcjs && stdenv.isDarwin && stdenv.lib.versionOlder ghc.version "7.10") '' ${optionalString (enableSharedExecutables && isExecutable && !isGhcjs && stdenv.isDarwin && stdenv.lib.versionOlder ghc.version "7.10") ''
for exe in "${binDir}/"* ; do for exe in "$out/bin/"* ; do
install_name_tool -add_rpath "${libDir}/${pname}-${version}" "$exe" install_name_tool -add_rpath "$out/lib/ghc-${ghc.version}/${pname}-${version}" "$exe"
done done
''} ''}
${optionalString enableSeparateDocOutput '' ${optionalString enableSeparateDocOutput ''
# Remove references back to $out but also back to $lib if we have for x in ${docdir "$doc"}/html/src/*.html; do
# docs. $lib is needed as it stores path to haddock interfaces in the remove-references-to -t $out $x
# conf file which creates a cycle if docs refer back to library
# path.
mkdir -p ${docDir}
for x in ${docDir}/html/src/*.html; do
remove-references-to -t $out -t ${libDir} -t ${binDir} ${optionalString enableSeparateDataOutput "-t $data"} $x
done done
mkdir -p $doc
''} ''}
${optionalString enableSeparateDataOutput "mkdir -p $data"}
${optionalString hasLibOutput ''
# Even if we don't have binary output for the package, things like
# Paths files will embed paths to bin/libexec directories in themselves
# which results in .lib <-> $out cyclic store reference. We
# therefore patch out the paths from separate library if we don't have
# separate bin output too.
#
# If we _do_ have separate bin and lib outputs, we may still be in
# trouble in case of shared executables: executable contains path to
# .lib, .lib contains path (through Paths) to .bin and we have a
# cycle.
#
# Lastly we have to deal with references from .lib back into
# $out/share if we're not splitting out data directory.
#
# It may happen that we have hasLibOutput set but the library
# directory was not created: this happens in the case that library
# section is not exposing any modules. See "fail" package for an
# example where no modules are exposed for GHC >= 8.0.
if [ -d ${libDir} ]; then
find ${libDir} -type f -exec \
remove-references-to -t ${binDir} -t ${libexecDir} "{}" \;
fi
''}
${optionalString (hasLibOutput && ! enableSeparateDocOutput) ''
# If we don't have separate docs, we have to patch out the ref to
# docs in package conf. This will likely break Haddock
# cross-package links but is necessary to break store cycle…
find ${libDir}/ -type f -name '*.conf' -exec \
remove-references-to -t ${docDir} "{}" \;
''}
${optionalString (hasLibOutput && ! enableSeparateDataOutput) ''
# Just like for doc output path in $out potentially landing in
# *.conf, we have to also remove the data directory so that it
# doesn't appear under data-dir field creating a cycle.
find ${libDir}/ -type f -exec echo Removing ${dataDir} refs from "{}" \;
find ${libDir}/ -type f -exec \
remove-references-to -t ${dataDir} "{}" \;
''}
${optionalString enableSeparateDataOutput "mkdir -p ${dataDir}"}
${optionalString enableSeparateBinOutput "mkdir -p ${binDir} ${libexecDir}"}
${optionalString enableSeparateEtcOutput "mkdir -p ${etcDir}"}
runHook postInstall runHook postInstall
''; '';
@ -432,7 +357,7 @@ stdenv.mkDerivation ({
# the directory containing the haddock documentation. # the directory containing the haddock documentation.
# `null' if no haddock documentation was built. # `null' if no haddock documentation was built.
# TODO: fetch the self from the fixpoint instead # TODO: fetch the self from the fixpoint instead
haddockDir = self: if doHaddock then "${docDir}/html" else null; haddockDir = self: if doHaddock then "${docdir self.doc}/html" else null;
env = stdenv.mkDerivation { env = stdenv.mkDerivation {
name = "interactive-${pname}-${version}-environment"; name = "interactive-${pname}-${version}-environment";
@ -461,7 +386,6 @@ stdenv.mkDerivation ({
// optionalAttrs (description != "") { inherit description; } // optionalAttrs (description != "") { inherit description; }
// optionalAttrs (maintainers != []) { inherit maintainers; } // optionalAttrs (maintainers != []) { inherit maintainers; }
// optionalAttrs (hydraPlatforms != platforms) { inherit hydraPlatforms; } // optionalAttrs (hydraPlatforms != platforms) { inherit hydraPlatforms; }
// optionalAttrs (outputsToInstall != []) { inherit outputsToInstall; }
; ;
} }

File diff suppressed because it is too large Load Diff

View File

@ -142,8 +142,4 @@ rec {
overrideSrc = drv: { src, version ? drv.version }: overrideSrc = drv: { src, version ? drv.version }:
overrideCabal drv (_: { inherit src version; editedCabalFile = null; }); overrideCabal drv (_: { inherit src version; editedCabalFile = null; });
hasNoBinOutput = drv: overrideCabal drv (drv: { enableSeparateBinOutput = false; });
installOutputs = drv: outputs: overrideCabal drv
(drv: { outputsToInstall = outputs; });
} }

View File

@ -44,7 +44,6 @@ let
isLibrary = false; isLibrary = false;
doHaddock = false; doHaddock = false;
hyperlinkSource = false; # Avoid depending on hscolour for this build. hyperlinkSource = false; # Avoid depending on hscolour for this build.
enableSeparateEtcOutput = false; # The flag to support this is missing in old versions of cabal.
postFixup = "rm -rf $out/lib $out/share $out/nix-support"; postFixup = "rm -rf $out/lib $out/share $out/nix-support";
}); });
cpphs = overrideCabal (self.cpphs.overrideScope (self: super: { cpphs = overrideCabal (self.cpphs.overrideScope (self: super: {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }: { stdenv, fetchurl, fetchpatch }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libfpx-1.3.1-7"; name = "libfpx-1.3.1-7";
@ -11,6 +11,13 @@ stdenv.mkDerivation rec {
# Darwin gets misdetected as Windows without this # Darwin gets misdetected as Windows without this
NIX_CFLAGS_COMPILE = if stdenv.isDarwin then "-D__unix" else null; NIX_CFLAGS_COMPILE = if stdenv.isDarwin then "-D__unix" else null;
patches = [
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libfpx/files/libfpx-1.3.1_p6-gcc6.patch?id=f28a947813dbc0a1fd1a8d4a712d58a64c48ca01";
sha256 = "032y8110zgnkdhkdq3745zk53am1x34d912rai8q70k3sskyq22p";
})
];
# This dead code causes a duplicate symbol error in Clang so just remove it # This dead code causes a duplicate symbol error in Clang so just remove it
postPatch = if stdenv.cc.isClang then '' postPatch = if stdenv.cc.isClang then ''
substituteInPlace jpeg/ejpeg.h --replace "int No_JPEG_Header_Flag" "" substituteInPlace jpeg/ejpeg.h --replace "int No_JPEG_Header_Flag" ""

View File

@ -1,21 +0,0 @@
{ stdenv, fetchurl, pkgconfig, freetype, libXft, pango, fontconfig }:
stdenv.mkDerivation rec {
version = "2.3.1";
name = "silgraphite-2.3.1";
src = fetchurl {
url = "mirror://sourceforge/silgraphite/silgraphite/${version}/${name}.tar.gz";
sha256 = "9b07c6e91108b1fa87411af4a57e25522784cfea0deb79b34ced608444f2ed65";
};
buildInputs = [pkgconfig freetype libXft pango fontconfig];
NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype2";
meta = {
description = "An advanced font engine";
maintainers = [ stdenv.lib.maintainers.raskin ];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -2,6 +2,7 @@
, stdenv , stdenv
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, isPy3k
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -9,6 +10,8 @@ buildPythonPackage rec {
version = "1.1"; version = "1.1";
name = "${pname}-${version}"; name = "${pname}-${version}";
disabled = isPy3k;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "06cnj682ynacwpi63k1427vbf7ydnwh3dchc4b11yw8ii25wbc5d"; sha256 = "06cnj682ynacwpi63k1427vbf7ydnwh3dchc4b11yw8ii25wbc5d";

View File

@ -2,6 +2,7 @@
, stdenv , stdenv
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, isPy3k
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -9,6 +10,8 @@ buildPythonPackage rec {
version = "1.4.0"; version = "1.4.0";
name = "${pname}-${version}"; name = "${pname}-${version}";
disabled = isPy3k;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "0rkq4dpl41hx64m3ad0bwn0r5i7sf8qpgazgkq905j3wgk5aaspg"; sha256 = "0rkq4dpl41hx64m3ad0bwn0r5i7sf8qpgazgkq905j3wgk5aaspg";

View File

@ -4,15 +4,15 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
name = "rustup-${version}"; name = "rustup-${version}";
version = "1.2.0"; version = "1.3.0";
depsSha256 = "06bfz5kyj3k0yxv55dq0s1arx34sy1jjfrpgd83rf99026vcm5x2"; depsSha256 = "078hssgffgpakv735p1xg60kic151r2dvpdr9sipb63lwqr4dxfb";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "rust-lang-nursery"; owner = "rust-lang-nursery";
repo = "rustup.rs"; repo = "rustup.rs";
rev = version; rev = version;
sha256 = "0qwl27wh7j03h511bd8fq5fif5xcmkiyy9rm3hri7czjqr01mw0v"; sha256 = "199jlqqidzak7nxmv2nzjzv7zfzy9z7hw6h8d8wf1rbfdwd9l6hs";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];

View File

@ -6,36 +6,46 @@
, username ? "" , password ? "" , username ? "" , password ? ""
}: }:
assert releaseType == "alpha" || releaseType == "headless" || releaseType == "demo"; assert releaseType == "alpha"
|| releaseType == "headless"
|| releaseType == "demo";
with stdenv.lib;
let let
version = if releaseType != "demo" then "0.15.33" else "0.15.33";
arch = if stdenv.system == "x86_64-linux" then { # NB If you nix-prefetch-url any of these, be sure to add a --name arg,
inUrl = "linux64"; # where the ultimate "_" (before the version) is changed to a "-".
inTar = "x64"; binDists = {
} else if stdenv.system == "i686-linux" then { x86_64-linux = let bdist = bdistForArch { inUrl = "linux64"; inTar = "x64"; }; in {
inUrl = "linux32"; alpha = bdist { sha256 = "0phikwv00mbwpz4207wm6gz6blarm0b9p1f013ha2w5g7c2dxq4s"; fetcher = authenticatedFetch; };
inTar = "i386"; headless = bdist { sha256 = "1m170cl8ji6k3d3jm6n48wx3b7xfsxp4wkaixh0qszaqzafsglp0"; };
} else abort "Unsupported platform"; demo = bdist { sha256 = "03nwn4838yhqq0r76pf2m4wxi32rsq0knsxmq3qq4ycji89q1dyc"; version = "0.15.33"; };
};
i686-linux = let bdist = bdistForArch { inUrl = "linux32"; inTar = "i386"; }; in {
alpha = bdist { sha256 = "0nnfkxxqnywx1z05xnndgh71gp4izmwdk026nnjih74m2k5j086l"; version = "0.14.23"; nameMut = asGz; };
headless = bdist { };
demo = bdist { };
};
};
actual = binDists.${stdenv.system}.${releaseType};
authenticatedFetch = callPackage ./fetch.nix { inherit username password; }; bdistForArch = arch: { sha256 ? null
, version ? "0.15.34"
fetch = rec { , fetcher ? fetchurl
, nameMut ? x: x
}:
if sha256 == null then
abort "Factorio ${releaseType}-${arch.inTar} binaries are not (and were never?) available to download"
else {
inherit version arch;
src = fetcher {
inherit sha256;
url = "https://www.factorio.com/get-download/${version}/${releaseType}/${arch.inUrl}"; url = "https://www.factorio.com/get-download/${version}/${releaseType}/${arch.inUrl}";
name = "factorio_${releaseType}_${arch.inTar}-${version}.tar.xz"; name = nameMut "factorio_${releaseType}_${arch.inTar}-${version}.tar.xz";
x64 = {
headless = fetchurl { inherit name url; sha256 = "17x0dlmfd7jwmpmn5i8wag28rl01iysqz3ri6g6msxjnvj5l6byn"; };
alpha = authenticatedFetch { inherit name url; sha256 = "1m2r0n99ngqq47s9fzr09d347i15an6x9v1qlij8yf8w7lyrdy4z"; };
demo = fetchurl { inherit name url; sha256 = "03nwn4838yhqq0r76pf2m4wxi32rsq0knsxmq3qq4ycji89q1dyc"; };
};
i386 = {
headless = abort "Factorio 32-bit headless binaries are not available for download.";
alpha = abort "Factorio 32-bit client is not available for this version.";
demo = abort "Factorio 32-bit demo binaries are not available for download.";
}; };
}; };
authenticatedFetch = callPackage ./fetch.nix { inherit username password; };
asGz = builtins.replaceStrings [".xz"] [".gz"];
configBaseCfg = '' configBaseCfg = ''
use-system-read-write-data-directories=false use-system-read-write-data-directories=false
@ -59,10 +69,10 @@ let
modDir = factorio-utils.mkModDirDrv mods; modDir = factorio-utils.mkModDirDrv mods;
base = { base = with actual; {
name = "factorio-${releaseType}-${version}"; name = "factorio-${releaseType}-${version}";
src = fetch.${arch.inTar}.${releaseType}; inherit src;
preferLocalBuild = true; preferLocalBuild = true;
dontBuild = true; dontBuild = true;
@ -118,7 +128,8 @@ let
--prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$libPath \ --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$libPath \
--run "$out/share/factorio/update-config.sh" \ --run "$out/share/factorio/update-config.sh" \
--argv0 "" \ --argv0 "" \
--add-flags "-c \$HOME/.factorio/config.cfg ${optionalString (mods != []) "--mod-directory=${modDir}"}" --add-flags "-c \$HOME/.factorio/config.cfg" \
${if mods!=[] then "--add-flags --mod-directory=${modDir}" else ""}
# TODO Currently, every time a mod is changed/added/removed using the # TODO Currently, every time a mod is changed/added/removed using the
# modlist, a new derivation will take up the entire footprint of the # modlist, a new derivation will take up the entire footprint of the
@ -154,4 +165,5 @@ let
''; '';
}; };
}; };
in stdenv.mkDerivation (releases.${releaseType}) in stdenv.mkDerivation (releases.${releaseType})

View File

@ -47,8 +47,8 @@ in rec {
}; };
winetricks = fetchFromGitHub rec { winetricks = fetchFromGitHub rec {
version = "20170614"; version = "20170823";
sha256 = "1xszflrdmixxr0v7vjby8fpnl8fgc9gldr1gnjpwzq1rnb84idqa"; sha256 = "15kjic39nl3z4g9l9galwkajl108fxfwaa0d9nssp54wg6villwx";
owner = "Winetricks"; owner = "Winetricks";
repo = "winetricks"; repo = "winetricks";
rev = version; rev = version;

View File

@ -1,8 +1,12 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gnome3, gtk-engine-murrine }: { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gnome3, gtk-engine-murrine }:
stdenv.mkDerivation rec { let
name = "${pname}-${version}"; # treat versions newer than 3.22 as 3.22
gnomeVersion = if stdenv.lib.versionOlder "3.22" gnome3.version then "3.22" else gnome3.version;
pname = "arc-theme"; pname = "arc-theme";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
version = "2017-05-12"; version = "2017-05-12";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -18,7 +22,7 @@ stdenv.mkDerivation rec {
preferLocalBuild = true; preferLocalBuild = true;
configureFlags = [ "--disable-unity" ]; configureFlags = [ "--disable-unity" "--with-gnome=${gnomeVersion}" ];
postInstall = '' postInstall = ''
mkdir -p $out/share/plank/themes mkdir -p $out/share/plank/themes
@ -32,7 +36,7 @@ stdenv.mkDerivation rec {
description = "A flat theme with transparent elements for GTK 3, GTK 2 and Gnome-Shell"; description = "A flat theme with transparent elements for GTK 3, GTK 2 and Gnome-Shell";
homepage = https://github.com/horst3180/arc-theme; homepage = https://github.com/horst3180/arc-theme;
license = licenses.gpl3; license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ simonvandel romildo ]; maintainers = with maintainers; [ simonvandel romildo ];
platforms = platforms.unix;
}; };
} }

View File

@ -6,11 +6,11 @@ in
{ {
# Policy: use the highest stable version as the default (on our master). # Policy: use the highest stable version as the default (on our master).
stable = generic { stable = generic {
version = "375.66"; version = "384.69";
sha256_32bit = "0k7ib5ah3c2apzgzxlq75l48zm8901mbwj7slv18k3rhk8j0w8i9"; sha256_32bit = "1zgq9vji0ndadvql3bsnd0a6p7pq0vr8d0yb5c8b22i2h9smhw1v";
sha256_64bit = "1h01s8brpz42jwc24dsflm4psd3zsy26ds98h0adgwx51dbpzqsr"; sha256_64bit = "0l3np6cx2rnb2q89zbnq4lvfcjl2g7i56hxwcb11ggijqm7ridx7";
settingsSha256 = "0bpdayyqw4cpgl7bgddfz6w5j8y3wsgr89p5vxnzgk9g0vgqxh5h"; settingsSha256 = "064va75p7dnkhy4hyi9b1gl4wjmrpjksg4cyiwl6n3lkmjnvmnwy";
persistencedSha256 = "113rllf9l26z546jjfijpxllp17qcpawblzxvsqc6rbzbkmvcdwi"; persistencedSha256 = "0ijq25gnihw34qhkba62l5fy6lwkma94i0fxp8084byyilm3fwms";
}; };
beta = generic { beta = generic {

View File

@ -1,7 +1,7 @@
{ lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomjs2 }: { lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomjs2 }:
buildGoPackage rec { buildGoPackage rec {
version = "4.3.2"; version = "4.4.3";
name = "grafana-v${version}"; name = "grafana-v${version}";
goPackagePath = "github.com/grafana/grafana"; goPackagePath = "github.com/grafana/grafana";
@ -9,12 +9,12 @@ buildGoPackage rec {
rev = "v${version}"; rev = "v${version}";
owner = "grafana"; owner = "grafana";
repo = "grafana"; repo = "grafana";
sha256 = "0hz323favjm0gz4s2112rl8ygw7dy2pz808yhraplq8nljqh4h11"; sha256 = "04cm8h7if8yvczcwd83drbfzgr1spfspzg5im8lb540ks9x55dz4";
}; };
srcStatic = fetchurl { srcStatic = fetchurl {
url = "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${version}.linux-x64.tar.gz"; url = "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${version}.linux-x64.tar.gz";
sha256 = "0vk668ibayx0hqlam9jns5c7pggdh83yy54hnz5l7fnws4lm50qc"; sha256 = "1p36hniay2y3mwg300b7n3sl3vv7l5jq5ddcnmpmznwyd8zwbl4h";
}; };
preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace"; preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
@ -28,8 +28,8 @@ buildGoPackage rec {
meta = with lib; { meta = with lib; {
description = "Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB"; description = "Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB";
license = licenses.asl20; license = licenses.asl20;
homepage = http://grafana.org/; homepage = https://grafana.org/;
maintainers = with maintainers; [ offline fpletz ]; maintainers = with maintainers; [ offline fpletz willibutz ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "sonarr-${version}"; name = "sonarr-${version}";
version = "2.0.0.4928"; version = "2.0.0.4949";
src = fetchurl { src = fetchurl {
url = "http://download.sonarr.tv/v2/master/mono/NzbDrone.master.${version}.mono.tar.gz"; url = "http://download.sonarr.tv/v2/master/mono/NzbDrone.master.${version}.mono.tar.gz";
sha256 = "0wggh8z5dmkkcgbb1hzikia55djdqmbqz2dpzx1iyvgys7y5n8xm"; sha256 = "7e4e3a3668ee7485d0ee4009bcd1f2a7c3e8c25da7d9170272ef275a19c76ac4";
}; };
buildInputs = [ buildInputs = [

View File

@ -2,14 +2,14 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "file-${version}"; name = "file-${version}";
version = "5.31"; version = "5.32";
src = fetchurl { src = fetchurl {
urls = [ urls = [
"ftp://ftp.astron.com/pub/file/${name}.tar.gz" "ftp://ftp.astron.com/pub/file/${name}.tar.gz"
"https://distfiles.macports.org/file/${name}.tar.gz" "https://distfiles.macports.org/file/${name}.tar.gz"
]; ];
sha256 = "1vp4zihaxkhi85chkjgd4r4zdg4k2wa3c6pmajhbmx6gr7d8ii89"; sha256 = "0l1bfa0icng9vdwya00ff48fhvjazi5610ylbhl35qi13d6xqfc6";
}; };
buildInputs = [ zlib ]; buildInputs = [ zlib ];

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl, bash, callPackage, makeWrapper { stdenv, fetchurl, bash, callPackage, makeWrapper
, clang, llvm, which, libcgroup }: , clang, llvm, which, libcgroup
}:
let let
afl-qemu = callPackage ./qemu.nix {}; afl-qemu = callPackage ./qemu.nix {};
@ -7,6 +8,7 @@ let
else if stdenv.system == "i686-linux" then "qemu-i386" else if stdenv.system == "i686-linux" then "qemu-i386"
else throw "afl: no support for ${stdenv.system}!"; else throw "afl: no support for ${stdenv.system}!";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "afl-${version}"; name = "afl-${version}";
version = "2.48b"; version = "2.48b";
@ -23,7 +25,7 @@ stdenv.mkDerivation rec {
buildPhase = '' buildPhase = ''
make PREFIX=$out make PREFIX=$out
cd llvm_mode cd llvm_mode
make PREFIX=$out CC=${clang}/bin/clang CXX=${clang}/bin/clang++ make PREFIX=$out
cd .. cd ..
''; '';
installPhase = '' installPhase = ''

View File

@ -394,7 +394,9 @@ with pkgs;
afio = callPackage ../tools/archivers/afio { }; afio = callPackage ../tools/archivers/afio { };
afl = callPackage ../tools/security/afl { }; afl = callPackage ../tools/security/afl {
stdenv = clangStdenv;
};
afpfs-ng = callPackage ../tools/filesystems/afpfs-ng/default.nix { }; afpfs-ng = callPackage ../tools/filesystems/afpfs-ng/default.nix { };
@ -794,10 +796,10 @@ with pkgs;
enableSharedExecutables = false; enableSharedExecutables = false;
executableToolDepends = [ makeWrapper ]; executableToolDepends = [ makeWrapper ];
postInstall = '' postInstall = ''
exe=$libexec/bin/${drv.pname}-${drv.version}/${drv.pname} exe=$out/libexec/${drv.pname}-${drv.version}/${drv.pname}
install -D $bin/bin/${drv.pname} $exe install -D $out/bin/${drv.pname} $exe
rm -rf $bin/bin $out/lib $out/share rm -rf $out/{bin,lib,share}
makeWrapper $exe $bin/bin/${drv.pname} \ makeWrapper $exe $out/bin/${drv.pname} \
--prefix PATH ":" "${nix}/bin" \ --prefix PATH ":" "${nix}/bin" \
--prefix PATH ":" "${nix-prefetch-scripts}/bin" --prefix PATH ":" "${nix-prefetch-scripts}/bin"
mkdir -p $out/share/bash-completion/completions mkdir -p $out/share/bash-completion/completions
@ -809,7 +811,7 @@ with pkgs;
executableToolDepends = [ makeWrapper ]; executableToolDepends = [ makeWrapper ];
postInstall = '' postInstall = ''
wrapProgram $out/bin/stack2nix \ wrapProgram $out/bin/stack2nix \
${lib.makeBinPath [ git cabal2nix cabal-install stack ]} --prefix PATH ":" "${git}/bin:${cabal2nix}/bin:${cabal-install}/bin:${stack}/bin"
''; '';
}); });
@ -5364,6 +5366,10 @@ with pkgs;
gccApple = throw "gccApple is no longer supported"; gccApple = throw "gccApple is no longer supported";
libstdcxxHook = makeSetupHook
{ substitutions = { gcc = gcc-unwrapped; }; }
../development/compilers/gcc/libstdc++-hook.sh;
# Can't just overrideCC, because then the stdenv-cross mkDerivation will be # Can't just overrideCC, because then the stdenv-cross mkDerivation will be
# thrown away. TODO: find a better solution for this. # thrown away. TODO: find a better solution for this.
crossLibcStdenv = buildPackages.makeStdenvCross { crossLibcStdenv = buildPackages.makeStdenvCross {
@ -5697,7 +5703,11 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security Foundation; inherit (darwin.apple_sdk.frameworks) Security Foundation;
}; };
go = go_1_8; go_1_9 = callPackage ../development/compilers/go/1.9.nix {
inherit (darwin.apple_sdk.frameworks) Security Foundation;
};
go = go_1_9;
go-repo-root = callPackage ../development/tools/go-repo-root { }; go-repo-root = callPackage ../development/tools/go-repo-root { };
@ -10370,7 +10380,6 @@ with pkgs;
shhopt = callPackage ../development/libraries/shhopt { }; shhopt = callPackage ../development/libraries/shhopt { };
silgraphite = callPackage ../development/libraries/silgraphite {};
graphite2 = callPackage ../development/libraries/silgraphite/graphite2.nix {}; graphite2 = callPackage ../development/libraries/silgraphite/graphite2.nix {};
simavr = callPackage ../development/tools/simavr { }; simavr = callPackage ../development/tools/simavr { };

View File

@ -143,7 +143,9 @@ in {
breathe = callPackage ../development/python-modules/breathe { }; breathe = callPackage ../development/python-modules/breathe { };
browsermob-proxy = callPackage ../development/python-modules/browsermob-proxy {}; browsermob-proxy = if ! isPy3k then
callPackage ../development/python-modules/browsermob-proxy {}
else throw "browsermob-proxy is not supported for ${python.executable}";
bugseverywhere = callPackage ../applications/version-management/bugseverywhere {}; bugseverywhere = callPackage ../applications/version-management/bugseverywhere {};