From 051bc353d06c86602f9af078cae4d839b819ca23 Mon Sep 17 00:00:00 2001 From: Diego Medina Date: Sat, 7 Dec 2019 21:45:25 -0500 Subject: [PATCH] go: do not replace path to mime.types --- pkgs/development/compilers/go/1.13.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/go/1.13.nix b/pkgs/development/compilers/go/1.13.nix index aad9ab9c68e..4354529a58c 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)