about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorDiego Medina <fmpwizard@gmail.com>2019-12-07 21:45:25 -0500
committerDiego Medina <fmpwizard@gmail.com>2019-12-08 07:20:23 -0500
commit051bc353d06c86602f9af078cae4d839b819ca23 (patch)
treeb88e0cb206d21f129b61ad9bb3adf89c9da2a6b3 /pkgs
parent5a0be78562c7de3daa450ee2c4698842e8ff7f8c (diff)
downloadnixlib-051bc353d06c86602f9af078cae4d839b819ca23.tar
nixlib-051bc353d06c86602f9af078cae4d839b819ca23.tar.gz
nixlib-051bc353d06c86602f9af078cae4d839b819ca23.tar.bz2
nixlib-051bc353d06c86602f9af078cae4d839b819ca23.tar.lz
nixlib-051bc353d06c86602f9af078cae4d839b819ca23.tar.xz
nixlib-051bc353d06c86602f9af078cae4d839b819ca23.tar.zst
nixlib-051bc353d06c86602f9af078cae4d839b819ca23.zip
go: do not replace path to mime.types
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/go/1.13.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/compilers/go/1.13.nix b/pkgs/development/compilers/go/1.13.nix
index aad9ab9c68ef..4354529a58cd 100644
--- a/pkgs/development/compilers/go/1.13.nix
+++ b/pkgs/development/compilers/go/1.13.nix
@@ -57,8 +57,8 @@ stdenv.mkDerivation rec {
       --replace '#!/usr/bin/env bash' '#!${runtimeShell}'
 
     # Patch the mimetype database location which is missing on NixOS.
-    substituteInPlace src/mime/type_unix.go \
-      --replace '/etc/mime.types' '${mailcap}/etc/mime.types'
+    # 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)