Merge pull request #54377 from rnhmjoj/go-mime
go: patch missing mimetype database
This commit is contained in:
commit
1b998ce854
|
@ -1,5 +1,6 @@
|
||||||
{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
|
{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
|
||||||
, perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation
|
, perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation
|
||||||
|
, mailcap
|
||||||
, buildPackages, targetPackages }:
|
, buildPackages, targetPackages }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -56,6 +57,10 @@ stdenv.mkDerivation rec {
|
||||||
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
|
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
|
||||||
--replace '#!/usr/bin/env bash' '#!${stdenv.shell}'
|
--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
|
# Disabling the 'os/http/net' tests (they want files not available in
|
||||||
# chroot builds)
|
# chroot builds)
|
||||||
rm src/net/{listen,parse}_test.go
|
rm src/net/{listen,parse}_test.go
|
||||||
|
|
Loading…
Reference in New Issue