3
0
Fork 0
forked from mirrors/nixpkgs

go: patch missing mimetype database

This commit is contained in:
rnhmjoj 2019-01-20 00:58:57 +01:00
parent 3956a8421f
commit ba7266c629
No known key found for this signature in database
GPG key ID: 91BE884FBA4B591A

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