diff options
34 files changed, 1003 insertions, 119 deletions
diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index a0dccc859883..fdd127e5541f 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -490,8 +490,9 @@ rec { # ARM else if platform.isAarch32 then let - version = platform.parsed.cpu.version or ""; - in if lib.versionOlder version "6" then sheevaplug + version = platform.parsed.cpu.version or null; + in if version == null then pcBase + else if lib.versionOlder version "6" then sheevaplug else if lib.versionOlder version "7" then raspberrypi else armv7l-hf-multiplatform else if platform.isAarch64 then aarch64-multiplatform diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ef99c09d3c48..ce4a83b70a0f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -70,6 +70,12 @@ githubId = 7414843; name = "Nicholas von Klitzing"; }; + _3noch = { + email = "eacameron@gmail.com"; + github = "3noch"; + githubId = 882455; + name = "Elliot Cameron"; + }; a1russell = { email = "adamlr6+pub@gmail.com"; github = "a1russell"; diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index 20526c8c6c56..1a29ed8b9785 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchzip, wxGTK30, pkgconfig, file, gettext, libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame, expat, libid3tag, ffmpeg_3, soundtouch, /*, portaudio - given up fighting their portaudio.patch */ - autoconf, automake, libtool - }: + cmake +}: with stdenv.lib; @@ -15,16 +15,8 @@ stdenv.mkDerivation rec { sha256 = "1xk0piv72d2xd3p7igr916fhcbrm76fhjr418k1rlqdzzg1hfljn"; }; - preConfigure = /* we prefer system-wide libs */ '' - autoreconf -vi # use system libraries - - # we will get a (possibly harmless) warning during configure without this - substituteInPlace configure \ - --replace /usr/bin/file ${file}/bin/file - ''; - - configureFlags = [ - "--with-libsamplerate" + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" ]; # audacity only looks for lame and ffmpeg at runtime, so we need to link them in manually @@ -43,15 +35,13 @@ stdenv.mkDerivation rec { "-lswscale" ]; - nativeBuildInputs = [ pkgconfig autoconf automake libtool ]; + nativeBuildInputs = [ pkgconfig cmake ]; buildInputs = [ file gettext wxGTK30 expat alsaLib libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil wxGTK30.gtk ffmpeg_3 libmad lame libvorbis flac soundtouch ]; #ToDo: detach sbsms - enableParallelBuilding = true; - dontDisableStatic = true; doCheck = false; # Test fails diff --git a/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix index 6841cd6e75d9..1e2a61a169af 100644 --- a/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix +++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix @@ -1,23 +1,77 @@ -{ fetchurl, bitwig-studio1, pulseaudio, libjack2, xorg }: +{ stdenv, fetchurl, alsaLib, cairo, dpkg, freetype +, gdk-pixbuf, glib, gtk3, lib, xorg +, libglvnd, libjack2, ffmpeg_3 +, libxkbcommon, xdg_utils, zlib, pulseaudio +, wrapGAppsHook, makeWrapper }: -bitwig-studio1.overrideAttrs (oldAttrs: rec { - name = "bitwig-studio-${version}"; - version = "3.2.8"; +stdenv.mkDerivation rec { + pname = "bitwig-studio"; + version = "3.3.1"; src = fetchurl { - url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb"; - sha256 = "18ldgmnv7bigb4mch888kjpf4abalpiwmlhwd7rjb9qf6p72fhpj"; + url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb"; + sha256 = "0f7xysk0cl48q7i28m25hasmrp30grgm3kah0s7xmkjgm33887pi"; }; - buildInputs = oldAttrs.buildInputs ++ [ xorg.libXtst ]; + nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ]; - runtimeDependencies = [ pulseaudio libjack2 ]; + unpackCmd = '' + mkdir -p root + dpkg-deb -x $curSrc root + ''; + + dontBuild = true; + dontWrapGApps = true; # we only want $gappsWrapperArgs here + + buildInputs = with xorg; [ + alsaLib cairo freetype gdk-pixbuf glib gtk3 libxcb xcbutil xcbutilwm zlib libXtst libxkbcommon pulseaudio libjack2 libX11 libglvnd libXcursor stdenv.cc.cc.lib + ]; + + binPath = lib.makeBinPath [ + xdg_utils ffmpeg_3 + ]; + + ldLibraryPath = lib.strings.makeLibraryPath buildInputs; installPhase = '' - ${oldAttrs.installPhase} + mkdir -p $out/bin + cp -r opt/bitwig-studio $out/libexec + ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio + cp -r usr/share $out/share + substitute usr/share/applications/bitwig-studio.desktop \ + $out/share/applications/bitwig-studio.desktop \ + --replace /usr/bin/bitwig-studio $out/bin/bitwig-studio + ''; + + postFixup = '' + # patchelf fails to set rpath on BitwigStudioEngine, so we use + # the LD_LIBRARY_PATH way + + find $out -type f -executable \ + -not -name '*.so.*' \ + -not -name '*.so' \ + -not -name '*.jar' \ + -not -path '*/resources/*' | \ + while IFS= read -r f ; do + patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f + wrapProgram $f \ + "''${gappsWrapperArgs[@]}" \ + --prefix PATH : "${binPath}" \ + --prefix LD_LIBRARY_PATH : "${ldLibraryPath}" + done - # recover commercial jre - rm -f $out/libexec/lib/jre - cp -r opt/bitwig-studio/lib/jre $out/libexec/lib ''; -}) + + meta = with stdenv.lib; { + description = "A digital audio workstation"; + longDescription = '' + Bitwig Studio is a multi-platform music-creation system for + production, performance and DJing, with a focus on flexible + editing tools and a super-fast workflow. + ''; + homepage = "https://www.bitwig.com/"; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ bfortz michalrus mrVanDalo ]; + }; +} diff --git a/pkgs/applications/audio/geonkick/default.nix b/pkgs/applications/audio/geonkick/default.nix index 804aaf75febe..0e6f45194e55 100644 --- a/pkgs/applications/audio/geonkick/default.nix +++ b/pkgs/applications/audio/geonkick/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "geonkick"; - version = "2.5.1"; + version = "2.6.1"; src = fetchFromGitLab { owner = "iurie-sw"; repo = pname; rev = "v${version}"; - sha256 = "14svwrxqw15j6wjy3x8s28yyrafa31bm7d1ns5h6gvpndccwc1kw"; + sha256 = "1l647j11pb9lkknnh4q99mmfcvr644b02lfcdjh98z60vqm1s54c"; }; nativeBuildInputs = [ cmake pkg-config ]; diff --git a/pkgs/applications/misc/clipmenu/default.nix b/pkgs/applications/misc/clipmenu/default.nix index 3227792d6a2f..f616e86c5b77 100644 --- a/pkgs/applications/misc/clipmenu/default.nix +++ b/pkgs/applications/misc/clipmenu/default.nix @@ -1,33 +1,43 @@ -{ clipnotify, makeWrapper, xsel, dmenu, util-linux, gawk, stdenv, fetchFromGitHub, fetchpatch, lib }: -let - runtimePath = lib.makeBinPath [ clipnotify xsel dmenu util-linux gawk ]; -in +{ stdenv +, lib +, fetchFromGitHub +, makeWrapper +, clipnotify +, coreutils +, dmenu +, gawk +, util-linux +, xdotool +, xsel +}: stdenv.mkDerivation rec { pname = "clipmenu"; - version = "6.1.0"; + version = "6.2.0"; src = fetchFromGitHub { owner = "cdown"; repo = "clipmenu"; rev = version; - sha256 = "0ddj5xcwrdb2qvrndvhv8j6swcqc8dvv5i00pqk35rfk5mrl4hwv"; + sha256 = "sha256-nvctEwyho6kl4+NXi76jT2kG7nchmI2a7mgxlgjXA5A="; }; - - patches = [ - (fetchpatch { - url = "https://github.com/cdown/clipmenu/commit/443b58583ef216e2405e4a38d401f7c36386d21e.patch"; - sha256 = "12m4rpw7jbr31c919llbsmn8dcf7yh9aijln4iym6h2lylzqzzdz"; - }) - ]; - + + postPatch = '' + sed -i init/clipmenud.service \ + -e "s,/usr/bin,$out/bin," + ''; + makeFlags = [ "PREFIX=$(out)" ]; buildInputs = [ makeWrapper ]; nativeBuildInputs = [ xsel clipnotify ]; - installPhase = '' - for bin in $out/bin/*; do - wrapProgram "$bin" --prefix PATH : "${runtimePath}" - done + postFixup = '' + sed -i "$out/bin/clipctl" -e 's,clipmenud\$,\.clipmenud-wrapped\$,' + + wrapProgram "$out/bin/clipmenu" \ + --prefix PATH : "${lib.makeBinPath [ xsel ]}" + + wrapProgram "$out/bin/clipmenud" \ + --set PATH "${lib.makeBinPath [ clipnotify coreutils gawk util-linux xdotool xsel ]}" ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/misc/herbe/default.nix b/pkgs/applications/misc/herbe/default.nix new file mode 100644 index 000000000000..0d05228b63eb --- /dev/null +++ b/pkgs/applications/misc/herbe/default.nix @@ -0,0 +1,33 @@ +{ stdenv, lib, fetchFromGitHub, libX11, libXft, freetype, patches ? [ ], + extraLibs ? [ ] }: + +stdenv.mkDerivation rec { + pname = "herbe"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "dudik"; + repo = pname; + rev = version; + sha256 = "0358i5jmmlsvy2j85ij7m1k4ar2jr5lsv7y1c58dlf9710h186cv"; + }; + + inherit patches; + + postPatch = '' + sed -i 's_/usr/include/freetype2_${freetype.dev}/include/freetype2_' Makefile + ''; + + buildInputs = [ libX11 libXft freetype ] ++ extraLibs; + + makeFlags = [ "PREFIX=$(out)" ]; + + meta = with lib; { + description = "Daemon-less notifications without D-Bus"; + homepage = "https://github.com/dudik/herbe"; + license = licenses.mit; + # NOTE: Could also work on 'unix'. + platforms = platforms.linux; + maintainers = with maintainers; [ wishfort36 ]; + }; +} diff --git a/pkgs/applications/misc/terminal-typeracer/default.nix b/pkgs/applications/misc/terminal-typeracer/default.nix index fa68703e8c0f..bfa84ebbb6c0 100644 --- a/pkgs/applications/misc/terminal-typeracer/default.nix +++ b/pkgs/applications/misc/terminal-typeracer/default.nix @@ -10,16 +10,16 @@ rustPlatform.buildRustPackage rec { pname = "terminal-typeracer"; - version = "2.0.2"; + version = "2.0.4"; src = fetchFromGitLab { owner = "ttyperacer"; repo = pname; rev = "v${version}"; - sha256 = "187xrqxalk2gxa22ki5q092llvliddrsc68cg4dvvy2xzq254jfy"; + sha256 = "RjGHY6KN6thxbg9W5FRwaAmUeD+5/WCeMCvzFHqZ+J4="; }; - cargoSha256 = "0ky8m23fjjbv7fr9776fjczpg0d43jxwnjxjpwz56jpynwnihfkl"; + cargoSha256 = "VSwku0rtQECirCHx2CXe72gCA+p3DdPC4YYwEYu8WfM="; buildInputs = [ openssl sqlite ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ]; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/development/arduino/platformio/default.nix b/pkgs/development/arduino/platformio/default.nix index 248d07adf6e1..194385e79529 100644 --- a/pkgs/development/arduino/platformio/default.nix +++ b/pkgs/development/arduino/platformio/default.nix @@ -4,14 +4,14 @@ let callPackage = newScope self; - version = "5.0.3"; + version = "5.0.4"; # pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964 src = fetchFromGitHub { owner = "platformio"; repo = "platformio-core"; rev = "v${version}"; - sha256 = "0sf5dy0cmhy66rmk0hq1by7nrmf7qz0a99hrk55dpbp6r6vnk3hw"; + sha256 = "15jnhlhkk9z6cyzxw065r3080dqan951klwf65p152vfzg79wf84"; }; self = { diff --git a/pkgs/development/compilers/go/2-dev.nix b/pkgs/development/compilers/go/2-dev.nix new file mode 100644 index 000000000000..44ee67ca8f6a --- /dev/null +++ b/pkgs/development/compilers/go/2-dev.nix @@ -0,0 +1,262 @@ +{ pkgs, stdenv, fetchurl, fetchgit, tzdata, iana-etc, runCommand +, perl, which, pkgconfig, patch, procps, pcre, cacert, Security, Foundation +, mailcap, runtimeShell +, buildPackages +, pkgsBuildTarget +, fetchpatch +}: + +let + + inherit (stdenv.lib) optionals optionalString; + + goBootstrap = runCommand "go-bootstrap" {} '' + mkdir $out + cp -rf ${buildPackages.go_bootstrap}/* $out/ + chmod -R u+w $out + find $out -name "*.c" -delete + cp -rf $out/bin/* $out/share/go/bin/ + ''; + + goarch = platform: { + "i686" = "386"; + "x86_64" = "amd64"; + "aarch64" = "arm64"; + "arm" = "arm"; + "armv5tel" = "arm"; + "armv6l" = "arm"; + "armv7l" = "arm"; + "powerpc64le" = "ppc64le"; + }.${platform.parsed.cpu.name} or (throw "Unsupported system"); + + # We need a target compiler which is still runnable at build time, + # to handle the cross-building case where build != host == target + targetCC = pkgsBuildTarget.targetPackages.stdenv.cc; +in + +stdenv.mkDerivation rec { + pname = "go"; + version = "2"; + + src = fetchgit { + url = https://go.googlesource.com/go; + rev = "abe4d3dce12252ed09216eaa67b7dab8c8922537"; + sha256 = "sha256:1d46w8426148q81fvrifx9glgn402jvf29n44i8j8g1pvzkfckh6"; + }; + + # perl is used for testing go vet + nativeBuildInputs = [ perl which pkgconfig patch procps ]; + buildInputs = [ cacert pcre ] + ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] + ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; + + depsTargetTargetPropagated = optionals stdenv.isDarwin [ Security Foundation ]; + + hardeningDisable = [ "all" ]; + + prePatch = '' + echo '${version}' > VERSION + 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' '#!${runtimeShell}' + + # Patch the mimetype database location which is missing on NixOS. + # but also allow static binaries built with NixOS to run outside nix + sed -i 's,\"/etc/mime.types,"${mailcap}/etc/mime.types\"\,\n\t&,' src/mime/type_unix.go + + # 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 + # Fails on aarch64 + sed -i '/TestFallocate/aif true \{ return\; \}' src/cmd/link/internal/ld/fallocate_test.go + # Skip this test since ssl patches mess it up. + sed -i '/TestLoadSystemCertsLoadColonSeparatedDirs/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go + # Disable another PIE test which breaks. + sed -i '/TestTrivialPIE/aif true \{ return\; \}' misc/cgo/testshared/shared_test.go + # Disable the BuildModePie test + sed -i '/TestBuildmodePIE/aif true \{ return\; \}' src/cmd/go/go_test.go + # Disable the unix socket test + sed -i '/TestShutdownUnix/aif true \{ return\; \}' src/net/net_test.go + # Disable the hostname test + sed -i '/TestHostname/aif true \{ return\; \}' src/os/os_test.go + # ParseInLocation fails the test + sed -i '/TestParseInSydney/aif true \{ return\; \}' 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/aif true \{ return\; \}' src/cmd/go/go_test.go + # Remove the timezone naming test + sed -i '/TestLoadFixed/aif true \{ return\; \}' src/time/time_test.go + # Remove disable setgid test + sed -i '/TestRespectSetgidDir/aif true \{ return\; \}' src/cmd/go/internal/work/build_test.go + # Remove cert tests that conflict with NixOS's cert resolution + sed -i '/TestEnvVars/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go + # TestWritevError hangs sometimes + sed -i '/TestWritevError/aif true \{ return\; \}' src/net/writev_test.go + # TestVariousDeadlines fails sometimes + sed -i '/TestVariousDeadlines/aif true \{ return\; \}' src/net/timeout_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 '' + # prepend the nix path to the zoneinfo files but also leave the original value for static binaries + # that run outside a nix server + sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go + + '' + optionalString stdenv.isAarch32 '' + echo '#!${runtimeShell}' > 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/aif true \{ return\; \}' src/os/os_test.go + sed -i '/TestCredentialNoSetGroups/aif true \{ return\; \}' src/os/exec/exec_posix_test.go + sed -i '/TestRead0/aif true \{ return\; \}' src/os/os_test.go + sed -i '/TestSystemRoots/aif true \{ return\; \}' src/crypto/x509/root_darwin_test.go + + sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/aif true \{ return\; \}' src/cmd/go/go_test.go + sed -i '/TestBuildDashIInstallsDependencies/aif true \{ return\; \}' src/cmd/go/go_test.go + + sed -i '/TestDisasmExtld/aif true \{ return\; \}' src/cmd/objdump/objdump_test.go + + sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go + + # TestCurrent fails because Current is not implemented on Darwin + sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go + sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go + + touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd + ''; + + patches = [ + ./remove-tools-1.11.patch + ./ssl-cert-file-2-dev.patch + ./remove-test-pie-1.15.patch + ./creds-test.patch + ./go-1.9-skip-flaky-19608.patch + ./go-1.9-skip-flaky-20072.patch + ./skip-external-network-tests-1.15.patch + ./skip-nohup-tests.patch + ./skip-cgo-tests-1.15.patch + ] ++ [ + # breaks under load: https://github.com/golang/go/issues/25628 + (if stdenv.isAarch32 + then ./skip-test-extra-files-on-aarch32-1.14.patch + else ./skip-test-extra-files-on-386-1.14.patch) + ]; + + postPatch = '' + find . -name '*.orig' -exec rm {} ';' + ''; + + GOOS = stdenv.targetPlatform.parsed.kernel.name; + GOARCH = goarch stdenv.targetPlatform; + # GOHOSTOS/GOHOSTARCH must match the building system, not the host system. + # Go will nevertheless build a for host system that we will copy over in + # the install phase. + GOHOSTOS = stdenv.buildPlatform.parsed.kernel.name; + GOHOSTARCH = goarch stdenv.buildPlatform; + + # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those + # to be different from CC/CXX + CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + "${targetCC}/bin/${targetCC.targetPrefix}cc" + else + null; + CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then + "${targetCC}/bin/${targetCC.targetPrefix}c++" + else + null; + + GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]); + GO386 = 387; # from Arch: don't assume sse2 on i686 + CGO_ENABLED = 1; + # Hopefully avoids test timeouts on Hydra + GO_TEST_TIMEOUT_SCALE = 3; + + # Indicate that we are running on build infrastructure + # Some tests assume things like home directories and users exists + GO_BUILDER_NAME = "nix"; + + GOROOT_BOOTSTRAP="${goBootstrap}/share/go"; + + postConfigure = '' + export GOCACHE=$TMPDIR/go-cache + # this is compiled into the binary + export GOROOT_FINAL=$out/share/go + + export PATH=$(pwd)/bin:$PATH + + ${optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' + # Independent from host/target, CC should produce code for the building system. + # We only set it when cross-compiling. + export CC=${buildPackages.stdenv.cc}/bin/cc + ''} + ulimit -a + ''; + + postBuild = '' + (cd src && ./make.bash) + ''; + + doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin; + + checkPhase = '' + runHook preCheck + (cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild) + runHook postCheck + ''; + + preInstall = '' + rm -r pkg/obj + # Contains the wrong perl shebang when cross compiling, + # since it is not used for anything we can deleted as well. + rm src/regexp/syntax/make_perl_groups.pl + '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then '' + mv bin/*_*/* bin + rmdir bin/*_* + ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH} + ''} + '' else if (stdenv.hostPlatform != stdenv.targetPlatform) then '' + rm -rf bin/*_* + ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' + rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH} + ''} + '' else ""); + + installPhase = '' + runHook preInstall + mkdir -p $GOROOT_FINAL + cp -a bin pkg src lib misc api doc $GOROOT_FINAL + ln -s $GOROOT_FINAL/bin $out/bin + runHook postInstall + ''; + + disallowedReferences = [ goBootstrap ]; + + meta = with stdenv.lib; { + branch = "dev.go2go"; + homepage = "http://golang.org/"; + description = "The Go Programming language"; + license = licenses.bsd3; + maintainers = teams.golang.members ++ [ maintainers._3noch ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/pkgs/development/compilers/go/ssl-cert-file-2-dev.patch b/pkgs/development/compilers/go/ssl-cert-file-2-dev.patch new file mode 100644 index 000000000000..6146880f7a03 --- /dev/null +++ b/pkgs/development/compilers/go/ssl-cert-file-2-dev.patch @@ -0,0 +1,45 @@ +diff --git a/src/crypto/x509/root_darwin_amd64.go b/src/crypto/x509/root_darwin_amd64.go +index ce88de025e..258ecc45d1 100644 +--- a/src/crypto/x509/root_darwin_amd64.go ++++ b/src/crypto/x509/root_darwin_amd64.go +@@ -10,6 +10,7 @@ import ( + "bytes" + macOS "crypto/x509/internal/macos" + "fmt" ++ "io/ioutil" + "os" + "strings" + ) +@@ -25,6 +26,14 @@ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate + var loadSystemRootsWithCgo func() (*CertPool, error) + + func loadSystemRoots() (*CertPool, error) { ++ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" { ++ data, err := ioutil.ReadFile(file) ++ if err == nil { ++ roots := NewCertPool() ++ roots.AppendCertsFromPEM(data) ++ return roots, nil ++ } ++ } + var trustedRoots []*Certificate + untrustedRoots := make(map[string]bool) + +diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go +index b48e618a65..195c1ff25a 100644 +--- a/src/crypto/x509/root_unix.go ++++ b/src/crypto/x509/root_unix.go +@@ -42,6 +42,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 != "" { diff --git a/pkgs/development/interpreters/self/default.nix b/pkgs/development/interpreters/self/default.nix index cf62399adc64..0d5cc061f591 100644 --- a/pkgs/development/interpreters/self/default.nix +++ b/pkgs/development/interpreters/self/default.nix @@ -1,6 +1,6 @@ -{ fetchgit, stdenv, xorg, makeWrapper, ncurses, cmake }: +{ stdenv, fetchFromGitHub, libX11, libXext, makeWrapper, ncurses, cmake }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { # The Self wrapper stores source in $XDG_DATA_HOME/self or ~/.local/share/self # so that it can be written to when using the Self transposer. Running 'Self' # after installation runs without an image. You can then build a Self image with: @@ -11,16 +11,18 @@ stdenv.mkDerivation { # This image can later be started with: # $ Self -s myimage.snap # - version = "4.5.0"; pname = "self"; + version = "2017.1"; - src = fetchgit { - url = "https://github.com/russellallen/self"; - rev = "d16bcaad3c5092dae81ad0b16d503f2a53b8ef86"; - sha256 = "1dhs6209407j0ll9w9id31vbawdrm9nz1cjak8g8hixrw1nid4i5"; + src = fetchFromGitHub { + owner = "russellalle |