syncthing: use removeReferencesTo
This commit is contained in:
parent
603b799bcb
commit
a80e4d76af
1 changed files with 4 additions and 9 deletions
|
@ -1,11 +1,6 @@
|
|||
{ stdenv, lib, fetchFromGitHub, go, pkgs }:
|
||||
{ stdenv, lib, fetchFromGitHub, go, pkgs, removeReferencesTo }:
|
||||
|
||||
let
|
||||
removeExpr = ref: ''
|
||||
sed -i "s,${ref},$(echo "${ref}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" \
|
||||
'';
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.14.24";
|
||||
name = "syncthing-${version}";
|
||||
|
||||
|
@ -16,7 +11,7 @@ in stdenv.mkDerivation rec {
|
|||
sha256 = "15jjk49ibry7crc3sw5zg09zsm5ir0ph5c0f3acas66wd02rnvl1";
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
buildInputs = [ go removeReferencesTo ];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p src/github.com/syncthing
|
||||
|
@ -48,7 +43,7 @@ in stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
preFixup = ''
|
||||
find $out/bin -type f -exec ${removeExpr go} '{}' '+'
|
||||
find $out/bin -type f -exec remove-references-to -t ${go} '{}' '+'
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
Loading…
Reference in a new issue