Merge pull request #54377 from rnhmjoj/go-mime

go: patch missing mimetype database
This commit is contained in:
Silvan Mosberger 2019-01-24 19:50:38 +01:00 committed by GitHub
commit 1b998ce854
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
, perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation
, mailcap
, buildPackages, targetPackages }:
let
@ -56,6 +57,10 @@ stdenv.mkDerivation rec {
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
--replace '#!/usr/bin/env bash' '#!${stdenv.shell}'
# Patch the mimetype database location which is missing on NixOS.
substituteInPlace src/mime/type_unix.go \
--replace '/etc/mime.types' '${mailcap}/etc/mime.types'
# Disabling the 'os/http/net' tests (they want files not available in
# chroot builds)
rm src/net/{listen,parse}_test.go