syncthing: remove runtime dependency on go
The hack used here is shamelessly stolen from buildGoPackage. If it is going to be applied to more expressions, it may make sense to factor it out so it can be shared.
This commit is contained in:
parent
b8b7832219
commit
b91fa0f477
@ -1,4 +1,10 @@
|
||||
{ stdenv, lib, fetchFromGitHub, go, pkgs }:
|
||||
let
|
||||
removeExpr = ref: ''
|
||||
sed -i "s,${ref},$(echo "${ref}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" \
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.14.18";
|
||||
@ -42,6 +48,10 @@ stdenv.mkDerivation rec {
|
||||
--replace /usr/bin/syncthing $out/bin/syncthing
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
find $out/bin -type f -exec ${removeExpr go} '{}' '+'
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://www.syncthing.net/;
|
||||
description = "Open Source Continuous File Synchronization";
|
||||
|
Loading…
Reference in New Issue
Block a user